From 5be1b24770e378900c606b428c5f28a8427afb88 Mon Sep 17 00:00:00 2001
From: Administrator <56479841@QQ.COM>
Date: 星期二, 06 六月 2023 15:26:03 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index e104b23..5aafe19 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -471,13 +471,16 @@
                     if (!locDetl.getMatnr().equals(matnr)) {
                         flag = true;
                         break;
+                    }else if (ioWorkType.equals(IoWorkType.CHECK_OUT)){
+                        flag = true;
+                        break;
                     }
                 }
 
                 if (flag) {
                     //褰撳墠宸烽亾瀛樺湪涓嶅悓瑙勬牸鐨勭墿鏂欙紝闇�瑕佽繘琛�101鍏ㄦ澘鍑哄簱
                     // 鑾峰彇璺緞
-                    StaDesc staDesc = staDescService.queryCrnStn(101, locMast.getCrnNo(), staNo.getDevNo(), locMast.getRow1());
+                    StaDesc staDesc = staDescService.queryCrnStn(101, locMast.getCrnNo(), locMast.getCrnNo()==1? 100:200 , locMast.getRow1());
                     if(staDesc == null){
                         throw new CoolException("鍑哄簱璺緞涓嶅瓨鍦�");
                     }
@@ -495,7 +498,7 @@
                     wrkMast.setOutMost(0);
                     wrkMast.setCrnNo(locMast.getCrnNo());
                     wrkMast.setSourceStaNo(staDesc.getCrnStn()); // 婧愮珯
-                    wrkMast.setStaNo(staDesc.getStnNo()); // 鐩爣绔�
+                    wrkMast.setStaNo(locMast.getCrnNo()==1? 100:200); // 鐩爣绔�
                     wrkMast.setSourceLocNo(locMast.getLocNo()); // 婧愬簱浣�
                     wrkMast.setFullPlt("Y"); // 婊℃澘锛歒
                     wrkMast.setPicking("N"); // 鎷f枡
@@ -582,10 +585,15 @@
             LocMast locMast = locMastService.selectById(dto.getLocNo());
 
             //-----------------2023.6.2鍑哄簱鍏煎浠g爜-----------------------
-            List<LocDetl> locDetls = locDetlService.selectByLocNo(locMast.getLocNo());
-            if (locMast.getLocType2() == 1 && locDetls.size() > 1) {
-                //鍗曞搧鍖哄煙鍑哄簱鐗╂枡澶т簬1绉嶏紝寮哄埗鍙樻垚101鍏ㄦ澘鍑哄簱
-                ioType = 101;
+            if (ioType!=107){
+                List<LocDetl> locDetls = locDetlService.selectByLocNo(locMast.getLocNo());
+                if (locMast.getLocType2() == 1 && locDetls.size() > 1) {
+                    //鍗曞搧鍖哄煙鍑哄簱鐗╂枡澶т簬1绉嶏紝寮哄埗鍙樻垚101鍏ㄦ澘鍑哄簱
+                    ioType = 101;
+                    if (staNo.getDevNo()==300){
+                        staNo.setDevNo(200);
+                    }
+                }
             }
             //-----------------2023.6.2鍑哄簱鍏煎浠g爜end-----------------------
 

--
Gitblit v1.9.1