From 67d3ab41f4989faf4db5f7f95f56b8595dd8eb3b Mon Sep 17 00:00:00 2001
From: tuqin <tuqin@tuqin.cn>
Date: 星期五, 11 九月 2026 09:39:44 +0800
Subject: [PATCH] feat(crm/erp): 新增采购申请、合同管理 Excel 导入(含菜单权限 SQL)

---
 yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseRequestService.java |   85 ++++++++++++++++++++++++------------------
 1 files changed, 49 insertions(+), 36 deletions(-)

diff --git a/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseRequestService.java b/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseRequestService.java
index 569f11c..6f4cc7b 100644
--- a/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseRequestService.java
+++ b/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/service/purchase/ErpPurchaseRequestService.java
@@ -3,17 +3,18 @@
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.request.ErpPurchaseRequestPageReqVO;
 import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.request.ErpPurchaseRequestSaveReqVO;
+import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.request.ErpPurchaseRequestImportExcelVO;
+import cn.iocoder.yudao.module.erp.controller.admin.purchase.vo.request.ErpPurchaseRequestImportRespVO;
 import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpPurchaseRequestDO;
 import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpPurchaseRequestItemDO;
 import jakarta.validation.Valid;
 
 import java.util.Collection;
 import java.util.List;
+import java.util.Map;
 
 /**
  * ERP 閲囪喘鐢宠 Service 鎺ュ彛
- *
- * @author 鑺嬮亾婧愮爜
  */
 public interface ErpPurchaseRequestService {
 
@@ -21,11 +22,17 @@
      * 鍒涘缓閲囪喘鐢宠
      *
      * @param createReqVO 鍒涘缓淇℃伅
-     * @param userId      鐢ㄦ埛缂栧彿锛堢敵璇蜂汉锛�
-     * @param deptId      閮ㄩ棬缂栧彿锛堢敵璇烽儴闂級
      * @return 缂栧彿
      */
-    Long createPurchaseRequest(@Valid ErpPurchaseRequestSaveReqVO createReqVO, Long userId, Long deptId);
+    Long createPurchaseRequest(@Valid ErpPurchaseRequestSaveReqVO createReqVO);
+
+    /**
+     * 瀵煎叆閲囪喘鐢宠
+     *
+     * @param importList 瀵煎叆鏁版嵁锛堟瘡涓�琛� = 涓�鏉℃槑缁嗭紝鐩稿悓閲囪喘鐢宠鍗曞彿鍚堝苟涓轰竴寮犵敵璇凤級
+     * @return 瀵煎叆缁撴灉
+     */
+    ErpPurchaseRequestImportRespVO importPurchaseRequestList(List<ErpPurchaseRequestImportExcelVO> importList);
 
     /**
      * 鏇存柊閲囪喘鐢宠
@@ -58,61 +65,67 @@
     PageResult<ErpPurchaseRequestDO> getPurchaseRequestPage(ErpPurchaseRequestPageReqVO pageReqVO);
 
     /**
-     * 鑾峰緱閲囪喘鐢宠鏄庣粏鍒楄〃
+     * 鑾峰緱閲囪喘鐢宠椤瑰垪琛�
      *
      * @param requestId 閲囪喘鐢宠缂栧彿
-     * @return 閲囪喘鐢宠鏄庣粏鍒楄〃
+     * @return 閲囪喘鐢宠椤瑰垪琛�
      */
     List<ErpPurchaseRequestItemDO> getPurchaseRequestItemListByRequestId(Long requestId);
 
     /**
-     * 鑾峰緱閲囪喘鐢宠鏄庣粏鍒楄〃
+     * 鑾峰緱閲囪喘鐢宠椤� List
      *
      * @param requestIds 閲囪喘鐢宠缂栧彿鏁扮粍
-     * @return 閲囪喘鐢宠鏄庣粏鍒楄〃
+     * @return 閲囪喘鐢宠椤� List
      */
     List<ErpPurchaseRequestItemDO> getPurchaseRequestItemListByRequestIds(Collection<Long> requestIds);
 
     /**
      * 鎻愪氦閲囪喘鐢宠瀹℃壒
      *
-     * @param id                   缂栧彿
-     * @param processDefinitionKey 娴佺▼瀹氫箟 Key锛堢敤鎴烽�夋嫨锛�
-     * @param userId               鐢ㄦ埛缂栧彿
+     * @param id 缂栧彿
+     * @param processDefinitionKey 娴佺▼瀹氫箟 Key
+     * @param userId 鐢ㄦ埛缂栧彿
      */
     void submitPurchaseRequest(Long id, String processDefinitionKey, Long userId);
-
-    /**
-     * 鏇存柊閲囪喘鐢宠瀹℃壒鐘舵��
-     *
-     * @param id        缂栧彿
-     * @param bpmResult BPM 瀹℃壒缁撴灉
-     */
-    void updatePurchaseRequestAuditStatus(Long id, Integer bpmResult);
-
-    /**
-     * 鏍规嵁閲囪喘鐢宠鐢熸垚閲囪喘璁㈠崟
-     *
-     * @param id         閲囪喘鐢宠缂栧彿
-     * @param supplierId 渚涘簲鍟嗙紪鍙�
-     * @param userId     鐢ㄦ埛缂栧彿
-     * @return 閲囪喘璁㈠崟缂栧彿
-     */
-    Long generatePurchaseOrder(Long id, Long supplierId, Long userId);
 
     /**
      * 鑾峰彇閲囪喘鐢宠瀹℃壒娴佺▼鍒楄〃
      *
      * @return 娴佺▼瀹氫箟鍒楄〃
      */
-    List<java.util.Map<String, Object>> getPurchaseRequestApproveProcessDefinitionList();
+    List<Map<String, Object>> getPurchaseRequestApproveProcessDefinitionList();
 
     /**
-     * 鏇存柊閲囪喘鐢宠鐨勫叆搴撶姸鎬�
+     * 鏇存柊閲囪喘鐢宠瀹℃壒缁撴灉锛圔PM 鍥炶皟锛�
      *
-     * @param id       閲囪喘鐢宠缂栧彿
-     * @param inStatus 鍏ュ簱鐘舵��
+     * @param id 缂栧彿
+     * @param bpmResult BPM 瀹℃壒缁撴灉
      */
-    void updatePurchaseRequestInStatus(Long id, Integer inStatus);
+    void updatePurchaseRequestAuditStatus(Long id, Integer bpmResult);
 
-}
+    /**
+     * 鐢熸垚閲囪喘璁㈠崟
+     *
+     * @param id 閲囪喘鐢宠缂栧彿
+     * @param supplierId 渚涘簲鍟嗙紪鍙�
+     * @return 閲囪喘璁㈠崟缂栧彿
+     */
+    Long generatePurchaseOrder(Long id, Long supplierId);
+
+    /**
+     * 閲嶇疆閲囪喘鐢宠鐘舵�侊紙椹冲洖 鈫� 鑽夌锛�
+     *
+     * @param id 缂栧彿
+     */
+    void resetPurchaseRequestStatus(Long id);
+
+    /**
+     * 鏍规嵁缂栧彿鍒楄〃鑾峰彇閲囪喘鐢宠鍒楄〃
+     *
+     * @param ids 缂栧彿鍒楄〃
+     * @return 閲囪喘鐢宠鍒楄〃
+     */
+    List<ErpPurchaseRequestDO> getPurchaseRequestList(List<Long> ids);
+
+}
\ No newline at end of file

--
Gitblit v1.9.3