From a0131e8ae6dedaac1f48e6dd40aee5955e205a9c Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期四, 30 四月 2026 18:14:57 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/task/handler/AutoEmptyOutHandler.java |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/handler/AutoEmptyOutHandler.java b/src/main/java/com/zy/asrs/task/handler/AutoEmptyOutHandler.java
index 8120229..b5ada96 100644
--- a/src/main/java/com/zy/asrs/task/handler/AutoEmptyOutHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/AutoEmptyOutHandler.java
@@ -159,10 +159,19 @@
             if (candidate == sourceCrnNo) {
                 continue;
             }
-            Integer runingCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>()
-                    .eq("io_type", 101).eq("crn_no",candidate)
-                    .in("wrk_sts", Arrays.asList(2L, 3L, 4L, 11L, 12L)));
-            if(runingCount != null && runingCount > 5) {continue;}
+//            Integer runingCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>()
+//                    .eq("io_type", 101).eq("crn_no",candidate)
+//                    .in("wrk_sts", Arrays.asList(2L, 3L, 4L, 11L, 12L)));
+//            if(runingCount != null && runingCount > 3) {continue;}
+            Integer existCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>()
+                    .eq("io_type", 101)
+                    .eq("log_mk", "Y")
+                    .eq("ove_mk", "N"));
+            int allow = 3 - (existCount == null ? 0 : existCount);
+            if (allow <= 0) {
+                log.info("鑷姩绉诲簱宸茶揪涓婇檺{}", existCount);
+                continue;
+            }
             Integer candidateEmpty = locMastService.selectCount(new EntityWrapper<LocMast>()
                     .eq("crn_no", candidate)
                     .eq("loc_sts", "O")
@@ -219,7 +228,7 @@
         wrkMast.setIoTime(now);
         wrkMast.setWrkSts(11L);
         wrkMast.setIoType(101);
-        wrkMast.setIoPri(13D);
+        wrkMast.setIoPri(12D);
         wrkMast.setCrnNo(sourceLoc.getCrnNo());
         wrkMast.setSourceLocNo(sourceLoc.getLocNo());
         wrkMast.setLocNo(targetLoc.getLocNo());
@@ -229,6 +238,7 @@
         wrkMast.setFullPlt("Y");
         wrkMast.setExitMk("N");
         wrkMast.setLogMk("Y");
+        wrkMast.setEmptyMk("N");
         wrkMast.setPacked(null);
         wrkMast.setOveMk("N");
         wrkMast.setAppeUser(userId);
@@ -285,6 +295,7 @@
                         .eq("crn_no", crnNo)
                         .eq("io_type", 110)
                 );
+                if(crnNo !=1){continue;}
                 if(!wrkMastList.isEmpty()){continue;}
                 Integer emptyLocCount = locMastService.selectCount(new EntityWrapper<LocMast>()
                         .eq("crn_no", crnNo)

--
Gitblit v1.9.1