| | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; |
| | | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| | | import static cn.iocoder.yudao.framework.common.pojo.PageParam.PAGE_SIZE_NONE; |
| | | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| | | |
| | | @Tag(name = "管理后台 - CRM 退费单") |
| | | @RestController |
| | |
| | | return success(true); |
| | | } |
| | | |
| | | @PutMapping("/audit") |
| | | @Operation(summary = "审批退费单(通过/驳回)") |
| | | @PreAuthorize("@ss.hasPermission('crm:refund:update')") |
| | | public CommonResult<Boolean> auditRefund(@Valid @RequestBody CrmRefundAuditReqVO auditReqVO) { |
| | | refundService.auditRefund(auditReqVO); |
| | | return success(true); |
| | | } |
| | | |
| | | @PutMapping("/submit") |
| | | @Operation(summary = "提交退费单审批") |
| | | @Operation(summary = "提交退费单审批(草稿/审核不通过→审批中),审批人由审批配置统一指定") |
| | | @Parameter(name = "id", description = "编号", required = true) |
| | | @PreAuthorize("@ss.hasPermission('crm:refund:update')") |
| | | public CommonResult<Boolean> submitRefund(@RequestParam("id") Long id, |
| | | @RequestParam("processDefinitionKey") String processDefinitionKey) { |
| | | refundService.submitRefund(id, processDefinitionKey, getLoginUserId()); |
| | | public CommonResult<Boolean> submitRefund(@RequestParam("id") Long id) { |
| | | refundService.submitRefund(id); |
| | | return success(true); |
| | | } |
| | | |
| | | @GetMapping("/approve-process-list") |
| | | @Operation(summary = "获得退费单审批流程定义列表") |
| | | @PutMapping("/audit") |
| | | @Operation(summary = "审核退费单(审批中→审核通过/审核不通过),仅审批人本人可操作") |
| | | @PreAuthorize("@ss.hasPermission('crm:refund:audit')") |
| | | public CommonResult<Boolean> auditRefund(@Valid @RequestBody CrmRefundAuditReqVO auditReqVO) { |
| | | refundService.auditRefund(auditReqVO.getId(), auditReqVO.getPass(), auditReqVO.getReviewRemark()); |
| | | return success(true); |
| | | } |
| | | |
| | | @GetMapping("/approver-ids") |
| | | @Operation(summary = "获得退费单的审批人编号集合,供前端判断是否展示审核按钮") |
| | | @PreAuthorize("@ss.hasPermission('crm:refund:query')") |
| | | public CommonResult<List<Map<String, Object>>> getRefundApproveProcessDefinitionList() { |
| | | return success(refundService.getRefundApproveProcessDefinitionList()); |
| | | public CommonResult<Set<Long>> getApproverUserIds() { |
| | | return success(refundService.getRefundApproverUserIds()); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |