Commit 58f336f5 authored by caotao's avatar caotao

修复全国接入情况数据展示错误问题

parent eafc944f
......@@ -238,7 +238,11 @@ public class CommonServiceImpl {
stationCacheInfoDto.setStationType(stationBasic.getStationType());
stationCacheInfoDto.setBelongProvince(regionList.stream().filter(region -> region.getRegionCode().toString().equals(stationBasic.getBelongArea().replace("[", "").split(",")[0])).map(region -> region.getRegionName()).collect(Collectors.toList()).get(0));
stationCacheInfoDto.setBelongArea(mapRegionList.stream().filter(mapRegion -> mapRegion.getProvince().contains(stationCacheInfoDto.getBelongProvince().substring(0, 2)) || mapRegion.getProvince().contains(stationCacheInfoDto.getBelongProvince().substring(0, 3))).map(mapRegion -> mapRegion.getName()).collect(Collectors.toList()).get(0));
stationCacheInfoDto.setInstalledCapacity(String.format("%.2f", sjglZsjZsbtzMapper.getStationCapactityByStationWerks(stationBasic.getStationNumber())));
Double installedCapacity = 0.0d;
if(!ObjectUtils.isEmpty(sjglZsjZsbtzMapper.getStationCapactityByStationWerks(stationBasic.getStationNumber()))){
installedCapacity =sjglZsjZsbtzMapper.getStationCapactityByStationWerks(stationBasic.getStationNumber());
}
stationCacheInfoDto.setInstalledCapacity(String.format("%.2f", installedCapacity));
stationCacheInfoDto.setFanGatewayId(stationBasic.getFanGatewayId());
stationCacheInfoDto.setAreaCode(mapRegionList.stream().filter(mapRegion -> mapRegion.getProvince().contains(stationCacheInfoDto.getBelongProvince().substring(0, 2)) || mapRegion.getProvince().contains(stationCacheInfoDto.getBelongProvince().substring(0, 3))).map(mapRegion -> mapRegion.getAreaCode()).collect(Collectors.toList()).get(0));
stationCacheInfoDto.setBoosterGatewayId(stationBasic.getBoosterGatewayId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment