Merge remote-tracking branch 'origin/test' into master-huawei

This commit is contained in:
joylink_zhangsai 2021-03-17 19:05:00 +08:00
commit 3609952dd0
2 changed files with 42 additions and 13 deletions

View File

@ -382,10 +382,10 @@ public class MapService implements IMapService {
// 更新地图当前使用的地图数据版本 // 更新地图当前使用的地图数据版本
map.setVersion(mapData.getVersion()); map.setVersion(mapData.getVersion());
mapInfoDAO.updateByPrimaryKey(map); mapInfoDAO.updateByPrimaryKey(map);
//更新系统默认交路及相关运行图基础数据
createDefaultRouting(mapDataVO, map.getId());
// 保存站间运行数据 // 保存站间运行数据
iCacheService.remove(BusinessConsts.CachePrefix.Map + map.getId()); //删除地图数据缓存 iCacheService.remove(BusinessConsts.CachePrefix.Map + map.getId()); //删除地图数据缓存
//更新系统默认交路及相关运行图基础数据
createDefaultRouting(mapDataVO, map.getId());
MapVO newMapVO = new MapVO(map); MapVO newMapVO = new MapVO(map);
MapDataVO dataVO = new MapDataVO(mapData); MapDataVO dataVO = new MapDataVO(mapData);
newMapVO.setMapData(dataVO); newMapVO.setMapData(dataVO);

View File

@ -873,7 +873,11 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
} }
// 找指定方向的站台轨 // 找指定方向的站台轨
Signal signal = lastSection.getSignalOf(right); Signal signal = lastSection.getSignalOf(right);
this.queryNormalStandTracksOnDirectionFromSignal(signal, right, nstdList); if (signal == null) {
this.queryNormalStandTracksOnDirectionFromSection(lastSection, right, nstdList);
} else {
this.queryNormalStandTracksOnDirectionFromSignal(signal, right, nstdList);
}
// 站前折返情况处理 // 站前折返情况处理
if (!CollectionUtils.isEmpty(nstdList) && if (!CollectionUtils.isEmpty(nstdList) &&
end.isNormalStandTrack() && end.isNormalStandTrack() &&
@ -903,6 +907,21 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
} }
} }
private void queryNormalStandTracksOnDirectionFromSection(Section lastSection, boolean right, List<Section> nstdList) {
Signal signal = lastSection.getSignalOf(right);
if (signal != null) {
this.queryNormalStandTracksOnDirectionFromSignal(signal, right, nstdList);
} else {
Section nextSection = lastSection.getSectionOf(right);
if (nextSection.isNormalStandTrack() && nextSection.getStandList().get(0).isRight() == right) {
nstdList.add(nextSection);
return;
} else {
this.queryNormalStandTracksOnDirectionFromSection(nextSection, right, nstdList);
}
}
}
private boolean canArriveOppositeStandTrack(Section start, Section end, boolean right) { private boolean canArriveOppositeStandTrack(Section start, Section end, boolean right) {
Signal signal = start.getSignalOf(right); Signal signal = start.getSignalOf(right);
List<Section> nstdList = new ArrayList<>(); List<Section> nstdList = new ArrayList<>();
@ -1137,27 +1156,37 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
Set<Signal> signals = new HashSet<>(); Set<Signal> signals = new HashSet<>();
for (Route route : routeList) { for (Route route : routeList) {
boolean containOppositeStandTrack = false; boolean containOppositeStandTrack = false;
boolean contains = false;
for (Section section : route.getSectionList()) { for (Section section : route.getSectionList()) {
if (section.isNormalStandTrack() && if (section.isNormalStandTrack()) {
!Objects.equals(section.getStandList().get(0).isRight(), standRight)) { if (!Objects.equals(section.getStandList().get(0).isRight(), standRight)) {
containOppositeStandTrack = true; containOppositeStandTrack = true;
} else {
contains = true;
nstdList.add(section);
}
break; break;
} }
} }
if (containOppositeStandTrack) { if (containOppositeStandTrack) {
continue; continue;
} }
Section lastRouteSection = route.getLastRouteSection(); if (contains) {
if (lastRouteSection.isNormalStandTrack()) {
if (Objects.equals(lastRouteSection.getStandList().get(0).isRight(), standRight)) {
if (!nstdList.contains(lastRouteSection)) {
nstdList.add(lastRouteSection);
}
}
continue; continue;
} else { } else {
signals.add(route.getDestination()); signals.add(route.getDestination());
} }
// Section lastRouteSection = route.getLastRouteSection();
// if (lastRouteSection.isNormalStandTrack()) {
// if (Objects.equals(lastRouteSection.getStandList().get(0).isRight(), standRight)) {
// if (!nstdList.contains(lastRouteSection)) {
// nstdList.add(lastRouteSection);
// }
// }
// continue;
// } else {
// signals.add(route.getDestination());
// }
} }
if (!CollectionUtils.isEmpty(signals)) { if (!CollectionUtils.isEmpty(signals)) {
for (Signal end : signals) { for (Signal end : signals) {