From 89bea3ae2043f2b821a3f7e9ae9b9f20ec358805 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期一, 13 十月 2025 17:12:02 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java |   50 ++++++++++++++++++++++++++++++++------------------
 1 files changed, 32 insertions(+), 18 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index 2a0b1c2..00eb38c 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -81,6 +81,9 @@
     @Override
     @Transactional
     public void comb(CombParam param, Long userId, String fxId) {
+        if (Cools.isEmpty(fxId)){
+            throw new CoolException("璇风敤鑷繁鐨勮处鍙风粍鎵�");
+        }
         if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
             throw new CoolException(BaseRes.PARAM);
         }
@@ -89,6 +92,7 @@
                 eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) {
             throw new CoolException(param.getBarcode() + "鏁版嵁缁勬墭妗d腑宸插瓨鍦�");
         }
+
 
         int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", param.getBarcode()));
         int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", param.getBarcode()));
@@ -105,26 +109,26 @@
         Date now = new Date();
 
         //杩涜鎵瑰彿绛涢�夛紝鎵瑰彿鍙兘鍞竴
-        Set<String> batchs = new HashSet<>();
-        List<String> strings = new ArrayList<>();
+//        Set<String> batchs = new HashSet<>();
+//        List<String> strings = new ArrayList<>();
 
 
-        for (CombParam.CombMat mat : param.getCombMats()) {
-            if (Cools.isEmpty(mat.getBatch())) {
-                continue;
-            }
-            batchs.add(mat.getBatch());
-            strings.add(mat.getBatch());
-            WaitPakin waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("batch", mat.getBatch()));
-            WrkDetl batch = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("batch", mat.getBatch()));
-            LocDetl batch1 = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("batch", mat.getBatch()));
-            if (!Cools.isEmpty(batch) || !Cools.isEmpty(batch1) || !Cools.isEmpty(waitPakin)) {
-                throw new CoolException("璇ョ墿鏂欐壒鍙�" + mat.getBatch() + "宸插湪鍏ュ簱閫氱煡妗c�佷换鍔℃槑缁嗗拰搴撳瓨涓瓨鍦�");
-            }
-        }
-        if (batchs.size() < strings.size()) {
-            throw new CoolException("鏈夐噸澶嶇殑鐗╂枡鎵瑰彿");
-        }
+//        for (CombParam.CombMat mat : param.getCombMats()) {
+//            if (Cools.isEmpty(mat.getBatch())) {
+//                continue;
+//            }
+//            batchs.add(mat.getBatch());
+//            strings.add(mat.getBatch());
+//            WaitPakin waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("batch", mat.getBatch()));
+//            WrkDetl batch = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>().eq("batch", mat.getBatch()));
+//            LocDetl batch1 = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("batch", mat.getBatch()));
+//            if (!Cools.isEmpty(batch) || !Cools.isEmpty(batch1) || !Cools.isEmpty(waitPakin)) {
+//                throw new CoolException("璇ョ墿鏂欐壒鍙�" + mat.getBatch() + "宸插湪鍏ュ簱閫氱煡妗c�佷换鍔℃槑缁嗗拰搴撳瓨涓瓨鍦�");
+//            }
+//        }
+//        if (batchs.size() < strings.size()) {
+//            throw new CoolException("鏈夐噸澶嶇殑鐗╂枡鎵瑰彿");
+//        }
         int i = 1;
         // 鏃犲崟缁勬墭
         if (Cools.isEmpty(param.getOrderNo())) {
@@ -132,7 +136,16 @@
             // 鐢熸垚鍏ュ簱閫氱煡妗�
             List<DetlDto> detlDtos = new ArrayList<>();
             param.getCombMats().forEach(elem -> {
+                // 鍒ゆ柇鏄惁鏈夌浉鍚屾潯鐮佺殑鏁版嵁
+                if (!Cools.isEmpty(elem.getBc())){
+                    if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
+                            eq("three_code", elem.getBc())) > 0) {
+                        throw new CoolException( elem.getBc() + "鏁版嵁缁勬墭妗d腑宸插瓨鍦�");
+                    }
+                }
+
                 DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme());
+                detlDto.setBc(elem.getBc());
                 if (DetlDto.has(detlDtos, detlDto)) {
                     DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
                     assert one != null;
@@ -154,6 +167,7 @@
                 WaitPakin waitPakin = new WaitPakin();
                 waitPakin.sync(mat);
                 waitPakin.setBatch(detlDto.getBatch());
+                waitPakin.setThreeCode(detlDto.getBc());
                 waitPakin.setZpallet(param.getBarcode());   // 鎵樼洏鐮�
                 waitPakin.setIoStatus("N");     // 鍏ュ嚭鐘舵��
                 waitPakin.setAnfme(detlDto.getAnfme());  // 鏁伴噺

--
Gitblit v1.9.1