|
@@ -1,6 +1,5 @@
|
|
|
package com.cpp.web.job;
|
|
|
|
|
|
-import com.cpp.common.utils.spring.SpringUtils;
|
|
|
import com.cpp.system.service.ISysConfigService;
|
|
|
import com.cpp.web.domain.datafactory.enums.FileTypeEnum;
|
|
|
import com.cpp.web.domain.enums.AlarmEnum;
|
|
@@ -12,7 +11,6 @@ import com.cpp.web.service.datafactory.CloudFileParsing;
|
|
|
import com.cpp.web.service.datafactory.DataStore;
|
|
|
import com.cpp.web.service.datafactory.ParsingLogService;
|
|
|
import com.cpp.web.service.datafactory.SftpFileParsing;
|
|
|
-import com.cpp.web.service.station.ElectricFieldService;
|
|
|
import com.cpp.web.utils.LogUtil;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -51,12 +49,14 @@ public class ScheduledJob implements ApplicationRunner {
|
|
|
/**
|
|
|
* 解析站端文件定时任务
|
|
|
*/
|
|
|
-// @Scheduled(fixedRate = 60000L)
|
|
|
+ @Scheduled(fixedRate = 60000L)
|
|
|
public void parsingFile() {
|
|
|
sftpFileParsing.parsingFile();
|
|
|
}
|
|
|
|
|
|
-// @Scheduled(cron = "0 0/15 0 * * *")
|
|
|
+
|
|
|
+
|
|
|
+ @Scheduled(cron = "0 0/15 0 * * *")
|
|
|
public void check() {
|
|
|
//短期未解析告警
|
|
|
String dqEndTime = iSysConfigService.selectConfigByKey("dqEndTime");
|
|
@@ -82,7 +82,7 @@ public class ScheduledJob implements ApplicationRunner {
|
|
|
/**
|
|
|
* 解析中心端文件定时任务
|
|
|
*/
|
|
|
-// @Scheduled(fixedRate = 60000L)
|
|
|
+ @Scheduled(fixedRate = 60000L)
|
|
|
public void cloudFileParsing() {
|
|
|
cloudFileParsing.parsingFile();
|
|
|
}
|
|
@@ -90,7 +90,7 @@ public class ScheduledJob implements ApplicationRunner {
|
|
|
/**
|
|
|
* 压缩文件上传并清理历史文件,一天一次
|
|
|
*/
|
|
|
-// @Scheduled(cron = "0 30 0 * * *")
|
|
|
+ @Scheduled(cron = "0 30 0 * * *")
|
|
|
public void uploadZipFile() {
|
|
|
sftpFileParsing.uploadZipFile();
|
|
|
}
|
|
@@ -99,7 +99,7 @@ public class ScheduledJob implements ApplicationRunner {
|
|
|
/**
|
|
|
* 计算准确率定时任务
|
|
|
*/
|
|
|
-// @Scheduled(cron = "0 30 1 * * *")
|
|
|
+ @Scheduled(cron = "0 30 1 * * *")
|
|
|
public void calculate() {
|
|
|
calcAccuracy.calculate();
|
|
|
}
|
|
@@ -107,42 +107,12 @@ public class ScheduledJob implements ApplicationRunner {
|
|
|
/**
|
|
|
* 告警消纳定时任务
|
|
|
*/
|
|
|
-// @Scheduled(fixedRate = 60000L)
|
|
|
+ @Scheduled(fixedRate = 60000L)
|
|
|
public void e() {
|
|
|
AlarmLog.getInstance().eliminate();
|
|
|
}
|
|
|
|
|
|
|
|
|
- /**
|
|
|
- * 告警消纳定时任务
|
|
|
- */
|
|
|
-// @Scheduled(fixedRate = 60000L)
|
|
|
- public void aaa() {
|
|
|
- for (ElectricField electricField : SpringUtils.getBean(ElectricFieldService.class).list()) {
|
|
|
- System.out.println(electricField.getStationCode());
|
|
|
-
|
|
|
-
|
|
|
- ForecastPowerShortTermRegulation forecastPowerShortTermRegulation = DataStore.getInstance().getData(electricField.getStationCode(), ForecastPowerShortTermRegulation.class);
|
|
|
- System.out.println(forecastPowerShortTermRegulation.getFpValue() + "," + forecastPowerShortTermRegulation.getTime());
|
|
|
-
|
|
|
-
|
|
|
- ForecastPowerUltraShortTermRegulation forecastPowerUltraShortTermRegulation = DataStore.getInstance().getData(electricField.getStationCode(), ForecastPowerUltraShortTermRegulation.class);
|
|
|
- System.out.println(forecastPowerUltraShortTermRegulation.getFpValue() + "," + forecastPowerUltraShortTermRegulation.getTime());
|
|
|
-
|
|
|
- PowerStationStatusData powerStationStatusData = DataStore.getInstance().getData(electricField.getStationCode(), PowerStationStatusData.class);
|
|
|
- System.out.println(powerStationStatusData.toString() + "," + powerStationStatusData.getTime());
|
|
|
- if (electricField.getElectricFieldTypeEnum().equals("E2")) {
|
|
|
- WindTowerStatusData data = DataStore.getInstance().getData(electricField.getStationCode(), WindTowerStatusData.class);
|
|
|
- System.out.println(data + "," + data.getTime());
|
|
|
- } else {
|
|
|
- WeatherStationStatusData data = DataStore.getInstance().getData(electricField.getStationCode(), WeatherStationStatusData.class);
|
|
|
- System.out.println(data + "," + data.getTime());
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
@Override
|
|
|
public void run(ApplicationArguments args) throws Exception {
|
|
|
AlarmLog.getInstance().initMap();
|