From 1817a79605b464735014a00e762e715788229a4b Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 01 四月 2026 11:41:14 +0800
Subject: [PATCH] #入库获取Row优化

---
 src/main/java/com/zy/core/plugin/NormalProcess.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/core/plugin/NormalProcess.java b/src/main/java/com/zy/core/plugin/NormalProcess.java
index 21221e3..e07c93e 100644
--- a/src/main/java/com/zy/core/plugin/NormalProcess.java
+++ b/src/main/java/com/zy/core/plugin/NormalProcess.java
@@ -5,6 +5,7 @@
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.core.common.Cools;
 import com.zy.asrs.domain.param.CreateInTaskParam;
+import com.zy.asrs.utils.Utils;
 import com.zy.asrs.entity.BasDevp;
 import com.zy.asrs.entity.WrkMast;
 import com.zy.asrs.service.BasDevpService;
@@ -13,14 +14,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;
@@ -59,6 +59,8 @@
     private WmsOperateUtils wmsOperateUtils;
     @Autowired
     private StoreInTaskGenerationService storeInTaskGenerationService;
+    @Autowired
+    private StationCommandDispatcher stationCommandDispatcher;
 
     @Override
     public void run() {
@@ -135,7 +137,10 @@
                         && 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, "normal-process", "enable-in");
+                    if (entity.getBarcodeStation() != null && entity.getBarcodeStation().getStationId() != null) {
+                        Utils.precomputeInTaskEnableRow(entity.getBarcodeStation().getStationId());
+                    }
                     redisUtil.set(RedisKeyType.GENERATE_ENABLE_IN_STATION_DATA_LIMIT.key + stationId, "lock", 15);
                     News.info("{}绔欑偣鍚姩鍏ュ簱鎴愬姛锛屾暟鎹寘:{}", stationId, JSON.toJSONString(command));
                 }

--
Gitblit v1.9.1