Browse Source

公司指标,理论发电量

malijun 9 months ago
parent
commit
5be35ec341
1 changed files with 6 additions and 3 deletions
  1. 6 3
      ruoyi-admin/src/test/java/com/ruoyi/JavaFunctionJobHandler.java

+ 6 - 3
ruoyi-admin/src/test/java/com/ruoyi/JavaFunctionJobHandler.java

@@ -1972,9 +1972,12 @@ public class JavaFunctionJobHandler extends IJobHandler {
                 year = yearMap.get(projectId);
                 pool.setNllfdl(year.getLlfdl());
             }
-            double v1 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getRllfdl).average().orElse(0);
-            double v2 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getYllfdl).average().orElse(0);
-            double v3 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getNllfdl).average().orElse(0);
+            double v1 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getRllfdl).sum());
+            double v2 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getYllfdl).sum());
+            double v3 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getNllfdl).sum());
+            //pools.stream().mapToDouble(ProEconReportIndicatorPool::getRllfdl),求和
+
+
             if (pools2 != null) {
                 pools2.setRllfdl(v1);
                 pools2.setYllfdl(v2);