From 2926782a194a79a51ce3a3d6ad43151605892c0e Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 27 八月 2025 16:10:22 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 46176e9..98a7cc5 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -35,12 +35,10 @@
 import com.zy.core.properties.SlaveProperties;
 import com.zy.core.thread.BarcodeThread;
 import com.zy.core.thread.SiemensDevpThread;
-import com.zy.system.service.ConfigService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
 import java.io.IOException;
@@ -53,7 +51,6 @@
  */
 @Slf4j
 @Service("mainService")
-@Transactional
 public class MainServiceImpl {
 
     public static final long COMMAND_TIMEOUT = 5 * 1000;
@@ -166,6 +163,20 @@
                             continue;
                         }
 
+                        StaDesc staDesc2 = staDescService.selectOne(new EntityWrapper<StaDesc>().eq("type_no", 1).eq("stn_no", staProtocol.getSiteId()));
+                        List<TaskWrk> taskWrkOutList = taskWrkService.selectList(new EntityWrapper<TaskWrk>()
+                                .eq("crn_no", staDesc2.getCrnNo())
+                                .eq("wrk_sts", 12)
+                        );
+                        if (!taskWrkOutList.isEmpty()) {
+                            News.watchInfo(String.valueOf(staProtocol.getSiteId()), "鐢宠鍏ュ簱浠诲姟鏃跺彂鐜版鍦ㄦ墽琛岀殑鍑哄簱浠诲姟,鍏ュ簱浠诲姟琚己鍒堕��鍥�");
+
+                            staProtocol.setWorkNo(9997);
+                            staProtocol.setStaNo(inSta.getBackSta().shortValue());
+                            MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
+                            continue;
+                        }
+
                         TaskWrk taskWrk1 = taskWrkService.selectOne(new EntityWrapper<TaskWrk>().eq("barcode", barcode));
                         if (taskWrk1 != null) {
                             News.watchInfo(String.valueOf(staProtocol.getSiteId()), "鎵樼洏鐮侊細" + barcode + "浠诲姟妗e瓨鍦�");

--
Gitblit v1.9.1