From cf9211f711be85c8e0c1c739d01c8694d2cf5c51 Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期一, 13 四月 2026 16:23:04 +0800
Subject: [PATCH] 屏蔽预调度任务
---
src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java | 58 ++++++++++------------------------------------------------
1 files changed, 10 insertions(+), 48 deletions(-)
diff --git a/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java b/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java
index 4be2698..34fe8b5 100644
--- a/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java
+++ b/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java
@@ -2,7 +2,6 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.common.Cools;
import com.core.exception.CoolException;
@@ -76,13 +75,6 @@
private static final String CRN_OUT_REQUIRE_STATION_OUT_ENABLE_CONFIG = "crnOutRequireStationOutEnable";
- public synchronized void crnIoExecute() {
- List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>());
- for (BasCrnp basCrnp : basCrnps) {
- crnIoExecute(basCrnp);
- }
- }
-
public void crnIoExecute(BasCrnp basCrnp) {
if (basCrnp == null || basCrnp.getCrnNo() == null) {
return;
@@ -142,11 +134,11 @@
return;
}
- //鎵ц绉诲姩浠诲姟
- boolean executed = executeCrnMoveTask(crnThread, crnProtocol);
- if (executed) {
- return;
- }
+// //鎵ц绉诲姩浠诲姟
+// boolean executed = executeCrnMoveTask(crnThread, crnProtocol);
+// if (executed) {
+// return;
+// }
String lastIo = resolveCrnLastIo(crnProtocol);
@@ -171,7 +163,7 @@
if (wrkMast.getWrkSts() != null && wrkMast.getWrkSts() == WrkStsType.INBOUND_STATION_RUN_COMPLETE.sts) {
boolean result = this.crnExecuteInPlanner(currentCrn, crnThread, wrkMast);
if (result) {
- crnProtocol.setLastIo("O");
+ crnProtocol.setLastIo("I");
return;
}
continue;
@@ -180,7 +172,7 @@
if (wrkMast.getWrkSts() != null && wrkMast.getWrkSts() == WrkStsType.NEW_OUTBOUND.sts) {
boolean result = this.crnExecuteOutPlanner(currentCrn, crnThread, wrkMast);
if (result) {
- crnProtocol.setLastIo("I");
+ crnProtocol.setLastIo("O");
return;
}
continue;
@@ -395,9 +387,9 @@
return false;
}
- if (!allowBatchOutboundExecute(wrkMast, true)) {
- return false;
- }
+// if (!allowBatchOutboundExecute(wrkMast, true)) {
+// return false;
+// }
for (StationObjModel stationObjModel : outStationList) {
StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, stationObjModel.getDeviceNo());
@@ -669,14 +661,6 @@
return defaultValue;
}
- //鍫嗗灈鏈轰换鍔℃墽琛屽畬鎴�
- public synchronized void crnIoExecuteFinish() {
- List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>());
- for (BasCrnp basCrnp : basCrnps) {
- crnIoExecuteFinish(basCrnp);
- }
- }
-
public void crnIoExecuteFinish(BasCrnp basCrnp) {
if (basCrnp == null || basCrnp.getCrnNo() == null) {
return;
@@ -714,21 +698,6 @@
}else if(wrkMast.getWrkSts() == WrkStsType.OUTBOUND_RUN.sts){
updateWrkSts = WrkStsType.OUTBOUND_RUN_COMPLETE.sts;
notifyUtils.notify(String.valueOf(SlaveType.Crn), crnProtocol.getCrnNo(), String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.CRN_OUT_TASK_COMPLETE, null);
-
- List<StationObjModel> outStationList = basCrnp.getOutStationList$();
- if(outStationList.isEmpty()){
- News.info("鍫嗗灈鏈�:{} 鍑哄簱绔欑偣鏈缃�", basCrnp.getCrnNo());
- return;
- }
-
- StationObjModel outStationObjModel = null;
- for (StationObjModel stationObjModel : outStationList) {
- if (stationObjModel.getStationId().equals(wrkMast.getSourceStaNo())) {
- outStationObjModel = stationObjModel;
- break;
- }
- }
- redisUtil.set(RedisKeyType.CRN_OUT_TASK_COMPLETE_STATION_INFO.key + wrkMast.getWrkNo(), JSON.toJSONString(outStationObjModel, SerializerFeature.DisableCircularReferenceDetect), 60 * 60 * 24);
}else if(wrkMast.getWrkSts() == WrkStsType.LOC_MOVE_RUN.sts){
updateWrkSts = WrkStsType.COMPLETE_LOC_MOVE.sts;
notifyUtils.notify(String.valueOf(SlaveType.Crn), crnProtocol.getCrnNo(), String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.CRN_TRANSFER_TASK_COMPLETE, null);
@@ -751,13 +720,6 @@
}
redisUtil.set(RedisKeyType.CRN_IO_EXECUTE_FINISH_LIMIT.key + basCrnp.getCrnNo(), "lock",10);
- }
- }
-
- public synchronized void plannerExecute() {
- List<BasCrnp> basCrnps = basCrnpService.list(new QueryWrapper<>());
- for (BasCrnp basCrnp : basCrnps) {
- plannerExecute(basCrnp);
}
}
--
Gitblit v1.9.1