联锁侧防数据生成、保存、仿真构建流程调试修改
联锁进路控制添加侧防逻辑(延续保护侧防逻辑还没有加),触发区段使用逻辑区段 联锁进路信号机添加 "级别" 概念和逻辑
This commit is contained in:
parent
8eb906de23
commit
eeeec1db01
@ -222,6 +222,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
List<RouteFls> flsList = new ArrayList<>();
|
List<RouteFls> flsList = new ArrayList<>();
|
||||||
if (config.isGenerateFls()) {
|
if (config.isGenerateFls()) {
|
||||||
Map<String, RouteFls> flsMap = this.generateFls(switchList);
|
Map<String, RouteFls> flsMap = this.generateFls(switchList);
|
||||||
|
flsList = new ArrayList<>(flsMap.values());
|
||||||
for (Route route : generatedRouteList) {
|
for (Route route : generatedRouteList) {
|
||||||
// 进路道岔侧防
|
// 进路道岔侧防
|
||||||
List<RouteFls> routeFlsList = new ArrayList<>();
|
List<RouteFls> routeFlsList = new ArrayList<>();
|
||||||
@ -1903,6 +1904,27 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
overlapList.add(routeOverlap);
|
overlapList.add(routeOverlap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 处理延续保护只有区段且区段有逻辑区段的情况(延续保护区段更换为逻辑区段)
|
||||||
|
for (RouteOverlap overlap : overlapList) {
|
||||||
|
List<SectionPath> pathList = overlap.getPathList();
|
||||||
|
for (SectionPath sectionPath : pathList) {
|
||||||
|
if (CollectionUtils.isEmpty(sectionPath.getSwitchList())) {
|
||||||
|
// 非道岔延续保护
|
||||||
|
List<Section> logicOverlapList = new ArrayList<>();
|
||||||
|
List<Section> sectionList = sectionPath.getSectionList();
|
||||||
|
Section section = sectionList.get(0);
|
||||||
|
List<Section> logicList = section.getLogicList();
|
||||||
|
if (!CollectionUtils.isEmpty(logicList)) {
|
||||||
|
Section logic = logicList.get(0);
|
||||||
|
if (!end.isRight()) {
|
||||||
|
logic = logicList.get(logicList.size() - 1);
|
||||||
|
}
|
||||||
|
logicOverlapList.add(logic);
|
||||||
|
}
|
||||||
|
sectionPath.setLogicList(logicOverlapList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return overlapList;
|
return overlapList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2176,11 +2198,40 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
|
|||||||
boolean right = !signal.isRight(); // 信号机反方向
|
boolean right = !signal.isRight(); // 信号机反方向
|
||||||
Section section = signal.getSection();
|
Section section = signal.getSection();
|
||||||
if (config.isSignalApproachOnlyOne()) {
|
if (config.isSignalApproachOnlyOne()) {
|
||||||
approachPathList.add(new SectionPath(right, null, Arrays.asList(section)));
|
approachPathList.add(new SectionPath(right, null, Arrays.asList(section), new ArrayList<>()));
|
||||||
} else {
|
} else {
|
||||||
float l = 600; // 接近距离默认600m
|
float l = 600; // 接近距离默认600m
|
||||||
getApproachPathOf(section, right, l, new SectionPath(right), config, approachPathList);
|
getApproachPathOf(section, right, l, new SectionPath(right), config, approachPathList);
|
||||||
}
|
}
|
||||||
|
for (SectionPath sectionPath : approachPathList) {
|
||||||
|
float len = 0;
|
||||||
|
List<Section> logicApproachList = new ArrayList<>();
|
||||||
|
List<Section> sectionList = sectionPath.getSectionList();
|
||||||
|
for (Section phySection : sectionList) {
|
||||||
|
if(len >= 600) break;
|
||||||
|
if (phySection.isSwitchTrack()) {
|
||||||
|
len += phySection.getLen();
|
||||||
|
logicApproachList.add(phySection);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
List<Section> logicList = phySection.getLogicList();
|
||||||
|
if (CollectionUtils.isEmpty(logicList)) {
|
||||||
|
len += phySection.getLen();
|
||||||
|
logicApproachList.add(phySection);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
List<Section> sortedList = new ArrayList<>(logicList);
|
||||||
|
if (signal.isRight()) {
|
||||||
|
Collections.reverse(sortedList);
|
||||||
|
}
|
||||||
|
for (Section logic : sortedList) {
|
||||||
|
logicApproachList.add(logic);
|
||||||
|
len += logic.getLen();
|
||||||
|
if(len >= 600) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sectionPath.setLogicList(logicApproachList);
|
||||||
|
}
|
||||||
signal.setApproachPathList(approachPathList);
|
signal.setApproachPathList(approachPathList);
|
||||||
signal.setRouteReleaseTime(config.getRouteReleaseTime());
|
signal.setRouteReleaseTime(config.getRouteReleaseTime());
|
||||||
}
|
}
|
||||||
|
@ -211,6 +211,20 @@ public class AtsPlanService {
|
|||||||
Station station = lastStationPlan.getStation();
|
Station station = lastStationPlan.getStation();
|
||||||
// 列车是否到达终点站的折返轨,且列车应该已经到达过最后一个车站
|
// 列车是否到达终点站的折返轨,且列车应该已经到达过最后一个车站
|
||||||
if (axleSection.isTurnBackTrack() && Objects.equals(station, axleSection.getStation())) {
|
if (axleSection.isTurnBackTrack() && Objects.equals(station, axleSection.getStation())) {
|
||||||
|
// 判断是否整个车停在折返轨
|
||||||
|
Section pre = axleSection.getSectionOf(!right);
|
||||||
|
if (axleSection.isSwitchTrack()) {
|
||||||
|
if (pre == null) {
|
||||||
|
pre = axleSection.getRelSwitch().getA().getSectionOf(!right);
|
||||||
|
}
|
||||||
|
if (pre != null && pre.isOccupied()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (pre.isOccupied()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (tripPlan.isTurnBackSection(axleSection)) { // 列车在计划折返轨
|
if (tripPlan.isTurnBackSection(axleSection)) { // 列车在计划折返轨
|
||||||
return true;
|
return true;
|
||||||
} else { // 若列车不在计划的折返轨,判断车次最后到达车站计划到列车位置进路是否到列车当前位置
|
} else { // 若列车不在计划的折返轨,判断车次最后到达车站计划到列车位置进路是否到列车当前位置
|
||||||
|
@ -671,8 +671,10 @@ public class AtsRouteSettingService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Signal queryApproachCloseSignal(Simulation simulation, TrainInfo train, Section section, Boolean right) {
|
private Signal queryApproachCloseSignal(Simulation simulation, TrainInfo train, Section section, Boolean right) {
|
||||||
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
Section base = section;
|
Section base = section;
|
||||||
Signal target = null;
|
Signal target = null;
|
||||||
|
Section logic = repository.getByCode(train.getSection(), Section.class);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (Objects.nonNull(base) && count < 10) {
|
while (Objects.nonNull(base) && count < 10) {
|
||||||
++count;
|
++count;
|
||||||
@ -684,7 +686,7 @@ public class AtsRouteSettingService {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 信号机存在,判定信号关闭、接近区段
|
// 信号机存在,判定信号关闭、接近区段
|
||||||
if (signal.isApproachSection(section.getCode())) {
|
if (signal.isApproachSection(train.getSection())) {
|
||||||
target = signal;
|
target = signal;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -329,50 +329,53 @@ public class RouteService {
|
|||||||
*/
|
*/
|
||||||
public void settingProgress(Simulation simulation, Route route) {
|
public void settingProgress(Simulation simulation, Route route) {
|
||||||
if (route.isSetting()) { // 进路排列中
|
if (route.isSetting()) { // 进路排列中
|
||||||
if (Objects.isNull(route.getSettingStartTime())) {//旧数据兼容逻辑
|
MapConfig config = simulation.getRepository().getConfig();
|
||||||
route.setSettingStartTime(simulation.getSystemTime());
|
if (!config.isRouteSettingNoFail()) {
|
||||||
}
|
if (Objects.isNull(route.getSettingStartTime())) {//旧数据兼容逻辑
|
||||||
if (simulation.getSystemTime().isAfter(route.getSettingStartTime().plusSeconds(10))) {
|
route.setSettingStartTime(simulation.getSystemTime());
|
||||||
route.settingFailed();
|
}
|
||||||
simulation.getRepository().removeSettingRoute(route);
|
if (simulation.getSystemTime().isAfter(route.getSettingStartTime().plusSeconds(10))) {
|
||||||
log.info(String.format("进路[%s]办理失败,取消办理2", route.debugStr()));
|
route.settingFailed();
|
||||||
return;
|
simulation.getRepository().removeSettingRoute(route);
|
||||||
|
log.info(String.format("进路[%s]办理失败,取消办理2", route.debugStr()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
route.setLock(true);
|
route.setLock(true);
|
||||||
route.getStart().setLockedRoute(route);
|
route.getStart().setLockedRoute(route);
|
||||||
MapConfig config = simulation.getRepository().getConfig();
|
boolean right = route.getStart().isRight();
|
||||||
if (!route.isRequisition()) {
|
// 预先锁闭
|
||||||
// 征用设备
|
if (config.isLockFirst()) {
|
||||||
// 预先锁闭
|
// 进路排列区段预先锁闭
|
||||||
boolean right = route.getStart().isRight();
|
List<Section> sectionList = route.getSectionList();
|
||||||
if (config.isLockFirst()) {
|
for (Section section : sectionList) {
|
||||||
// 进路排列区段预先锁闭
|
if (section.isSwitchTrack()) {
|
||||||
List<Section> sectionList = route.getSectionList();
|
Switch relSwitch = section.getRelSwitch();
|
||||||
for (Section section : sectionList) {
|
relSwitch.getA().routeLocking(right);
|
||||||
if (section.isSwitchTrack()) {
|
if (relSwitch.isNormalPosition()) { // 定位
|
||||||
Switch relSwitch = section.getRelSwitch();
|
relSwitch.getB().routeLocking(right);
|
||||||
relSwitch.getA().routeLocking(right);
|
relSwitch.getC().routeUnlocking(right);
|
||||||
if (relSwitch.isNormalPosition()) { // 定位
|
} else if (relSwitch.isReversePosition()) { // 反位
|
||||||
relSwitch.getB().routeLocking(right);
|
relSwitch.getC().routeLocking(right);
|
||||||
relSwitch.getC().routeUnlocking(right);
|
relSwitch.getB().routeUnlocking(right);
|
||||||
} else if (relSwitch.isReversePosition()) { // 反位
|
} else { // 失表
|
||||||
relSwitch.getC().routeLocking(right);
|
relSwitch.getB().routeLocking(right);
|
||||||
relSwitch.getB().routeUnlocking(right);
|
relSwitch.getC().routeLocking(right);
|
||||||
} else { // 失表
|
|
||||||
relSwitch.getB().routeLocking(right);
|
|
||||||
relSwitch.getC().routeLocking(right);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
section.routeLocking(right);
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
section.routeLocking(right);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!route.isRequisition()) {
|
||||||
|
// 征用设备
|
||||||
// 道岔位置转换
|
// 道岔位置转换
|
||||||
List<SwitchElement> switchList = route.getSwitchList();
|
List<SwitchElement> switchList = route.getSwitchList();
|
||||||
this.routeSwitchTurn(simulation, switchList);
|
this.routeSwitchTurn(simulation, switchList);
|
||||||
route.updateRequisition(true);
|
route.updateRequisition(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.routeFlsControl(simulation, route);
|
||||||
// 设备已征用,检查进路条件
|
// 设备已征用,检查进路条件
|
||||||
boolean onPosition = this.checkSwitchPosition(simulation, route);
|
boolean onPosition = this.checkSwitchPosition(simulation, route);
|
||||||
if (!onPosition) { // 还未转换到位置
|
if (!onPosition) { // 还未转换到位置
|
||||||
@ -390,6 +393,26 @@ public class RouteService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void routeFlsControl(Simulation simulation, Route route) {
|
||||||
|
// 侧防道岔转换
|
||||||
|
List<RouteFls> flsList = route.getFlsList();
|
||||||
|
if (!CollectionUtils.isEmpty(flsList)) {
|
||||||
|
List<SwitchElement> switchElementList = new ArrayList<>();
|
||||||
|
for (RouteFls routeFls : flsList) {
|
||||||
|
List<RouteFls.FlsElement> level1List = routeFls.getLevel1List();
|
||||||
|
for (RouteFls.FlsElement flsElement : level1List) {
|
||||||
|
SwitchElement pSwitch = flsElement.getPSwitch();
|
||||||
|
if (pSwitch != null) {
|
||||||
|
switchElementList.add(pSwitch);
|
||||||
|
} else if (flsElement.getFpae() != null) {
|
||||||
|
switchElementList.add(flsElement.getFpae());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.routeSwitchTurn(simulation, switchElementList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean checkSwitchPosition(Simulation simulation, Route route) {
|
private boolean checkSwitchPosition(Simulation simulation, Route route) {
|
||||||
Set<Switch> sectionRelSwitches = route.getSectionList().stream().map(Section::getRelSwitch).collect(Collectors.toSet());
|
Set<Switch> sectionRelSwitches = route.getSectionList().stream().map(Section::getRelSwitch).collect(Collectors.toSet());
|
||||||
List<SwitchElement> switchList;
|
List<SwitchElement> switchList;
|
||||||
@ -427,11 +450,15 @@ public class RouteService {
|
|||||||
MapConfig config = simulation.getRepository().getConfig();
|
MapConfig config = simulation.getRepository().getConfig();
|
||||||
boolean right = overlap.isRight();
|
boolean right = overlap.isRight();
|
||||||
SectionPath sectionPath = overlap.selectPath();
|
SectionPath sectionPath = overlap.selectPath();
|
||||||
if (!overlap.isRequisition()) { // 设备征用
|
// 延续保护区段预先锁闭
|
||||||
// 延续保护位置转动
|
List<Section> logicList = sectionPath.getLogicList();
|
||||||
// 延续保护区段预先锁闭
|
if (config.isLockFirst()) {
|
||||||
List<Section> sectionList = sectionPath.getSectionList();
|
if (!CollectionUtils.isEmpty(logicList)) {
|
||||||
if (config.isLockFirst()) {
|
for (Section section : logicList) {
|
||||||
|
section.overlapLocking(right);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<Section> sectionList = sectionPath.getSectionList();
|
||||||
for (Section section : sectionList) {
|
for (Section section : sectionList) {
|
||||||
if (section.isSwitchTrack()) {
|
if (section.isSwitchTrack()) {
|
||||||
Switch relSwitch = section.getRelSwitch();
|
Switch relSwitch = section.getRelSwitch();
|
||||||
@ -451,6 +478,9 @@ public class RouteService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!overlap.isRequisition()) { // 设备征用
|
||||||
|
// 延续保护位置转动
|
||||||
// 道岔位置转换
|
// 道岔位置转换
|
||||||
List<SwitchElement> pathSwitchList = sectionPath.getPathSwitchElementList();
|
List<SwitchElement> pathSwitchList = sectionPath.getPathSwitchElementList();
|
||||||
this.routeSwitchTurn(simulation, pathSwitchList);
|
this.routeSwitchTurn(simulation, pathSwitchList);
|
||||||
@ -529,7 +559,6 @@ public class RouteService {
|
|||||||
if (section.isSwitchTrack()) {
|
if (section.isSwitchTrack()) {
|
||||||
// 道岔锁闭
|
// 道岔锁闭
|
||||||
Switch relSwitch = section.getRelSwitch();
|
Switch relSwitch = section.getRelSwitch();
|
||||||
relSwitch.routeLock();
|
|
||||||
if (relSwitch.isNormalPosition()) {
|
if (relSwitch.isNormalPosition()) {
|
||||||
relSwitch.getC().routeUnlocking(right);
|
relSwitch.getC().routeUnlocking(right);
|
||||||
} else if (relSwitch.isReversePosition()) {
|
} else if (relSwitch.isReversePosition()) {
|
||||||
@ -537,18 +566,31 @@ public class RouteService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// // 道岔锁闭
|
// 道岔锁闭
|
||||||
// for (SwitchElement element : route.getSwitchList()) {
|
for (SwitchElement element : route.getSwitchList()) {
|
||||||
// Switch aSwitch = element.getASwitch();
|
Switch aSwitch = element.getASwitch();
|
||||||
// aSwitch.routeLock();
|
aSwitch.routeLock();
|
||||||
// if (simulation.getRepository().getConfig().isLockFirst()) {
|
}
|
||||||
// if (element.isNormal()) {
|
// 侧防锁闭
|
||||||
// aSwitch.getC().routeUnlocking(right);
|
List<RouteFls> flsList = route.getFlsList();
|
||||||
// } else {
|
if (!CollectionUtils.isEmpty(flsList)) {
|
||||||
// aSwitch.getB().routeUnlocking(right);
|
for (RouteFls routeFls : flsList) {
|
||||||
// }
|
for (RouteFls.FlsElement flsElement : routeFls.getLevel1List()) {
|
||||||
// }
|
SwitchElement pSwitch = flsElement.getPSwitch();
|
||||||
// }
|
if (pSwitch != null) {
|
||||||
|
Switch aSwitch = pSwitch.getASwitch();
|
||||||
|
if (aSwitch.isOnPosition(pSwitch.isNormal())) {
|
||||||
|
aSwitch.fpLock();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
SwitchElement fpae = flsElement.getFpae();
|
||||||
|
if (fpae != null && fpae.getASwitch().isOnPosition(fpae.isNormal())) {
|
||||||
|
fpae.getASwitch().fpLock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 延续保护
|
// 延续保护
|
||||||
if (!route.isCbtcMode()) {
|
if (!route.isCbtcMode()) {
|
||||||
RouteOverlap overlap = route.getOverlap();
|
RouteOverlap overlap = route.getOverlap();
|
||||||
@ -648,6 +690,13 @@ public class RouteService {
|
|||||||
aSwitch.routeUnlock();
|
aSwitch.routeUnlock();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 进路侧防取消锁闭
|
||||||
|
List<RouteFls> flsList = route.getFlsList();
|
||||||
|
if (!CollectionUtils.isEmpty(flsList)) {
|
||||||
|
for (RouteFls routeFls : flsList) {
|
||||||
|
routeFls.unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
// 进路延续保护解锁
|
// 进路延续保护解锁
|
||||||
RouteOverlap overlap = route.getOverlap();
|
RouteOverlap overlap = route.getOverlap();
|
||||||
if (Objects.nonNull(overlap)) {
|
if (Objects.nonNull(overlap)) {
|
||||||
@ -709,32 +758,35 @@ public class RouteService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isInterlocked(Route route) {
|
public boolean isInterlocked(Route route) {
|
||||||
Route.CheckFailMessage failMessage;
|
// Route.CheckFailMessage failMessage;
|
||||||
if (route.isOpenGuide()) {
|
// if (route.isOpenGuide()) {
|
||||||
failMessage = this.guideRouteCheck(route);
|
// failMessage = this.guideRouteCheck(route);
|
||||||
} else {
|
// } else {
|
||||||
failMessage = this.baseCheck(route);
|
// failMessage = this.baseCheck(route);
|
||||||
}
|
// }
|
||||||
if (Objects.nonNull(failMessage)) {
|
// if (Objects.nonNull(failMessage)) {
|
||||||
log.debug(String.format("联锁网络检查失败:[%s]", failMessage.toJson()));
|
// log.debug(String.format("联锁网络检查失败:[%s]", failMessage.toJson()));
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
int level = checkRouteLevel(route);
|
||||||
|
route.getStart().setLevel(level);
|
||||||
|
if (level != 3) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int checkRouteLevel(Route route) {
|
||||||
|
int level = 1;
|
||||||
|
// 进路区段检查
|
||||||
boolean right = route.getStart().isRight();
|
boolean right = route.getStart().isRight();
|
||||||
List<Section> sectionList = route.getSectionList();
|
List<Section> sectionList = route.getSectionList();
|
||||||
for (Section section : sectionList) {
|
for (Section section : sectionList) {
|
||||||
if (!section.isRouteLockOn(right)) {
|
if (!section.isRouteLockOn(right)) {
|
||||||
return false;
|
return level;
|
||||||
}
|
}
|
||||||
if (section.isNoStatus()) {
|
if (section.isNoStatus()) {
|
||||||
return false;
|
return level;
|
||||||
}
|
|
||||||
}
|
|
||||||
// 站台紧急停车
|
|
||||||
if (!CollectionUtils.isEmpty(route.getEspList())) {
|
|
||||||
for (ESP esp : route.getEspList()) {
|
|
||||||
if (esp.isEffective()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 道岔位置一致检查
|
// 道岔位置一致检查
|
||||||
@ -754,7 +806,41 @@ public class RouteService {
|
|||||||
}
|
}
|
||||||
log.debug(String.format("联锁网络检查失败:道岔[%s(%s)]位置[%s]",
|
log.debug(String.format("联锁网络检查失败:道岔[%s(%s)]位置[%s]",
|
||||||
element.getASwitch().getName(), element.getASwitch().getCode(), p));
|
element.getASwitch().getName(), element.getASwitch().getCode(), p));
|
||||||
return false;
|
return level;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
level = 2; // 引导级
|
||||||
|
// 进路侧防检查
|
||||||
|
List<RouteFls> flsList = route.getFlsList();
|
||||||
|
if (!route.isOpenGuide() && !CollectionUtils.isEmpty(flsList)) {
|
||||||
|
boolean level1Result = true;
|
||||||
|
for (RouteFls routeFls : flsList) {
|
||||||
|
List<RouteFls.FlsElement> level1List = routeFls.getLevel1List();
|
||||||
|
for (RouteFls.FlsElement flsElement : level1List) {
|
||||||
|
SwitchElement pSwitch = flsElement.getPSwitch();
|
||||||
|
if (pSwitch != null && !pSwitch.getASwitch().isOnPosition(pSwitch.isNormal())) {
|
||||||
|
level1Result = false;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
SwitchElement fpae = flsElement.getFpae();
|
||||||
|
Signal pSignal = flsElement.getPSignal();
|
||||||
|
if ((pSignal != null && !pSignal.isClose()) ||
|
||||||
|
(fpae != null && !fpae.getASwitch().isOnPosition(fpae.isNormal()))) {
|
||||||
|
level1Result = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!level1Result) {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 站台紧急停车
|
||||||
|
if (!CollectionUtils.isEmpty(route.getEspList())) {
|
||||||
|
for (ESP esp : route.getEspList()) {
|
||||||
|
if (esp.isEffective()) {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 首区段检查
|
// 首区段检查
|
||||||
@ -767,53 +853,53 @@ public class RouteService {
|
|||||||
Collections.reverse(logicList);
|
Collections.reverse(logicList);
|
||||||
}
|
}
|
||||||
if (logicList.get(0).isOccupied()) {
|
if (logicList.get(0).isOccupied()) {
|
||||||
return false;
|
return level;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (firstRouteSection.isOccupied()) {
|
if (firstRouteSection.isOccupied()) {
|
||||||
return false;
|
return level;
|
||||||
}
|
|
||||||
}
|
|
||||||
// 如果进路区段中有站台轨,站台屏蔽门开着,需要关灯
|
|
||||||
List<Section> standTracks = sectionList.stream().filter(Section::isStandTrack).collect(Collectors.toList());
|
|
||||||
if (!CollectionUtils.isEmpty(standTracks)) {
|
|
||||||
for (Section standTrack : standTracks) {
|
|
||||||
List<Stand> standList = standTrack.getStandList();
|
|
||||||
if (standList.stream().anyMatch(stand -> stand.getPsd() != null && !stand.getPsd().isCloseAndLock()))
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// // 如果进路区段中有站台轨,站台屏蔽门开着,需要关灯
|
||||||
|
// List<Section> standTracks = sectionList.stream().filter(Section::isStandTrack).collect(Collectors.toList());
|
||||||
|
// if (!CollectionUtils.isEmpty(standTracks)) {
|
||||||
|
// for (Section standTrack : standTracks) {
|
||||||
|
// List<Stand> standList = standTrack.getStandList();
|
||||||
|
// if (standList.stream().anyMatch(stand -> stand.getPsd() != null && !stand.getPsd().isCloseAndLock()))
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
} else { // 后备模式检查
|
} else { // 后备模式检查
|
||||||
// 区段占用检查
|
// 区段占用检查
|
||||||
Route.CheckFailMessage checkFailMessage = this.ciLevelCheck(route);
|
Route.CheckFailMessage checkFailMessage = this.ciLevelCheck(route);
|
||||||
if (Objects.nonNull(checkFailMessage)) {
|
if (Objects.nonNull(checkFailMessage)) {
|
||||||
|
|
||||||
log.debug(String.format("联锁网络检查失败:[%s]", checkFailMessage.toJson()));
|
log.debug(String.format("联锁网络检查失败:[%s]", checkFailMessage.toJson()));
|
||||||
return false;
|
return level;
|
||||||
}
|
}
|
||||||
// 屏蔽门
|
// 屏蔽门
|
||||||
// if (!CollectionUtils.isEmpty(route.getPsdList())) {
|
if (!CollectionUtils.isEmpty(route.getPsdList())) {
|
||||||
// for (PSD psd : route.getPsdList()) {
|
for (PSD psd : route.getPsdList()) {
|
||||||
// if (!psd.isCloseAndLock()) {
|
if (!psd.isCloseAndLock()) {
|
||||||
// log.debug(String.format("联锁网络检查失败:站台[%s(%s)]屏蔽门[%s(%s)]未关闭",
|
log.debug(String.format("联锁网络检查失败:站台[%s(%s)]屏蔽门[%s(%s)]未关闭",
|
||||||
// psd.getStand().getName(), psd.getStand().getCode(),
|
psd.getStand().getName(), psd.getStand().getCode(),
|
||||||
// psd.getName(), psd.getCode()));
|
psd.getName(), psd.getCode()));
|
||||||
// return false;
|
return level;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// 站台扣车
|
// 站台扣车
|
||||||
if (!CollectionUtils.isEmpty(route.getStandHoldList())) {
|
if (!CollectionUtils.isEmpty(route.getStandHoldList())) {
|
||||||
for (Stand stand : route.getStandHoldList()) {
|
for (Stand stand : route.getStandHoldList()) {
|
||||||
if (stand.isHoldTrain()) {
|
if (stand.isHoldTrain()) {
|
||||||
log.debug(String.format("联锁网络检查失败:站台[%s(%s)]扣车",
|
log.debug(String.format("联锁网络检查失败:站台[%s(%s)]扣车",
|
||||||
stand.getName(), stand.getCode()));
|
stand.getName(), stand.getCode()));
|
||||||
return false;
|
return level;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
level = 3; // 主信号级
|
||||||
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -958,6 +1044,10 @@ public class RouteService {
|
|||||||
SwitchElement switchElement = route.getRouteSwitchElement(relSwitch);
|
SwitchElement switchElement = route.getRouteSwitchElement(relSwitch);
|
||||||
section.routeUnlocking(right);
|
section.routeUnlocking(right);
|
||||||
relSwitch.routeUnlock();
|
relSwitch.routeUnlock();
|
||||||
|
RouteFls routeFls = route.getRouteFlsOfSwitch(relSwitch);
|
||||||
|
if (routeFls != null) {
|
||||||
|
routeFls.unlock();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
section.routeUnlocking(right);
|
section.routeUnlocking(right);
|
||||||
}
|
}
|
||||||
@ -982,7 +1072,11 @@ public class RouteService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void overlapLock(SectionPath sectionPath, boolean right) {
|
private void overlapLock(SectionPath sectionPath, boolean right) {
|
||||||
for (Section section : sectionPath.getSectionList()) {
|
List<Section> sectionList = sectionPath.getSectionList();
|
||||||
|
if (!CollectionUtils.isEmpty(sectionPath.getLogicList())) {
|
||||||
|
sectionList = sectionPath.getLogicList();
|
||||||
|
}
|
||||||
|
for (Section section : sectionList) {
|
||||||
if (section.isSwitchTrack()) {
|
if (section.isSwitchTrack()) {
|
||||||
Switch relSwitch = section.getRelSwitch();
|
Switch relSwitch = section.getRelSwitch();
|
||||||
relSwitch.overlapLock();
|
relSwitch.overlapLock();
|
||||||
@ -1086,10 +1180,20 @@ public class RouteService {
|
|||||||
overlap.releaseImmediately();
|
overlap.releaseImmediately();
|
||||||
} else {
|
} else {
|
||||||
boolean allUnlock = true;
|
boolean allUnlock = true;
|
||||||
for (Section section : sectionPath.getSectionList()) {
|
List<Section> logicList = sectionPath.getLogicList();
|
||||||
if (section.isOverlapLock()) {
|
if (!CollectionUtils.isEmpty(logicList)) {
|
||||||
allUnlock = false;
|
for (Section section : logicList) {
|
||||||
break;
|
if (section.isOverlapLock()) {
|
||||||
|
allUnlock = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (Section section : sectionPath.getSectionList()) {
|
||||||
|
if (section.isOverlapLock()) {
|
||||||
|
allUnlock = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (allUnlock) {
|
if (allUnlock) {
|
||||||
@ -1118,12 +1222,23 @@ public class RouteService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<Section> sectionList = path.getSectionList();
|
List<Section> logicList = path.getLogicList();
|
||||||
for (Section section : sectionList) {
|
if (!CollectionUtils.isEmpty(logicList)) {
|
||||||
if (section.isLockedOn(!right)) {
|
for (Section section : logicList) {
|
||||||
// 区段锁闭在相反方向
|
if (section.isLockedOn(!right)) {
|
||||||
setting = false;
|
// 区段锁闭在相反方向
|
||||||
break;
|
setting = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
List<Section> sectionList = path.getSectionList();
|
||||||
|
for (Section section : sectionList) {
|
||||||
|
if (section.isLockedOn(!right)) {
|
||||||
|
// 区段锁闭在相反方向
|
||||||
|
setting = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (setting) {
|
if (setting) {
|
||||||
@ -1135,8 +1250,15 @@ public class RouteService {
|
|||||||
for (SwitchElement element : settingPath.getSwitchList()) {
|
for (SwitchElement element : settingPath.getSwitchList()) {
|
||||||
element.getASwitch().overlapLock();
|
element.getASwitch().overlapLock();
|
||||||
}
|
}
|
||||||
for (Section section : settingPath.getSectionList()) {
|
List<Section> logicList = settingPath.getLogicList();
|
||||||
section.overlapLocking(right);
|
if (!CollectionUtils.isEmpty(logicList)) {
|
||||||
|
for (Section section : logicList) {
|
||||||
|
section.overlapLocking(right);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (Section section : settingPath.getSectionList()) {
|
||||||
|
section.overlapLocking(right);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
overlap.setLock(true);
|
overlap.setLock(true);
|
||||||
}
|
}
|
||||||
|
@ -1073,6 +1073,16 @@ public class InterlockBuilder2 {
|
|||||||
sectionList.add(section);
|
sectionList.add(section);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 逻辑区段
|
||||||
|
List<Section> logicList = new ArrayList<>();
|
||||||
|
List<String> logicCodeList = sectionPathVO.getLogicList();
|
||||||
|
if (!CollectionUtils.isEmpty(logicCodeList)) {
|
||||||
|
for (String code : logicCodeList) {
|
||||||
|
Section logic = ((Section) elementMap.get(code));
|
||||||
|
Objects.requireNonNull(logic, String.format("编码为[%s]的区段不存在", code));
|
||||||
|
logicList.add(logic);
|
||||||
|
}
|
||||||
|
}
|
||||||
// 路径中道岔
|
// 路径中道岔
|
||||||
List<MapCISwitchVO> switchPositionList = sectionPathVO.getSwitchPositionList();
|
List<MapCISwitchVO> switchPositionList = sectionPathVO.getSwitchPositionList();
|
||||||
List<SwitchElement> switchElementList = new ArrayList<>();
|
List<SwitchElement> switchElementList = new ArrayList<>();
|
||||||
@ -1164,7 +1174,7 @@ public class InterlockBuilder2 {
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new SectionPath(sectionPathVO.isRight(), switchElementList, sectionList);
|
return new SectionPath(sectionPathVO.isRight(), switchElementList, sectionList, logicList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void checkBetweenRouteSameDirectionSignal(Map<String, MapElement> elementMap, List<String> errMsgList) {
|
private static void checkBetweenRouteSameDirectionSignal(Map<String, MapElement> elementMap, List<String> errMsgList) {
|
||||||
|
@ -31,6 +31,11 @@ public class MapConfig {
|
|||||||
*/
|
*/
|
||||||
private boolean lockFirst;
|
private boolean lockFirst;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进路办理不失败一直尝试办理
|
||||||
|
*/
|
||||||
|
private boolean routeSettingNoFail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列车停站开门后,才办理出站进路开放出站信号机
|
* 列车停站开门后,才办理出站进路开放出站信号机
|
||||||
*/
|
*/
|
||||||
@ -148,6 +153,7 @@ public class MapConfig {
|
|||||||
if (Objects.nonNull(configVO)) {
|
if (Objects.nonNull(configVO)) {
|
||||||
setUpRight(configVO.getUpRight());
|
setUpRight(configVO.getUpRight());
|
||||||
setLockFirst(configVO.getLockFirst());
|
setLockFirst(configVO.getLockFirst());
|
||||||
|
setRouteSettingNoFail(configVO.isRouteSettingNoFail());
|
||||||
setSignalOpenAfterParking(configVO.isSignalOpenAfterParking());
|
setSignalOpenAfterParking(configVO.isSignalOpenAfterParking());
|
||||||
this.setStandHoldCloseLogicLight(configVO.isStandHoldCloseLogicLight());
|
this.setStandHoldCloseLogicLight(configVO.isStandHoldCloseLogicLight());
|
||||||
setCtcOverlapOnlyTurnBackStationLock(configVO.isCtcOverlapOnlyTurnBackStationLock());
|
setCtcOverlapOnlyTurnBackStationLock(configVO.isCtcOverlapOnlyTurnBackStationLock());
|
||||||
|
@ -466,6 +466,17 @@ public class Route extends MapNamedElement {
|
|||||||
return Objects.equals(this.getLastRouteSection(), section);
|
return Objects.equals(this.getLastRouteSection(), section);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RouteFls getRouteFlsOfSwitch(Switch aSwitch) {
|
||||||
|
if (!CollectionUtils.isEmpty(this.flsList)) {
|
||||||
|
for (RouteFls routeFls : flsList) {
|
||||||
|
if (Objects.equals(routeFls.getBase().getASwitch(), aSwitch)) {
|
||||||
|
return routeFls;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进路检查失败原因
|
* 进路检查失败原因
|
||||||
*/
|
*/
|
||||||
|
@ -47,6 +47,20 @@ public class RouteFls {
|
|||||||
return this.level1List != null && !this.level1List.isEmpty();
|
return this.level1List != null && !this.level1List.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void unlock() {
|
||||||
|
for (RouteFls.FlsElement flsElement : this.getLevel1List()) {
|
||||||
|
SwitchElement pSwitch = flsElement.getPSwitch();
|
||||||
|
if (pSwitch != null) {
|
||||||
|
pSwitch.getASwitch().fpUnlock();
|
||||||
|
} else {
|
||||||
|
SwitchElement fpae = flsElement.getFpae();
|
||||||
|
if (fpae != null) {
|
||||||
|
fpae.getASwitch().fpUnlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 侧防元件
|
* 侧防元件
|
||||||
*/
|
*/
|
||||||
|
@ -26,32 +26,29 @@ public class SectionPath {
|
|||||||
/** 道岔位置(如果有道岔的话) */
|
/** 道岔位置(如果有道岔的话) */
|
||||||
private List<SwitchElement> switchList;
|
private List<SwitchElement> switchList;
|
||||||
|
|
||||||
/** 侧防 */
|
/** 延续保护侧防 */
|
||||||
private List<RouteFls> flsList;
|
private List<RouteFls> flsList;
|
||||||
|
|
||||||
private List<Section> sectionList;
|
private List<Section> sectionList;
|
||||||
|
|
||||||
|
private List<Section> logicList;
|
||||||
|
|
||||||
public SectionPath(boolean right) {
|
public SectionPath(boolean right) {
|
||||||
this.right = right;
|
this.right = right;
|
||||||
this.switchList = new ArrayList<>();
|
this.switchList = new ArrayList<>();
|
||||||
this.sectionList = new ArrayList<>();
|
this.sectionList = new ArrayList<>();
|
||||||
|
this.logicList = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SectionPath(boolean right, List<SwitchElement> switchList, List<Section> sectionList) {
|
public SectionPath(boolean right, List<SwitchElement> switchList, List<Section> sectionList, List<Section> logicList) {
|
||||||
this.right = right;
|
this.right = right;
|
||||||
this.switchList = switchList;
|
this.switchList = switchList;
|
||||||
this.sectionList = sectionList;
|
this.sectionList = sectionList;
|
||||||
}
|
this.logicList = logicList;
|
||||||
|
|
||||||
public SectionPath(boolean right, List<SwitchElement> switchList, List<Section> sectionList, List<RouteFls> flsList) {
|
|
||||||
this.right = right;
|
|
||||||
this.switchList = switchList;
|
|
||||||
this.sectionList = sectionList;
|
|
||||||
this.flsList = flsList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SectionPath cloneNew() {
|
public SectionPath cloneNew() {
|
||||||
return new SectionPath(this.right, new ArrayList<>(this.switchList), new ArrayList<>(this.sectionList));
|
return new SectionPath(this.right, new ArrayList<>(this.switchList), new ArrayList<>(this.sectionList), new ArrayList<>(this.logicList));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSection(Section section) {
|
public void addSection(Section section) {
|
||||||
|
@ -127,6 +127,11 @@ public class Signal extends MayOutOfOrderDevice {
|
|||||||
*/
|
*/
|
||||||
private Route lockedRoute;
|
private Route lockedRoute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 信号级别:0-不可用;1-关闭;2-引导级;3-主信号级
|
||||||
|
*/
|
||||||
|
private int level;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否封锁
|
* 是否封锁
|
||||||
*/
|
*/
|
||||||
@ -232,16 +237,25 @@ public class Signal extends MayOutOfOrderDevice {
|
|||||||
.collect(Collectors.toMap
|
.collect(Collectors.toMap
|
||||||
((switchElement -> switchElement.getASwitch().getCode()),
|
((switchElement -> switchElement.getASwitch().getCode()),
|
||||||
Function.identity()));
|
Function.identity()));
|
||||||
for (Section approach : path.getSectionList()) {
|
List<Section> logicList = path.getLogicList();
|
||||||
if (approach.isSamePhysical(sectionCode)) {
|
if (!CollectionUtils.isEmpty(logicList)) {
|
||||||
return true;
|
for (Section logic : logicList) {
|
||||||
} else if (approach.isSwitchTrack()) {
|
if (logic.isSamePhysical(sectionCode)) {
|
||||||
Switch relSwitch = approach.getRelSwitch();
|
return true;
|
||||||
SwitchElement element = elementMap.get(relSwitch.getCode());
|
}
|
||||||
if (relSwitch.isOnPosition(element.isNormal())) {
|
}
|
||||||
continue;
|
} else {
|
||||||
} else {
|
for (Section approach : path.getSectionList()) {
|
||||||
break;
|
if (approach.isSamePhysical(sectionCode)) {
|
||||||
|
return true;
|
||||||
|
} else if (approach.isSwitchTrack()) {
|
||||||
|
Switch relSwitch = approach.getRelSwitch();
|
||||||
|
SwitchElement element = elementMap.get(relSwitch.getCode());
|
||||||
|
if (relSwitch.isOnPosition(element.isNormal())) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,11 @@ public class Switch extends MayOutOfOrderDevice {
|
|||||||
*/
|
*/
|
||||||
private boolean routeLock;
|
private boolean routeLock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否进路侧防锁闭
|
||||||
|
*/
|
||||||
|
private boolean fpLock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否进路延续保护锁闭
|
* 是否进路延续保护锁闭
|
||||||
*/
|
*/
|
||||||
@ -120,7 +125,7 @@ public class Switch extends MayOutOfOrderDevice {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isLocked() {
|
public boolean isLocked() {
|
||||||
return this.singleLock || this.routeLock || this.overlapLock;
|
return this.singleLock || this.routeLock || this.overlapLock || this.isFpLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -229,6 +234,14 @@ public class Switch extends MayOutOfOrderDevice {
|
|||||||
this.overlapLock = false;
|
this.overlapLock = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void fpLock() {
|
||||||
|
this.fpLock = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fpUnlock() {
|
||||||
|
this.fpLock = false;
|
||||||
|
}
|
||||||
|
|
||||||
public void overlapLock() {
|
public void overlapLock() {
|
||||||
this.overlapLock = true;
|
this.overlapLock = true;
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,11 @@ public class RealLineConfigVO {
|
|||||||
@ApiModelProperty(value = "进路办理是否先锁闭——开始办理直接先锁闭区段(如福州一号线)")
|
@ApiModelProperty(value = "进路办理是否先锁闭——开始办理直接先锁闭区段(如福州一号线)")
|
||||||
private Boolean lockFirst = false;
|
private Boolean lockFirst = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进路办理不失败
|
||||||
|
*/
|
||||||
|
private boolean routeSettingNoFail = false;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否列车停站开门后,才办理出站进路开放出站信号机")
|
@ApiModelProperty(value = "是否列车停站开门后,才办理出站进路开放出站信号机")
|
||||||
private boolean signalOpenAfterParking = false;
|
private boolean signalOpenAfterParking = false;
|
||||||
|
|
||||||
|
@ -118,10 +118,12 @@ public class MapRouteFlankProtectionNewVO {
|
|||||||
@ApiModelProperty(value = "侧防区域元件")
|
@ApiModelProperty(value = "侧防区域元件")
|
||||||
private MapCISwitchVO areaSwitch;
|
private MapCISwitchVO areaSwitch;
|
||||||
|
|
||||||
public static List<Level> convertBO2VOList(List<RouteFls.FlsElement> level1List) {
|
public static List<Level> convertBO2VOList(List<RouteFls.FlsElement> flsElementList) {
|
||||||
List<Level> list = new ArrayList<>();
|
List<Level> list = new ArrayList<>();
|
||||||
for (RouteFls.FlsElement flsElement : level1List) {
|
if (!CollectionUtils.isEmpty(flsElementList)) {
|
||||||
list.add(fromBO(flsElement));
|
for (RouteFls.FlsElement flsElement : flsElementList) {
|
||||||
|
list.add(fromBO(flsElement));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,8 @@ public class MapSectionPathVO {
|
|||||||
|
|
||||||
private List<String> flsList;
|
private List<String> flsList;
|
||||||
|
|
||||||
|
private List<String> logicList;
|
||||||
|
|
||||||
public MapSectionPathVO(boolean right, List<String> sectionList, List<MapCISwitchVO> switchPositionList) {
|
public MapSectionPathVO(boolean right, List<String> sectionList, List<MapCISwitchVO> switchPositionList) {
|
||||||
this.right = right;
|
this.right = right;
|
||||||
this.sectionList = sectionList;
|
this.sectionList = sectionList;
|
||||||
@ -52,6 +54,10 @@ public class MapSectionPathVO {
|
|||||||
if (!CollectionUtils.isEmpty(sectionPath.getFlsList())) {
|
if (!CollectionUtils.isEmpty(sectionPath.getFlsList())) {
|
||||||
vo.setFlsList(sectionPath.getFlsList().stream().map(RouteFls::getCode).collect(Collectors.toList()));
|
vo.setFlsList(sectionPath.getFlsList().stream().map(RouteFls::getCode).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
List<Section> logicList = sectionPath.getLogicList();
|
||||||
|
if (!CollectionUtils.isEmpty(logicList)) {
|
||||||
|
vo.setLogicList(logicList.stream().map(Section::getCode).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user