From f9a1f1b0a23bb8bc33a4a649f61f9efcce349279 Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期四, 10 八月 2023 13:20:01 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 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 54c52e1..41f34cc 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -93,7 +93,10 @@
 
         int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode()));
         int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode()));
-        if (countLoc > 0 || countWrk > 0) {
+//        int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode())
+//                                            .last(" wrk_no IN ( SELECT wrk_no FROM asr_wrk_mast WHERE wrk_sts != 15 )"));
+
+        if (countLoc > 0  || countWrk > 0) {
             throw new CoolException("宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
         }
 
@@ -118,6 +121,9 @@
 
             for (DetlDto detlDto : detlDtos) {
                 Mat mat = matService.selectByMatnr(detlDto.getMatnr());
+                if (Cools.isEmpty(detlDto.getBatch())){
+                    detlDto.setBatch("");
+                }
                 if (Cools.isEmpty(mat)) {
                     throw new CoolException(detlDto.getMatnr() + "鍟嗗搧妗f涓嶅瓨鍦�");
                 }
@@ -212,14 +218,14 @@
                 throw new CoolException(combMat.getMatnr() + ":鍟嗗搧鏁伴噺鏈夎锛�");
             }
             if (Cools.isEmpty(combMat.getBatch())){
-                throw new CoolException(combMat.getMatnr() + ":鍟嗗搧鎵瑰彿鏈夎锛�");
+//                throw new CoolException(combMat.getMatnr() + ":鍟嗗搧鎵瑰彿鏈夎锛�");
             }
             ManLocDetl manLocDetl = new ManLocDetl();
             manLocDetl.setLocNo(locno);
             manLocDetl.setNodeId(node.getId());
             manLocDetl.setMaktx(mat.getMaktx());
             manLocDetl.setMatnr(mat.getMatnr());
-            manLocDetl.setBatch(combMat.getBatch());
+            manLocDetl.setBatch(Cools.isEmpty(combMat.getBatch()) ? "" : combMat.getBatch());
             manLocDetl.setAnfme(combMat.getAnfme());
             manLocDetl.setModiTime(now);
             if (!manLocDetlService.insert(manLocDetl)) {

--
Gitblit v1.9.1