diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/data/StationDirection.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/data/StationDirection.java index 7953a35fe..cc0a83485 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/data/StationDirection.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/data/StationDirection.java @@ -19,7 +19,7 @@ import java.util.concurrent.atomic.AtomicInteger; @Setter @Getter @Slf4j -public class StationDirection extends MayOutOfOrderDevice { +public class StationDirection extends MayOutOfOrderDevice implements Cloneable { /** * 发辅助默认倒计时 25s */ @@ -270,7 +270,14 @@ public class StationDirection extends MayOutOfOrderDevice { this.deliverRouteList = new ArrayList<>(); this.routeSettingStatusMap = new HashMap<>(); } - + public StationDirection clone(){ + try { + return (StationDirection)super.clone(); + } catch (CloneNotSupportedException e) { + e.printStackTrace(); + } + return null; + } @Override public void reset() { this.routeSettingStatusMap.clear(); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcEffectRepository.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcEffectRepository.java index 74e715735..a52f7e2fe 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcEffectRepository.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcEffectRepository.java @@ -575,6 +575,6 @@ public class CtcEffectRepository { this.stationTrackSectionMap.clear(); this.doorRepository.clear(); this.regularTrainLineMap.clear(); - + updateReguarTrainLineMap.clear(); } } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcManageRepository.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcManageRepository.java index 8c7a82a11..2046dd75f 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcManageRepository.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcManageRepository.java @@ -48,10 +48,12 @@ public class CtcManageRepository { public void reset() { + this.trackSectionRepository.clear(); this.doorRepository.clear(); this.runPlanRepository.clear(); - this.runPlanRepository.clear(); + regularTrainLineMap.clear(); + } /** diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/build/SimulationBuilder.java b/src/main/java/club/joylink/rtss/simulation/cbtc/build/SimulationBuilder.java index f9ae4b71e..eb34db8eb 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/build/SimulationBuilder.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/build/SimulationBuilder.java @@ -366,7 +366,8 @@ public class SimulationBuilder { // ioGate.setCode(sd.getCode()); // ioGate.setIoName(sd.getName()); // ioGate.setDirection(sd.getLabelEnum()); - doorRep.save(sd); + + doorRep.save(sd.clone()); } for (Stand stand : station.getAllStandList()) { TrackSection ts = new TrackSection(stand.getSection());