|
@@ -2,24 +2,28 @@ package com.ebei.screen.common.task;
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import com.ebei.screen.service.EbaSystemService;
|
|
|
+import com.ebei.screen.service.EnergyPlatformService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
/**
|
|
|
- * EBA大屏项目定时任务
|
|
|
+ * 大屏项目定时任务
|
|
|
*
|
|
|
* @author Levi.u
|
|
|
* @date 2021/1/14 14:13
|
|
|
*/
|
|
|
@Slf4j
|
|
|
@Component
|
|
|
-public class EbaTask {
|
|
|
+public class ScreenTask {
|
|
|
|
|
|
@Autowired
|
|
|
private EbaSystemService ebaSystemService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private EnergyPlatformService energyPlatformService;
|
|
|
+
|
|
|
/**
|
|
|
* 每小时执行一次数据拉取
|
|
|
*/
|
|
@@ -28,6 +32,7 @@ public class EbaTask {
|
|
|
try {
|
|
|
log.info("定时开始执行 开始时间:{}", DateUtil.now());
|
|
|
ebaSystemService.initData();
|
|
|
+ energyPlatformService.initData();
|
|
|
log.info("定时执行结束 结束时间:{}", DateUtil.now());
|
|
|
} catch (Exception e) {
|
|
|
log.info("定时任务执行出现错误:{}", e);
|