修改:道岔区段故障占用时进路仍能办理的bug

This commit is contained in:
joylink_zhangsai 2021-07-20 16:02:27 +08:00
parent 6afa297947
commit bef8add983

View File

@ -60,6 +60,11 @@ public class RouteService {
} }
// 进路区段是否故障占用 // 进路区段是否故障占用
for (Section section : route.getSectionList()) { for (Section section : route.getSectionList()) {
for (int i = 0; i < 3; i++) {
if (section.getParent() == null || section.isAxleCounter())
break;
section = section.getParent();
}
if (Section.AxleFault.FAULT.equals(section.getFault())) { if (Section.AxleFault.FAULT.equals(section.getFault())) {
return new Route.CheckFailMessage(Route.CheckFailReason.SectionFaultOccupied, section); return new Route.CheckFailMessage(Route.CheckFailReason.SectionFaultOccupied, section);
} }