#
Junjie
15 小时以前 909164aa1859fdf25330eb130bc90b8bd22e540b
src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
@@ -466,6 +466,17 @@
                        if (wrkMast.getIoType() == WrkIoType.IN.id && runBlockReassignLocStationList.contains(stationProtocol.getStationId())) {
                            //站点处于重新分配库位区域
                            int currentTaskBufferCommandCount = countCurrentTaskBufferCommands(
                                    stationProtocol.getTaskBufferItems(),
                                    stationProtocol.getTaskNo()
                            );
                            if (currentTaskBufferCommandCount > 0) {
                                News.info("输送站点运行堵塞重分配已跳过,缓存区仍存在当前任务命令。站点号={},工作号={},当前任务命令数={}",
                                        stationProtocol.getStationId(),
                                        stationProtocol.getTaskNo(),
                                        currentTaskBufferCommandCount);
                                continue;
                            }
                            //运行堵塞,重新申请任务
                            String response = wmsOperateUtils.applyReassignTaskLocNo(wrkMast.getWrkNo(), stationProtocol.getStationId());
                            if (Cools.isEmpty(response)) {
@@ -562,6 +573,10 @@
                                continue;
                            }
                            if (countCurrentTaskBufferCommands(stationProtocol.getTaskBufferItems(), stationProtocol.getTaskNo()) > 0) {
                                continue;
                            }
                            StationCommand command = stationThread.getRunBlockRerouteCommand(
                                    wrkMast.getWrkNo(),
                                    stationProtocol.getStationId(),
@@ -577,6 +592,7 @@
                                continue;
                            }
                            resetSegmentMoveCommandsBeforeReroute(wrkMast.getWrkNo());
                            offerDevpCommandWithDedup(basDevp.getDevpNo(), command, "checkStationRunBlock_reroute");
                            syncOutOrderWatchState(wrkMast, stationProtocol.getStationId(), outOrderStationIds, dispatchDecision, command);
                            News.info("输送站点堵塞后重新计算路径命令下发成功,站点号={},工作号={},命令数据={}", stationProtocol.getStationId(), wrkMast.getWrkNo(), JSON.toJSONString(command));
@@ -677,6 +693,13 @@
                    continue;
                }
                if (countCurrentTaskBufferCommands(stationProtocol.getTaskBufferItems(), stationProtocol.getTaskNo()) > 0) {
                    continue;
                }
                if (isWatchingCircleTransit(wrkMast.getWrkNo(), stationProtocol.getStationId())) {
                    continue;
                }
                if (isWatchingCircleArrival(wrkMast.getWrkNo(), stationProtocol.getStationId())) {
                    continue;
                }
@@ -707,6 +730,7 @@
                if (!tryAcquireOutOrderDispatchLock(wrkMast.getWrkNo(), stationProtocol.getStationId())) {
                    continue;
                }
                resetSegmentMoveCommandsBeforeReroute(wrkMast.getWrkNo());
                syncOutOrderWatchState(wrkMast, stationProtocol.getStationId(), outOrderStationIds, dispatchDecision, command);
                offerDevpCommandWithDedup(stationObjModel.getDeviceNo(), command, "checkStationOutOrder");
                News.info(dispatchDecision.isCircle() ? "{}任务进行绕圈" : "{}任务直接去目标点", wrkMast.getWrkNo());
@@ -756,6 +780,9 @@
                if (Objects.equals(stationProtocol.getStationId(), wrkMast.getStaNo())) {
                    continue;
                }
                if (countCurrentTaskBufferCommands(stationProtocol.getTaskBufferItems(), stationProtocol.getTaskNo()) > 0) {
                    continue;
                }
                Double pathLenFactor = resolveOutboundPathLenFactor(wrkMast);
                OutOrderDispatchDecision dispatchDecision = resolveOutboundDispatchDecision(
@@ -783,6 +810,7 @@
                if (!tryAcquireOutOrderDispatchLock(wrkMast.getWrkNo(), stationProtocol.getStationId())) {
                    continue;
                }
                resetSegmentMoveCommandsBeforeReroute(wrkMast.getWrkNo());
                syncOutOrderWatchState(wrkMast, stationProtocol.getStationId(), outOrderList, dispatchDecision, command);
                offerDevpCommandWithDedup(basDevp.getDevpNo(), command, "watchCircleStation");
            }
@@ -1259,6 +1287,15 @@
        return command != null && stationId != null && stationId.equals(command.getTargetStaNo());
    }
    private boolean isWatchingCircleTransit(Integer wrkNo, Integer stationId) {
        StationCommand command = getWatchCircleCommand(wrkNo);
        if (command == null || stationId == null || Objects.equals(stationId, command.getTargetStaNo())) {
            return false;
        }
        List<Integer> navigatePath = command.getNavigatePath();
        return navigatePath != null && navigatePath.contains(stationId);
    }
    private StationCommand getWatchCircleCommand(Integer wrkNo) {
        if (wrkNo == null || wrkNo <= 0) {
            return null;