From 5879527ed5b7349ce7fd7cd3fe92c81307646b21 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 19 九月 2025 11:09:23 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   15 ++++++++++++---
 1 files changed, 12 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 f32a679..d24beac 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;
@@ -182,6 +179,18 @@
 
                         TaskWrk taskWrk1 = taskWrkService.selectOne(new EntityWrapper<TaskWrk>().eq("barcode", barcode));
                         if (taskWrk1 != null) {
+                            if (staProtocol.getWorkNo() == 9999) {
+                                Object object = redisUtil.get(RedisKeyType.IN_TASK_LOCK.key + inSta.getStaNo());
+                                if(object != null) {
+                                    continue;
+                                }
+                                StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>()
+                                        .eq("crn_no", taskWrk1.getCrnNo()).eq("type_no", 1).eq("stn_no", staProtocol.getSiteId()));
+                                staProtocol.setWorkNo(taskWrk1.getWrkNo());
+                                staProtocol.setStaNo(staDesc.getCrnStn().shortValue());
+                                MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
+                                redisUtil.set(RedisKeyType.IN_TASK_LOCK.key, "lock", 10);
+                            }
                             News.watchInfo(String.valueOf(staProtocol.getSiteId()), "鎵樼洏鐮侊細" + barcode + "浠诲姟妗e瓨鍦�");
                             continue;
                         }

--
Gitblit v1.9.1