From 3ab9a944e397e4dcfd6c9dfac619ed3f52cc7ba5 Mon Sep 17 00:00:00 2001
From: TQS <56479841@qq.com>
Date: 星期三, 15 二月 2023 18:02:52 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
index 538b1fa..fb369ff 100644
--- a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -209,23 +209,23 @@
                     if (wrkDetls57.isEmpty()) {
                         exceptionHandle("鐩樼偣鍏ュ簱 ===>> 宸ヤ綔鏄庣粏妗d负绌猴紱[workNo={0}]", wrkMast.getWrkNo());
                     }
-//                    if(!Cools.isEmpty(locDetlService.selectByLocNo(wrkMast.getLocNo()))){
-//                        locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo()));
-//                    }
-//                    if (Cools.isEmpty(locDetlService.selectByLocNo(wrkMast.getLocNo()))){
-//                        for (WrkDetl wrkDetl:wrkDetls57){
-//                            LocDetl locDetl = new LocDetl();
-//                            locDetl.sync(wrkDetl);
-//                            locDetl.setLocNo(wrkMast.getLocNo()); // 搴撲綅鍙�
-//                            locDetl.setAnfme(wrkDetl.getAnfme()); // 鏁伴噺
-//                            locDetl.setZpallet(wrkDetl.getZpallet()); // 鎵樼洏鏉$爜
-//                            locDetl.setModiTime(now);
-//                            locDetl.setAppeTime(now);
-//                            if (!locDetlService.insert(locDetl)) {
-//                                exceptionHandle("鐩樼偣鍏ュ簱 ===>> 鏂板搴撳瓨鏄庣粏澶辫触锛沎workNo={0}],[matnr={1}]", wrkMast.getWrkNo(), wrkDetl.getMatnr());
-//                            }
-//                        }
-//                    }
+                    if(!Cools.isEmpty(locDetlService.selectByLocNo(wrkMast.getLocNo()))){
+                        locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo()));
+                    }
+                    if (Cools.isEmpty(locDetlService.selectByLocNo(wrkMast.getLocNo()))){
+                        for (WrkDetl wrkDetl:wrkDetls57){
+                            LocDetl locDetl = new LocDetl();
+                            locDetl.sync(wrkDetl);
+                            locDetl.setLocNo(wrkMast.getLocNo()); // 搴撲綅鍙�
+                            locDetl.setAnfme(wrkDetl.getAnfme()); // 鏁伴噺
+                            locDetl.setZpallet(wrkDetl.getZpallet()); // 鎵樼洏鏉$爜
+                            locDetl.setModiTime(now);
+                            locDetl.setAppeTime(now);
+                            if (!locDetlService.insert(locDetl)) {
+                                exceptionHandle("鐩樼偣鍏ュ簱 ===>> 鏂板搴撳瓨鏄庣粏澶辫触锛沎workNo={0}],[matnr={1}]", wrkMast.getWrkNo(), wrkDetl.getMatnr());
+                            }
+                        }
+                    }
 
                     // 淇敼搴撲綅鐘舵�� Q ====>> F
                     if (locMast.getLocSts().equals("Q")) {
@@ -244,7 +244,7 @@
                     String locSts = "D";
                     // 搴撲綅绉昏浆鍒ゆ柇鏄惁涓虹┖鏉跨Щ杞�
                     if (wrkMast.getEmptyMk().equals("N")) {
-                        locSts = "F";
+                        locSts = "R";
                         // 杞Щ搴撳瓨鏄庣粏鏁版嵁: 搴撳瓨鍙� 鐢卞伐浣滄。婧愬簱浣嶅彉涓虹洰鏍囧簱浣�
                         if (!locDetlService.updateLocNo(wrkMast.getLocNo(), wrkMast.getSourceLocNo())) {
                             exceptionHandle("搴撲綅绉昏浆 ===>> 杞Щ搴撳瓨鏄庣粏鏁版嵁澶辫触锛沎婧愬簱浣�={0}],[鐩爣搴撲綅={1}]", wrkMast.getSourceLocNo(), wrkMast.getLocNo());

--
Gitblit v1.9.1