新增:进路排列增加道岔占用检查

This commit is contained in:
joylink_zhangsai 2021-07-05 16:15:33 +08:00
parent 343ce12cea
commit a93df56e55
2 changed files with 7 additions and 1 deletions

View File

@ -175,7 +175,7 @@ public class RouteService {
return new Route.CheckFailMessage(Route.CheckFailReason.SectionLockOppositeDirection, section);
}
}
// 进路内道岔封锁/锁闭位置检查
// 进路内道岔封锁/锁闭/占用位置检查
List<SwitchElement> switchList = route.getSwitchList();
for (SwitchElement element : switchList) {
Switch aSwitch = element.getASwitch();
@ -187,6 +187,10 @@ public class RouteService {
if (aSwitch.isLocked() && !aSwitch.isOnPosition(element.isNormal())) {
return new Route.CheckFailMessage(Route.CheckFailReason.SwitchLockPositionError, aSwitch);
}
// 是否占用在另一个位置
if (aSwitch.isSectionOccupied() && !aSwitch.isOnPosition(element.isNormal())) {
return new Route.CheckFailMessage(Route.CheckFailReason.SwitchOccupiedPositionError, aSwitch);
}
// // 道岔是否故障
// if (aSwitch.isFaultOnPosition(element.isNormal()) && aSwitch.isLoss()) {
// return new Route.CheckFailMessage(Route.CheckFailReason.SwitchFault, aSwitch);

View File

@ -594,6 +594,8 @@ public class Route extends MapNamedElement {
SwitchBlockade,
/** 道岔锁闭的方向不对 */
SwitchLockPositionError,
/** 道岔占用位置不对 */
SwitchOccupiedPositionError,
/** 道岔位置失表故障 */
SwitchFault,
/** 区段封锁 */