Commit a2f1fb5e authored by caotao's avatar caotao

缓存数据新增片区code

parent 97e33c96
......@@ -24,4 +24,6 @@ public class StationCacheInfoDto implements Serializable {
private String fanGatewayId;
//升压站网关
private String boosterGatewayId;
//片区code
private String areaCode;
}
......@@ -51,6 +51,7 @@ public class StationCacheDataInit implements CommandLineRunner {
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.setBelongArea(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.setInstalledCapacity(String.format("%.2f",sjglZsjZsbtzMapper.getStationCapactityByStationWerks(stationBasic.getStationNumber())));
List<QueryDto> queryDtoList = new ArrayList<>();
queryDtoList.add(new QueryDto("gatewayId",stationBasic.getFanGatewayId()));
......
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