diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/CalculateService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/CalculateService.java index f29a3efa8..f36a4f48c 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/CalculateService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/CalculateService.java @@ -737,15 +737,15 @@ public class CalculateService { Set
sections = routeMap.keySet(); for (Section last : sections) { List 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 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(); } } }