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 73aaa4a3a..ceb86fd19 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 @@ -4,8 +4,7 @@ import club.joylink.rtss.exception.BusinessExceptionAssertEnum; import club.joylink.rtss.simulation.cbtc.ATS.operation.vo.CtcRunPlanParam; import club.joylink.rtss.simulation.cbtc.CTC.data.vo.CtcRunPlanVO; import club.joylink.rtss.simulation.cbtc.data.map.StationDirection; -import lombok.Getter; -import lombok.Setter; +import lombok.*; import org.springframework.util.CollectionUtils; import java.time.LocalDateTime; @@ -281,9 +280,10 @@ public class CtcEffectRepository { /** * 阶段计划数据 */ - @Getter - @Setter - public class CtcStageRunPlanRepository { + @Data + @NoArgsConstructor + @AllArgsConstructor + public static class CtcStageRunPlanRepository { /** * 车站编码 */ @@ -292,7 +292,7 @@ public class CtcEffectRepository { /** * 当前数据版本 */ - private AtomicInteger version; + private AtomicInteger version = new AtomicInteger(0); /** * 最近变更时间 @@ -353,9 +353,10 @@ public class CtcEffectRepository { return new CtcStageRunPlanVO(this); } - @Getter - @Setter - public class CtcStageRunPlanVO { + @Data + @NoArgsConstructor + @AllArgsConstructor + public static class CtcStageRunPlanVO { private String stationCode; private LocalDateTime updateTime; @@ -385,7 +386,7 @@ public class CtcEffectRepository { /** * 当前数据版本 */ - protected AtomicInteger version; + protected AtomicInteger version = new AtomicInteger(0); /** * 最近变更时间 @@ -418,8 +419,7 @@ public class CtcEffectRepository { /** * 车站股道数据 */ - @Setter - @Getter + @Data public static class StationTrackSectionRepository extends AbstractWorkspaceRepository { /** * 保存 @@ -446,8 +446,7 @@ public class CtcEffectRepository { /** * 车站出入口 */ - @Setter - @Getter + @Data public static class StationDoorRepository extends AbstractWorkspaceRepository { private final Map trackSectionMap = new ConcurrentHashMap<>(); @@ -465,10 +464,8 @@ public class CtcEffectRepository { /** * 固定进路信息 */ - @Setter - @Getter + @Data public static class StationRunPlanRepository extends AbstractWorkspaceRepository { - /** * 保存运行计划 * @@ -498,10 +495,6 @@ public class CtcEffectRepository { return this.dataMap.containsKey(code); } - public StationRunPlanRepository() { - this.version = new AtomicInteger(0); - } - public List getAllRunPlanParam() { return this.dataMap.values().stream().collect(Collectors.toList()); } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/vo/CtcRunPlanVO.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/vo/CtcRunPlanVO.java index a6bfc6789..2c0734609 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/vo/CtcRunPlanVO.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/vo/CtcRunPlanVO.java @@ -2,8 +2,9 @@ package club.joylink.rtss.simulation.cbtc.CTC.data.vo; import club.joylink.rtss.simulation.cbtc.ATS.operation.vo.CtcRunPlanParam; import club.joylink.rtss.simulation.cbtc.CTC.data.CtcStationRunPlanLog; -import lombok.Getter; -import lombok.Setter; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import org.springframework.util.StringUtils; import java.time.LocalDateTime; @@ -11,8 +12,9 @@ import java.time.LocalDateTime; /** * 阶段对比 */ -@Setter -@Getter +@Data +@NoArgsConstructor +@AllArgsConstructor public class CtcRunPlanVO { /** * 车站编码 @@ -90,8 +92,9 @@ public class CtcRunPlanVO { return new CtcRunPlanStatusVO(this); } - @Setter - @Getter + @Data + @NoArgsConstructor + @AllArgsConstructor public static class CtcRunPlanStatusVO { /** * 车站编码 diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/storage/plan/StorageCtcEffectData.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/storage/plan/StorageCtcEffectData.java index 60b4f364b..cdc32c9cf 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/storage/plan/StorageCtcEffectData.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/storage/plan/StorageCtcEffectData.java @@ -1,16 +1,18 @@ package club.joylink.rtss.simulation.cbtc.data.storage.plan; import club.joylink.rtss.simulation.cbtc.CTC.data.CtcEffectRepository; -import lombok.Getter; -import lombok.Setter; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import java.util.Map; /** * CTC生效区数据 */ -@Setter -@Getter +@Data +@NoArgsConstructor +@AllArgsConstructor public class StorageCtcEffectData { /**