|
@@ -2,6 +2,7 @@ package com.cpp.web.job;
|
|
|
|
|
|
import com.cpp.web.service.accuracy.CalcAccuracy;
|
|
import com.cpp.web.service.accuracy.CalcAccuracy;
|
|
import com.cpp.web.service.alarm.AlarmLog;
|
|
import com.cpp.web.service.alarm.AlarmLog;
|
|
|
|
+import com.cpp.web.service.cloud.CloudFileParsing;
|
|
import com.cpp.web.service.datafactory.SftpFileParsing;
|
|
import com.cpp.web.service.datafactory.SftpFileParsing;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.boot.ApplicationArguments;
|
|
import org.springframework.boot.ApplicationArguments;
|
|
@@ -19,19 +20,38 @@ public class ScheduledJob implements ApplicationRunner {
|
|
|
|
|
|
private final CalcAccuracy calcAccuracy;
|
|
private final CalcAccuracy calcAccuracy;
|
|
|
|
|
|
|
|
+ private final CloudFileParsing cloudFileParsing;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
- * 解析文件定时任务
|
|
|
|
|
|
+ * 解析站端文件定时任务
|
|
*/
|
|
*/
|
|
// @Scheduled(fixedRate = 60000L)
|
|
// @Scheduled(fixedRate = 60000L)
|
|
public void parsingFile() {
|
|
public void parsingFile() {
|
|
sftpFileParsing.parsingFile();
|
|
sftpFileParsing.parsingFile();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 解析中心端文件定时任务
|
|
|
|
+ */
|
|
|
|
+// @Scheduled(fixedRate = 60000L)
|
|
|
|
+ public void cloudFileParsing() {
|
|
|
|
+ cloudFileParsing.parsingFile();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 压缩文件上传并清理历史文件,一天一次
|
|
|
|
+ */
|
|
|
|
+// @Scheduled(cron = "0 30 0 * * *")
|
|
|
|
+ public void uploadZipFile() {
|
|
|
|
+ sftpFileParsing.uploadZipFile();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 计算准确率定时任务
|
|
* 计算准确率定时任务
|
|
*/
|
|
*/
|
|
-// @Scheduled(cron = "0 17 9 * * *")
|
|
|
|
|
|
+// @Scheduled(cron = "0 30 1 * * *")
|
|
public void calculate() {
|
|
public void calculate() {
|
|
calcAccuracy.calculate();
|
|
calcAccuracy.calculate();
|
|
}
|
|
}
|