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

This commit is contained in:
walker-sheng 2021-03-23 09:22:41 +08:00
commit 064e46b47a
3 changed files with 18 additions and 1 deletions

View File

@ -254,6 +254,12 @@ public class MapController {
return this.iMapService.querySectionsUnderTheStation(id, stationCode);
}
@ApiOperation("获取集中站下所有区段")
@GetMapping("/{id}/deviceStation/{stationCode}/sections")
public List<MapSectionNewVO> querySectionBelongTheDeviceStation(@PathVariable Long id, @PathVariable String stationCode) {
return this.iMapService.querySectionBelongTheDeviceStation(id, stationCode);
}
@ApiOperation(value = "获取地图站台关联的屏蔽门")
@GetMapping("/{id}/stand/{standCode}/psd")
public List<MapPSDVO> getStandPsds(@PathVariable Long id,

View File

@ -292,4 +292,9 @@ public interface IMapService {
* 查询地图下的所有区段
*/
List<MapSectionNewVO> querySectionsUnderMap(Long id);
/**
* 查询属于该集中站的区段
*/
List<MapSectionNewVO> querySectionBelongTheDeviceStation(Long mapId, String stationCode);
}

View File

@ -42,7 +42,6 @@ import java.text.Collator;
import java.time.LocalDateTime;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collector;
import java.util.stream.Collectors;
/**
@ -869,6 +868,13 @@ public class MapService implements IMapService {
return mapDetail.getGraphDataNew().getSectionList();
}
@Override
public List<MapSectionNewVO> querySectionBelongTheDeviceStation(Long mapId, String stationCode) {
MapVO mapDetail = getMapDetail(mapId);
return mapDetail.getGraphDataNew().getSectionList().stream()
.filter(section -> section.getStationCode().equals(stationCode)).collect(Collectors.toList());
}
/**
* 该版本的地图数据是否存在
*/