diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmd.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmd.java index 5c13b5aed..55681596e 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmd.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmd.java @@ -18,10 +18,6 @@ public class DisCmd { * 调度命令号(不一定唯一) */ private String cmdCode; - /** - * 调度命令的创建平台识别号 - */ - private String cpId; /** * 标题 */ diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmdApiController.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmdApiController.java index d0b0239b0..89371e679 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmdApiController.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmdApiController.java @@ -121,7 +121,7 @@ public class DisCmdApiController { */ public static class ClearCacheReqVo{ /** - * 调度命令的创建平台识别号 + * 调度命令的创建平台(调度台或车站code)识别号 */ private String cpId; } @@ -131,7 +131,7 @@ public class DisCmdApiController { @Data public static class DeleteFromCacheReqVo{ /** - * 调度命令的创建平台识别号 + * 调度命令的创建平台(调度台或车站code)识别号 */ private String cpId; /** diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmdSendCompany.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmdSendCompany.java index 89c2f24b7..bb5335e20 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmdSendCompany.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/DisCmdSendCompany.java @@ -9,16 +9,16 @@ import java.time.LocalDateTime; */ @Data public class DisCmdSendCompany { - /** - * 发令单位类型 - */ - private Type type = Type.Undefined; /** * 发令单位名称 */ private String name; /** - * 发令单位code + * 发令平台类型 + */ + private Type type = Type.Undefined; + /** + * 发令平台code */ private String code; /** diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/convertor/DisCmdConvertor.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/convertor/DisCmdConvertor.java index f151da993..a17a0ddd3 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/convertor/DisCmdConvertor.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/convertor/DisCmdConvertor.java @@ -104,8 +104,6 @@ public class DisCmdConvertor { return to; } public static DisCmd convert(DisCmdSrcVo from,DisCmd to){ - // - to.setCpId(from.getCpId()); to.setAuthState(from.getAuthState()); to.setCmdId(from.getCmdId()); to.setCmdCode(from.getCmdCode()); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/service/DisCmdService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/service/DisCmdService.java index 34c730167..09dd2bd7d 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/service/DisCmdService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/service/DisCmdService.java @@ -49,27 +49,27 @@ public class DisCmdService { } /** * 删除缓存箱中的某条调度命令 - * @param cpId 调度命令的创建平台识别号 + * @param cpId 调度命令的创建平台(调度台或车站的code)识别号 * @param cmdId */ public void deleteFromCache(Simulation simulation,String cpId,String cmdId){ CtcRepository ctcRepository = simulation.getCtcRepository(); DisCmd cmd = this.findDisCmd(simulation,cmdId); if(null != cmd){ - final boolean can = cpId.equals(cmd.getCpId())&&DisCmdSendCompany.Status.Cache.equals(cmd.getSendCompany().getState()); + final boolean can = cpId.equals(cmd.getSendCompany().getCode())&&DisCmdSendCompany.Status.Cache.equals(cmd.getSendCompany().getState()); BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(can, String.format("仿真(%s),调度命令id(%s)的删除校验失败", simulation.getId(),cmdId)); ctcRepository.getDisCmdMap().remove(cmdId); } } /** * 清空缓存箱中的所有调度命令 - * @param cpId 调度命令的创建平台识别号 + * @param cpId 调度命令的创建平台(调度台或车站的code)识别号 */ public void clearCache(Simulation simulation,String cpId){ CtcRepository ctcRepository = simulation.getCtcRepository(); List clearList = new ArrayList<>(); ctcRepository.getDisCmdMap().values().forEach(cmd->{ - if(cpId.equals(cmd.getCpId())&&DisCmdSendCompany.Status.Cache.equals(cmd.getSendCompany().getState())){ + if(cpId.equals(cmd.getSendCompany().getCode())&&DisCmdSendCompany.Status.Cache.equals(cmd.getSendCompany().getState())){ clearList.add(cmd.getCmdId()); } }); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/vo/DisCmdSendCompanyVo.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/vo/DisCmdSendCompanyVo.java index 1ef37ea7d..10a8aafaf 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/vo/DisCmdSendCompanyVo.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/vo/DisCmdSendCompanyVo.java @@ -11,18 +11,17 @@ import java.time.LocalDateTime; */ @Data public class DisCmdSendCompanyVo { - - /** - * 发令单位类型[Dispatcher(调度台) Station(车站)] - * @see DisCmdSendCompany.Type - */ - private String type = "Undefined"; /** * 发令单位名称 */ private String name; /** - * 发令单位code + * 发令平台类型[Dispatcher(调度台) Station(车站)] + * @see DisCmdSendCompany.Type + */ + private String type = "Undefined"; + /** + * 发令平台code */ private String code; /** diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/vo/DisCmdSrcVo.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/vo/DisCmdSrcVo.java index fe01490b5..d42b2dbcc 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/vo/DisCmdSrcVo.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/rail/cmd/vo/DisCmdSrcVo.java @@ -10,10 +10,6 @@ import java.util.List; */ @Data public class DisCmdSrcVo { - /** - * 调度命令的创建平台识别号 - */ - private String cpId; /** * 标题 */