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