Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/rtss-server into test
This commit is contained in:
commit
659b537f75
|
@ -70,7 +70,7 @@ public class CiRouteService {
|
|||
return failMessage;
|
||||
}
|
||||
// 进路中道岔是否存在和监控中进路延续保护冲突
|
||||
failMessage = monitorRouteOverlapConflictCheck(simulation, route);
|
||||
failMessage = monitorRouteOverlapConflictCheck(simulation, route, manual);
|
||||
if (failMessage != null) {
|
||||
return failMessage;
|
||||
}
|
||||
|
@ -154,20 +154,36 @@ public class CiRouteService {
|
|||
}
|
||||
|
||||
private static Route.CheckFailMessage monitorRouteOverlapConflictCheck(Simulation simulation,
|
||||
Route route) {
|
||||
Route route, boolean manual) {
|
||||
SimulationDataRepository repository = simulation.getRepository();
|
||||
List<Route> settingRoutes = repository.getSettingRoutes();
|
||||
for (Route sr : settingRoutes) {
|
||||
if (sr.isSettingOverlap() && (sr.getOverlap().isSetting() || sr.getOverlap()
|
||||
.isLock())/*&& !repository.isTrainParking(sr.getOverlap().getSection())*/) {
|
||||
SectionPath sectionPath = sr.getOverlap().selectPath();
|
||||
for (SwitchElement switchElement : sectionPath.getSwitchList()) {
|
||||
if (route.isConflictSwitch(switchElement)) {
|
||||
return new Route.CheckFailMessage(Route.CheckFailReason.SwitchCiUseOnOppositePosition,
|
||||
switchElement.getASwitch());
|
||||
if (sr.isSettingOverlap()) {
|
||||
if (sr.getOverlap().isLock() || (!manual && sr.getOverlap().isSetting())) {
|
||||
SectionPath sectionPath = sr.getOverlap().selectPath();
|
||||
for (SwitchElement switchElement : sectionPath.getSwitchList()) {
|
||||
if (route.isConflictSwitch(switchElement)) {
|
||||
return new Route.CheckFailMessage(Route.CheckFailReason.SwitchCiUseOnOppositePosition,
|
||||
switchElement.getASwitch());
|
||||
}
|
||||
}
|
||||
} else if (sr.getOverlap().isSetting() && manual) {
|
||||
SectionPath sectionPath = sr.getOverlap().selectPath();
|
||||
for (SwitchElement switchElement : sectionPath.getSwitchList()) {
|
||||
switchElement.getASwitch().checkAndResetUsePosition();
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (sr.isSettingOverlap() && (sr.getOverlap().isSetting() || sr.getOverlap()
|
||||
// .isLock())/*&& !repository.isTrainParking(sr.getOverlap().getSection())*/) {
|
||||
// SectionPath sectionPath = sr.getOverlap().selectPath();
|
||||
// for (SwitchElement switchElement : sectionPath.getSwitchList()) {
|
||||
// if (route.isConflictSwitch(switchElement)) {
|
||||
// return new Route.CheckFailMessage(Route.CheckFailReason.SwitchCiUseOnOppositePosition,
|
||||
// switchElement.getASwitch());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -190,7 +206,6 @@ public class CiRouteService {
|
|||
if (aSwitch.isCiUseOnOppositePosition(switchElement.isNormal())) { // 道岔征用在相反位置
|
||||
if (manual && !aSwitch.isLocked()) { // 人工办理优先
|
||||
aSwitch.checkAndResetUsePosition();
|
||||
aSwitch.ciUse(switchElement.isNormal());
|
||||
} else {
|
||||
return new Route.CheckFailMessage(Route.CheckFailReason.SwitchCiUseOnOppositePosition,
|
||||
aSwitch);
|
||||
|
|
Loading…
Reference in New Issue