浏览代码

逆变器分析二次页面修复

xushili 1 年之前
父节点
当前提交
b3a8adf3ce

+ 7 - 7
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/goodness/WindturbinegoodnessService.java

@@ -1166,18 +1166,18 @@ public class WindturbinegoodnessService {
         }
 
         //所有逆变器的输入功率测点
-        String srgTag = srg.stream().map(epp -> epp.getNemCode()).collect(Collectors.joining(";"));
-        List<PointData> historySrgDatas = edosUtil.getHistoryDatasSnap(srgTag, startTs, endTs, null, 900L);
+        //String srgTag = srg.stream().map(epp -> epp.getNemCode()).collect(Collectors.joining(";"));
+        List<PointData> historySrgDatas = edosUtil.getHistoryDatasSnap(srg.get(0).getNemCode(), startTs, endTs, null, 900L);
         Map<Long, PointData> srgMap = historySrgDatas.stream().collect(Collectors.toMap(PointData::getPointTime, Function.identity()));
 
         //所有逆变器的输出功率测点
-        String scgTag = scg.stream().map(epp -> epp.getNemCode()).collect(Collectors.joining(";"));
-        List<PointData> historyScgDatas = edosUtil.getHistoryDatasSnap(scgTag, startTs, endTs, null, 900L);
+        //String scgTag = scg.stream().map(epp -> epp.getNemCode()).collect(Collectors.joining(";"));
+        List<PointData> historyScgDatas = edosUtil.getHistoryDatasSnap(scg.get(0).getNemCode(), startTs, endTs, null, 900L);
         Map<Long, PointData> scgMap = historyScgDatas.stream().collect(Collectors.toMap(PointData::getPointTime, Function.identity()));
 
         //所有逆变器的输出电压测点
-        String srdTag = srd.stream().map(epp -> epp.getNemCode()).collect(Collectors.joining(";"));
-        List<PointData> historySrdDatas = edosUtil.getHistoryDatasSnap(srdTag, startTs, endTs, null, 900L);
+        //String srdTag = srd.stream().map(epp -> epp.getNemCode()).collect(Collectors.joining(";"));
+        List<PointData> historySrdDatas = edosUtil.getHistoryDatasSnap(srd.get(0).getNemCode(), startTs, endTs, null, 900L);
         Map<Long, PointData> srdMap = historySrdDatas.stream().collect(Collectors.toMap(PointData::getPointTime, Function.identity()));
 
         List<InverterAnalysis2> lpds = new ArrayList<>();
@@ -1192,7 +1192,7 @@ public class WindturbinegoodnessService {
             ia.setInputVoltage(srdMap.get(pointTime).getPointValueInDouble());
             Double srgValue = srgMap.get(pointTime) != null ? srgMap.get(pointTime).getPointValueInDouble() : null;
             Double scgValue = scgMap.get(pointTime) != null ? scgMap.get(pointTime).getPointValueInDouble() : null;
-            if (srgValue == null || Double.valueOf(0.0).equals(srgValue) || scgValue == null || Double.valueOf(0.0).equals(scgValue)) {
+            if (srgValue == null || Double.valueOf(0.0).equals(srgValue) || scgValue == null) {
                 ia.setConversionRate(0.0);
             } else {
                 ia.setConversionRate(scgValue / srgValue * 100);