修改大铁引导进路筛选逻辑
This commit is contained in:
parent
1f3b7c65d2
commit
f42923f100
@ -458,7 +458,14 @@ public class CiApiServiceImpl2 implements CiApiService {
|
|||||||
collect = signal.getRouteList().stream()
|
collect = signal.getRouteList().stream()
|
||||||
.filter(Route::isTrainRoute)
|
.filter(Route::isTrainRoute)
|
||||||
.filter(route1 -> !route1.hasReverseSwitch())
|
.filter(route1 -> !route1.hasReverseSwitch())
|
||||||
.filter(Route::isAllSwitchIsOnPos) //大铁直接办理引导进路需道岔在正确位置
|
.filter(route1 -> {
|
||||||
|
List<SwitchElement> switchList = route1.getSwitchList();
|
||||||
|
if (!CollectionUtils.isEmpty(switchList)) {
|
||||||
|
return switchList.stream()
|
||||||
|
.allMatch(se -> se.isOnPosition() || se.getASwitch().isGuideMasterLock());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}) //大铁直接办理引导进路需道岔在正确位置或道岔引导总锁
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
BusinessExceptionAssertEnum.OPERATION_FAIL.assertCollectionNotEmpty(collect,
|
BusinessExceptionAssertEnum.OPERATION_FAIL.assertCollectionNotEmpty(collect,
|
||||||
signal.debugStr() + "无符合条件的进路");
|
signal.debugStr() + "无符合条件的进路");
|
||||||
|
@ -157,7 +157,7 @@ public class CiSwitchControlService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量转动道岔到指定位置
|
* 确保道岔位置正确
|
||||||
*/
|
*/
|
||||||
public boolean ensureSwitchPosCurrent(Simulation simulation, List<SwitchElement> switchElements, boolean guideSetting) {
|
public boolean ensureSwitchPosCurrent(Simulation simulation, List<SwitchElement> switchElements, boolean guideSetting) {
|
||||||
boolean allOn = true;
|
boolean allOn = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user