【剧本信息保存实体修改】
This commit is contained in:
parent
bf22dac447
commit
26f96fed02
@ -63,6 +63,9 @@ public class StorageSimulation {
|
||||
this.planLoaded = simulation.isPlanLoaded();
|
||||
this.repository = new StorageSimulationDataRepository(simulation.getRepository(), script);
|
||||
this.ctcDataRepository = new StorageSimulationCtcDataRepository(simulation.getCtcRepository());
|
||||
if (!this.ctcDataRepository.isNotEmpty()) {
|
||||
this.ctcDataRepository = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void recover2Simulation(Simulation simulation) {
|
||||
|
@ -289,7 +289,9 @@ public class StorageSimulationDataRepository {
|
||||
this.usedTrainList = tempUsedTrainList;
|
||||
}
|
||||
// 有状态的进路列表
|
||||
this.settingRouteList = new ArrayList<>(repository.getSettingRouteMap().keySet());
|
||||
if (!repository.getSettingRouteMap().isEmpty()) {
|
||||
this.settingRouteList = new ArrayList<>(repository.getSettingRouteMap().keySet());
|
||||
}
|
||||
}
|
||||
|
||||
public void recover2Simulation(Simulation simulation, SimulationDataRepository repository) {
|
||||
|
@ -159,4 +159,11 @@ public class StorageSimulationCtcDataRepository {
|
||||
this.dispatchCommandList.forEach(command -> repository.addDispatchCommand(command.recover2Simulation(simulation)));
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isNotEmpty() {
|
||||
return this.storageCtcZoneData != null || this.storageCtcEffectData != null || this.runPlanLogList != null
|
||||
|| this.routeSequenceMap != null || this.ticketId != null || this.railTicketList != null
|
||||
|| this.greenLicensesList != null || this.redLicenseList != null || this.dispatchCommandId != null
|
||||
|| this.dispatchCommandList != null;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
import club.joylink.rtss.simulation.cbtc.constant.SignalAspect;
|
||||
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.MapElement;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.MayOutOfOrderDevice;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.Route;
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.Signal;
|
||||
import club.joylink.rtss.util.jsonSerialize.Boolean2NumDeserializer;
|
||||
@ -105,7 +104,7 @@ public class StorageSignal extends StorageDelayUnlockDevice {
|
||||
change = true;
|
||||
this.setBlockade(signal.isBlockade());
|
||||
}
|
||||
if (signal.getLevel() != 1) {
|
||||
if (signal.getLevel() != 1 && signal.getLevel() != 0) {
|
||||
change = true;
|
||||
this.setLevel(signal.getLevel());
|
||||
}
|
||||
@ -117,7 +116,7 @@ public class StorageSignal extends StorageDelayUnlockDevice {
|
||||
change = true;
|
||||
this.setFpl(signal.isFpl());
|
||||
}
|
||||
if (!signal.isLogicLight()) {
|
||||
if (signal.isLogicLight()) {
|
||||
change = true;
|
||||
this.setLogicLight(signal.isLogicLight());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user