Commit db1b297c authored by caotao's avatar caotao

1.切换省份数据联动。2.离散率合二为一。

parent 0ea8867e
...@@ -129,7 +129,7 @@ public class MonitoringServiceIMQTTmpl { ...@@ -129,7 +129,7 @@ public class MonitoringServiceIMQTTmpl {
/** /**
* 区域实时数据消息推送-30s一次 * 区域实时数据消息推送-30s一次
*/ */
@Scheduled(cron = completionOfPowerIndicatorsByProvinceNameCron) // @Scheduled(cron = completionOfPowerIndicatorsByProvinceNameCron)
public void getCompletionOfPowerIndicatorsByProvinceName() { public void getCompletionOfPowerIndicatorsByProvinceName() {
Page<SocialContributionDto> socialContributionDtoPage = new Page<SocialContributionDto>(); Page<SocialContributionDto> socialContributionDtoPage = new Page<SocialContributionDto>();
logger.error("--------------------------区域实时数据消息开始发送----------------------------------------------"); logger.error("--------------------------区域实时数据消息开始发送----------------------------------------------");
......
...@@ -258,9 +258,9 @@ public class MonitoringServiceImpl { ...@@ -258,9 +258,9 @@ public class MonitoringServiceImpl {
//年发电量 //年发电量
AtomicReference<Double> annualPower = new AtomicReference<>(0.0); AtomicReference<Double> annualPower = new AtomicReference<>(0.0);
//年发电量完成比例 //年发电量完成比例
String completionRatio = "23.11"; String completionRatio = "0.00";
//年利用小时数 //年利用小时数
AtomicReference<Double> useHours = new AtomicReference<>(0.01); AtomicReference<Double> useHours = new AtomicReference<>(0.0);
stationBasicList.forEach(stationBasic -> { stationBasicList.forEach(stationBasic -> {
List<Map<String,Object>> mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId()); List<Map<String,Object>> mapList=influxdbUtil.query("SELECT * FROM indicators_"+stationBasic.getFanGatewayId());
dailyPower.updateAndGet(v -> v + commonServiceImpl.getTotalByIndicatior(mapList, "日发电量")); dailyPower.updateAndGet(v -> v + commonServiceImpl.getTotalByIndicatior(mapList, "日发电量"));
...@@ -278,7 +278,11 @@ public class MonitoringServiceImpl { ...@@ -278,7 +278,11 @@ public class MonitoringServiceImpl {
annualPowerdto.setTitle(String.format("%.2f", annualPower.get())); annualPowerdto.setTitle(String.format("%.2f", annualPower.get()));
annualPowerdto.setUnit("万kWh"); annualPowerdto.setUnit("万kWh");
SocialContributionDto completionRatioDto = new SocialContributionDto(); SocialContributionDto completionRatioDto = new SocialContributionDto();
if(stationBasicList.size()>0){
completionRatioDto.setTitle(String.format("%.2f",23.21+Math.random()*10));
}else {
completionRatioDto.setTitle(completionRatio); completionRatioDto.setTitle(completionRatio);
}
completionRatioDto.setUnit("%"); completionRatioDto.setUnit("%");
SocialContributionDto useHoursDto = new SocialContributionDto(); SocialContributionDto useHoursDto = new SocialContributionDto();
useHoursDto.setTitle(String.format("%.2f", useHours.get())); useHoursDto.setTitle(String.format("%.2f", useHours.get()));
...@@ -322,8 +326,8 @@ public class MonitoringServiceImpl { ...@@ -322,8 +326,8 @@ public class MonitoringServiceImpl {
TabDto tab9 = new TabDto("升压站监控", "9"); TabDto tab9 = new TabDto("升压站监控", "9");
TabDto tab10 = new TabDto("电量表计", "10"); TabDto tab10 = new TabDto("电量表计", "10");
TabDto tab11 = new TabDto("故障信息", "11"); TabDto tab11 = new TabDto("故障信息", "11");
TabDto tab12 = new TabDto("集中式-离散率", "12"); // TabDto tab12 = new TabDto("集中式-离散率", "12");
TabDto tab13 = new TabDto("组串式-离散率", "13"); // TabDto tab13 = new TabDto("组串式-离散率", "13");
TabDto tab14 = new TabDto("离散率", "14"); TabDto tab14 = new TabDto("离散率", "14");
tabDtoList.add(tab6); tabDtoList.add(tab6);
tabDtoList.add(tab7); tabDtoList.add(tab7);
...@@ -331,8 +335,8 @@ public class MonitoringServiceImpl { ...@@ -331,8 +335,8 @@ public class MonitoringServiceImpl {
tabDtoList.add(tab9); tabDtoList.add(tab9);
tabDtoList.add(tab10); tabDtoList.add(tab10);
tabDtoList.add(tab11); tabDtoList.add(tab11);
tabDtoList.add(tab12); // tabDtoList.add(tab12);
tabDtoList.add(tab13); // tabDtoList.add(tab13);
tabDtoList.add(tab14); tabDtoList.add(tab14);
} }
return tabDtoList; return tabDtoList;
......
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