From f4d88f2a2317c2f08391173856b81ec3083ae29a Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期三, 29 四月 2026 15:52:08 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/task/handler/AutoEmptyOutHandler.java | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 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 ee06027..7c80bd6 100644
--- a/src/main/java/com/zy/asrs/task/handler/AutoEmptyOutHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/AutoEmptyOutHandler.java
@@ -128,6 +128,10 @@
if (Cools.isEmpty(sourceLoc) || Cools.isEmpty(sourceLoc.getBarcode())) {
return null;
}
+ Integer sourceCrnNo = sourceLoc.getCrnNo();
+ if (sourceCrnNo == null) {
+ return null;
+ }
Integer runningCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>()
.eq("barcode", sourceLoc.getBarcode())
@@ -139,9 +143,13 @@
Integer targetCrnNo = null;
Integer targetEmptyCount = null;
for (int candidate = 1; candidate < 5; candidate++) {
- if (candidate == crnNo) {
+ 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 candidateEmpty = locMastService.selectCount(new EntityWrapper<LocMast>()
.eq("crn_no", candidate)
.eq("loc_sts", "O")
@@ -170,6 +178,9 @@
if (Cools.isEmpty(targetLoc)) {
return null;
}
+ if (sourceCrnNo.equals(targetLoc.getCrnNo())) {
+ return null;
+ }
List<Integer> sourceStaNos = staDescService.queryOutStaNosByLocNo(sourceLoc.getLocNo(), 101);
if (Cools.isEmpty(sourceStaNos)) {
--
Gitblit v1.9.1