【修改阶段计划列表实体结构】
This commit is contained in:
parent
de3435cfd9
commit
1fd327136f
@ -387,122 +387,121 @@ public class CtcRunPlanParam implements Cloneable {
|
|||||||
* @return 修改过的字段
|
* @return 修改过的字段
|
||||||
*/
|
*/
|
||||||
public CtcRunPlanParam compareAndChange(CtcRunPlanParam origin, CtcRunPlanParam modify) {
|
public CtcRunPlanParam compareAndChange(CtcRunPlanParam origin, CtcRunPlanParam modify) {
|
||||||
this.setRunPlanCode(modify.getRunPlanCode());
|
|
||||||
boolean change = false;
|
boolean change = false;
|
||||||
if (!Objects.equals(origin.getStationCode(), modify.getStationCode())) {
|
if (!Objects.equals(origin.getStationCode(), modify.getStationCode())) {
|
||||||
this.stationCode = modify.getStationCode();
|
this.stationCode = origin.getStationCode();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getTripNumber(), modify.getTripNumber())) {
|
if (!Objects.equals(origin.getTripNumber(), modify.getTripNumber())) {
|
||||||
this.tripNumber = modify.getTripNumber();
|
this.tripNumber = origin.getTripNumber();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getGroupNumber(), modify.getGroupNumber())) {
|
if (!Objects.equals(origin.getGroupNumber(), modify.getGroupNumber())) {
|
||||||
this.groupNumber = modify.getGroupNumber();
|
this.groupNumber = origin.getGroupNumber();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getTrackSectionCode(), modify.getTrackSectionCode())) {
|
if (!Objects.equals(origin.getTrackSectionCode(), modify.getTrackSectionCode())) {
|
||||||
this.trackSectionCode = modify.getTrackSectionCode();
|
this.trackSectionCode = origin.getTrackSectionCode();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getArriveSectionCode(), modify.getArriveSectionCode())) {
|
if (!Objects.equals(origin.getArriveSectionCode(), modify.getArriveSectionCode())) {
|
||||||
this.arriveSectionCode = modify.getArriveSectionCode();
|
this.arriveSectionCode = origin.getArriveSectionCode();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getDepartSectionCode(), modify.getDepartSectionCode())) {
|
if (!Objects.equals(origin.getDepartSectionCode(), modify.getDepartSectionCode())) {
|
||||||
this.departSectionCode = modify.getDepartSectionCode();
|
this.departSectionCode = origin.getDepartSectionCode();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getArriveTime(), modify.getArriveTime())) {
|
if (!Objects.equals(origin.getArriveTime(), modify.getArriveTime())) {
|
||||||
this.arriveTime = modify.getArriveTime();
|
this.arriveTime = origin.getArriveTime();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getDepartTime(), modify.getDepartTime())) {
|
if (!Objects.equals(origin.getDepartTime(), modify.getDepartTime())) {
|
||||||
this.departTime = modify.getDepartTime();
|
this.departTime = origin.getDepartTime();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getArriveTripNumber(), modify.getArriveTripNumber())) {
|
if (!Objects.equals(origin.getArriveTripNumber(), modify.getArriveTripNumber())) {
|
||||||
this.arriveTripNumber = modify.getArriveTripNumber();
|
this.arriveTripNumber = origin.getArriveTripNumber();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getDepartTripNumber(), modify.getDepartTripNumber())) {
|
if (!Objects.equals(origin.getDepartTripNumber(), modify.getDepartTripNumber())) {
|
||||||
this.departTripNumber = modify.getDepartTripNumber();
|
this.departTripNumber = origin.getDepartTripNumber();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getArriveStationCode(), modify.getArriveStationCode())) {
|
if (!Objects.equals(origin.getArriveStationCode(), modify.getArriveStationCode())) {
|
||||||
this.arriveStationCode = modify.getArriveStationCode();
|
this.arriveStationCode = origin.getArriveStationCode();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getDepartStationCode(), modify.getDepartStationCode())) {
|
if (!Objects.equals(origin.getDepartStationCode(), modify.getDepartStationCode())) {
|
||||||
this.departStationCode = modify.getDepartStationCode();
|
this.departStationCode = origin.getDepartStationCode();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getArriveDirectionCode(), modify.getArriveDirectionCode())) {
|
if (!Objects.equals(origin.getArriveDirectionCode(), modify.getArriveDirectionCode())) {
|
||||||
this.arriveDirectionCode = modify.getArriveDirectionCode();
|
this.arriveDirectionCode = origin.getArriveDirectionCode();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
if (!Objects.equals(origin.getDepartDirectionCode(), modify.getDepartDirectionCode())) {
|
if (!Objects.equals(origin.getDepartDirectionCode(), modify.getDepartDirectionCode())) {
|
||||||
this.departDirectionCode = modify.getDepartDirectionCode();
|
this.departDirectionCode = origin.getDepartDirectionCode();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 到达计划时间
|
// 到达计划时间
|
||||||
if (!Objects.equals(origin.getArrivePlanTime(), modify.getArrivePlanTime())) {
|
if (!Objects.equals(origin.getArrivePlanTime(), modify.getArrivePlanTime())) {
|
||||||
this.arrivePlanTime = modify.getArrivePlanTime();
|
this.arrivePlanTime = origin.getArrivePlanTime();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 出发计划时间
|
// 出发计划时间
|
||||||
if (!Objects.equals(origin.getDepartPlanTime(), modify.getDepartPlanTime())) {
|
if (!Objects.equals(origin.getDepartPlanTime(), modify.getDepartPlanTime())) {
|
||||||
this.departPlanTime = modify.getDepartPlanTime();
|
this.departPlanTime = origin.getDepartPlanTime();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 始发
|
// 始发
|
||||||
if (!Objects.equals(origin.getStartRunPlan(), modify.getStartRunPlan())) {
|
if (!Objects.equals(origin.getStartRunPlan(), modify.getStartRunPlan())) {
|
||||||
this.startRunPlan = modify.getStartRunPlan();
|
this.startRunPlan = origin.getStartRunPlan();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 终到
|
// 终到
|
||||||
if (!Objects.equals(origin.getEndRunPlan(), modify.getEndRunPlan())) {
|
if (!Objects.equals(origin.getEndRunPlan(), modify.getEndRunPlan())) {
|
||||||
this.endRunPlan = modify.getEndRunPlan();
|
this.endRunPlan = origin.getEndRunPlan();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 电力计划
|
// 电力计划
|
||||||
if (!Objects.equals(origin.getElectrical(), modify.getElectrical())) {
|
if (!Objects.equals(origin.getElectrical(), modify.getElectrical())) {
|
||||||
this.electrical = modify.getElectrical();
|
this.electrical = origin.getElectrical();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 办理客运
|
// 办理客运
|
||||||
if (!Objects.equals(origin.getPassenger(), modify.getPassenger())) {
|
if (!Objects.equals(origin.getPassenger(), modify.getPassenger())) {
|
||||||
this.passenger = modify.getPassenger();
|
this.passenger = origin.getPassenger();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 重点列车
|
// 重点列车
|
||||||
if (!Objects.equals(origin.getKeyTrains(), modify.getKeyTrains())) {
|
if (!Objects.equals(origin.getKeyTrains(), modify.getKeyTrains())) {
|
||||||
this.keyTrains = modify.getKeyTrains();
|
this.keyTrains = origin.getKeyTrains();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 是否军用
|
// 是否军用
|
||||||
if (!Objects.equals(origin.getMilitary(), modify.getMilitary())) {
|
if (!Objects.equals(origin.getMilitary(), modify.getMilitary())) {
|
||||||
this.military = modify.getMilitary();
|
this.military = origin.getMilitary();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 运行股道与基本径路不一致
|
// 运行股道与基本径路不一致
|
||||||
if (!Objects.equals(origin.getTrackDiscordant(), modify.getTrackDiscordant())) {
|
if (!Objects.equals(origin.getTrackDiscordant(), modify.getTrackDiscordant())) {
|
||||||
this.trackDiscordant = modify.getTrackDiscordant();
|
this.trackDiscordant = origin.getTrackDiscordant();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 出入口与基本径路不一致
|
// 出入口与基本径路不一致
|
||||||
if (!Objects.equals(origin.getEntryOutDiscordant(), modify.getEntryOutDiscordant())) {
|
if (!Objects.equals(origin.getEntryOutDiscordant(), modify.getEntryOutDiscordant())) {
|
||||||
this.entryOutDiscordant = modify.getTrackDiscordant();
|
this.entryOutDiscordant = origin.getTrackDiscordant();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 超限等级
|
// 超限等级
|
||||||
if (!Objects.equals(origin.getTransfinite(), modify.getTransfinite())) {
|
if (!Objects.equals(origin.getTransfinite(), modify.getTransfinite())) {
|
||||||
this.transfinite = modify.getTransfinite();
|
this.transfinite = origin.getTransfinite();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
// 状态
|
// 状态
|
||||||
if (!Objects.equals(origin.getStatus(), modify.getStatus())) {
|
if (!Objects.equals(origin.getStatus(), modify.getStatus())) {
|
||||||
this.status = modify.getStatus();
|
this.status = origin.getStatus();
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
return change ? this : null;
|
return change ? this : null;
|
||||||
|
@ -197,13 +197,13 @@ public class CtcStationRunPlanLogService {
|
|||||||
CtcStationRunPlanLog runPlanLog = simulation.getCtcRepository()
|
CtcStationRunPlanLog runPlanLog = simulation.getCtcRepository()
|
||||||
.getRunPlanByRunPlanCodeAndStationCode(stationCode, ctcRunPlanVO.getRunPlanCode());
|
.getRunPlanByRunPlanCodeAndStationCode(stationCode, ctcRunPlanVO.getRunPlanCode());
|
||||||
if (runPlanLog != null) {
|
if (runPlanLog != null) {
|
||||||
runPlanLog.setBaseAttribute(ctcRunPlanVO.getOriginRunPlan());
|
runPlanLog.setBaseAttribute(ctcRunPlanVO.getRunPlan());
|
||||||
// 到达
|
// 到达
|
||||||
modifyRunPlanItemInfo(simulation, runPlanLog.getArriveRunPlan(), ctcRunPlanVO.getOriginRunPlan(), true);
|
modifyRunPlanItemInfo(simulation, runPlanLog.getArriveRunPlan(), ctcRunPlanVO.getRunPlan(), true);
|
||||||
// 出发
|
// 出发
|
||||||
modifyRunPlanItemInfo(simulation, runPlanLog.getDepartRunPlan(), ctcRunPlanVO.getOriginRunPlan(), false);
|
modifyRunPlanItemInfo(simulation, runPlanLog.getDepartRunPlan(), ctcRunPlanVO.getRunPlan(), false);
|
||||||
} else {
|
} else {
|
||||||
runPlanLog = createRunPlanLog(simulation, stationCode, ctcRunPlanVO.getOriginRunPlan());
|
runPlanLog = createRunPlanLog(simulation, stationCode, ctcRunPlanVO.getRunPlan());
|
||||||
simulation.getCtcRepository().addRunPlanToSimulationMap(runPlanLog);
|
simulation.getCtcRepository().addRunPlanToSimulationMap(runPlanLog);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -23,7 +23,7 @@ public class CtcRunPlanVO {
|
|||||||
/**
|
/**
|
||||||
* 当前运行计划
|
* 当前运行计划
|
||||||
*/
|
*/
|
||||||
private CtcRunPlanParam originRunPlan;
|
private CtcRunPlanParam runPlan;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改过的字段信息
|
* 修改过的字段信息
|
||||||
@ -34,7 +34,7 @@ public class CtcRunPlanVO {
|
|||||||
this.stationCode = runPlanParam.getStationCode();
|
this.stationCode = runPlanParam.getStationCode();
|
||||||
this.runPlanCode = runPlanParam.getRunPlanCode();
|
this.runPlanCode = runPlanParam.getRunPlanCode();
|
||||||
// 修改前的运行计划
|
// 修改前的运行计划
|
||||||
this.originRunPlan = runPlanParam.clone();
|
this.runPlan = runPlanParam.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user