南京二 按计划行车问题
This commit is contained in:
parent
513aa73523
commit
64e76d7bde
@ -681,7 +681,6 @@ public class CalculateService {
|
||||
return;
|
||||
}
|
||||
}
|
||||
routePath.addSectionFirst(section);
|
||||
Signal signal = section.getSignalOf(right);
|
||||
if (signal == null) {
|
||||
queryLastSignalRoute(start, section, right, routePath);
|
||||
|
@ -67,15 +67,6 @@ public class RoutePath {
|
||||
this.sectionSortMap.put(this.end.getCode(), this.sectionList.size() + 1);
|
||||
}
|
||||
|
||||
public void addSectionFirst(Section section) {
|
||||
if (this.sectionList.contains(section)) {
|
||||
return;
|
||||
}
|
||||
this.sectionList.add(0, section);
|
||||
this.sectionSortMap.put(section.getCode(), this.sectionList.size());
|
||||
this.sectionSortMap.put(this.end.getCode(), this.sectionList.size() + 1);
|
||||
}
|
||||
|
||||
public void addSections(List<Section> sections) {
|
||||
if (!CollectionUtils.isEmpty(sections)) {
|
||||
for (Section section : sections) {
|
||||
@ -84,7 +75,7 @@ public class RoutePath {
|
||||
}
|
||||
}
|
||||
|
||||
public void addRoute(Route route) {
|
||||
public void addRouteAndSignal(Route route) {
|
||||
if (this.routeList.contains(route)) {
|
||||
return;
|
||||
}
|
||||
@ -92,10 +83,17 @@ public class RoutePath {
|
||||
this.addSignal(route.getStart());
|
||||
}
|
||||
|
||||
public void addRoute(Route route) {
|
||||
if (this.routeList.contains(route)) {
|
||||
return;
|
||||
}
|
||||
this.routeList.add(route);
|
||||
}
|
||||
|
||||
public void addRoutes(List<Route> routeList) {
|
||||
if (!CollectionUtils.isEmpty(routeList)) {
|
||||
for (Route route : routeList) {
|
||||
this.addRoute(route);
|
||||
this.addRouteAndSignal(route);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user