From eeca5bc061d3f74e76658a5ae339fa9e5eff0d57 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 06 四月 2026 20:37:30 +0800
Subject: [PATCH] #出库站点命令下发

---
 src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java                   |   16 ----------------
 src/main/java/com/zy/core/enums/RedisKeyType.java                             |    1 -
 src/main/java/com/zy/core/utils/station/StationOutboundDispatchProcessor.java |   15 +++------------
 src/main/java/com/zy/core/plugin/FakeProcess.java                             |    2 --
 src/main/java/com/zy/core/utils/station/StationRegularDispatchProcessor.java  |    1 -
 5 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/src/main/java/com/zy/core/enums/RedisKeyType.java b/src/main/java/com/zy/core/enums/RedisKeyType.java
index 7bb3e08..7764b6f 100644
--- a/src/main/java/com/zy/core/enums/RedisKeyType.java
+++ b/src/main/java/com/zy/core/enums/RedisKeyType.java
@@ -65,7 +65,6 @@
     DUAL_CRN_PICK_WAIT_NEXT_TASK("dual_crn_pick_wait_next_task_"),
     DUAL_CRN_OUT_TASK_STATION_INFO("dual_crn_out_task_station_info_"),
     DUAL_CRN_OUT_TASK_COMPLETE_STATION_INFO("dual_crn_out_task_complete_station_info_"),
-    CRN_OUT_TASK_COMPLETE_STATION_INFO("crn_out_task_complete_station_info_"),
 
     WATCH_CIRCLE_STATION_("watch_circle_station_"),
     WATCH_STATION_COLOR_CONFIG("watch_station_color_config"),
diff --git a/src/main/java/com/zy/core/plugin/FakeProcess.java b/src/main/java/com/zy/core/plugin/FakeProcess.java
index c8fce93..9ca01d3 100644
--- a/src/main/java/com/zy/core/plugin/FakeProcess.java
+++ b/src/main/java/com/zy/core/plugin/FakeProcess.java
@@ -1,7 +1,6 @@
 package com.zy.core.plugin;
 
 import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.serializer.SerializerFeature;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.core.common.Cools;
 import com.zy.asrs.domain.param.CreateInTaskParam;
@@ -721,7 +720,6 @@
                 StationCommand command = stationThread.getCommand(StationCommandType.WRITE_INFO, 9998,
                         wrkMast.getSourceStaNo(), 0, 0);
                 stationCommandDispatcher.dispatch(stationObjModel.getDeviceNo(), command, "fake-process", "crn-out-complete-write-info");
-                redisUtil.set(RedisKeyType.CRN_OUT_TASK_COMPLETE_STATION_INFO.key + wrkMast.getWrkNo(), JSON.toJSONString(stationObjModel, SerializerFeature.DisableCircularReferenceDetect), 60 * 60 * 24);
             }
         } else if (wrkMast.getWrkSts() == WrkStsType.LOC_MOVE_RUN.sts) {
             updateWrkSts = WrkStsType.COMPLETE_LOC_MOVE.sts;
diff --git a/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java b/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java
index 4be2698..b4090f5 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;
@@ -714,21 +713,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);
diff --git a/src/main/java/com/zy/core/utils/station/StationOutboundDispatchProcessor.java b/src/main/java/com/zy/core/utils/station/StationOutboundDispatchProcessor.java
index fcb5b3c..f72ce6a 100644
--- a/src/main/java/com/zy/core/utils/station/StationOutboundDispatchProcessor.java
+++ b/src/main/java/com/zy/core/utils/station/StationOutboundDispatchProcessor.java
@@ -126,13 +126,7 @@
                 News.warn("杈撻�佺珯鐐规墽琛岃秴鏃讹紝宸查噴鏀鹃噸璇曡祫鏍笺�傚伐浣滃彿={}", wrkMast.getWrkNo());
             }
 
-            Object infoObj = redisUtil.get(RedisKeyType.CRN_OUT_TASK_COMPLETE_STATION_INFO.key + wrkMast.getWrkNo());
-            if (infoObj == null) {
-                News.info("鍑哄簱浠诲姟{}鏁版嵁缂撳瓨涓嶅瓨鍦�", wrkMast.getWrkNo());
-                return;
-            }
-
-            StationObjModel stationObjModel = JSON.parseObject(infoObj.toString(), StationObjModel.class);
+            StationObjModel stationObjModel = getOutboundSourceStation(wrkMast);
             if (stationObjModel == null || stationObjModel.getDeviceNo() == null || stationObjModel.getStationId() == null) {
                 return;
             }
@@ -239,13 +233,10 @@
                 if (hasPendingDispatch(wrkMast.getWrkNo())) {
                     continue;
                 }
-                Object infoObj = redisUtil.get(RedisKeyType.DUAL_CRN_OUT_TASK_STATION_INFO.key + wrkMast.getWrkNo());
-                if (infoObj == null) {
-                    News.info("鍑哄簱浠诲姟{}鏁版嵁缂撳瓨涓嶅瓨鍦�", wrkMast.getWrkNo());
+                StationObjModel stationObjModel = getOutboundSourceStation(wrkMast);
+                if (stationObjModel == null || stationObjModel.getDeviceNo() == null || stationObjModel.getStationId() == null) {
                     continue;
                 }
-
-                StationObjModel stationObjModel = JSON.parseObject(infoObj.toString(), StationObjModel.class);
                 StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, stationObjModel.getDeviceNo());
                 if (stationThread == null) {
                     continue;
diff --git a/src/main/java/com/zy/core/utils/station/StationRegularDispatchProcessor.java b/src/main/java/com/zy/core/utils/station/StationRegularDispatchProcessor.java
index 643b495..0aa1c09 100644
--- a/src/main/java/com/zy/core/utils/station/StationRegularDispatchProcessor.java
+++ b/src/main/java/com/zy/core/utils/station/StationRegularDispatchProcessor.java
@@ -181,7 +181,6 @@
         if (wrkMast == null || wrkMast.getWrkNo() == null) {
             return;
         }
-        redisUtil.del(RedisKeyType.CRN_OUT_TASK_COMPLETE_STATION_INFO.key + wrkMast.getWrkNo());
         redisUtil.del(RedisKeyType.DUAL_CRN_OUT_TASK_STATION_INFO.key + wrkMast.getWrkNo());
     }
 

--
Gitblit v1.9.1