From 99bb8ae0205c6de1fb58751e3ee8868c795456c1 Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期三, 04 二月 2026 14:08:45 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java b/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java
index 52ff58a..d7965f9 100644
--- a/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java
+++ b/src/main/java/com/zy/core/utils/CrnOperateProcessUtils.java
@@ -2,6 +2,7 @@
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.serializer.SerializerFeature;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.core.exception.CoolException;
 import com.zy.asrs.domain.enums.NotifyMsgType;
@@ -96,6 +97,11 @@
                     && crnProtocol.getForkPos() == 0
                     && crnProtocol.getAlarm() == 0
             ) {
+                Object clearLock = redisUtil.get(RedisKeyType.CLEAR_CRN_TASK_LIMIT.key + basCrnp.getCrnNo());
+                if (clearLock != null) {
+                    continue;
+                }
+
                 // 濡傛灉鏈�杩戜竴娆℃槸鍏ュ簱妯″紡
                 if (crnProtocol.getLastIo().equals("I")) {
                     if (basCrnp.getInEnable().equals("Y")) {
@@ -576,6 +582,21 @@
                 }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);
@@ -763,13 +784,13 @@
         if (lock != null) {
             return false;
         }
-        redisUtil.set(RedisKeyType.CHECK_SHALLOW_LOC_STATUS_LIMIT.key + taskNo, "lock", 5);
 
         Integer shallowRow = Utils.getShallowRowByDeepRow(Utils.getRow(locNo));
         if (shallowRow == null) {
             return true;
         }
 
+        redisUtil.set(RedisKeyType.CHECK_SHALLOW_LOC_STATUS_LIMIT.key + taskNo, "lock", 5);
         String shallowLocNo = Utils.getLocNo(shallowRow, Utils.getBay(locNo), Utils.getLev(locNo));
         LocMast shallowLocMast = locMastService.queryByLoc(shallowLocNo);
         if (shallowLocMast == null) {

--
Gitblit v1.9.1