Commit 9296bc09 authored by zhangsen's avatar zhangsen

文档问题处理

parent fabdd69a
......@@ -286,9 +286,11 @@ public class MonitorFanIdxController extends BaseController {
public ResponseModel<Map<String, Object>> getOverviewWindSpeed(@RequestParam(value = "stationId", required = false)String stationId,@RequestParam(value = "type", required = false)String type
,@RequestParam(value = "areaCode", required = false)String areaCode) {
String gatewayId = "";
List<StationCacheInfoDto> listStationCacheInfoDto = commonServiceImpl.getListStationCacheInfoDto();
double installedCapacity = listStationCacheInfoDto.stream().mapToDouble(t -> Double.parseDouble(t.getInstalledCapacity())).sum();
if (null != areaCode){
List<StationCacheInfoDto> listStationCacheInfoDto = commonServiceImpl.getListStationCacheInfoDto();
List<String> collect = listStationCacheInfoDto.stream().filter(e -> e.getAreaCode().equals(areaCode)).map(StationCacheInfoDto::getFanGatewayId).collect(Collectors.toList());
installedCapacity = listStationCacheInfoDto.stream().filter(e -> e.getAreaCode().equals(areaCode)).mapToDouble(t -> Double.parseDouble(t.getInstalledCapacity())).sum();
gatewayId = String.join(",", collect);
}
if (null != stationId){
......@@ -297,8 +299,9 @@ public class MonitorFanIdxController extends BaseController {
if (null == type){
gatewayId = stationBasic.getFanGatewayId();
}
installedCapacity = listStationCacheInfoDto.stream().filter(e -> e.getStationId().equals(stationId)).mapToDouble(t -> Double.parseDouble(t.getInstalledCapacity())).sum();
}
Map<String, Object> detailsWindSpeed = monitorFanIndicator.getDetailsWindSpeedAll(gatewayId);
Map<String, Object> detailsWindSpeed = monitorFanIndicator.getDetailsWindSpeedAll(gatewayId, installedCapacity);
return ResponseHelper.buildResponse(detailsWindSpeed);
}
......
......@@ -609,7 +609,15 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public Map<String,Object> getDetailsWindSpeedAll(String gatewayId){
public Map<String,Object> getDetailsWindSpeedAll(String gatewayId, double installedCapacity){
Map<String, List<String>> queryCondtion = new HashMap<>();
if (StringUtils.isNotEmpty(gatewayId)) {
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
}
queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值", "南瑞光差保护_313P"));
List<ESEquipments> indicatorsDtoList = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class);
double sum = indicatorsDtoList.stream().mapToDouble(t -> Double.parseDouble(t.getValueDouble().toString())).sum();
Double format = Double.parseDouble(String.format("%.2f", sum / installedCapacity));
List<Map<String, Object>> list = temporaryDataMapper.timingTemporarysSorageData(gatewayId);
Map<String,Object> map = new HashMap<>();
List<String> values = new ArrayList<>();
......@@ -661,6 +669,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
map.put("min",min);
map.put("maxTime",maxTime);
map.put("minTime",minTime);
map.put("load", format);
return map;
}
......
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