【剧本反序列化BUG】
This commit is contained in:
parent
ee5be65ad5
commit
75f5c2b592
@ -205,10 +205,15 @@ public class CtcStationRunPlanLog {
|
|||||||
this.transfinite = paramInfo.getTransfinite();
|
this.transfinite = paramInfo.getTransfinite();
|
||||||
}
|
}
|
||||||
this.runPlanTaskItemMap = new HashMap<>(RunPlanTask.values().length); // 运行计划任务
|
this.runPlanTaskItemMap = new HashMap<>(RunPlanTask.values().length); // 运行计划任务
|
||||||
RunPlanTask.getOptionKeyList().forEach(key -> this.runPlanTaskItemMap.put(key, new RunPlanTaskItem(RunPlanTask.NO)));
|
RunPlanTask.getOptionKeyList().stream().filter(k -> !RunPlanTask.NO.equals(k))
|
||||||
|
.forEach(key -> this.runPlanTaskItemMap.put(key, new RunPlanTaskItem(RunPlanTask.NO)));
|
||||||
paramInfo.getRunPlanTaskMap().forEach((k, v) -> {
|
paramInfo.getRunPlanTaskMap().forEach((k, v) -> {
|
||||||
if (v != null && v > 0) {
|
if (v != null && v > 0 && !RunPlanTask.NO.equals(k)) {
|
||||||
this.runPlanTaskItemMap.get(k.getOptionKey()).setType(k);
|
if (this.runPlanTaskItemMap.containsKey(k.getOptionKey())) {
|
||||||
|
this.runPlanTaskItemMap.get(k.getOptionKey()).setType(k);
|
||||||
|
} else {
|
||||||
|
this.runPlanTaskItemMap.put(k.getOptionKey(), new RunPlanTaskItem(k));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 删除状态
|
// 删除状态
|
||||||
@ -648,7 +653,7 @@ public class CtcStationRunPlanLog {
|
|||||||
if (paramInfo.arriveAndDepartElectrical()) { // 存在指定电力设置,则获取指定
|
if (paramInfo.arriveAndDepartElectrical()) { // 存在指定电力设置,则获取指定
|
||||||
Boolean electrical = arrive ? paramInfo.getArriveElectrical() : paramInfo.getDepartElectrical();
|
Boolean electrical = arrive ? paramInfo.getArriveElectrical() : paramInfo.getDepartElectrical();
|
||||||
runPlanItem.setElectrical(electrical);
|
runPlanItem.setElectrical(electrical);
|
||||||
} else {
|
} else if (paramInfo.getElectrical() != null) {
|
||||||
runPlanItem.setElectrical(paramInfo.getElectrical());
|
runPlanItem.setElectrical(paramInfo.getElectrical());
|
||||||
}
|
}
|
||||||
// 超限等级
|
// 超限等级
|
||||||
|
@ -4,8 +4,7 @@ import club.joylink.rtss.simulation.cbtc.ATS.operation.vo.CtcRunPlanParam;
|
|||||||
import club.joylink.rtss.simulation.cbtc.CTC.data.CtcRepository;
|
import club.joylink.rtss.simulation.cbtc.CTC.data.CtcRepository;
|
||||||
import club.joylink.rtss.simulation.cbtc.CTC.data.CtcStationRunPlanLog;
|
import club.joylink.rtss.simulation.cbtc.CTC.data.CtcStationRunPlanLog;
|
||||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||||
import lombok.Getter;
|
import lombok.*;
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -98,8 +97,12 @@ public class StorageCtcRunPlanLog {
|
|||||||
if (sign != null) {
|
if (sign != null) {
|
||||||
ctcStationRunPlanLog.setSign(sign);
|
ctcStationRunPlanLog.setSign(sign);
|
||||||
}
|
}
|
||||||
this.departItemOtherInfo.convertToObj(ctcStationRunPlanLog.getDepartRunPlan());
|
if (this.departItemOtherInfo != null) {
|
||||||
this.arriveItemOtherInfo.convertToObj(ctcStationRunPlanLog.getArriveRunPlan());
|
this.departItemOtherInfo.convertToObj(ctcStationRunPlanLog.getDepartRunPlan());
|
||||||
|
}
|
||||||
|
if (this.arriveItemOtherInfo != null) {
|
||||||
|
this.arriveItemOtherInfo.convertToObj(ctcStationRunPlanLog.getArriveRunPlan());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setDepartAndArrive(CtcRunPlanParam ctcRunPlanParam, CtcStationRunPlanLog.RunPlanItem runPlanItem, boolean arrive) {
|
private void setDepartAndArrive(CtcRunPlanParam ctcRunPlanParam, CtcStationRunPlanLog.RunPlanItem runPlanItem, boolean arrive) {
|
||||||
@ -166,9 +169,10 @@ public class StorageCtcRunPlanLog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Getter
|
@Data
|
||||||
@Setter
|
@AllArgsConstructor
|
||||||
private class ItemOtherInfo {
|
@NoArgsConstructor
|
||||||
|
public static class ItemOtherInfo {
|
||||||
/**
|
/**
|
||||||
* 实际时间
|
* 实际时间
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user