| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得回款") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('crm:receivable:query')") |
| | | public CommonResult<CrmReceivableRespVO> getReceivable(@RequestParam("id") Long id) { |
| | | CrmReceivableDO receivable = receivableService.getReceivable(id); |
| | | return success(buildReceivableDetail(receivable)); |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得回款分页") |
| | | @PreAuthorize("@ss.hasPermission('crm:receivable:query')") |
| | | public CommonResult<PageResult<CrmReceivableRespVO>> getReceivablePage(@Valid CrmReceivablePageReqVO pageReqVO) { |
| | | PageResult<CrmReceivableDO> pageResult = receivableService.getReceivablePage(pageReqVO, getLoginUserId()); |
| | | return success(new PageResult<>(buildReceivableDetailList(pageResult.getList()), pageResult.getTotal())); |
| | |
| | | }); |
| | | } |
| | | |
| | | @PutMapping("/submit") |
| | | @Operation(summary = "提交回款审批") |
| | | @PutMapping("/update-status") |
| | | @Operation(summary = "更新回款的状态(审核/反审核)") |
| | | @PreAuthorize("@ss.hasPermission('crm:receivable:update')") |
| | | public CommonResult<Boolean> submitContract(@RequestParam("id") Long id) { |
| | | receivableService.submitReceivable(id, getLoginUserId()); |
| | | public CommonResult<Boolean> updateReceivableStatus(@RequestParam("id") Long id, |
| | | @RequestParam("status") Integer status) { |
| | | receivableService.updateReceivableStatus(id, status); |
| | | return success(true); |
| | | } |
| | | |
| | | @GetMapping("/audit-count") |
| | | @Operation(summary = "获得待审核回款数量") |
| | | @PreAuthorize("@ss.hasPermission('crm:receivable:query')") |
| | | public CommonResult<Long> getAuditReceivableCount() { |
| | | return success(receivableService.getAuditReceivableCount(getLoginUserId())); |
| | | } |