Commit 991d4dad authored by chenzhao's avatar chenzhao

监盘 大屏问题修复

parent a942806d
...@@ -32,6 +32,9 @@ public class CommonConstans { ...@@ -32,6 +32,9 @@ public class CommonConstans {
public static final Double tToWT = 0.0001; public static final Double tToWT = 0.0001;
//万Kwh转MV //万Kwh转MV
public static final Integer wkwhToMv = 10; public static final Integer wkwhToMv = 10;
//kw转MV
public static final Double kwToMv =0.0001 ;
// 正常运行 发电状态=1 // 正常运行 发电状态=1
// 告警运行 报警状态=1 // 告警运行 报警状态=1
// 正常停机 停机状态=1 // 正常停机 停机状态=1
......
...@@ -602,14 +602,15 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -602,14 +602,15 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
} }
public Map<String,Object> getDetailsWindSpeedAll(String gatewayId, double installedCapacity){ public Map<String,Object> getDetailsWindSpeedAll(String gatewayId, double installedCapacity,List<String> ids){
Map<String, List<String>> queryCondtion = new HashMap<>(); Map<String, List<String>> queryCondtion = new HashMap<>();
if (StringUtils.isNotEmpty(gatewayId)) { if (CollectionUtils.isNotEmpty(ids)) {
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId)); queryCondtion.put(CommonConstans.QueryStringGateWayId, ids);
} }
queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值", "南瑞光差保护_313P")); queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值", "南瑞光差保护_313P"));
List<ESEquipments> indicatorsDtoList = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class); List<ESEquipments> indicatorsDtoList = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class);
double sum = indicatorsDtoList.stream().mapToDouble(t -> Double.parseDouble(t.getValueF().toString())).sum(); double sum = null == indicatorsDtoList?0.0: indicatorsDtoList.stream().mapToDouble(t -> Double.parseDouble(t.getValueF().toString())).sum();
Double format = Double.parseDouble(String.format("%.2f", sum / installedCapacity)); Double format = Double.parseDouble(String.format("%.2f", sum / installedCapacity));
List<Map<String, Object>> list = temporaryDataMapper.timingTemporarysSorageData(gatewayId); List<Map<String, Object>> list = temporaryDataMapper.timingTemporarysSorageData(gatewayId);
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
...@@ -1936,5 +1937,21 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1936,5 +1937,21 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
return hashMap; return hashMap;
} }
public String getEquipCount(String gatewayId, String stationType) {
Map<String, List<String>> queryCondtion1 = new HashMap<>();
if (stationType.equals("FDZ")) {
queryCondtion1.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("有功功率"));
} else {
queryCondtion1.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("运行"));
}
queryCondtion1.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
List<ESEquipments> equipNumList = commonServiceImpl.getListDataByCondtions(queryCondtion1, null, ESEquipments.class);
if (!CollectionUtils.isEmpty(equipNumList)) {
return equipNumList.size() + "";
}
return "0";
}
} }
...@@ -821,7 +821,7 @@ public class MonitoringServiceImpl { ...@@ -821,7 +821,7 @@ public class MonitoringServiceImpl {
BigDecimal totalInstall = new BigDecimal(getInstallCapity(stationBasicListAll)); BigDecimal totalInstall = new BigDecimal(getInstallCapity(stationBasicListAll));
stringHashMap.put("title", totalInstall.toString()); stringHashMap.put("title", totalInstall.toString());
stringHashMap.put("data", ""); stringHashMap.put("data", "");
list.add(stringHashMap); // list.add(stringHashMap);
//风电站 //风电站
HashMap<String, String> stringHashMap1 = new HashMap<>(); HashMap<String, String> stringHashMap1 = new HashMap<>();
BigDecimal fdzInstall = new BigDecimal(getInstallCapity(fdzList)); BigDecimal fdzInstall = new BigDecimal(getInstallCapity(fdzList));
...@@ -924,7 +924,7 @@ public class MonitoringServiceImpl { ...@@ -924,7 +924,7 @@ public class MonitoringServiceImpl {
HashMap<String, String> stringHashMap16 = new HashMap<>(); HashMap<String, String> stringHashMap16 = new HashMap<>();
stringHashMap16.put("title", String.format(CommonConstans.Twodecimalplaces, (totalAnnual * CommonConstans.sulfurDioxide * CommonConstans.tToWT))); stringHashMap16.put("title", String.format(CommonConstans.Twodecimalplaces, (totalAnnual * CommonConstans.sulfurDioxide * CommonConstans.tToWT)));
stringHashMap16.put("unit", "二氧化硫减排量(万t)"); stringHashMap16.put("unit", "二氧化硫减排量(万t)");
list3.add(stringHashMap16); list3.add(stringHashMap16);
page3.setRecords(list3); page3.setRecords(list3);
try { try {
emqKeeper.getMqttClient().publish("bigscreen_zjrl_topic", JSON.toJSON(page).toString().getBytes("UTF-8"), 1, true); emqKeeper.getMqttClient().publish("bigscreen_zjrl_topic", JSON.toJSON(page).toString().getBytes("UTF-8"), 1, true);
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
{ {
"title": "风机台数", "title": "风机台数",
"title1": "风机台数(台)", "title1": "风机台数(台)",
"action": "*.replace(\".0\",\"\")",
"url": "upload/jxiop/amos_studio/EA3572E1BD31DC1E7D8DA162F09ECB.png" "url": "upload/jxiop/amos_studio/EA3572E1BD31DC1E7D8DA162F09ECB.png"
}, },
{ {
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
{ {
"title": "逆变器台数", "title": "逆变器台数",
"title1": "逆变器台数(台)", "title1": "逆变器台数(台)",
"action": "*.replace(\".0\",\"\")",
"url": "upload/jxiop/amos_studio/EA3572E1BD31DC1E7D8DA162F09ECB.png" "url": "upload/jxiop/amos_studio/EA3572E1BD31DC1E7D8DA162F09ECB.png"
}, },
{ {
...@@ -24,7 +23,7 @@ ...@@ -24,7 +23,7 @@
{ {
"url": "upload/jxiop/amos_studio/DD1CE8BAF5A7C3AC5E6E2C0D46C3EEC.png", "url": "upload/jxiop/amos_studio/DD1CE8BAF5A7C3AC5E6E2C0D46C3EEC.png",
"title1": "辐照强度(W/㎡)", "title1": "辐照强度(W/㎡)",
"title": "总辐射" "title": "辐照强度"
}, },
{ {
"url": "upload/jxiop/amos_studio/22639FDFF29B20B681DF55F1252876B3.png", "url": "upload/jxiop/amos_studio/22639FDFF29B20B681DF55F1252876B3.png",
...@@ -52,8 +51,8 @@ ...@@ -52,8 +51,8 @@
"url": "upload/jxiop/amos_studio/1660C5DDA22ACFADC89A60DEDB82FA39.png" "url": "upload/jxiop/amos_studio/1660C5DDA22ACFADC89A60DEDB82FA39.png"
}, },
{ {
"title": "利用小时", "title": "利用小时",
"title1": "利用小时", "title1": "利用小时",
"action":"String.format(\"%.2f\",Double.parseDouble(columnMap.get(\"*\").toString())/ (Double.parseDouble(columnMap.get(\"-\").toString())*1000))", "action":"String.format(\"%.2f\",Double.parseDouble(columnMap.get(\"*\").toString())/ (Double.parseDouble(columnMap.get(\"-\").toString())*1000))",
"url": "upload/jxiop/amos_studio/C46B483E51ACAC137CBEB5156F6F377.png" "url": "upload/jxiop/amos_studio/C46B483E51ACAC137CBEB5156F6F377.png"
} }
......
...@@ -401,6 +401,7 @@ public class CommonServiceImpl { ...@@ -401,6 +401,7 @@ public class CommonServiceImpl {
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.getName()).collect(Collectors.toList()).get(0));
stationCacheInfoDto.setInstalledCapacity(String.format("%.2f", sjglZsjZsbtzMapper.getStationCapactityByStationWerks(stationBasic.getStationNumber()))); stationCacheInfoDto.setInstalledCapacity(String.format("%.2f", sjglZsjZsbtzMapper.getStationCapactityByStationWerks(stationBasic.getStationNumber())));
stationCacheInfoDto.setFanGatewayId(stationBasic.getFanGatewayId()); 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()); stationCacheInfoDto.setBoosterGatewayId(stationBasic.getBoosterGatewayId());
stationCacheInfoDtos.add(stationCacheInfoDto); stationCacheInfoDtos.add(stationCacheInfoDto);
} }
......
...@@ -206,7 +206,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -206,7 +206,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}); });
Collator instance = Collator.getInstance(Locale.CHINA); Collator instance = Collator.getInstance(Locale.CHINA);
Collections.sort(result, (e1, e2) -> { Collections.sort(result, (e1, e2) -> {
return instance.compare(e1.getSystemType(), e2.getSystemType()); return instance.compare(e1.getEquipmentIndexName(), e2.getEquipmentIndexName());
}); });
List<ESEquipments> collect = result.stream() List<ESEquipments> collect = result.stream()
.skip((long) (current - 1) * size) .skip((long) (current - 1) * size)
...@@ -801,6 +801,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -801,6 +801,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
statusMap.put("title", listDatum.getValue().equals("false") ? "通" : "断"); statusMap.put("title", listDatum.getValue().equals("false") ? "通" : "断");
statusMaps.add(statusMap); statusMaps.add(statusMap);
} }
Collator instance = Collator.getInstance(Locale.CHINA);
Collections.sort(statusMaps, (e1, e2) -> {
return instance.compare(e1.get("data"), e2.get("data"));
});
return statusMaps; return statusMaps;
} }
......
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