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 * @param param
* @return * @return
*/ */
//@XxlJob(THIS_DAY_POWER_GENERATION) @XxlJob(THIS_DAY_POWER_GENERATION)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> thisDayPowerGeneration() { public ReturnT<String> thisDayPowerGeneration(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -79,10 +78,9 @@ public class GenerationScheduledTask {
* @param param * @param param
* @return * @return
*/ */
//@XxlJob(LOAD_THREE_YEAR_POWER_GENERATION) @XxlJob(LOAD_THREE_YEAR_POWER_GENERATION)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadThreeYearPowerGeneration() { public ReturnT<String> loadThreeYearPowerGeneration(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); 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刷新 * realId刷新
*/ */
//@XxlJob(REAL_ID_DATA) @XxlJob(REAL_ID_DATA)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadRealId() { public ReturnT<String> loadRealId(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -44,10 +43,9 @@ public class MonitorScheduledTask {
* 实时数据刷新 * 实时数据刷新
* @return ReturnT<String> * @return ReturnT<String>
*/ */
//@XxlJob(REAL_TIME_DATA) @XxlJob(REAL_TIME_DATA)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadRealData() { public ReturnT<String> loadRealData(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -59,10 +57,9 @@ public class MonitorScheduledTask {
* 站点在线状态同步 * 站点在线状态同步
* @return ReturnT<String> * @return ReturnT<String>
*/ */
//@XxlJob(REAL_TIME_DATA) @XxlJob(REAL_TIME_DATA)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadStationOnLine() { public ReturnT<String> loadStationOnLine(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -75,10 +72,9 @@ public class MonitorScheduledTask {
* 集中监控数据处理 * 集中监控数据处理
* @return ReturnT<String> * @return ReturnT<String>
*/ */
//@XxlJob(CENTRALIZED_MONITORING) @XxlJob(CENTRALIZED_MONITORING)
@Scheduled(cron = "0/4 * * * * ? ") //@Scheduled(cron = "0/4 * * * * ? ")
public ReturnT<String> loadMonitoring() { public ReturnT<String> loadMonitoring(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); 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 * @return
* @throws Exception * @throws Exception
*/ */
//@XxlJob(LOAD_EM_INFO) @XxlJob(LOAD_EM_INFO)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadEmInfo() { public ReturnT<String> loadEmInfo(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -47,10 +46,9 @@ public class RealTargetScheduledTask {
/** /**
* 水电站-机组实时加载 * 水电站-机组实时加载
*/ */
//@XxlJob(LOAD_HYDROPOWER_UNIT_REAL) @XxlJob(LOAD_HYDROPOWER_UNIT_REAL)
@Scheduled(cron = "0/5 * * * * ? ") //@Scheduled(cron = "0/5 * * * * ? ")
public ReturnT<String> loadHydropowerReal() { public ReturnT<String> loadHydropowerReal(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -61,10 +59,9 @@ public class RealTargetScheduledTask {
/** /**
* 水电站-机组指标加载 * 水电站-机组指标加载
*/ */
//@XxlJob(LOAD_HYDROPOWER_UNIT_TARGET) @XxlJob(LOAD_HYDROPOWER_UNIT_TARGET)
@Scheduled(cron = "0 0/3 * * * ? ") //@Scheduled(cron = "0 0/3 * * * ? ")
public ReturnT<String> loadHydropowerTarget() { public ReturnT<String> loadHydropowerTarget(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -113,10 +110,9 @@ public class RealTargetScheduledTask {
/** /**
* 水利-站点水位数据 * 水利-站点水位数据
*/ */
//@XxlJob(LOAD_WATER_LEVEL) @XxlJob(LOAD_WATER_LEVEL)
@Scheduled(cron = "0 0/5 * * * ? ") //@Scheduled(cron = "0 0/5 * * * ? ")
public ReturnT<String> loadWaterLevel() { public ReturnT<String> loadWaterLevel(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); 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) @XxlJob(REGIONAL_DUTY_INFO)
@Scheduled(cron = "0 0/5 * * * ? ") //@Scheduled(cron = "0 0/5 * * * ? ")
public ReturnT<String> loadRegionalDuty() { public ReturnT<String> loadRegionalDuty(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"); 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) @XxlJob(THIS_DAY_START_STOP_RECORD)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> thisDayStartStopRecord() { public ReturnT<String> thisDayStartStopRecord(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -44,10 +43,9 @@ public class StartStopScheduledTask {
/** /**
* 设备开停机时间记录 * 设备开停机时间记录
*/ */
//@XxlJob(START_STOP_TIME_RECORD) @XxlJob(START_STOP_TIME_RECORD)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> startStopTimeRecord() { public ReturnT<String> startStopTimeRecord(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }

2
hzims-service/pom.xml

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

Loading…
Cancel
Save