Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
c6868d4e0a
@ -45,8 +45,8 @@ public class StationDirectionService {
|
||||
*/
|
||||
private final ButtonValidInterface turnDirectionPressDownValid = (simulation, stationDirection) -> {
|
||||
// 如果处于发辅助状态,说明存在异常情况正在人为处理,直接跳过判断
|
||||
if (stationDirection.isMainAssistStatus() && stationDirection.isDeliverAssistStatus()) {
|
||||
return;
|
||||
if (stationDirection.isMainAssistStatus()) {
|
||||
throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:正处在辅助状态");
|
||||
}
|
||||
// 区间是否空闲
|
||||
if (StationDirection.IndicatorStatusEnum.O.equals(stationDirection.getSectionAspect())) {
|
||||
@ -81,15 +81,13 @@ public class StationDirectionService {
|
||||
boolean isReceiveConflict = stationDirection.getReceiveRouteList().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) {
|
||||
throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:存在锁闭进路");
|
||||
}
|
||||
// 是否改方状态
|
||||
if (stationDirection.isChangeDirectionStatus()) {
|
||||
throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:正在改方状态");
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -440,7 +440,8 @@ public class CtcStationRunPlanLogService {
|
||||
// 确定车次班次
|
||||
if (StringUtils.isEmpty(runPlanParam.getGroupNumber())) {
|
||||
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.generateRunPlanCode();
|
||||
|
@ -181,7 +181,12 @@ public class CtcStationRunPlanLog {
|
||||
this.military = paramInfo.getMilitary(); // 是否军用
|
||||
this.trackDiscordant = paramInfo.getTrackDiscordant(); // 运行股道与基本径路不一致
|
||||
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); // 运行计划任务
|
||||
RunPlanTask.getOptionKeyList().forEach(key -> this.runPlanTaskItemMap.put(key, new RunPlanTaskItem(RunPlanTask.NO)));
|
||||
paramInfo.getRunPlanTaskMap().forEach((k, v) -> {
|
||||
@ -525,7 +530,7 @@ public class CtcStationRunPlanLog {
|
||||
}
|
||||
|
||||
private void clearProperty() {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user