进路正常解锁相关道岔解锁逻辑

This commit is contained in:
walker-sheng 2021-01-19 17:09:48 +08:00
parent fa3a17c63e
commit bad7cca595

View File

@ -1041,20 +1041,20 @@ public class RouteService {
break;
} else {
if (section.isSwitchTrack()) { // 如果是道岔区段解锁道岔
SwitchElement switchElement = route.getRouteSwitchElement(relSwitch);
section.routeUnlocking(right);
relSwitch.routeUnlock();
relSwitch.overlapUnLock();
// 侧防解锁
RouteFls routeFls = route.getRouteFlsOfSwitch(relSwitch);
if (routeFls != null) {
routeFls.unlock();
}
//检查道岔的联动道岔和计轴关联道岔是否可以解锁
List<Switch> switches = Arrays.asList(null, relSwitch.queryAxleRelatedOtherSwitch());
List<Switch> switches = Arrays.asList(relSwitch.queryLinkedSwitch(), relSwitch.queryAxleRelatedOtherSwitch());
for (Switch linkedSwitch : switches) {
if (linkedSwitch == null)
continue;
if (linkedSwitch.getAllSections().stream().noneMatch(Section::isRouteLock)) { //道岔关联的所有区段都没有进路锁闭
if (route.isRouteSwitch(linkedSwitch) && linkedSwitch.getAllSections().stream().noneMatch(Section::isRouteLock)) { //道岔关联的所有区段都没有进路锁闭
linkedSwitch.routeUnlock();
}
}