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 3bf61b4b6..9d3e7a9ca 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 @@ -183,6 +183,8 @@ public class Operation { Stand_Total_Cancel, /** 手动开启屏蔽门 */ Stand_Open_Psd, + /** 取消设置(扣车或跳停) */ + Stand_Cancel_Setting, //--------------------------- 控制模式 --------------------------- /** 请求站控 */ 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 4ec4bc335..c19ec43d0 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 @@ -162,4 +162,12 @@ public class StandOperateHandler { public void manualOpenPsd(Simulation simulation, String standCode) { atsStandService.manualOpenPsd(simulation, standCode); } + + /** + * 取消设置 + */ + @OperateHandlerMapping(type = Operation.Type.Stand_Cancel_Setting) + public void cancelSetting(Simulation simulation, String standCode) { + atsStandService.cancelSetting(simulation, standCode); + } } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/SwitchOperateHandler.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/SwitchOperateHandler.java index 47ab0052a..9bb872dc4 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/SwitchOperateHandler.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/SwitchOperateHandler.java @@ -254,4 +254,10 @@ public class SwitchOperateHandler { vrSwitch.setNormal(normal); vrSwitch.setReverse(!normal); } + + /** 强行转岔 */ + @OperateHandlerMapping(type = Operation.Type.Switch_Force_Turn) + public void switchForceTurn(Simulation simulation, String switchCode, Boolean normal) { + ciApiService.switchForceTurn(simulation, switchCode, normal); + } } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsRouteSettingService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsRouteSettingService.java index a1d05e8a9..a22da7618 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsRouteSettingService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsRouteSettingService.java @@ -77,7 +77,6 @@ public class AtsRouteSettingService { route = this.queryPlanTrainNeedRoute(simulation, train, signal, trainList); } else if (train.isHeadCodeTrain()) { // 头码车 route = this.queryHeadTrainNeedRoute(simulation, train, signal, trainList); -// headTrainToSetRoute(repository, trainPositionMap, signalTrainMap, waitSettingList, signal, train); } if (Objects.nonNull(route)) { waitSettingList.add(new TrainRoute(train, trainPositionMap.get(train.getGroupNumber()), 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 87b13d5dc..c711162ce 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 @@ -407,4 +407,16 @@ public class AtsStandService { Stand stand = repository.getByCode(standCode, Stand.class); stand.getPsd().getVirtualScreenDoor().updateLockAndClose(false, true); } + + /** + * 取消设置(扣车或跳停) + */ + public void cancelSetting(Simulation simulation, String standCode) { + Stand stand = simulation.getRepository().getByCode(standCode, Stand.class); + if (stand.isStationHoldTrain()) { + cancelHoldTrain(simulation, standCode); + } else if (stand.isAllSkip()) { + cancelJumpStop(simulation, standCode, null); + } + } } 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 f7082d808..e383f10b6 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 @@ -314,4 +314,9 @@ public interface CiApiService { * 取消站台紧急停车 */ void cancelStandEB(Simulation simulation, Stand stand); + + /** + * 强扳道岔 + */ + void switchForceTurn(Simulation simulation, String switchCode, Boolean normal); } 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 37f812b35..7bba22f21 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 @@ -455,4 +455,9 @@ public class CiApiServiceImpl implements CiApiService { return; stand.getEsp().update(false); } + + @Override + public void switchForceTurn(Simulation simulation, String switchCode, Boolean normal) { + + } } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java index 9220ce15e..396196e1a 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java @@ -132,7 +132,6 @@ public class RouteService { /** * 进路CBTC/联锁办理条件公有检查 * - * * @param simulation * @param route * @return @@ -428,12 +427,12 @@ public class RouteService { } boolean onPosition = this.checkRouteSwitchPosition(switchList); if (!onPosition) return false; - if (!route.isCbtcMode()) { // 检查进路延续保护 - RouteOverlap overlap = route.getOverlap(); - if (Objects.nonNull(overlap) && !overlap.isLock()) { - return false; - } - } +// if (!route.isCbtcMode()) { // 检查进路延续保护 +// RouteOverlap overlap = route.getOverlap(); +// if (Objects.nonNull(overlap) && !overlap.isLock()) { +// return false; +// } +// } return true; } @@ -869,17 +868,17 @@ public class RouteService { return level; } } - // 非CBTC下,如果进路区段中有站台轨,站台屏蔽门开着,需要关灯 - if (!route.isCbtcMode()) { - List
standTracks = sectionList.stream().filter(Section::isStandTrack).collect(Collectors.toList()); - if (!CollectionUtils.isEmpty(standTracks)) { - for (Section standTrack : standTracks) { - List standList = standTrack.getStandList(); - if (standList.stream().anyMatch(stand -> stand.getPsd() != null && !stand.getPsd().isCloseAndLock())) - return level; - } + // 非CBTC级别下,如果进路区段中有站台轨,站台屏蔽门开着,需要关灯 +// if (!route.isCbtcMode()) { + List
standTracks = sectionList.stream().filter(Section::isStandTrack).collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(standTracks)) { + for (Section standTrack : standTracks) { + List standList = standTrack.getStandList(); + if (standList.stream().anyMatch(stand -> stand.getPsd() != null && !stand.getPsd().isCloseAndLock())) + return level; } } +// } } else { // 后备模式检查 // 区段占用检查 Route.CheckFailMessage checkFailMessage = this.ciLevelCheck(route); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Signal.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Signal.java index 1dcaf7826..6e9ff2745 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Signal.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Signal.java @@ -120,6 +120,11 @@ public class Signal extends MayOutOfOrderDevice { */ private AutoSignal autoSignal; + /** + * 传输信号机关联的信号机 + */ + private Signal linkSignal; + // ------------------状态属性--------------------- /** @@ -404,7 +409,11 @@ public class Signal extends MayOutOfOrderDevice { /** * 通过信号机 */ - PASSING + PASSING, + /** + * 传输信号机 + */ + TRANSMISSION, } public enum SignalFault implements DeviceFault { diff --git a/src/main/java/club/joylink/rtss/vo/client/map/newmap/MapSignalNewVO.java b/src/main/java/club/joylink/rtss/vo/client/map/newmap/MapSignalNewVO.java index 33a33a64d..96d8ae5f0 100644 --- a/src/main/java/club/joylink/rtss/vo/client/map/newmap/MapSignalNewVO.java +++ b/src/main/java/club/joylink/rtss/vo/client/map/newmap/MapSignalNewVO.java @@ -187,4 +187,7 @@ public class MapSignalNewVO { /**是否无延续保护*/ @ApiModelProperty(value="是否无延续保护") private boolean noOverlap; + + @ApiModelProperty(value = "传输信号机关联的信号机") + private String linkSignalCode; }