From 71fd2c86e0206f614c068be05f67356deaca9b09 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期五, 24 四月 2026 09:04:20 +0800
Subject: [PATCH] 自动移库

---
 src/main/java/com/zy/asrs/task/AutoLocMoveScheduler.java |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/AutoLocMoveScheduler.java b/src/main/java/com/zy/asrs/task/AutoLocMoveScheduler.java
index 48e8073..2f73bb2 100644
--- a/src/main/java/com/zy/asrs/task/AutoLocMoveScheduler.java
+++ b/src/main/java/com/zy/asrs/task/AutoLocMoveScheduler.java
@@ -8,8 +8,10 @@
 import com.zy.asrs.service.WrkMastService;
 import com.zy.common.model.enums.WorkNoType;
 import com.zy.common.service.CommonService;
+import com.zy.system.timer.LoadingConfigTimer;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
@@ -29,15 +31,21 @@
     @Resource
     private LocMastService locMastService;
 
+    @Resource
+    private LoadingConfigTimer loadingConfigTimer;
+
     // 绔嬩綋搴撹窇搴撶▼搴忥紝鐢熶骇鍕跨敤 ,涓�涓贩閬撴斁涓�涓墭鐩�
-//    @Scheduled(cron = "0/5 * * * * ? ")
+    @Scheduled(cron = "0/5 * * * * ? ")
     public synchronized void autoMoveLoc() {
-        for(int i = 1; i <= 3; i++ ){
+        if(!loadingConfigTimer.getAutoMoveLocTest().equals("Y") ){
+            return;
+        }
+        for(int i = 1; i <= 2; i++ ){
             // 婧愬簱浣�
             LocMast sourceLocMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts", "D").eq("crn_no", i));
             if(sourceLocMast != null) {
                 // 鑾峰彇涓�涓Щ鍔ㄧ殑鐩爣搴撲綅
-                LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("crn_no", i).eq("loc_type3", "0")
+                LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("crn_no", i).isNull("loc_type3")
                         .eq("loc_sts","O").orderBy("lev1").orderBy("bay1").orderBy("row1"));
 
                 if (locMast != null) {

--
Gitblit v1.9.1