From 57273834cdf6dcac9b6dfe5e0fb15ee9b9f2bc2d Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 31 三月 2026 19:44:06 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/plugin/GslProcess.java | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/zy/core/plugin/GslProcess.java b/src/main/java/com/zy/core/plugin/GslProcess.java
index c38b7d8..ea52095 100644
--- a/src/main/java/com/zy/core/plugin/GslProcess.java
+++ b/src/main/java/com/zy/core/plugin/GslProcess.java
@@ -8,14 +8,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;
@@ -49,6 +48,8 @@
private RedisUtil redisUtil;
@Autowired
private StoreInTaskGenerationService storeInTaskGenerationService;
+ @Autowired
+ private StationCommandDispatcher stationCommandDispatcher;
@Override
public void run() {
@@ -59,16 +60,12 @@
//鎵ц鍫嗗灈鏈轰换鍔�
crnOperateUtils.crnIoExecute();
- //鍫嗗灈鏈轰换鍔℃墽琛屽畬鎴�-鍏峰浠跨湡鑳藉姏
+ //鍫嗗灈鏈轰换鍔℃墽琛屽畬鎴�
crnOperateUtils.crnIoExecuteFinish();
//鎵ц杈撻�佺珯鐐瑰叆搴撲换鍔�
stationOperateProcessUtils.stationInExecute();
//鎵ц杈撻�佺珯鐐瑰嚭搴撲换鍔�
stationOperateProcessUtils.crnStationOutExecute();
- //妫�娴嬭緭閫佺珯鐐瑰嚭搴撲换鍔℃墽琛屽畬鎴�
- stationOperateProcessUtils.stationOutExecuteFinish();
- // 妫�娴嬩换鍔¤浆瀹屾垚
- stationOperateProcessUtils.checkTaskToComplete();
// 妫�娴嬪嚭搴撴帓搴�
stationOperateProcessUtils.checkStationOutOrder();
// 鐩戞帶缁曞湀绔欑偣
@@ -119,7 +116,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, "gsl-process", "station-back");
News.taskInfo(stationProtocol.getTaskNo(), "{}鎵爜寮傚父锛屽凡閫�鍥炶嚦{}", backStation.getStationId());
redisUtil.set(RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + stationProtocol.getStationId(), "lock", 10);
return true;
@@ -167,7 +164,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, "gsl-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