malijun 5 ヶ月 前
コミット
df3ee9ac9c

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

@@ -1748,10 +1748,17 @@ public class JavaFunctionJobHandler extends IJobHandler {
 
         QueryWrapper<ProEconReportIndicatorPool> wrapperrp = new QueryWrapper<>();
         wrapperrp.eq("record_date", time0)
-                .in("foreign_key_id", days.stream().map(TurbineInfoDay::getStationId).collect(Collectors.toList()));
+                .in("foreign_key_id", days.stream().map(TurbineInfoDay::getProjectId).collect(Collectors.toList()));
         List<ProEconReportIndicatorPool> pools = reportIndicatorPoolService.list(wrapperrp);
 
 
+        ProEconReportIndicatorPool GSPJFS = new ProEconReportIndicatorPool();
+        GSPJFS.setRecordDate(time0.toLocalDateTime().toLocalDate());
+        GSPJFS.setForeignKeyId("GJNY_SXGS_DBXNY_ZGS0");
+        GSPJFS.setCompanyId("GJNY_SXGS_DBXNY_ZGS");
+        reportIndicatorPoolService.save(GSPJFS);
+
+
 
         wrapperrp = new QueryWrapper<>();
         wrapperrp.eq("record_date", time0).eq("foreign_key_id", "GJNY_SXGS_DBXNY_ZGS0");
@@ -1762,7 +1769,7 @@ public class JavaFunctionJobHandler extends IJobHandler {
 
         if (!pools.isEmpty()){
             for (ProEconReportIndicatorPool pool : pools) {
-                projectId = pool.getProjectId();
+                projectId = pool.getForeignKeyId();
                 day = dayMap.get(projectId);
                 pool.setRpjfs(day.getPjfs());
                 month = monthMap.get(projectId);
@@ -1785,7 +1792,7 @@ public class JavaFunctionJobHandler extends IJobHandler {
             for (TurbineInfoDay day2 : days) {
                 ProEconReportIndicatorPool pool = new ProEconReportIndicatorPool();
                 pool.setRecordDate(time0.toLocalDateTime().toLocalDate());
-                pool.setForeignKeyId(day2.getStationId());
+                pool.setForeignKeyId(day2.getProjectId());
                 poolList.add(pool);
             }
             reportIndicatorPoolService.saveOrUpdateBatch(poolList);

+ 7 - 0
universal-computing-platform/src/main/java/com/ruoyi/ucp/service/impl/ProEconReportIndicatorPoolServiceImpl.java

@@ -32,4 +32,11 @@ public class ProEconReportIndicatorPoolServiceImpl extends ServiceImpl<ProEconRe
     public boolean saveOrUpdateBatch(Collection<ProEconReportIndicatorPool> entityList) {
         return super.saveOrUpdateBatch(entityList);
     }
+
+    //重写save
+    @Override
+    public boolean save(ProEconReportIndicatorPool entity) {
+        return super.save(entity);
+    }
+
 }