【运行方向改方后不能变回BUG】

This commit is contained in:
weizhihong 2022-06-16 18:11:26 +08:00
parent c9d58dd14e
commit 8460cd425e

View File

@ -353,11 +353,19 @@ public class StationDirection extends MapNamedElement {
public boolean monitorRouteChangeStatus() {
boolean isChange = false;
for (Route r : this.receiveRouteList) {
isChange = isChange || (changeDirectionTime != null && r.isSetting() && r.getSettingStartTime().isAfter(changeDirectionTime));
if (changeDirectionTime != null && r.isSetting()) {
isChange = isChange || r.getSettingStartTime().isAfter(changeDirectionTime);
} else {
isChange = isChange || !Objects.equals(r.isSetting(), routeSettingStatusMap.get(r.getCode()));
}
routeSettingStatusMap.put(r.getCode(), r.isSetting());
}
for (Route r : this.deliverRouteList) {
isChange = isChange || (changeDirectionTime != null && r.isSetting() && r.getSettingStartTime().isAfter(changeDirectionTime));
if (changeDirectionTime != null && r.isSetting()) {
isChange = isChange || r.getSettingStartTime().isAfter(changeDirectionTime);
} else {
isChange = isChange || !Objects.equals(r.isSetting(), routeSettingStatusMap.get(r.getCode()));
}
routeSettingStatusMap.put(r.getCode(), r.isSetting());
}
return isChange;