فهرست منبع

功率曲线拟合调整

wangchangsheng 2 سال پیش
والد
کامیت
5ddd6cc610

+ 4 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/PerformanceCurvefittingService.java

@@ -18,6 +18,7 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 public class PerformanceCurvefittingService {
@@ -61,7 +62,9 @@ public class PerformanceCurvefittingService {
                     tempList.add(vo);
                 });
                 SortUtils.sort(tempList, "speed", SortUtils.ASC);
-                resultMap.put(windturbineIds, tempList);
+
+                resultMap.put("list", tempList);
+                resultMap.put("chanrt", tempList.stream().filter(i ->  (i.getSpeed()%Double.valueOf(0.5))==0).collect(Collectors.toList()));
             }
         }
 

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay1ServiceImpl.java

@@ -87,7 +87,7 @@ public class ProEconPowerstationInfoDay1ServiceImpl extends ServiceImpl<ProEconP
         }
 
         if (null !=date) {
-            Date bingdate = DateUtils.addDays(date, -10);
+            Date bingdate = DateUtils.addDays(date, -4);
 
             qw.lambda().ge(ProEconPowerstationInfoDay1::getRecordDate, bingdate);
             qw.lambda().le(ProEconPowerstationInfoDay1::getRecordDate, date);

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay4ServiceImpl.java

@@ -80,7 +80,7 @@ public class ProEconPowerstationInfoDay4ServiceImpl extends ServiceImpl<ProEconP
         List<ProEconPowerstationInfoDay4> currlist = new ArrayList<>();
         if (null !=date) {
 
-            Date bingdate = DateUtils.addDays(date, -10);
+            Date bingdate = DateUtils.addDays(date, -6);
 
             qw.lambda().ge(ProEconPowerstationInfoDay4::getRecordDate, bingdate);
             qw.lambda().le(ProEconPowerstationInfoDay4::getRecordDate, date);

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProEconPowerstationInfoDay5ServiceImpl.java

@@ -75,7 +75,7 @@ public class ProEconPowerstationInfoDay5ServiceImpl extends ServiceImpl<ProEconP
         }
 
         if (null !=date) {
-            Date bingdate = DateUtils.addDays(date, -7);
+            Date bingdate = DateUtils.addDays(date, -6);
 
             qw.lambda().ge(ProEconPowerstationInfoDay5::getRecordDate, bingdate);
             qw.lambda().le(ProEconPowerstationInfoDay5::getRecordDate, date);

+ 7 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/performacompare/EquipmentPerformaCompareService.java

@@ -59,7 +59,13 @@ public class EquipmentPerformaCompareService {
 
         Map<String, List<ProEconWtPowerCurveFitting>> map =  proEconWtPowerCurveFittingService.getgroupProEconWtPowerCurveFittingList(windturbineIds);
 
-        return map;
+        Map<String, List<ProEconWtPowerCurveFitting>> newmap = new HashMap<>();
+        for (Map.Entry<String, List<ProEconWtPowerCurveFitting>> list : map.entrySet()) {
+            System.out.println(list.getKey() + "--->" + list.getValue());
+            List<ProEconWtPowerCurveFitting> fittingList = list.getValue().stream().filter(i ->  (i.getSpeed()%Double.valueOf(0.5))==0).collect(Collectors.toList());;
+            newmap.put(list.getKey(),fittingList);
+        }
+        return newmap;
     }