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 | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 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 196d4f0..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瓨鍦�"); @@ -205,9 +216,9 @@ } else if (jsonObject.getInteger("code") == 500) { News.watchInfo(String.valueOf(staProtocol.getSiteId()), "鏉$爜锛�" + barcode + "鐢宠WMS澶辫触,绯荤粺鍥為��,response=" + JSON.toJSONString(jsonObject)); -// staProtocol.setWorkNo(9997); -// staProtocol.setStaNo(inSta.getBackSta().shortValue()); -// MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); + staProtocol.setWorkNo(9997); + staProtocol.setStaNo(inSta.getBackSta().shortValue()); + MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); continue; }else { News.watchInfo(String.valueOf(staProtocol.getSiteId()), "鏉$爜锛�" + barcode + "鐢宠WMS澶辫触,response=" + JSON.toJSONString(jsonObject)); -- Gitblit v1.9.1