Commit 9c2a2d70 authored by tangwei's avatar tangwei

解决冲突

parents b070ae26 662969fb
...@@ -282,6 +282,11 @@ public class MonitoringServiceImpl { ...@@ -282,6 +282,11 @@ public class MonitoringServiceImpl {
AtomicReference<Double> useHours = new AtomicReference<>(0.0); AtomicReference<Double> useHours = new AtomicReference<>(0.0);
AtomicReference<Double> installCapacity = new AtomicReference<>(0.0); AtomicReference<Double> installCapacity = new AtomicReference<>(0.0);
AtomicReference<Double> fdzInstallCapacity = new AtomicReference<>(0.0);
AtomicReference<Double> gfzinstallCapacity = new AtomicReference<>(0.0);
//年发电量
AtomicReference<Double> fdzannualPower = new AtomicReference<>(0.0);
AtomicReference<Double> gfzannualPower = new AtomicReference<>(0.0);
stationBasicList.forEach(stationCacheInfoDto -> { stationBasicList.forEach(stationCacheInfoDto -> {
Map<String, List<String>> queryMap = new HashMap<>(); Map<String, List<String>> queryMap = new HashMap<>();
queryMap.put("equipmentIndexName.keyword", Arrays.asList("日发电量", "月发电量", "年发电量")); queryMap.put("equipmentIndexName.keyword", Arrays.asList("日发电量", "月发电量", "年发电量"));
...@@ -294,6 +299,8 @@ public class MonitoringServiceImpl { ...@@ -294,6 +299,8 @@ public class MonitoringServiceImpl {
dailyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "日发电量"))); dailyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "日发电量")));
monthlyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "月发电量"))); monthlyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "月发电量")));
annualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "年发电量"))); annualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "年发电量")));
fdzannualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "年发电量")));
fdzInstallCapacity.updateAndGet(v -> v + Double.parseDouble(stationCacheInfoDto.getInstalledCapacity()));
} else { } else {
Map<String, List<String>> queryCondtion = new HashMap<>(); Map<String, List<String>> queryCondtion = new HashMap<>();
queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("日发电量", "月发电量", "年发电量")); queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("日发电量", "月发电量", "年发电量"));
...@@ -304,8 +311,9 @@ public class MonitoringServiceImpl { ...@@ -304,8 +311,9 @@ public class MonitoringServiceImpl {
dailyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "日发电量") * CommonConstans.pvGenPoweActor * CommonConstans.pvGenPoweActorDay)); dailyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "日发电量") * CommonConstans.pvGenPoweActor * CommonConstans.pvGenPoweActorDay));
monthlyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "月发电量") * CommonConstans.pvGenPoweActor)); monthlyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "月发电量") * CommonConstans.pvGenPoweActor));
annualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "年发电量") * CommonConstans.pvGenPoweActor)); annualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "年发电量") * CommonConstans.pvGenPoweActor));
gfzannualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "年发电量") * CommonConstans.pvGenPoweActor));
gfzinstallCapacity.updateAndGet(v -> v + Double.parseDouble(stationCacheInfoDto.getInstalledCapacity()));
} }
installCapacity.updateAndGet(v -> v + Double.parseDouble(stationCacheInfoDto.getInstalledCapacity()));
}); });
completionRatio = String.format("%.2f", (annualPower.get() * 100) / value); completionRatio = String.format("%.2f", (annualPower.get() * 100) / value);
SocialContributionDto dailyPowerdto = new SocialContributionDto(); SocialContributionDto dailyPowerdto = new SocialContributionDto();
...@@ -321,7 +329,7 @@ public class MonitoringServiceImpl { ...@@ -321,7 +329,7 @@ public class MonitoringServiceImpl {
completionRatioDto.setTitle(completionRatio); completionRatioDto.setTitle(completionRatio);
completionRatioDto.setUnit("%"); completionRatioDto.setUnit("%");
SocialContributionDto useHoursDto = new SocialContributionDto(); SocialContributionDto useHoursDto = new SocialContributionDto();
useHoursDto.setTitle(String.format(CommonConstans.Twodecimalplaces, annualPower.get() / installCapacity.get())); useHoursDto.setTitle(String.format(CommonConstans.Twodecimalplaces, (fdzannualPower.get() * CommonConstans.wkwhToMv / fdzInstallCapacity.get() + gfzannualPower.get() * CommonConstans.wkwhToMv / gfzinstallCapacity.get())));
useHoursDto.setUnit("h"); useHoursDto.setUnit("h");
socialContributionDtoList.add(dailyPowerdto); socialContributionDtoList.add(dailyPowerdto);
socialContributionDtoList.add(monthlyPowerdto); socialContributionDtoList.add(monthlyPowerdto);
...@@ -1067,10 +1075,10 @@ public class MonitoringServiceImpl { ...@@ -1067,10 +1075,10 @@ public class MonitoringServiceImpl {
HashMap<String, Object> result = new HashMap<>(); HashMap<String, Object> result = new HashMap<>();
List<HashMap<String, Object>> hashMapList = new ArrayList<>(); List<HashMap<String, Object>> hashMapList = new ArrayList<>();
List<IndicatorData> indicatorDataList = new ArrayList<>(); List<IndicatorData> indicatorDataList = new ArrayList<>();
if(stationBasic.getStationType().equals("FDZ")){ if (stationBasic.getStationType().equals("FDZ")) {
indicatorDataList = indicatorDataMapper.selectDataByequipmentIndexNameAndtime("220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值",date+" 00:00:00",date +" 23:59:59",stationBasic.getBoosterGatewayId()); indicatorDataList = indicatorDataMapper.selectDataByequipmentIndexNameAndtime("220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值", date + " 00:00:00", date + " 23:59:59", stationBasic.getBoosterGatewayId());
}else { } else {
indicatorDataList = indicatorDataMapper.selectDataByequipmentIndexNameAndtime("南瑞光差保护_313P-9705TA有功功率一次值",date+" 00:00:00",date +" 23:59:59",stationBasic.getBoosterGatewayId()); indicatorDataList = indicatorDataMapper.selectDataByequipmentIndexNameAndtime("南瑞光差保护_313P-9705TA有功功率一次值", date + " 00:00:00", date + " 23:59:59", stationBasic.getBoosterGatewayId());
} }
//x轴数据 //x轴数据
List<String> xdata = new ArrayList<>(); List<String> xdata = new ArrayList<>();
...@@ -1087,11 +1095,11 @@ public class MonitoringServiceImpl { ...@@ -1087,11 +1095,11 @@ public class MonitoringServiceImpl {
shortPowerYdata.add("0.00"); shortPowerYdata.add("0.00");
superPowerShortYdata.add("0.00"); superPowerShortYdata.add("0.00");
} }
}else{ } else {
for (int i = 0; i < indicatorDataList.size() ; i++) { for (int i = 0; i < indicatorDataList.size(); i++) {
IndicatorData indicatorData = indicatorDataList.get(i); IndicatorData indicatorData = indicatorDataList.get(i);
xdata.add(DateUtil.format(indicatorData.getCreatedTime(), "HH:mm")); xdata.add(DateUtil.format(indicatorData.getCreatedTime(), "HH:mm"));
currentPowerYdata.add(String.format(CommonConstans.Twodecimalplaces,indicatorData.getValueF())); currentPowerYdata.add(String.format(CommonConstans.Twodecimalplaces, indicatorData.getValueF()));
shortPowerYdata.add("0.00"); shortPowerYdata.add("0.00");
superPowerShortYdata.add("0.00"); superPowerShortYdata.add("0.00");
} }
......
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