From cc8308e2ba418db7545bbaf5dedcb2e3541351d8 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期三, 22 四月 2026 14:35:37 +0800
Subject: [PATCH] feat(production): 添加班组信息和补产数量支持

---
 src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java b/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
index 12af6c7..d8c7881 100644
--- a/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
+++ b/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
@@ -185,12 +185,15 @@
         if (!salesLedgers.isEmpty()) {
             throw new RuntimeException("瀹㈡埛妗f涓嬫湁閿�鍞悎鍚岋紝璇峰厛鍒犻櫎閿�鍞悎鍚�");
         }
-        //  鍒犻櫎瀹㈡埛鐨勫悓鏃朵篃闇�瑕佸垹闄ゅ搴旂殑瀹㈡埛璺熼殢銆侀檮浠跺拰鍥炶鎻愰啋
-        for (Long id : ids) {
-            customerFollowUpService.deleteByCustomerId(id);
-            customerReturnVisitService.deleteByCustomerId(id);
+        List<CustomerPrivatePool> customerPrivatePools = customerPrivatePoolMapper.selectList(new QueryWrapper<CustomerPrivatePool>().lambda().in(CustomerPrivatePool::getCustomerId, idList));
+        if (!customerPrivatePools.isEmpty()) {
+            throw new RuntimeException("瀹㈡埛妗f涓嬫湁瀹㈡埛绉佹捣锛岃鍏堟敹鍥炵娴锋暟鎹�");
         }
-
+        //  鍒犻櫎瀹㈡埛鐨勫悓鏃朵篃闇�瑕佸垹闄ゅ搴旂殑瀹㈡埛璺熼殢銆侀檮浠跺拰鍥炶鎻愰啋
+//        for (Long id : ids) {
+//            customerFollowUpService.deleteByCustomerId(id);
+//            customerReturnVisitService.deleteByCustomerId(id);
+//        }
         return customerMapper.deleteBatchIds(idList);
     }
 

--
Gitblit v1.9.3