Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
joylink_zhangsai 2022-07-14 15:16:31 +08:00
commit c6868d4e0a
3 changed files with 15 additions and 11 deletions

View File

@ -45,8 +45,8 @@ public class StationDirectionService {
*/ */
private final ButtonValidInterface turnDirectionPressDownValid = (simulation, stationDirection) -> { private final ButtonValidInterface turnDirectionPressDownValid = (simulation, stationDirection) -> {
// 如果处于发辅助状态说明存在异常情况正在人为处理直接跳过判断 // 如果处于发辅助状态说明存在异常情况正在人为处理直接跳过判断
if (stationDirection.isMainAssistStatus() && stationDirection.isDeliverAssistStatus()) { if (stationDirection.isMainAssistStatus()) {
return; throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:正处在辅助状态");
} }
// 区间是否空闲 // 区间是否空闲
if (StationDirection.IndicatorStatusEnum.O.equals(stationDirection.getSectionAspect())) { if (StationDirection.IndicatorStatusEnum.O.equals(stationDirection.getSectionAspect())) {
@ -81,15 +81,13 @@ public class StationDirectionService {
boolean isReceiveConflict = stationDirection.getReceiveRouteList().stream().anyMatch(Route::isLock); boolean isReceiveConflict = stationDirection.getReceiveRouteList().stream().anyMatch(Route::isLock);
// 原发车站无发车进路锁闭 // 原发车站无发车进路锁闭
boolean isDeliverConflict = stationDirection.getDeliverRouteList().stream().anyMatch(Route::isLock); boolean isDeliverConflict = stationDirection.getDeliverRouteList().stream().anyMatch(Route::isLock);
// 相对车站
StationDirection relativeDirection = getRelativeStationDirection(simulation, stationDirection);
if (relativeDirection != null) {
isReceiveConflict = isReceiveConflict || relativeDirection.getReceiveRouteList().stream().anyMatch(Route::isLock);
isDeliverConflict = isDeliverConflict || relativeDirection.getDeliverRouteList().stream().anyMatch(Route::isLock);
}
if (isReceiveConflict || isDeliverConflict) { if (isReceiveConflict || isDeliverConflict) {
throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:存在锁闭进路"); throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:存在锁闭进路");
} }
// 是否改方状态
if (stationDirection.isChangeDirectionStatus()) {
throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:正在改方状态");
}
}; };
/** /**

View File

@ -440,7 +440,8 @@ public class CtcStationRunPlanLogService {
// 确定车次班次 // 确定车次班次
if (StringUtils.isEmpty(runPlanParam.getGroupNumber())) { if (StringUtils.isEmpty(runPlanParam.getGroupNumber())) {
long time = simulation.getCtcRepository().getAllRunPlanList().stream() long time = simulation.getCtcRepository().getAllRunPlanList().stream()
.filter(r -> tripNumber.equals(r.getTripNumber())).count(); .filter(r -> tripNumber.equals(r.getTripNumber()) && stationCode.equals(r.getStation().getCode()))
.count();
runPlanParam.generateGroupNumber(time + 1); runPlanParam.generateGroupNumber(time + 1);
} }
runPlanParam.generateRunPlanCode(); runPlanParam.generateRunPlanCode();

View File

@ -181,7 +181,12 @@ public class CtcStationRunPlanLog {
this.military = paramInfo.getMilitary(); // 是否军用 this.military = paramInfo.getMilitary(); // 是否军用
this.trackDiscordant = paramInfo.getTrackDiscordant(); // 运行股道与基本径路不一致 this.trackDiscordant = paramInfo.getTrackDiscordant(); // 运行股道与基本径路不一致
this.entryOutDiscordant = paramInfo.getEntryOutDiscordant(); // 出入口与基本径路不一致 this.entryOutDiscordant = paramInfo.getEntryOutDiscordant(); // 出入口与基本径路不一致
this.transfinite = paramInfo.getTransfinite(); // 超限等级 // 超限等级
if (paramInfo.getTransfinite() == null && (paramInfo.getDepartTransfinite() != null || paramInfo.getArriveTransfinite() != null)) {
this.transfinite = paramInfo.getDepartTransfinite() != null ? paramInfo.getDepartTransfinite() : paramInfo.getArriveTransfinite();
} else {
this.transfinite = paramInfo.getTransfinite();
}
this.runPlanTaskItemMap = new HashMap<>(RunPlanTask.values().length); // 运行计划任务 this.runPlanTaskItemMap = new HashMap<>(RunPlanTask.values().length); // 运行计划任务
RunPlanTask.getOptionKeyList().forEach(key -> this.runPlanTaskItemMap.put(key, new RunPlanTaskItem(RunPlanTask.NO))); RunPlanTask.getOptionKeyList().forEach(key -> this.runPlanTaskItemMap.put(key, new RunPlanTaskItem(RunPlanTask.NO)));
paramInfo.getRunPlanTaskMap().forEach((k, v) -> { paramInfo.getRunPlanTaskMap().forEach((k, v) -> {
@ -525,7 +530,7 @@ public class CtcStationRunPlanLog {
} }
private void clearProperty() { private void clearProperty() {
} }
} }