From 804b34fb9d6735c434ff0ee69fe3d2c7c4292298 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 14 五月 2026 09:12:34 +0800
Subject: [PATCH] Merge branch 'dev_New_pro' of http://114.132.189.42:9002/r/product-inventory-management-after into dev_西宁_青铝绿行

---
 src/main/java/com/ruoyi/production/service/impl/ProductionPlanServiceImpl.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductionPlanServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductionPlanServiceImpl.java
index 8c885cd..20e7eb7 100644
--- a/src/main/java/com/ruoyi/production/service/impl/ProductionPlanServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductionPlanServiceImpl.java
@@ -101,12 +101,13 @@
             throw new BaseException("鍚堝苟澶辫触锛屾墍閫夌敓浜ц鍒掔殑浜у搧鍨嬪彿涓嶄竴鑷�");
         }
 
-        // 宸蹭笅鍙戞垨閮ㄥ垎涓嬪彂鐨勮鍒掍笉鍏佽鍐嶆鍚堝苟
-        boolean hasIssuedPlan = planLists.stream()
+        // 浠呪�滃凡涓嬪彂鈥濊鍒掍笉鍏佽鍐嶆鍙備笌鍚堝苟涓嬪彂锛�
+        // 鈥滃緟涓嬪彂/閮ㄥ垎涓嬪彂鈥濆厑璁哥户缁笅鍙戝墿浣欐暟閲忋��
+        boolean hasFullyIssuedPlan = planLists.stream()
                 .anyMatch(item -> item.getStatus() != null
-                        && (item.getStatus() == PLAN_STATUS_PARTIAL || item.getStatus() == PLAN_STATUS_ISSUED));
-        if (hasIssuedPlan) {
-            throw new BaseException("鍚堝苟澶辫触锛屾墍閫夌敓浜ц鍒掑瓨鍦ㄥ凡涓嬪彂鎴栭儴鍒嗕笅鍙戠殑鏁版嵁");
+                        && item.getStatus() == PLAN_STATUS_ISSUED);
+        if (hasFullyIssuedPlan) {
+            throw new BaseException("鍚堝苟澶辫触锛屾墍閫夌敓浜ц鍒掑瓨鍦ㄥ凡涓嬪彂鐨勬暟鎹�");
         }
 
         // 璁$畻鏈鍙笅鍙戠殑鍓╀綑闇�姹傛�婚噺
@@ -150,6 +151,7 @@
         productionOrder.setProductModelId(firstPlan.getProductModelId());
         productionOrder.setQuantity(assignedQuantity);
         productionOrder.setPlanCompleteTime(productionPlanDto.getPlanCompleteTime());
+        productionOrder.setTeamLeaderUserId(productionPlanDto.getLeaderId());
         if (!productionOrderService.saveProductionOrder(productionOrder)) {
             throw new ServiceException("涓嬪彂澶辫触锛岀敓浜ц鍗曚繚瀛樺け璐�");
         }

--
Gitblit v1.9.3