Browse Source

#定时任务恢复

zhongwei
yang_shj 2 months ago
parent
commit
4e378279f4
  1. 14
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/GenerationScheduledTask.java
  2. 28
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java
  3. 28
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java
  4. 7
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/ShowScheduledTask.java
  5. 14
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/StartStopScheduledTask.java
  6. 2
      hzims-service/pom.xml

14
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/GenerationScheduledTask.java

@ -63,10 +63,9 @@ public class GenerationScheduledTask {
* @param param
* @return
*/
//@XxlJob(THIS_DAY_POWER_GENERATION)
@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> thisDayPowerGeneration() {
String param = "";
@XxlJob(THIS_DAY_POWER_GENERATION)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> thisDayPowerGeneration(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
@ -79,10 +78,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");
}

28
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java

@ -29,10 +29,9 @@ public class MonitorScheduledTask {
/**
* realId刷新
*/
//@XxlJob(REAL_ID_DATA)
@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadRealId() {
String param = "";
@XxlJob(REAL_ID_DATA)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadRealId(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
@ -44,10 +43,9 @@ public class MonitorScheduledTask {
* 实时数据刷新
* @return ReturnT<String>
*/
//@XxlJob(REAL_TIME_DATA)
@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadRealData() {
String param = "";
@XxlJob(REAL_TIME_DATA)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadRealData(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
@ -59,10 +57,9 @@ public class MonitorScheduledTask {
* 站点在线状态同步
* @return ReturnT<String>
*/
//@XxlJob(REAL_TIME_DATA)
@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadStationOnLine() {
String param = "";
@XxlJob(REAL_TIME_DATA)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadStationOnLine(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
@ -75,10 +72,9 @@ public class MonitorScheduledTask {
* 集中监控数据处理
* @return ReturnT<String>
*/
//@XxlJob(CENTRALIZED_MONITORING)
@Scheduled(cron = "0/4 * * * * ? ")
public ReturnT<String> loadMonitoring() {
String param = "";
@XxlJob(CENTRALIZED_MONITORING)
//@Scheduled(cron = "0/4 * * * * ? ")
public ReturnT<String> loadMonitoring(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}

28
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java

@ -33,10 +33,9 @@ public class RealTargetScheduledTask {
* @return
* @throws Exception
*/
//@XxlJob(LOAD_EM_INFO)
@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadEmInfo() {
String param = "";
@XxlJob(LOAD_EM_INFO)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadEmInfo(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
@ -47,10 +46,9 @@ public class RealTargetScheduledTask {
/**
* 水电站-机组实时加载
*/
//@XxlJob(LOAD_HYDROPOWER_UNIT_REAL)
@Scheduled(cron = "0/5 * * * * ? ")
public ReturnT<String> loadHydropowerReal() {
String param = "";
@XxlJob(LOAD_HYDROPOWER_UNIT_REAL)
//@Scheduled(cron = "0/5 * * * * ? ")
public ReturnT<String> loadHydropowerReal(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
@ -61,10 +59,9 @@ public class RealTargetScheduledTask {
/**
* 水电站-机组指标加载
*/
//@XxlJob(LOAD_HYDROPOWER_UNIT_TARGET)
@Scheduled(cron = "0 0/3 * * * ? ")
public ReturnT<String> loadHydropowerTarget() {
String param = "";
@XxlJob(LOAD_HYDROPOWER_UNIT_TARGET)
//@Scheduled(cron = "0 0/3 * * * ? ")
public ReturnT<String> loadHydropowerTarget(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
@ -113,10 +110,9 @@ public class RealTargetScheduledTask {
/**
* 水利-站点水位数据
*/
//@XxlJob(LOAD_WATER_LEVEL)
@Scheduled(cron = "0 0/5 * * * ? ")
public ReturnT<String> loadWaterLevel() {
String param = "";
@XxlJob(LOAD_WATER_LEVEL)
//@Scheduled(cron = "0 0/5 * * * ? ")
public ReturnT<String> loadWaterLevel(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/ShowScheduledTask.java

@ -42,10 +42,9 @@ public class ShowScheduledTask {
/**
* 首页-区域班组数据
*/
// @XxlJob(REGIONAL_DUTY_INFO)
@Scheduled(cron = "0 0/5 * * * ? ")
public ReturnT<String> loadRegionalDuty() {
String param = "";
@XxlJob(REGIONAL_DUTY_INFO)
//@Scheduled(cron = "0 0/5 * * * ? ")
public ReturnT<String> loadRegionalDuty(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss");
}

14
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/StartStopScheduledTask.java

@ -30,10 +30,9 @@ public class StartStopScheduledTask {
/**
* 单日开停机记录
*/
//@XxlJob(THIS_DAY_START_STOP_RECORD)
@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> thisDayStartStopRecord() {
String param = "";
@XxlJob(THIS_DAY_START_STOP_RECORD)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> thisDayStartStopRecord(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
@ -44,10 +43,9 @@ public class StartStopScheduledTask {
/**
* 设备开停机时间记录
*/
//@XxlJob(START_STOP_TIME_RECORD)
@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> startStopTimeRecord() {
String param = "";
@XxlJob(START_STOP_TIME_RECORD)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> startStopTimeRecord(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}

2
hzims-service/pom.xml

@ -24,7 +24,7 @@
<module>hzims-scheduled</module>
<module>hzims-alarm</module>
<module>hzims-basic</module>
<module>gglm-big-model</module>
<!--<module>gglm-big-model</module>-->
</modules>
<dependencies>

Loading…
Cancel
Save