|
@@ -1786,7 +1786,8 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
|
|
|
wrapperrp = new QueryWrapper<>();
|
|
wrapperrp = new QueryWrapper<>();
|
|
wrapperrp.eq("record_date", time0).eq("foreign_key_id", "GJNY_SXGS_DBXNY_ZGS0");
|
|
wrapperrp.eq("record_date", time0).eq("foreign_key_id", "GJNY_SXGS_DBXNY_ZGS0");
|
|
- List<ProEconReportIndicatorPool> pools2 = reportIndicatorPoolService.list(wrapperrp);
|
|
|
|
|
|
+ ProEconReportIndicatorPool pools2 = reportIndicatorPoolService.getOne(wrapperrp);
|
|
|
|
+
|
|
|
|
|
|
TurbineInfoDay day, month, year;
|
|
TurbineInfoDay day, month, year;
|
|
String projectId;
|
|
String projectId;
|
|
@@ -1804,11 +1805,11 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
double v1 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getRpjfs).average().orElse(0);
|
|
double v1 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getRpjfs).average().orElse(0);
|
|
double v2 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getYpjfs).average().orElse(0);
|
|
double v2 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getYpjfs).average().orElse(0);
|
|
double v3 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getNpjfs).average().orElse(0);
|
|
double v3 = pools.stream().mapToDouble(ProEconReportIndicatorPool::getNpjfs).average().orElse(0);
|
|
- if (CollUtil.isNotEmpty(pools2)) {
|
|
|
|
- pools2.get(0).setRpjfs(v1);
|
|
|
|
- pools2.get(0).setYpjfs(v2);
|
|
|
|
- pools2.get(0).setNpjfs(v3);
|
|
|
|
- reportIndicatorPoolService.saveOrUpdateBatch(pools2);
|
|
|
|
|
|
+ if (!(pools2 == null)) {
|
|
|
|
+ pools2.setRpjfs(v1);
|
|
|
|
+ pools2.setYpjfs(v2);
|
|
|
|
+ pools2.setNpjfs(v3);
|
|
|
|
+ reportIndicatorPoolService.saveOrUpdate(pools2);
|
|
}
|
|
}
|
|
reportIndicatorPoolService.saveOrUpdateBatch(pools);
|
|
reportIndicatorPoolService.saveOrUpdateBatch(pools);
|
|
} else {
|
|
} else {
|