Browse Source

修改功率跳变导致电量问题

xieshengjie 1 year ago
parent
commit
b2cd1dd19b

+ 5 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/CycleCalculationService.java

@@ -175,9 +175,12 @@ public class CycleCalculationService {
                     long samedayZeroTime = samedayZero.getTime();
 
                     for (int i = 0;i<ssglList.size();i++){
-                        Long pointTime = ssglList.get(i).getPointTime()*1000;
                         double hours = (currentDate.getTime() - samedayZeroTime) / 1000 / 60 / 60;
-                        rfdl += hours*1/glSize*ssglList.get(i).getPointValueInDouble();
+                        double glData = ssglList.get(i).getPointValueInDouble();
+                        if (glData>=0 && glData<=modelpower.get(wt.getModelId())*24*1.5){
+                            rfdl += hours*1/glSize*glData;
+                        }
+
                     }
                 }
                 wtResultList.add(PointUtil.createPointData(date,rfdl,rfdlPoint.getNemCode(),rfdlPoint.getName()));