修改设置头码车逻辑

This commit is contained in:
joylink_zhangsai 2021-05-31 13:05:00 +08:00
parent ac063978f8
commit cd8efe1a21
2 changed files with 9 additions and 10 deletions

View File

@ -260,24 +260,22 @@ public class AtsTrainService {
default: default:
throw new SimulationException(SimulationExceptionType.System_Fault, String.format("无法识别的目的地码类型[%s]", destinationCodeDefinition.getType())); throw new SimulationException(SimulationExceptionType.System_Fault, String.format("无法识别的目的地码类型[%s]", destinationCodeDefinition.getType()));
} }
supervisedTrain.change2HeadCode(destinationCode, serviceNumber, tripNumber);
//默认 //默认
this.onboardAtpApiService.update2HeadTrainServiceNumber(simulation, groupNumber, serviceNumber, tripNumber, destinationCode, true);
} else { //没有新版目的地码数据 } else { //没有新版目的地码数据
List<Routing> routingList = repository.queryRoutingByDestCode(destinationCode); List<Routing> routingList = repository.queryRoutingByDestCode(destinationCode);
if (CollectionUtils.isEmpty(routingList)) { if (CollectionUtils.isEmpty(routingList)) {
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
String.format("不存在目的地号为[%s]的交路", destinationCode)); String.format("不存在目的地号为[%s]的交路", destinationCode));
} else { }
}
boolean needParking = true; boolean needParking = true;
if (repository.getConfig().isNoParkingServiceNumber(serviceNumber)) { if (repository.getConfig().isNoParkingServiceNumber(serviceNumber)) {
needParking = false; needParking = false;
} }
supervisedTrain.change2HeadCode(destinationCode, serviceNumber, tripNumber); supervisedTrain.change2HeadCode(destinationCode, serviceNumber, tripNumber);
//默认
this.onboardAtpApiService.update2HeadTrainServiceNumber(simulation, groupNumber, serviceNumber, tripNumber, destinationCode, needParking); this.onboardAtpApiService.update2HeadTrainServiceNumber(simulation, groupNumber, serviceNumber, tripNumber, destinationCode, needParking);
} supervisedTrain.updateEstimatedArriveInfo(null, null);
}
} }
/** /**

View File

@ -801,6 +801,7 @@ public class RouteService {
} }
//进路解锁 //进路解锁
route.setLock(false); route.setLock(false);
route.setSetting(false);
simulation.getRepository().removeSettingRoute(route); simulation.getRepository().removeSettingRoute(route);
} }