进路路径查询方法哈尔滨ATP进路逻辑调整

This commit is contained in:
walker-sheng 2021-01-28 17:43:52 +08:00
parent 05ab248b18
commit d669bb2d4c

View File

@ -737,15 +737,15 @@ public class CalculateService {
Set<Section> sections = routeMap.keySet();
for (Section last : sections) {
List<Route> tempList = routeMap.get(last);
if (tempList.contains(lastRouteSection)) {
if (Objects.equals(last, lastRouteSection)) {
break;
}
if (tempList.get(0).getSectionList().contains(lastRouteSection)) {
handled = true;
tempList.add(route);
List<Route> nextRouteList = route.getDestination().getRouteList();
if (nextRouteList.size() == 1 &&
Objects.equals(nextRouteList.get(0).getLastRouteSection(), last)) {
if (nextRouteList.size() == 1) {
tempList.addAll(nextRouteList);
} else {
throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception();
}
}
}