| | |
| | | |
| | | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| | | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; |
| | | import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
| | | |
| | | @Tag(name = "管理后台 - 售后赔付/服务补偿单") |
| | | @RestController |
| | |
| | | } |
| | | |
| | | @PutMapping("/submit") |
| | | @Operation(summary = "提交赔付/服务补偿单审批") |
| | | @Operation(summary = "提交赔付/服务补偿单审批(未提交/审核不通过→审批中),审批人由审批配置统一指定") |
| | | @Parameter(name = "id", description = "编号", required = true) |
| | | @PreAuthorize("@ss.hasPermission('aftersales:compensation:submit')") |
| | | public CommonResult<Boolean> submitCompensation(@RequestParam("id") Long id, |
| | | @RequestParam("processDefinitionKey") String processDefinitionKey) { |
| | | compensationService.submitCompensation(id, processDefinitionKey, getLoginUserId()); |
| | | public CommonResult<Boolean> submitCompensation(@RequestParam("id") Long id) { |
| | | compensationService.submitCompensation(id); |
| | | return success(true); |
| | | } |
| | | |
| | | @PutMapping("/audit") |
| | | @Operation(summary = "审批赔付/服务补偿单(通过/驳回)") |
| | | @Operation(summary = "审核赔付/服务补偿单(审批中→审核通过/审核不通过),仅审批人本人可操作") |
| | | @PreAuthorize("@ss.hasPermission('aftersales:compensation:audit')") |
| | | public CommonResult<Boolean> auditCompensation(@Valid @RequestBody AfterSaleCompensationAuditReqVO auditReqVO) { |
| | | compensationService.auditCompensation(auditReqVO); |
| | | compensationService.auditCompensation(auditReqVO.getId(), auditReqVO.getPass(), auditReqVO.getReviewRemark()); |
| | | return success(true); |
| | | } |
| | | |
| | | @GetMapping("/approve-process-list") |
| | | @Operation(summary = "获得赔付/服务补偿单审批流程定义列表") |
| | | @GetMapping("/approver-ids") |
| | | @Operation(summary = "获得审批人编号集合,供前端判断是否展示审核按钮") |
| | | @PreAuthorize("@ss.hasPermission('aftersales:compensation:query')") |
| | | public CommonResult<List<Map<String, Object>>> getCompensationApproveProcessDefinitionList() { |
| | | return success(compensationService.getCompensationApproveProcessDefinitionList()); |
| | | public CommonResult<Set<Long>> getApproverUserIds() { |
| | | return success(compensationService.getCompensationApproverUserIds()); |
| | | } |
| | | |
| | | // ========== 内部方法:批量拼装关联名称 ========== |