diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/ScheduledApplication.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/ScheduledApplication.java index c8a2b83..a14fbe8 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/ScheduledApplication.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/ScheduledApplication.java @@ -24,8 +24,4 @@ public class ScheduledApplication { BladeApplication.run("hzims-scheduled", ScheduledApplication.class, args); } -// @Override -// protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { -// return BladeApplication.createSpringApplicationBuilder(builder, "hzims-scheduled", ScheduledApplication.class); -// } } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/GenerationScheduledTask.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/GenerationScheduledTask.java index 29b4042..ba4dab2 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/GenerationScheduledTask.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/GenerationScheduledTask.java @@ -75,10 +75,9 @@ public class GenerationScheduledTask { * @param param * @return */ - //@XxlJob(LOAD_THREE_YEAR_POWER_GENERATION) - @Scheduled(cron = "0/40 * * * * ? ") - public ReturnT loadThreeYearPowerGeneration() { - String param = ""; + @XxlJob(LOAD_THREE_YEAR_POWER_GENERATION) + //@Scheduled(cron = "0/40 * * * * ? ") + public ReturnT loadThreeYearPowerGeneration(String param) { if (Func.isBlank(param)) { param = DateUtil.format(new Date(), "yyyy-MM"); } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java index e082119..9591c87 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java @@ -59,10 +59,9 @@ public class RealTargetScheduledTask { /** * 水电站-机组指标加载 */ - //@XxlJob(LOAD_HYDROPOWER_UNIT_TARGET) - @Scheduled(cron = "0/40 * * * * ? ") - public ReturnT loadHydropowerTarget() { - String param = ""; + @XxlJob(LOAD_HYDROPOWER_UNIT_TARGET) + //@Scheduled(cron = "0/40 * * * * ? ") + public ReturnT loadHydropowerTarget(String param) { if (Func.isBlank(param)) { param = DateUtil.format(new Date(), "yyyy-MM"); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java index 01b533d..ed6e432 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java @@ -215,6 +215,7 @@ public class HydroelectricServiceImpl implements HydroelectricService { generates.addAll(device.getGenerates()); }); Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.DAY_OF_MONTH,-1); Date end = calendar.getTime(); calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY)); calendar.add(Calendar.MINUTE,-calendar.get(Calendar.MINUTE));