【改方时列车换端操作】

This commit is contained in:
weizhihong 2022-04-25 10:15:41 +08:00
parent f83fbf0002
commit 4d12f520d1

View File

@ -151,11 +151,11 @@ public class AssistService {
if (train == null || !train.isStop()) { if (train == null || !train.isStop()) {
throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:未停靠列车"); throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:未停靠列车");
} }
// 判断本站台是否是接车站台 // 判断本站台是否是接车站台,这里不做判断在改方实际操作时判断列车
boolean isReceive = button.getStand().isRight() == train.isRight(); // boolean isReceive = button.getStand().isRight() == train.isRight();
if (!isReceive) { // if (!isReceive) {
throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:非接车方向"); // throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:非接车方向");
} // }
}; };
/** /**
@ -171,8 +171,11 @@ public class AssistService {
if (train == null || !train.isStop()) { if (train == null || !train.isStop()) {
throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:未停靠列车"); throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:未停靠列车");
} }
// 判断列车是否要执行换端
if (button.getStand().isRight() == train.isRight()) {
// 列车换端 // 列车换端
atpService.turnDirectionImmediately(train); atpService.turnDirectionImmediately(train);
}
// 获取发车指示灯 // 获取发车指示灯
Indicator deliverIndicator = getStationIndicatorByType(button.getStation(), button.getLabel(), IndicatorTypeEnum.DELIVER); Indicator deliverIndicator = getStationIndicatorByType(button.getStation(), button.getLabel(), IndicatorTypeEnum.DELIVER);
// 办进路 // 办进路