From 358a65169e422bacfa8bd3134f7723e2eca32628 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 10 四月 2026 14:37:43 +0800
Subject: [PATCH] #出入库模式管控

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

diff --git a/src/main/java/com/zy/core/plugin/GslProcess.java b/src/main/java/com/zy/core/plugin/GslProcess.java
index 0e16ea5..e5e2034 100644
--- a/src/main/java/com/zy/core/plugin/GslProcess.java
+++ b/src/main/java/com/zy/core/plugin/GslProcess.java
@@ -3,9 +3,11 @@
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.core.common.Cools;
+import com.zy.asrs.entity.WrkLastno;
 import com.zy.asrs.utils.Utils;
 import com.zy.asrs.entity.BasDevp;
 import com.zy.asrs.service.BasDevpService;
+import com.zy.asrs.service.WrkLastnoService;
 import com.zy.common.service.CommonService;
 import com.zy.common.utils.RedisUtil;
 import com.zy.core.News;
@@ -49,6 +51,8 @@
     private BasDevpService basDevpService;
     @Autowired
     private RedisUtil redisUtil;
+    @Autowired
+    private WrkLastnoService wrkLastnoService;
     @Autowired
     private StoreInTaskGenerationService storeInTaskGenerationService;
     @Autowired
@@ -126,6 +130,10 @@
                         && stationProtocol.getTaskNo() == 0
                         && stationProtocol.isEnableIn()
                 ) {
+                    if (stationProtocol.getIoMode() != 1) {
+                        continue;//涓嶅睘浜庡叆搴撴ā寮�
+                    }
+
                     StationCommand command = stationThread.getCommand(StationCommandType.MOVE, commonService.getWorkNo(WrkIoType.ENABLE_IN.id), stationId, entity.getBarcodeStation().getStationId(), 0);
                     stationCommandDispatcher.dispatch(basDevp.getDevpNo(), command, "gsl-process", "enable-in");
                     if (entity.getBarcodeStation() != null && entity.getBarcodeStation().getStationId() != null) {
@@ -206,6 +214,23 @@
             return true;//绔欑偣鏃犲紓甯�
         }
 
+        WrkLastno stationBackTaskRange = wrkLastnoService.getById(WrkIoType.STATION_BACK.id);
+        Integer currentTaskNo = stationProtocol.getTaskNo();
+        if (currentTaskNo != null
+                && currentTaskNo > 0
+                && stationBackTaskRange != null
+                && stationBackTaskRange.getsNo() != null
+                && stationBackTaskRange.geteNo() != null
+                && currentTaskNo >= stationBackTaskRange.getsNo()
+                && currentTaskNo <= stationBackTaskRange.geteNo()) {
+            News.info("鏉$爜绔欏凡澶勪簬閫�鍥炲伐浣滃彿鑼冨洿锛岃烦杩囬噸澶嶇敓鎴愰��鍥炲懡浠ゃ�俿tationId={}锛宼askNo={}锛宺ange=[{}, {}]",
+                    stationProtocol.getStationId(),
+                    currentTaskNo,
+                    stationBackTaskRange.getsNo(),
+                    stationBackTaskRange.geteNo());
+            return false;
+        }
+
         StationObjModel backStation = stationObjModel.getBackStation();
         if (backStation == null || backStation.getStationId() == null) {
             News.warn("鏉$爜绔欓��鍥炲け璐ワ紝閫�鍥炵珯鏈厤缃�俤eviceNo={}锛宻tationId={}",

--
Gitblit v1.9.1