Browse Source

逆变器分析接口

宁檬 1 year ago
parent
commit
4028f633ef

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

@@ -1194,11 +1194,6 @@ public class WindturbinegoodnessService {
             ia.setInputPower(srgMap.get(pointTime).getPointValueInDouble());
             ia.setOutputPower(scgMap.get(pointTime).getPointValueInDouble());
             ia.setInputVoltage(srdMap.get(pointTime).getPointValueInDouble());
-            /*if (srgMap.get(pointTime).getPointValueInDouble() == null || srgMap.get(pointTime).getPointValueInDouble() == 0.0 || scgMap.get(pointTime).getPointValueInDouble() == null || scgMap.get(pointTime).getPointValueInDouble() == 0.0) {
-                ia.setConversionRate(0.0);
-            } else {
-                ia.setConversionRate(scgMap.get(pointTime).getPointValueInDouble() / srgMap.get(pointTime).getPointValueInDouble() * 100);
-            }*/
             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)) {
@@ -1208,22 +1203,7 @@ public class WindturbinegoodnessService {
             }
             lpds.add(ia);
         }
-       // List<InverterAnalysis2> lias2 = lpds.stream().sorted(Comparator.comparing(InverterAnalysis2::getTime)).collect(Collectors.toList());
-        List<InverterAnalysis2> lias2 = lpds.stream().sorted(Comparator.comparing(ia -> {
-            try {
-                Long pointTime = ia.getTime();
-                Date date = new Date(pointTime * 1000);
-                //将id转换成Long类型
-                Long sortValue = Long.parseLong(wtid);
-                //将sortValue和时间戳拼接成一个Long类型的值
-                String sortKey = sortValue.toString() + String.format("%13d", date.getTime());
-                return Long.parseLong(sortKey);
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-            return null;
-        })).collect(Collectors.toList());
-
+        List<InverterAnalysis2> lias2 = lpds.stream().sorted(Comparator.comparing(InverterAnalysis2::getTime)).collect(Collectors.toList());
         int total = lias2.size();
         long offset = (pageNum - 1) * pageSize;
         lias2 = lias2.stream().skip(offset).limit(pageSize).collect(Collectors.toList());