【运行计划军用等属性】
【办理进路序列时空指针异常】
This commit is contained in:
parent
c2f0ee2116
commit
b4a5b3b6aa
@ -88,6 +88,46 @@ public class CtcRunPlanParam {
|
||||
*/
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 客运车
|
||||
*/
|
||||
private Boolean passenger;
|
||||
|
||||
/**
|
||||
* 重点列车
|
||||
*/
|
||||
private Boolean keyTrains;
|
||||
|
||||
/**
|
||||
* 是否军用
|
||||
*/
|
||||
private Boolean military;
|
||||
|
||||
/**
|
||||
* 运行股道与基本径路不一致
|
||||
*/
|
||||
private Boolean trackDiscordant;
|
||||
|
||||
/**
|
||||
* 出入口与基本径路不一致
|
||||
*/
|
||||
private Boolean entryOutDiscordant;
|
||||
|
||||
/**
|
||||
* 超限等级
|
||||
*/
|
||||
private CtcStationRunPlanLog.TransfiniteType transfinite;
|
||||
|
||||
/**
|
||||
* 记事
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 晚点原因
|
||||
*/
|
||||
private String lateReason;
|
||||
|
||||
/**
|
||||
* 列车运行计划作业
|
||||
*/
|
||||
|
@ -90,14 +90,14 @@ public class CtcStationRunPlanLogService {
|
||||
}
|
||||
});
|
||||
// 编辑过轨道的行车记录
|
||||
Station station = simulation.getRepository().getByCode(stationCode, Station.class);
|
||||
runPlanLogList.stream().filter(runPlanLog -> runPlanLog.getArriveRunPlan() != null || runPlanLog.getDepartRunPlan() != null)
|
||||
.forEach(runPlanLog -> {
|
||||
CtcStationRunPlanLog r = simulation.getCtcRepository().getRunPlanByRunPlanCode(stationCode, runPlanLog.getCode());
|
||||
if (runPlanLog.getArriveRunPlan() != null && runPlanLog.getArriveRunPlan().getTrackSection() != null) {
|
||||
ctcService.runPlanItemUpdate(simulation, station, runPlanLog.getArriveRunPlan(), false);
|
||||
ctcService.runPlanItemUpdate(simulation, r.getStation(), r.getArriveRunPlan(), false);
|
||||
}
|
||||
if (runPlanLog.getDepartRunPlan() != null && runPlanLog.getDepartRunPlan().getTrackSection() != null) {
|
||||
ctcService.runPlanItemUpdate(simulation, station, runPlanLog.getDepartRunPlan(), true);
|
||||
ctcService.runPlanItemUpdate(simulation, r.getStation(), r.getDepartRunPlan(), true);
|
||||
}
|
||||
});
|
||||
ctcLogicLoop.sendRunPlanChangeMessage(simulation, runPlanLogList, simulation.getSimulationUserIds());
|
||||
@ -374,6 +374,54 @@ public class CtcStationRunPlanLogService {
|
||||
} else {
|
||||
changeRunPlanLog.setRunPlanTaskList(null);
|
||||
}
|
||||
// 是否客运
|
||||
if (planParam.getPassenger() != null && !Objects.equals(planParam.getPassenger(), runPlanLog.getPassenger())) {
|
||||
runPlanLog.setPassenger(planParam.getPassenger());
|
||||
changeRunPlanLog.setPassenger(planParam.getPassenger());
|
||||
change = true;
|
||||
}
|
||||
// 重点列车
|
||||
if (planParam.getKeyTrains() != null && !Objects.equals(planParam.getKeyTrains(), runPlanLog.getKeyTrains())) {
|
||||
runPlanLog.setKeyTrains(planParam.getKeyTrains());
|
||||
changeRunPlanLog.setKeyTrains(planParam.getKeyTrains());
|
||||
change = true;
|
||||
}
|
||||
// 是否军用
|
||||
if (planParam.getMilitary() != null && !Objects.equals(planParam.getMilitary(), runPlanLog.getMilitary())) {
|
||||
runPlanLog.setMilitary(planParam.getMilitary());
|
||||
changeRunPlanLog.setMilitary(planParam.getMilitary());
|
||||
change = true;
|
||||
}
|
||||
// 运行股道与基本径路不一致
|
||||
if (planParam.getTrackDiscordant() != null && !Objects.equals(planParam.getTrackDiscordant(), runPlanLog.getTrackDiscordant())) {
|
||||
runPlanLog.setTrackSectionCode(planParam.getTrackSectionCode());
|
||||
changeRunPlanLog.setTrackSectionCode(planParam.getTrackSectionCode());
|
||||
change = true;
|
||||
}
|
||||
// 出入口与基本径路不一致
|
||||
if (planParam.getEntryOutDiscordant() != null && !Objects.equals(planParam.getEntryOutDiscordant(), runPlanLog.getEntryOutDiscordant())) {
|
||||
runPlanLog.setEntryOutDiscordant(planParam.getEntryOutDiscordant());
|
||||
changeRunPlanLog.setEntryOutDiscordant(planParam.getEntryOutDiscordant());
|
||||
change = true;
|
||||
}
|
||||
// 超限等级
|
||||
if (planParam.getTransfinite() != null && !Objects.equals(planParam.getTransfinite(), runPlanLog.getTransfinite())) {
|
||||
runPlanLog.setTransfinite(planParam.getTransfinite());
|
||||
changeRunPlanLog.setTransfinite(planParam.getTransfinite());
|
||||
change = true;
|
||||
}
|
||||
// 记事
|
||||
if (planParam.getRemark() != null && !Objects.equals(planParam.getRemark(), runPlanLog.getRemark())) {
|
||||
runPlanLog.setRemark(planParam.getRemark());
|
||||
changeRunPlanLog.setRemark(planParam.getRemark());
|
||||
change = true;
|
||||
}
|
||||
// 晚点原因
|
||||
if (planParam.getLateReason() != null && !Objects.equals(planParam.getLateReason(), runPlanLog.getLateReason())) {
|
||||
runPlanLog.setLateReason(planParam.getLateReason());
|
||||
changeRunPlanLog.setLateReason(planParam.getLateReason());
|
||||
change = true;
|
||||
}
|
||||
change = change || changeDepartItem != null;
|
||||
if (change) {
|
||||
changeRunPlanLog.setCode(planParam.getRunPlanCode());
|
||||
@ -456,6 +504,22 @@ public class CtcStationRunPlanLogService {
|
||||
ctcStationRunPlanLog.setCode(RandomGenerator.uuid());
|
||||
ctcStationRunPlanLog.setStation(station);
|
||||
ctcStationRunPlanLog.setTripNumber(tripNumber);
|
||||
// 是否客运
|
||||
ctcStationRunPlanLog.setPassenger(paramInfo.getPassenger());
|
||||
// 重点列车
|
||||
ctcStationRunPlanLog.setKeyTrains(paramInfo.getKeyTrains());
|
||||
// 是否军用
|
||||
ctcStationRunPlanLog.setMilitary(paramInfo.getMilitary());
|
||||
// 运行股道与基本径路不一致
|
||||
ctcStationRunPlanLog.setTrackSectionCode(paramInfo.getTrackSectionCode());
|
||||
// 出入口与基本径路不一致
|
||||
ctcStationRunPlanLog.setEntryOutDiscordant(paramInfo.getEntryOutDiscordant());
|
||||
// 超限等级
|
||||
ctcStationRunPlanLog.setTransfinite(paramInfo.getTransfinite());
|
||||
// 记事
|
||||
ctcStationRunPlanLog.setRemark(paramInfo.getRemark());
|
||||
// 晚点原因
|
||||
ctcStationRunPlanLog.setLateReason(paramInfo.getLateReason());
|
||||
ctcStationRunPlanLog.setArriveRunPlan(CtcStationRunPlanLog.createRunPlanItem(simulation, paramInfo, true));
|
||||
ctcStationRunPlanLog.setDepartRunPlan(CtcStationRunPlanLog.createRunPlanItem(simulation, paramInfo, false));
|
||||
return ctcStationRunPlanLog;
|
||||
|
Loading…
Reference in New Issue
Block a user