Commit 53cc8421 authored by caotao's avatar caotao

运行监盘右侧数据返回错误问题修改

parent 0b0d798c
...@@ -30,7 +30,6 @@ public class CoreCommonServiceImpl implements CoreCommonService { ...@@ -30,7 +30,6 @@ public class CoreCommonServiceImpl implements CoreCommonService {
public List<CoreValuesDto> getValuesByStationNamesAndPointsNames(String stationNames, String pointsNames) { public List<CoreValuesDto> getValuesByStationNamesAndPointsNames(String stationNames, String pointsNames) {
List<CoreValuesDto> result = new ArrayList<>(); List<CoreValuesDto> result = new ArrayList<>();
try { try {
FeignClientResult<List<Object>> feignClientResult = coreFeignClient.getValues(stationNames, pointsNames); FeignClientResult<List<Object>> feignClientResult = coreFeignClient.getValues(stationNames, pointsNames);
List<Object> list = feignClientResult.getResult(); List<Object> list = feignClientResult.getResult();
list.forEach(o -> { list.forEach(o -> {
......
...@@ -372,13 +372,14 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -372,13 +372,14 @@ public class MonitorServiceImpl implements MonitorService {
completionOfPowerIndicatorsDto.setDailyPower(String.format(CommonConstans.Fourdecimalplaces, buDunStationDetailInfo.getDay())); completionOfPowerIndicatorsDto.setDailyPower(String.format(CommonConstans.Fourdecimalplaces, buDunStationDetailInfo.getDay()));
completionOfPowerIndicatorsDto.setMonthlyPower(String.format(CommonConstans.Fourdecimalplaces, buDunStationDetailInfo.getMonth())); completionOfPowerIndicatorsDto.setMonthlyPower(String.format(CommonConstans.Fourdecimalplaces, buDunStationDetailInfo.getMonth()));
completionOfPowerIndicatorsDto.setAnnualPower(String.format(CommonConstans.Fourdecimalplaces, buDunStationDetailInfo.getYear())); completionOfPowerIndicatorsDto.setAnnualPower(String.format(CommonConstans.Fourdecimalplaces, buDunStationDetailInfo.getYear()));
StationCacheInfoDto stationCacheInfoDto = stationCacheInfoDtoList.stream().filter(stationCacheInfoDto1 -> stationCacheInfoDto1.getStationName().contains(buDunStationDetailInfo.getStation_name().replace("电场","").replace("电站",""))).findFirst().get(); StationCacheInfoDto stationCacheInfoDto = stationCacheInfoDtoList.stream().filter(stationCacheInfoDto1 -> stationCacheInfoDto1.getStationName().contains(buDunStationDetailInfo.getStation_name().replace("电场","").replace("电站","").replace("光伏电站",""))).findFirst().orElse(null);
if (stationCacheInfoDto.getStationCoreName() != null && stationCacheInfoDto.getBoosterCoreName() != null) { if (!ObjectUtils.isEmpty(stationCacheInfoDto)&&stationCacheInfoDto.getStationCoreName() != null && stationCacheInfoDto.getBoosterCoreName() != null) {
List<CoreValuesDto> coreValuesDtoList = coreValuesDtos.stream().filter(coreValuesDto -> coreValuesDto.getName().equals(stationCacheInfoDto.getStationCoreName()) || coreValuesDto.getName().equals(stationCacheInfoDto.getBoosterCoreName())).collect(Collectors.toList()); List<CoreValuesDto> coreValuesDtoList = coreValuesDtos.stream().filter(coreValuesDto -> coreValuesDto.getName().equals(stationCacheInfoDto.getStationCoreName()) || coreValuesDto.getName().equals(stationCacheInfoDto.getBoosterCoreName())).collect(Collectors.toList());
completionOfPowerIndicatorsDto.setActivePower(String.format(CommonConstans.Twodecimalplaces, (coreCommonService.getSumOfByPointName(coreValuesDtoList, CommonConstans.ACTIVE_POWER)))); completionOfPowerIndicatorsDto.setActivePower(String.format(CommonConstans.Twodecimalplaces, (coreCommonService.getSumOfByPointName(coreValuesDtoList, CommonConstans.ACTIVE_POWER))));
}else { }else {
completionOfPowerIndicatorsDto.setActivePower("--"); completionOfPowerIndicatorsDto.setActivePower("--");
} }
completionOfPowerIndicatorsDtoList.add(completionOfPowerIndicatorsDto);
}); });
} }
String provincelUrl = Constants.BASE_URL + "?" + Constants.get_province_item_url + "&provinceName=" + provinceName; String provincelUrl = Constants.BASE_URL + "?" + Constants.get_province_item_url + "&provinceName=" + provinceName;
......
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