| | |
| | | } |
| | | |
| | | String candidateSignature = buildPathSignature(candidateCommand); |
| | | // 同 task、同当前位置、同路径签名的命令视为重复派发,直接压制。 |
| | | if (!isBlank(candidateSignature) && Objects.equals(candidateSignature, session.getPathSignature())) { |
| | | return true; |
| | | } |
| | | |
| | | // 到达下一决策站后允许重新决策,不继续受旧 session 的中间路径保护。 |
| | | if (Objects.equals(currentStationId, session.getNextDecisionStationId())) { |
| | | return false; |
| | | } |
| | | |
| | | // 还处在旧路线覆盖范围内时,其他触发源不应再插入一条新命令。 |
| | | return session.containsStation(currentStationId); |
| | | } |
| | | |
| | |
| | | && Objects.equals(current.getNextDecisionStationId(), command.getTargetStaNo()) |
| | | && Objects.equals(current.getPathSignature(), pathSignature); |
| | | |
| | | // 同一触发站、同一目标、同一路径签名时复用当前 session,只刷新下发时间,不新开 routeVersion。 |
| | | StationMoveSession session = reuseCurrent ? current : new StationMoveSession(); |
| | | if (!reuseCurrent) { |
| | | session.setRouteVersion(current == null || current.getRouteVersion() == null |