From 37efb9725fcbcf921534d032ad2aa4ce2aaa7fde Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期六, 11 四月 2026 10:23:28 +0800
Subject: [PATCH] #入库异常

---
 src/main/java/com/zy/core/plugin/GslProcess.java |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/core/plugin/GslProcess.java b/src/main/java/com/zy/core/plugin/GslProcess.java
index 1ffd5b1..3ca41cc 100644
--- a/src/main/java/com/zy/core/plugin/GslProcess.java
+++ b/src/main/java/com/zy/core/plugin/GslProcess.java
@@ -137,7 +137,20 @@
                     //鍚姩鍏ュ簱锛屽垹闄ゆ潯鐮佺珯閫�鍥為檺鍒�
                     Integer backStationId = entity.getBarcodeStation().getStationId();
                     String lockKey = RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + backStationId;
-                    redisUtil.del(lockKey);
+                    if (redisUtil.hasKey(lockKey)) {
+                        StationProtocol backStationProtocol = stationMap.get(backStationId);
+                        if (backStationProtocol == null) {
+                            continue;
+                        }
+
+                        if (backStationProtocol.isAutoing()
+                                && !backStationProtocol.isLoading()
+                                && stationProtocol.getTaskNo() == 0
+                        ) {
+                            //鏉$爜绔欒嚜鍔ㄣ�佹棤鐗┿�佸伐浣滃彿0銆傚垹闄ゆ潯鐮佺珯閫�鍥為檺鍒�
+                            redisUtil.del(lockKey);
+                        }
+                    }
 
                     StationCommand command = stationThread.getCommand(StationCommandType.MOVE, commonService.getWorkNo(WrkIoType.ENABLE_IN.id), stationId, backStationId, 0);
                     stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, "gsl-process", "enable-in");
@@ -288,7 +301,7 @@
         }
         stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, "gsl-process", "station-back");
         News.info("{}鎵爜绔欏紓甯革紝宸查��鍥炶嚦{},鏉$爜绔欑姸鎬侊細{}", stationProtocol.getTaskNo(), backStation.getStationId(), JSON.toJSONString(stationProtocol));
-        redisUtil.set(lockKey, "lock", 60 * 10);
+        redisUtil.set(lockKey, "lock", 60 * 60);
         return false;
     }
 

--
Gitblit v1.9.1