From 30ec656c41cbf3e552cfad409fe5b7e2c1f99ee6 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 25 三月 2026 19:41:25 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/utils/StationOperateProcessUtils.java | 36 +++++++++++++++++++++++++++---------
1 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java b/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
index a081481..2e2dd5c 100644
--- a/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
+++ b/src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
@@ -163,7 +163,16 @@
wrkMast.setModiTime(now);
if (wrkMastService.updateById(wrkMast)) {
wrkAnalysisService.markInboundStationStart(wrkMast, now);
- offerDevpCommandWithDedup(basDevp.getDevpNo(), command, "stationInExecute");
+ boolean offered = offerDevpCommandWithDedup(basDevp.getDevpNo(), command, "stationInExecute");
+ if (offered && stationMoveCoordinator != null) {
+ stationMoveCoordinator.recordDispatch(
+ wrkMast.getWrkNo(),
+ stationProtocol.getStationId(),
+ "stationInExecute",
+ command,
+ false
+ );
+ }
News.info("杈撻�佺珯鐐瑰叆搴撳懡浠や笅鍙戞垚鍔燂紝绔欑偣鍙�={}锛屽伐浣滃彿={}锛屽懡浠ゆ暟鎹�={}", stationId, wrkMast.getWrkNo(), JSON.toJSONString(command));
redisUtil.set(RedisKeyType.STATION_IN_EXECUTE_LIMIT.key + stationId, "lock", 5);
loadGuardState.reserveLoopTask(loopHitResult.getLoopNo());
@@ -334,7 +343,16 @@
wrkMast.setSystemMsg("");
wrkMast.setIoTime(new Date());
if (wrkMastService.updateById(wrkMast)) {
- offerDevpCommandWithDedup(stationObjModel.getDeviceNo(), command, "dualCrnStationOutExecute");
+ boolean offered = offerDevpCommandWithDedup(stationObjModel.getDeviceNo(), command, "dualCrnStationOutExecute");
+ if (offered && stationMoveCoordinator != null) {
+ stationMoveCoordinator.recordDispatch(
+ wrkMast.getWrkNo(),
+ stationProtocol.getStationId(),
+ "dualCrnStationOutExecute",
+ command,
+ false
+ );
+ }
notifyUtils.notify(String.valueOf(SlaveType.Devp), stationObjModel.getDeviceNo(), String.valueOf(wrkMast.getWrkNo()), wrkMast.getWmsWrkNo(), NotifyMsgType.STATION_OUT_TASK_RUN, null);
News.info("杈撻�佺珯鐐瑰嚭搴撳懡浠や笅鍙戞垚鍔燂紝绔欑偣鍙�={}锛屽伐浣滃彿={}锛屽懡浠ゆ暟鎹�={}", stationProtocol.getStationId(), wrkMast.getWrkNo(), JSON.toJSONString(command));
redisUtil.set(RedisKeyType.STATION_OUT_EXECUTE_LIMIT.key + stationProtocol.getStationId(), "lock", 5);
@@ -500,6 +518,7 @@
pathLenFactor,
"checkStationRunBlock_reroute"
).withRunBlockCommand()
+ .withSuppressDispatchGuard()
.withCancelSessionBeforeDispatch()
.withResetSegmentCommandsBeforeDispatch();
executeSharedReroute(context);
@@ -584,6 +603,10 @@
continue;
}
+ if (stationProtocol.isRunBlock()) {
+ continue;
+ }
+
if (!stationProtocol.getStationId().equals(stationProtocol.getTargetStaNo())) {
continue;
}
@@ -645,11 +668,7 @@
continue;
}
- StationCommand circleCommand = getWatchCircleCommand(stationProtocol.getTaskNo());
- if (circleCommand == null) {
- continue;
- }
- if (!stationProtocol.getStationId().equals(circleCommand.getTargetStaNo())) {
+ if (!isWatchingCircleArrival(stationProtocol.getTaskNo(), stationProtocol.getStationId())) {
continue;
}
@@ -1364,8 +1383,7 @@
if (session == null) {
return false;
}
- boolean protectedStatus = session.isActive() || StationMoveSession.STATUS_BLOCKED.equals(session.getStatus());
- if (!protectedStatus || !session.containsStation(stationId)) {
+ if (!session.isActive() || !session.containsStation(stationId)) {
return false;
}
if (StationMoveDispatchMode.CIRCLE == session.getDispatchMode()) {
--
Gitblit v1.9.1