删除查询进路路径方法中,虚拟信号机下的进路只有一条的断言和逻辑
This commit is contained in:
parent
4ab64ffe1b
commit
6b16dc6fb4
@ -755,22 +755,22 @@ public class CalculateService {
|
|||||||
if (!CollectionUtils.isEmpty(routeList)) {
|
if (!CollectionUtils.isEmpty(routeList)) {
|
||||||
// 进路
|
// 进路
|
||||||
boolean find = false;
|
boolean find = false;
|
||||||
if (signal.isVirtual()) { // 虚拟信号机,应该只有一条进路
|
// if (signal.isVirtual()) { // 虚拟信号机,应该只有一条进路
|
||||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(routeList.size() == 1);
|
// BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(routeList.size() == 1);
|
||||||
Route route = routeList.get(0);
|
// Route route = routeList.get(0);
|
||||||
routePath.addRoute(route);
|
// routePath.addRoute(route);
|
||||||
List<Section> sectionList = route.getSectionList();
|
// List<Section> sectionList = route.getSectionList();
|
||||||
int i = sectionList.indexOf(end);
|
// int i = sectionList.indexOf(end);
|
||||||
if (i >= 0) {
|
// if (i >= 0) {
|
||||||
// 找到
|
// // 找到
|
||||||
routePath.addSections(sectionList.subList(0, i));
|
// routePath.addSections(sectionList.subList(0, i));
|
||||||
list.add(routePath);
|
// list.add(routePath);
|
||||||
} else {
|
// } else {
|
||||||
routePath.addSections(sectionList);
|
// routePath.addSections(sectionList);0
|
||||||
queryRoutePaths(iter + 1, iterTimes, route.getLastRouteSection(), routePath, list, warnList);
|
// queryRoutePaths(iter + 1, iterTimes, route.getLastRouteSection(), routePath, list, warnList);
|
||||||
}
|
// }
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
Map<Section, List<Route>> routeMap = new HashMap<>(); // 进路终端对应进路列表(ATP进路合并进正常进路终端)
|
Map<Section, List<Route>> routeMap = new HashMap<>(); // 进路终端对应进路列表(ATP进路合并进正常进路终端)
|
||||||
routeList.sort(Comparator.comparing(Route::isAtp)); // 将ATP进路排在最后处理
|
routeList.sort(Comparator.comparing(Route::isAtp)); // 将ATP进路排在最后处理
|
||||||
for (Route route : routeList) {
|
for (Route route : routeList) {
|
||||||
|
Loading…
Reference in New Issue
Block a user