From c1ed5a7f04fcc6459da611140a43870428092499 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 10 四月 2026 23:42:17 +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 c481262..261b8ce 100644
--- a/src/main/java/com/zy/core/plugin/GslProcess.java
+++ b/src/main/java/com/zy/core/plugin/GslProcess.java
@@ -136,8 +136,21 @@
 
                     //鍚姩鍏ュ簱锛屽垹闄ゆ潯鐮佺珯閫�鍥為檺鍒�
                     Integer backStationId = entity.getBarcodeStation().getStationId();
-                    String lockKey = RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + stationProtocol.getStationId();
-                    redisUtil.del(lockKey);
+                    String lockKey = RedisKeyType.GENERATE_STATION_BACK_LIMIT.key + backStationId;
+                    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");

--
Gitblit v1.9.1