From b121560787e1ae91f5795fd1ef17aa518343ffdd Mon Sep 17 00:00:00 2001 From: DU Date: Sat, 20 Feb 2021 13:40:42 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=89=A3=E8=BD=A6?= =?UTF-8?q?=EF=BC=8C=E8=BD=A6=E7=AB=99=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/ATS/operation/Operation.java | 16 +++++++++- .../handler/StandOperateHandler.java | 16 ++++++++++ .../handler/StationOperateHandler.java | 5 +-- .../cbtc/ATS/service/AtsStandService.java | 32 +++++++++++++++++++ .../rtss/simulation/cbtc/CI/CiApiService.java | 4 +++ .../simulation/cbtc/CI/CiApiServiceImpl.java | 12 +++++++ .../cbtc/CI/service/StandService.java | 20 ++++++++++++ .../rtss/simulation/cbtc/data/map/Stand.java | 5 ++- .../simulation/cbtc/data/map/Station.java | 1 + .../cbtc/data/status/StandStatus.java | 10 ++++++ .../cbtc/data/vo/StandStatusVO.java | 4 +++ 11 files changed, 121 insertions(+), 4 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java index 179dba8df..818d13bc6 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java @@ -189,6 +189,10 @@ public class Operation { Stand_Open_Psd, /** 取消设置(扣车或跳停) */ Stand_Cancel_Setting, + /** 系统扣车 */ + Stand_Sys_Hold_Train(), + /** 取消系统扣车 */ + Stand_Cancel_Sys_Hold_Train(), //--------------------------- 控制模式 --------------------------- /** 请求站控 */ @@ -209,7 +213,7 @@ public class Operation { CM_Surrender_Control(), /** 连锁控 */ CM_Interlock_Control(), - /** 回复中控请求(同意/拒绝) */ + /** 回复连锁控请求(同意/拒绝) */ CM_Reply_Interlock_Control(), //--------------------------- 集中车站 --------------------------- @@ -246,6 +250,16 @@ public class Operation { /** 设置/取消强制点灯 */ Station_Set_Or_Cancel_Force_Physical_Signal, + //车站控制授权 + /** 请求区域控制权 */ + Station_Apply_Control, + /** 授权转移 */ + Station_Control_Transfer, + /** 下放站控 */ + Station_Control_Devolve, + /** 收回站控 */ + Station_Control_Revoke, + //--------------------------- 列车 --------------------------- /** 在指定区段加载一辆计划列车(本地开发使用) */ Train_Init_Plan(), diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StandOperateHandler.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StandOperateHandler.java index 8ef427578..3460e8ef4 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StandOperateHandler.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StandOperateHandler.java @@ -73,6 +73,22 @@ public class StandOperateHandler { } + /** + * 设置系统扣车 + */ + @OperateHandlerMapping(type = Operation.Type.Stand_Sys_Hold_Train) + public void setSysHoldTrain(Simulation simulation) { + this.atsStandService.sysHoldTrain(simulation); + } + + /** + * 取消系统扣车 + */ + @OperateHandlerMapping(type = Operation.Type.Stand_Cancel_Sys_Hold_Train) + public void cancelSysHoldTrain(Simulation simulation) { + this.atsStandService.cancelSysHoldTrain(simulation); + } + /** * 提前发车 */ diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StationOperateHandler.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StationOperateHandler.java index 23d0e809d..a74c6f542 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StationOperateHandler.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StationOperateHandler.java @@ -161,6 +161,7 @@ public class StationOperateHandler { atsStationService.emergencyStationControl(simulation, fromMember, stationCodes); } + /**回复站控请求c*/ @OperateHandlerMapping(type = Operation.Type.CM_Reply_Station_Control) public void replyForStationControl(Simulation simulation, List replyVOList){ @@ -187,14 +188,14 @@ public class StationOperateHandler { repository.getSignalList().stream().filter(s -> Objects.equals(stationCode,s.getInterlockStation().getCode())).forEach(signal -> ciApiService.blockadeSignal(simulation, signal.getCode())); } - /**交出控制权*/ + /**交出控制权/下放站控*/ @OperateHandlerMapping(type = Operation.Type.CM_Surrender_Control) public void surrenderControl(Simulation simulation, SimulationMember member, String stationCode){ SimulationDataRepository repository = simulation.getRepository(); this.atsStationService.surrenderControl(simulation, member, repository.getByCode(stationCode, Station.class)); } - /**交出控制权*/ + /**接收控制权*/ @OperateHandlerMapping(type = Operation.Type.CM_Receive_Control) public void receiveControl(Simulation simulation, SimulationMember member, String stationCode){ SimulationDataRepository repository = simulation.getRepository(); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStandService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStandService.java index f7328d2a2..6d9be79ba 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStandService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStandService.java @@ -329,6 +329,10 @@ public class AtsStandService { } else { this.ciApiService.standHoldTrain(simulation, standCode, false); } + checkAndSetTrainHold(simulation, stand); + } + + private void checkAndSetTrainHold(Simulation simulation, Stand stand) { if (stand.isHoldTrain()) { // 先默认CBTC模式,扣车状态发送给列车 List superviseTrainList = simulation.getRepository().getSuperviseTrainList(); @@ -342,6 +346,34 @@ public class AtsStandService { } } + public void sysHoldTrain(Simulation simulation) { + List stands = simulation.getRepository().getStandList(); + stands.forEach(stand -> { + if (stand.isJumpStop()) { + stand.setAllSkip(false); + stand.getSkipSet().clear(); + } + this.ciApiService.sysHoldTrain(simulation, stand.getCode()); + checkAndSetTrainHold(simulation, stand); + }); + List onlineTrainList = simulation.getRepository().getOnlineTrainList(); + for (VirtualRealityTrain train : onlineTrainList) { + if (train.isJump()) { + this.onboardAtpApiService.cancelJump(simulation, train.getGroupNumber()); + } + } + } + + public void cancelSysHoldTrain(Simulation simulation) { + List stands = simulation.getRepository().getStandList(); + stands.forEach(stand -> { + if (stand.isSysHoldTrain()) { + this.ciApiService.sysHoldTrainCancel(simulation, stand.getCode()); + this.checkAndCancelTrainHold(simulation, stand); + } + }); + } + public void forceCancelHoldTrain(Simulation simulation, String standCode) { Stand stand = simulation.getRepository().getByCode(standCode, Stand.class); if (stand.isCenterHoldTrain()) { diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiService.java index ff007355b..c0054f017 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiService.java @@ -250,6 +250,8 @@ public interface CiApiService { */ void standHoldTrain(Simulation simulation, String standCode, boolean center); + void sysHoldTrain(Simulation simulation, String standCode); + /** * 站台取消扣车,联锁关系处理 * @param simulation @@ -258,6 +260,8 @@ public interface CiApiService { */ void standHoldTrainCancel(Simulation simulation, String standCode, boolean center); + void sysHoldTrainCancel(Simulation simulation, String standCode); + void standHoldTrainCancelAll(Simulation simulation, String standCode); /** diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl.java index c76285380..e9d0e0e8f 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl.java @@ -332,12 +332,24 @@ public class CiApiServiceImpl implements CiApiService { this.standService.holdTrain(simulation, stand, center); } + @Override + public void sysHoldTrain(Simulation simulation, String standCode) { + Stand stand = simulation.getRepository().getByCode(standCode, Stand.class); + this.standService.sysHoldTrain(simulation, stand); + } + @Override public void standHoldTrainCancel(Simulation simulation, String standCode, boolean center) { Stand stand = simulation.getRepository().getByCode(standCode, Stand.class); this.standService.cancelHoldTrain(simulation, stand, center); } + @Override + public void sysHoldTrainCancel(Simulation simulation, String standCode) { + Stand stand = simulation.getRepository().getByCode(standCode, Stand.class); + this.standService.cancelSysHoldTrain(simulation, stand); + } + @Override public void standHoldTrainCancelAll(Simulation simulation, String standCode) { Stand stand = simulation.getRepository().getByCode(standCode, Stand.class); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/StandService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/StandService.java index e9882be17..ef8cc7a97 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/StandService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/StandService.java @@ -89,6 +89,26 @@ public class StandService { } } + /**系统扣车*/ + public void sysHoldTrain(Simulation simulation, Stand stand) { + stand.setSysHoldTrain(true); + // 关闭出站信号机 + Signal signal = stand.getSection().getSignalOf(stand.isRight()); + if (Objects.nonNull(signal)) { + MapConfig config = simulation.getRepository().getConfig(); + if (config.isStandHoldCloseLogicLight() || !signal.isLogicLight()) { + this.signalService.close(simulation, signal); + } + } + } + + public void cancelSysHoldTrain(Simulation simulation, Stand stand) { + stand.setSysHoldTrain(false); + // 如果所有扣车都取消,开放出站信号机 + if (!stand.isHoldTrain()) { + this.reopenSignal(simulation, stand); + } + } /** * 取消扣车 * diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java index 5b1cb93c5..f5a65cbb2 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java @@ -82,6 +82,9 @@ public class Stand extends MayOutOfOrderDevice { */ private volatile boolean centerHoldTrain; + /**系统扣车*/ + private volatile boolean sysHoldTrain; + /** * 区间自动扣车 */ @@ -175,7 +178,7 @@ public class Stand extends MayOutOfOrderDevice { */ //TODO 反向扣车是否计算在内 public boolean isHoldTrain() { - return stationHoldTrain || centerHoldTrain; + return stationHoldTrain || centerHoldTrain || sysHoldTrain; } /** diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Station.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Station.java index 4feee7ea2..a32f22f55 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Station.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Station.java @@ -379,6 +379,7 @@ public class Station extends MayOutOfOrderDevice { * 紧急站控 */ Emergency, + /** * 联锁控 */ diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java index 6ba8faf93..b7ac08c6c 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java @@ -41,6 +41,10 @@ public class StandStatus extends DeviceStatus { @JsonSerialize(using = Boolean2NumSerializer.class) private boolean centerHoldTrain; + /**中心是否扣车*/ + @JsonSerialize(using = Boolean2NumSerializer.class) + private boolean sysHoldTrain; + /**区间自动扣车*/ @JsonSerialize(using = Boolean2NumSerializer.class) private boolean autoHoldTrain; @@ -90,6 +94,7 @@ public class StandStatus extends DeviceStatus { this.emergencyClosed = stand.isEmergencyClosed(); this.stationHoldTrain = stand.isStationHoldTrain(); this.centerHoldTrain = stand.isCenterHoldTrain(); + this.sysHoldTrain = stand.isSysHoldTrain(); this.autoHoldTrain = stand.isAutoHoldTrain(); this.allSkip = stand.isAllSkip(); this.skipSet = new HashSet<>(stand.getSkipSet()); @@ -143,6 +148,11 @@ public class StandStatus extends DeviceStatus { status.setCenterHoldTrain(this.centerHoldTrain); change = true; } + if (!Objects.equals(this.sysHoldTrain, stand.isSysHoldTrain())) { + this.sysHoldTrain = stand.isSysHoldTrain(); + status.setSysHoldTrain(this.sysHoldTrain); + change = true; + } if (!Objects.equals(this.autoHoldTrain, stand.isAutoHoldTrain())) { this.autoHoldTrain = stand.isAutoHoldTrain(); status.setAutoHoldTrain(this.autoHoldTrain); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/StandStatusVO.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/StandStatusVO.java index 19b8cd162..9226b842f 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/StandStatusVO.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/StandStatusVO.java @@ -37,6 +37,10 @@ public class StandStatusVO extends DeviceStatusVO { @JsonSerialize(using = Boolean2NumSerializer.class) private Boolean centerHoldTrain; + /**是否系统扣车*/ + @JsonSerialize(using = Boolean2NumSerializer.class) + private Boolean sysHoldTrain; + /**区间自动扣车*/ @JsonSerialize(using = Boolean2NumSerializer.class) private Boolean autoHoldTrain; From f3b9ebf4a7e600f8f583be370cefc053019a5965 Mon Sep 17 00:00:00 2001 From: DU Date: Sat, 20 Feb 2021 15:35:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=BD=A6=E7=AB=99=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/ATS/operation/Operation.java | 6 +- .../handler/StationOperateHandler.java | 23 ++++- .../cbtc/ATS/service/AtsStationService.java | 84 ++++++++++++++++--- .../cbtc/data/status/StandStatus.java | 1 + 4 files changed, 96 insertions(+), 18 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java index 43ef0d007..da7bb8b0f 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/Operation.java @@ -251,12 +251,10 @@ public class Operation { Station_Cancel_CI_Auto, /** 设置/取消强制点灯 */ Station_Set_Or_Cancel_Force_Physical_Signal, - /** 区域选择(请求区域控制权【泰雷兹】) */ - Station_Apply_Control, //车站控制授权 - /** 请求区域控制权 */ - Station_Apply_Control, + /** 区域选择(请求区域控制权【泰雷兹】) */ + Station_Control_Apply, /** 授权转移 */ Station_Control_Transfer, /** 下放站控 */ diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StationOperateHandler.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StationOperateHandler.java index e915af9bf..a57070e61 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StationOperateHandler.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/StationOperateHandler.java @@ -228,11 +228,26 @@ public class StationOperateHandler { this.atsStationService.setOrCancelForcePhysicalSignal(simulation, repository.getByCode(stationCode, Station.class)); } - @OperateHandlerMapping(type = Operation.Type.Station_Apply_Control) + @OperateHandlerMapping(type = Operation.Type.Station_Control_Apply) public void applyControl(Simulation simulation, List stationCodes, SimulationMember simulationMember) { - SimulationDataRepository repository = simulation.getRepository(); BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes, "未选择车站"); - List stations = stationCodes.stream().map(stationCode -> repository.getByCode(stationCode, Station.class)).collect(Collectors.toList()); - this.atsStationService.applyControl(simulation, stations, simulationMember); + this.atsStationService.applyControl(simulation, stationCodes, simulationMember); + } + + @OperateHandlerMapping(type = Operation.Type.Station_Control_Transfer) + public void transferControl(Simulation simulation, List stationCodes, boolean agree, SimulationMember simulationMember) { + this.atsStationService.transferControl(simulation, stationCodes, agree, simulationMember); + } + + @OperateHandlerMapping(type = Operation.Type.Station_Control_Devolve) + public void devolveControl(Simulation simulation, List stationCodes, SimulationMember simulationMember) { + BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes, "未选择车站"); + this.atsStationService.devolveControl(simulation, stationCodes, simulationMember); + } + + @OperateHandlerMapping(type = Operation.Type.Station_Control_Revoke) + public void revokeControl(Simulation simulation, List stationCodes, SimulationMember simulationMember) { + BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes, "未选择车站"); + this.atsStationService.revokeControl(simulation, stationCodes, simulationMember); } } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStationService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStationService.java index 8a2b551d8..55c01a1d8 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStationService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStationService.java @@ -410,21 +410,85 @@ public class AtsStationService { BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(signalList, station.debugStr() + "下无信号机"); if (!signalList.get(0).isForcePhysical()) { signalList.forEach(signal -> { - signal.changeLightType(false); - signal.setForcePhysical(true); - }); + signal.changeLightType(false); + signal.setForcePhysical(true); + }); } else { signalList.forEach(signal -> signal.setForcePhysical(false)); } } - public void applyControl(Simulation simulation, List stations, SimulationMember member) { - stations.forEach(station -> { - if (station.getController() == null) { + public void applyControl(Simulation simulation, List stationCodes, SimulationMember member) { + if (CollectionUtils.isEmpty(stationCodes)) { + throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "申请控制的车站列表不能为空"); + } + //TODO 角色和设备检查 + synchronized (simulation) { + SimulationDataRepository repository = simulation.getRepository(); + BusinessExceptionAssertEnum.INVALID_OPERATION.assertNotTrue(stationCodes.stream().filter(s -> Objects.nonNull(repository.getByCode(s, Station.class).getControlApplicant())).findAny().isPresent(), "申请列车存在已被申请的车站"); + stationCodes.forEach(s -> { + Station station = repository.getByCode(s, Station.class); + if (station.getController() == null) { + station.setController(member); + } else { + station.setControlApplicant(member); + } + }); + } + } + + public void transferControl(Simulation simulation, List stationCodes, boolean agree, SimulationMember member) { + if (CollectionUtils.isEmpty(stationCodes)) { + throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "控制权转移的车站列表不能为空"); + } + //TODO 角色和设备检查 + synchronized (simulation) { + SimulationDataRepository repository = simulation.getRepository(); + stationCodes.forEach(s -> { + Station station = repository.getByCode(s, Station.class); + if (agree) { + if (station.getController() == null || Objects.equals(station.getController(), member)) { + station.setController(station.getControlApplicant()); + } + return; + } + station.setControlApplicant(null); + }); + } + } + + public void devolveControl(Simulation simulation, List stationCodes, SimulationMember member) { + if (CollectionUtils.isEmpty(stationCodes)) { + throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "控制权下放的车站列表不能为空"); + } + //TODO 角色和设备检查 + synchronized (simulation) { + SimulationDataRepository repository = simulation.getRepository(); + stationCodes.forEach(s -> { + Station station = repository.getByCode(s, Station.class); + if (Objects.nonNull(station.getController()) && Objects.equals(station.getController(), member)) { + station.setController(null); + station.setEmergencyController(false); + station.setControlApplicant(null); + } + }); + } + } + + + public void revokeControl(Simulation simulation, List stationCodes, SimulationMember member) { + if (CollectionUtils.isEmpty(stationCodes)) { + throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "回收控制权的车站列表不能为空"); + } + //TODO 角色和设备检查 + synchronized (simulation) { + SimulationDataRepository repository = simulation.getRepository(); + stationCodes.forEach(s -> { + Station station = repository.getByCode(s, Station.class); station.setController(member); - } else { - station.setControlApplicant(member); - } - }); + station.setEmergencyController(true); + station.setControlApplicant(null); + }); + } } } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java index b7ac08c6c..a3f87bf75 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/StandStatus.java @@ -230,6 +230,7 @@ public class StandStatus extends DeviceStatus { statusVO.setAllSkip(allSkip); statusVO.setAutoHoldTrain(autoHoldTrain); statusVO.setCenterHoldTrain(centerHoldTrain); + statusVO.setSysHoldTrain(sysHoldTrain); statusVO.setStationHoldTrain(stationHoldTrain); statusVO.setEmergencyClosed(emergencyClosed); statusVO.setTrainParking(trainParking); From c3fd300248386207ef65b1fb88c2e60d97aa5e57 Mon Sep 17 00:00:00 2001 From: DU Date: Sat, 20 Feb 2021 16:44:07 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8A=98=E8=BF=94?= =?UTF-8?q?=E7=8E=B0=E5=9C=B0=E5=AE=9E=E8=AE=AD=E8=83=8C=E6=99=AFbug?= =?UTF-8?q?=EF=BC=8C=E7=AB=99=E5=8F=B0=E7=8A=B6=E6=80=81=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/services/training/generatornew/GeneratorNew.java | 3 +++ .../java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java | 1 + 2 files changed, 4 insertions(+) diff --git a/src/main/java/club/joylink/rtss/services/training/generatornew/GeneratorNew.java b/src/main/java/club/joylink/rtss/services/training/generatornew/GeneratorNew.java index e5cfb29a5..b814f6e68 100644 --- a/src/main/java/club/joylink/rtss/services/training/generatornew/GeneratorNew.java +++ b/src/main/java/club/joylink/rtss/services/training/generatornew/GeneratorNew.java @@ -59,6 +59,9 @@ public interface GeneratorNew { case STAND: ((Stand) mapDevice).getDeviceStation().setControlMode(Station.ControlMode.Local); break; + case CYCLE: + ((Cycle) mapDevice).getStation().setControlMode(Station.ControlMode.Local); + break; } } // 实训基本信息 diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java index f5a65cbb2..27bfceb3e 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java @@ -156,6 +156,7 @@ public class Stand extends MayOutOfOrderDevice { this.remainTime = 0; this.stationHoldTrain = false; this.centerHoldTrain = false; + this.sysHoldTrain = false; this.autoHoldTrain = false; this.allSkip = false; this.skipSet = Collections.synchronizedSet(new HashSet<>());