From 1b188bf36d999590af33cf4a7463fc5e1aa73757 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期三, 15 二月 2023 12:41:31 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 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 63f9a24..1923cd6 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -91,10 +91,18 @@
             throw new CoolException(param.getBarcode() + "鏁版嵁姝e湪杩涜鍏ュ簱");
         }
 
+        if(param.getBarcode().length()!=8){
+            throw new CoolException("鏉$爜闀垮害涓嶆槸8浣�===>>" + param.getBarcode());
+        }
+        if (param.getCombMats().size()>1){
+            throw new CoolException("涓嶅厑璁告贩鏂�===>>" + param.getBarcode());
+        }
+
         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) {
-            throw new CoolException("宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
+        int countwait = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet",param.getBarcode()));
+        if (countLoc > 0 || countWrk > 0 || countwait > 0) {
+            throw new CoolException("缁勬墭妗�/宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
         }
 
         Date now = new Date();
@@ -191,6 +199,7 @@
 
     }
 
+    // 鍟嗗搧涓婃灦
     @Override
     public void onSale(CombParam param) {
         Date now = new Date();
@@ -211,14 +220,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)) {
@@ -227,6 +236,7 @@
         }
     }
 
+    // 鍟嗗搧涓嬫灦
     @Override
     public void offSale(OffSaleParam offSaleParam) {
         ManLocDetl manLocDetl = manLocDetlMapper.selectLocNo0(offSaleParam.getLocNo(), offSaleParam.getMatnr());
@@ -242,6 +252,9 @@
         manLocDetlMapper.updateAnfme0(anfme,manLocDetl.getNodeId());
     }
 
+    // 鏌ユ壘鍟嗗搧
+
+
     @Override
     @Transactional
     public void adjust(MobileAdjustParam param, Long userId) {

--
Gitblit v1.9.1