Browse Source

光伏等效发电时、离散率、转换效率分析bug4

xushili 1 year ago
parent
commit
14574a5169

+ 6 - 3
power-fitting-JN/src/main/java/com.gyee.power.fitting/dispersionanalysis/InverterAnalysis2.java

@@ -12,6 +12,7 @@ import com.gyee.power.fitting.model.custom.TsDoubleData;
 import com.gyee.power.fitting.service.ProBasicEquipmentPointService;
 import com.gyee.power.fitting.service.ProBasicEquipmentService;
 import com.gyee.power.fitting.service.ProEconEquipmentmodelService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -81,11 +82,13 @@ public class InverterAnalysis2 {
         Map<String, Double> dxfdsData = new HashMap<>();
         double dxfdsSum = 0;//等效发电时之和
         TsDoubleData endData, startData;
-        String ims;
+        String ims, p;
         double dxfds;
         for (String s : inverterIds) {
-            endData = endSection.get(s);
-            startData = startSection.get(s);
+            p = epMap.get(s);
+            if (StringUtils.isEmpty(p)) continue;
+            endData = endSection.get(p);
+            startData = startSection.get(p);
             ims = inverterModelMap.get(s);
             if (endData == null || startData == null || ims == null) {
                 dxfds = 0;

+ 4 - 3
power-fitting-JN/src/main/java/com.gyee.power.fitting/service/impl/IvPvCurveFittingService.java

@@ -80,7 +80,7 @@ public class IvPvCurveFittingService {
         }
     }
 
-    public Map<String, List<PhotovoltaicInfo>> getDatas2File1(String stationid, long start, long end, int interval) {
+    public Map<String, List<PhotovoltaicInfo>> getDatas2File1(String stationid, long start, long end, Integer interval) {
 
         int daym = 24 * 60 * 60 * 1000;
         Map<String, List<PhotovoltaicInfo>> wj = new HashMap<>();
@@ -520,9 +520,10 @@ public class IvPvCurveFittingService {
      *
      * @return 逆变器,列表
      */
-    public List<List<PhotovoltaicInfo>> getDatas(String stationid, long start, long end, int interval) {
+    public List<List<PhotovoltaicInfo>> getDatas(String stationid, long start, long end, Integer interval) {
         //间隔
-        interval = 5 * 60; //5分钟-300
+        if (interval == null)
+            interval = 5 * 60; //5分钟-300
 
         //获得测点
         Map<String, String> zglpoints = getPoints(stationid, "zgl");