From ecb51654e5224950f1fe8d139190d1c1a8daebca Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 23 三月 2026 22:46:39 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/utils/StationOperateProcessUtils.java | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java b/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
index f988dd1..dced1e1 100644
--- a/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
+++ b/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
@@ -27,6 +27,7 @@
import com.zy.core.model.Task;
import com.zy.core.model.command.StationCommand;
import com.zy.core.model.protocol.StationProtocol;
+import com.zy.core.model.protocol.StationTaskBufferItem;
import com.zy.core.service.StationTaskLoopService;
import com.zy.core.thread.StationThread;
import org.springframework.beans.factory.annotation.Autowired;
@@ -1312,6 +1313,14 @@
if (lock != null) {
return;
}
+ int taskBufferCommandCount = countTaskBufferCommands(stationProtocol.getTaskBufferItems());
+ if (taskBufferCommandCount > 0) {
+ News.info("杈撻�佺珯鐐逛换鍔″仠鐣欒秴鏃讹紝浣嗙紦瀛樺尯浠嶆湁鍛戒护锛屽凡璺宠繃閲嶇畻銆傜珯鐐瑰彿={}锛屽伐浣滃彿={}锛岀紦瀛樺懡浠ゆ暟={}",
+ stationProtocol.getStationId(),
+ stationProtocol.getTaskNo(),
+ taskBufferCommandCount);
+ return;
+ }
Double pathLenFactor = resolveOutboundPathLenFactor(wrkMast);
OutOrderDispatchDecision dispatchDecision = null;
@@ -1375,6 +1384,24 @@
redisUtil.del(key);
}
+ private int countTaskBufferCommands(List<StationTaskBufferItem> taskBufferItems) {
+ if (taskBufferItems == null || taskBufferItems.isEmpty()) {
+ return 0;
+ }
+ int count = 0;
+ for (StationTaskBufferItem item : taskBufferItems) {
+ if (item == null) {
+ continue;
+ }
+ Integer taskNo = item.getTaskNo();
+ Integer targetStaNo = item.getTargetStaNo();
+ if ((taskNo != null && taskNo != 0) || (targetStaNo != null && targetStaNo != 0)) {
+ count++;
+ }
+ }
+ return count;
+ }
+
private int clearIssuedMoveCommandsDuringIdleStay(StationTaskIdleTrack idleTrack,
Integer taskNo,
Integer stationId) {
--
Gitblit v1.9.1