新增:进路排列增加道岔占用检查
This commit is contained in:
parent
343ce12cea
commit
a93df56e55
@ -175,7 +175,7 @@ public class RouteService {
|
|||||||
return new Route.CheckFailMessage(Route.CheckFailReason.SectionLockOppositeDirection, section);
|
return new Route.CheckFailMessage(Route.CheckFailReason.SectionLockOppositeDirection, section);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 进路内道岔封锁/锁闭位置检查
|
// 进路内道岔封锁/锁闭/占用位置检查
|
||||||
List<SwitchElement> switchList = route.getSwitchList();
|
List<SwitchElement> switchList = route.getSwitchList();
|
||||||
for (SwitchElement element : switchList) {
|
for (SwitchElement element : switchList) {
|
||||||
Switch aSwitch = element.getASwitch();
|
Switch aSwitch = element.getASwitch();
|
||||||
@ -187,6 +187,10 @@ public class RouteService {
|
|||||||
if (aSwitch.isLocked() && !aSwitch.isOnPosition(element.isNormal())) {
|
if (aSwitch.isLocked() && !aSwitch.isOnPosition(element.isNormal())) {
|
||||||
return new Route.CheckFailMessage(Route.CheckFailReason.SwitchLockPositionError, aSwitch);
|
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()) {
|
// if (aSwitch.isFaultOnPosition(element.isNormal()) && aSwitch.isLoss()) {
|
||||||
// return new Route.CheckFailMessage(Route.CheckFailReason.SwitchFault, aSwitch);
|
// return new Route.CheckFailMessage(Route.CheckFailReason.SwitchFault, aSwitch);
|
||||||
|
@ -594,6 +594,8 @@ public class Route extends MapNamedElement {
|
|||||||
SwitchBlockade,
|
SwitchBlockade,
|
||||||
/** 道岔锁闭的方向不对 */
|
/** 道岔锁闭的方向不对 */
|
||||||
SwitchLockPositionError,
|
SwitchLockPositionError,
|
||||||
|
/** 道岔占用位置不对 */
|
||||||
|
SwitchOccupiedPositionError,
|
||||||
/** 道岔位置失表故障 */
|
/** 道岔位置失表故障 */
|
||||||
SwitchFault,
|
SwitchFault,
|
||||||
/** 区段封锁 */
|
/** 区段封锁 */
|
||||||
|
Loading…
Reference in New Issue
Block a user