Browse Source

#水电站点首页接口优化

zhongwei
yang_shj 4 months ago
parent
commit
850fed5d6a
  1. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/ScheduledApplication.java
  2. 7
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/GenerationScheduledTask.java
  3. 7
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java
  4. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java

4
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);
// }
}

7
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<String> loadThreeYearPowerGeneration() {
String param = "";
@XxlJob(LOAD_THREE_YEAR_POWER_GENERATION)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadThreeYearPowerGeneration(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}

7
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<String> loadHydropowerTarget() {
String param = "";
@XxlJob(LOAD_HYDROPOWER_UNIT_TARGET)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadHydropowerTarget(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}

1
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));

Loading…
Cancel
Save