|
@@ -1,5 +1,7 @@
|
|
|
package com.huaxu.quartz.job;
|
|
|
|
|
|
+import com.huaxu.quartz.service.DataAlarmDayJobService;
|
|
|
+import com.huaxu.quartz.service.DataAlarmHourJobService;
|
|
|
import com.huaxu.service.MonitorDataService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.quartz.Job;
|
|
@@ -7,6 +9,7 @@ import org.quartz.JobExecutionContext;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
/**
|
|
@@ -21,6 +24,8 @@ public class MonitorDataReportByDayJob implements Job, Serializable {
|
|
|
@Autowired
|
|
|
private MonitorDataService monitorDataService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private DataAlarmHourJobService dataAlarmHourJobService;
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -28,6 +33,7 @@ public class MonitorDataReportByDayJob implements Job, Serializable {
|
|
|
try {
|
|
|
log.info("日报报任务开始执行");
|
|
|
monitorDataService.getMonitorDataReportByHour();
|
|
|
+ dataAlarmHourJobService.execute();
|
|
|
log.info("日报任务执行结束");
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|