修改设置计划车时更新车站计划的逻辑
This commit is contained in:
parent
3e4a0d1332
commit
2a6b0bebe1
@ -2,6 +2,7 @@ package club.joylink.rtss.simulation.cbtc.ATS.service;
|
||||
|
||||
import club.joylink.rtss.entity.PlanRouting;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.simulation.cbtc.ATS.service.stage.AtsPlanTrainStageService;
|
||||
import club.joylink.rtss.simulation.cbtc.CI.CiApiService;
|
||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants;
|
||||
@ -54,6 +55,9 @@ public class AtsTrainService {
|
||||
@Autowired
|
||||
private AtsRouteService atsRouteService;
|
||||
|
||||
@Autowired
|
||||
private AtsPlanTrainStageService atsPlanTrainStageService;
|
||||
|
||||
/**
|
||||
* 添加列车追踪
|
||||
*
|
||||
@ -178,9 +182,10 @@ public class AtsTrainService {
|
||||
// 更新列车计划和下一站
|
||||
supervisedTrain.initPlan(tripPlan, nextPlan, repository.getConfig());
|
||||
this.onboardAtpApiService.updateTripPlan(simulation, supervisedTrain.getGroupNumber(), tripPlan);
|
||||
long runningTime = ChronoUnit.SECONDS.between(tripPlan.getStartTime(), nextPlan.getArriveTime());
|
||||
this.onboardAtpApiService.updateNextStation(simulation, supervisedTrain.getGroupNumber(),
|
||||
nextPlan.getStation().getCode(), nextPlan.getSection().getCode(), runningTime, nextPlan.isPark());
|
||||
atsPlanTrainStageService.updateNextPlan(simulation, supervisedTrain, tripPlan, nextPlan);
|
||||
// long runningTime = ChronoUnit.SECONDS.between(tripPlan.getStartTime(), nextPlan.getArriveTime());
|
||||
// this.onboardAtpApiService.updateNextStation(simulation, supervisedTrain.getGroupNumber(),
|
||||
// nextPlan.getStation().getCode(), nextPlan.getSection().getCode(), runningTime, nextPlan.isPark());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ public class AtsPlanTrainStageService implements AtsStageService {
|
||||
this.onboardAtpApiService.updateTripPlan(simulation, trainInfo.getGroupNumber(), nextTripPlan);
|
||||
}
|
||||
|
||||
private void updateNextPlan(Simulation simulation, TrainInfo trainInfo, TripPlan tripPlan, StationPlan nextStationPlan) {
|
||||
public void updateNextPlan(Simulation simulation, TrainInfo trainInfo, TripPlan tripPlan, StationPlan nextStationPlan) {
|
||||
if (nextStationPlan == null) {
|
||||
log.warn(String.format("列车[%s]下一计划到站为null", trainInfo.debugStr()));
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user