From d8268b21c6d73b9cf081c8be193589eb83ed5a63 Mon Sep 17 00:00:00 2001
From: Administrator <1051256694@qq.com>
Date: 星期五, 20 三月 2026 20:52:14 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/task/WorkMastScheduler.java |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/WorkMastScheduler.java b/src/main/java/com/zy/asrs/task/WorkMastScheduler.java
index 9121617..0ffe661 100644
--- a/src/main/java/com/zy/asrs/task/WorkMastScheduler.java
+++ b/src/main/java/com/zy/asrs/task/WorkMastScheduler.java
@@ -79,7 +79,7 @@
      * @date 2026/1/10 14:42
      */
     @Scheduled(cron = "0/3 * * * * ? ")
-    private void autoPubTasks() {
+    private synchronized void autoPubTasks() {
         List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().in("wrk_sts", Arrays.asList(1L, 11L)));
         if (wrkMasts.isEmpty()) {
             return;
@@ -92,15 +92,14 @@
                         .eq("b_loc_no", wrkMast.getLocNo())
                         .eq("freeze", 1));
                 if (Cools.isEmpty(locAroundBind)) {
-                    locAroundBind = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>()
-                            .eq("b_loc_no", wrkMast.getSourceLocNo())
-                            .eq("freeze", 1));
-                    if (!Cools.isEmpty(locAroundBind)) {
-                        markPublishError(wrkMast.getWrkNo(), String.valueOf("婧愬簱浣嶈鍐荤粨"));
-                        continue;
-                    }
-                } else {
                     markPublishError(wrkMast.getWrkNo(), String.valueOf("鐩爣搴撲綅琚喕缁�"));
+                    continue;
+                }
+                locAroundBind = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>()
+                        .eq("b_loc_no", wrkMast.getSourceLocNo())
+                        .eq("freeze", 1));
+                if (!Cools.isEmpty(locAroundBind)) {
+                    markPublishError(wrkMast.getWrkNo(), String.valueOf("婧愬簱浣嶈鍐荤粨"));
                     continue;
                 }
             Integer crnNo = wrkMast.getCrnNo();
@@ -108,7 +107,7 @@
                 if(wrkMast.getIoType()==101&&!Cools.isEmpty(wrkMast.getLocNo())){
                     LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("crn_no", crnNo).eq("loc_no", wrkMast.getLocNo()));
                     if (!Cools.isEmpty(locMast)) {
-                        List<WrkMast> wrkMasts1 = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).in("wrk_sts", Arrays.asList(12L)));
+                        List<WrkMast> wrkMasts1 = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).in("wrk_sts", Arrays.asList(12L,13L,14L)));
                         if (!wrkMasts1.isEmpty()) {
                             continue;
                         }

--
Gitblit v1.9.1