malijun 5 kuukautta sitten
vanhempi
commit
cf96a3c149
1 muutettua tiedostoa jossa 7 lisäystä ja 25 poistoa
  1. 7 25
      ruoyi-admin/src/test/java/com/ruoyi/JavaFunctionJobHandler.java

+ 7 - 25
ruoyi-admin/src/test/java/com/ruoyi/JavaFunctionJobHandler.java

@@ -1672,32 +1672,14 @@ public class JavaFunctionJobHandler extends IJobHandler {
             }
             reportIndicatorPoolService.saveOrUpdateBatch(poolList);
         } else {
-            ProEconReportIndicatorPool pool = new ProEconReportIndicatorPool();
-            LineInfoDay day, month, year;
-            List<ProEconReportIndicatorPool> poolList = new ArrayList<>();
-            String projectId;
-            projectId = pool.getProjectId();
-            day = dayMap.get(projectId);
-
-            pool.setRecordDate(time0.toLocalDateTime().toLocalDate());
-            pool.setForeignKeyId(projectId);
 
-
-            pool.setRfdldb(day.getRfdl().doubleValue());
-            pool.setRswdldb(day.getSwdl());
-            pool.setRgwgwdldb(day.getGwdl());
-            pool.setRfdcydldb(day.getCydl());
-            month = monthMap.get(projectId);
-            pool.setYfdldb(month.getRfdl().doubleValue());
-            pool.setYswdldb(month.getSwdl());
-            pool.setYgwgwdldb(month.getGwdl());
-            pool.setYfdcydldb(month.getCydl());
-            year = yearMap.get(projectId);
-            pool.setNfdldb(year.getRfdl().doubleValue());
-            pool.setNswdldb(year.getSwdl());
-            pool.setNgwgwdldb(year.getGwdl());
-            pool.setNfdcydldb(year.getCydl());
-            poolList.add(pool);
+            List<ProEconReportIndicatorPool> poolList = new ArrayList<>();
+            for (LineInfoDay day :days){
+                ProEconReportIndicatorPool pool = new ProEconReportIndicatorPool();
+                pool.setRecordDate(time0.toLocalDateTime().toLocalDate());
+                pool.setForeignKeyId(day.getProjectId());
+                poolList.add(pool);
+            }
             reportIndicatorPoolService.saveOrUpdateBatch(poolList);
 
         }