From 7d2ee3cef2e0d68ba6400bc5957640d2771bbf4c Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期三, 16 九月 2026 18:05:40 +0800
Subject: [PATCH] refactor: 单据审核改为审批配置状态机(新增:audit接口/审核人字段/DB变更脚本)

---
 yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/refund/CrmRefundController.java |   35 +++++++++++++++++------------------
 1 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/refund/CrmRefundController.java b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/refund/CrmRefundController.java
index 256bcda..e183ca7 100644
--- a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/refund/CrmRefundController.java
+++ b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/refund/CrmRefundController.java
@@ -21,12 +21,11 @@
 
 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
@@ -52,28 +51,28 @@
         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")

--
Gitblit v1.9.3