From 90402710d962aa357062ecb94649e0f277c1dfb3 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 29 三月 2026 21:03:48 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/plugin/XiaosongProcess.java | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/zy/core/plugin/XiaosongProcess.java b/src/main/java/com/zy/core/plugin/XiaosongProcess.java
index bfed9a4..cf5670f 100644
--- a/src/main/java/com/zy/core/plugin/XiaosongProcess.java
+++ b/src/main/java/com/zy/core/plugin/XiaosongProcess.java
@@ -13,14 +13,13 @@
import com.zy.common.service.CommonService;
import com.zy.common.utils.RedisUtil;
import com.zy.core.News;
-import com.zy.core.cache.MessageQueue;
import com.zy.core.cache.SlaveConnection;
+import com.zy.core.dispatch.StationCommandDispatcher;
import com.zy.core.enums.RedisKeyType;
import com.zy.core.enums.SlaveType;
import com.zy.core.enums.StationCommandType;
import com.zy.core.enums.WrkIoType;
import com.zy.core.model.StationObjModel;
-import com.zy.core.model.Task;
import com.zy.core.model.command.StationCommand;
import com.zy.core.model.protocol.StationProtocol;
import com.zy.core.plugin.api.MainProcessPluginApi;
@@ -62,6 +61,8 @@
private DualCrnOperateProcessUtils dualCrnOperateProcessUtils;
@Autowired
private StoreInTaskGenerationService storeInTaskGenerationService;
+ @Autowired
+ private StationCommandDispatcher stationCommandDispatcher;
@Override
public void run() {
@@ -80,10 +81,6 @@
stationOperateProcessUtils.crnStationOutExecute();
//鎵ц鍙屽伐浣嶅爢鍨涙満杈撻�佺珯鐐瑰嚭搴撲换鍔�
stationOperateProcessUtils.dualCrnStationOutExecute();
- //妫�娴嬭緭閫佺珯鐐瑰嚭搴撲换鍔℃墽琛屽畬鎴�
- stationOperateProcessUtils.stationOutExecuteFinish();
- // 妫�娴嬩换鍔¤浆瀹屾垚
- stationOperateProcessUtils.checkTaskToComplete();
//妫�娴嬭緭閫佺珯鐐规槸鍚﹁繍琛屽牭濉�
stationOperateProcessUtils.checkStationRunBlock();
//妫�娴嬭緭閫佺珯鐐逛换鍔″仠鐣欒秴鏃跺悗閲嶆柊璁$畻璺緞
@@ -134,7 +131,7 @@
News.taskInfo(stationProtocol.getTaskNo(), "{}宸ヤ綔,鑾峰彇杈撻�佺嚎鍛戒护澶辫触", stationProtocol.getTaskNo());
return false;
}
- MessageQueue.offer(SlaveType.Devp, context.getBasDevp().getDevpNo(), new Task(2, command));
+ stationCommandDispatcher.dispatch(context.getBasDevp().getDevpNo(), command, "xiaosong-process", "station-back");
News.taskInfo(stationProtocol.getTaskNo(), "{}鎵爜寮傚父锛屽凡閫�鍥炶嚦{}", backStation.getStationId());
redisUtil.set(RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + stationProtocol.getTaskNo(), "lock", 10);
return true;
@@ -174,7 +171,7 @@
&& stationProtocol.isEnableIn()
) {
StationCommand command = stationThread.getCommand(StationCommandType.MOVE, commonService.getWorkNo(WrkIoType.ENABLE_IN.id), stationId, entity.getBarcodeStation().getStationId(), 0);
- MessageQueue.offer(SlaveType.Devp, basDevp.getDevpNo(), new Task(2, command));
+ stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, "xiaosong-process", "enable-in");
redisUtil.set(RedisKeyType.GENERATE_ENABLE_IN_STATION_DATA_LIMIT.key + stationId, "lock", 15);
News.info("{}绔欑偣鍚姩鍏ュ簱鎴愬姛锛屾暟鎹寘:{}", stationId, JSON.toJSONString(command));
}
--
Gitblit v1.9.1