Browse Source

#定时任务注解修改

zhongwei
yang_shj 3 months ago
parent
commit
1a999e9ce9
  1. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/DutyNoticeScheduledTask.java
  2. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java
  3. 5
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java
  4. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/ReportScheduledTask.java
  5. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/vRView/scheduled/TimeTask.java

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/DutyNoticeScheduledTask.java

@ -51,7 +51,7 @@ public class DutyNoticeScheduledTask {
* realId刷新 * realId刷新
*/ */
@XxlJob(DUTY_NOTICE) @XxlJob(DUTY_NOTICE)
// @Scheduled(cron = "0 */1 * * * ? ") //@Scheduled(cron = "0 */1 * * * ? ")
public ReturnT<String> dutyNotice(String param) throws ParseException { public ReturnT<String> dutyNotice(String param) throws ParseException {
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM-dd"); param = DateUtil.format(new Date(), "yyyy-MM-dd");

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

@ -58,7 +58,7 @@ public class MonitorScheduledTask {
* @return ReturnT<String> * @return ReturnT<String>
*/ */
@XxlJob(CENTRALIZED_MONITORING) @XxlJob(CENTRALIZED_MONITORING)
// @Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadMonitoring(String param) { public ReturnT<String> loadMonitoring(String param) {
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");

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

@ -47,9 +47,8 @@ public class RealTargetScheduledTask {
* 水电站-机组实时加载 * 水电站-机组实时加载
*/ */
//@XxlJob(LOAD_HYDROPOWER_UNIT_REAL) //@XxlJob(LOAD_HYDROPOWER_UNIT_REAL)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
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");
} }

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/ReportScheduledTask.java

@ -78,7 +78,7 @@ public class ReportScheduledTask {
* @return ReturnT<String> * @return ReturnT<String>
*/ */
@XxlJob(RUM_MONTH_REPORT) @XxlJob(RUM_MONTH_REPORT)
// @Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> runMonthReport(String param) { public ReturnT<String> runMonthReport(String param) {
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), DateUtil.PATTERN_DATETIME); param = DateUtil.format(new Date(), DateUtil.PATTERN_DATETIME);

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/vRView/scheduled/TimeTask.java

@ -17,9 +17,9 @@ public class TimeTask {
/** /**
* 定时获取热点数据 * 定时获取热点数据
*/ */
@Scheduled(cron = "0/10 * * * * ?") //@Scheduled(cron = "0/10 * * * * ?")
//@XxlJob(TASK_TIMING_PUSH_HOT_SPOT_DATA) @XxlJob(TASK_TIMING_PUSH_HOT_SPOT_DATA)
public ReturnT<String> getTimingPushHotSpotData() throws Exception { public ReturnT<String> getTimingPushHotSpotData(String param) throws Exception {
HzWebSocketServer webSocketSet = new HzWebSocketServer(); HzWebSocketServer webSocketSet = new HzWebSocketServer();
try { try {
webSocketSet.sendFind(); webSocketSet.sendFind();

Loading…
Cancel
Save