From b62a18196dc7ede82d17a51fe1f0973c7b0983ab Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 09 八月 2023 16:43:39 +0800 Subject: [PATCH] 1 --- src/main/java/com/yssh/config/ScheduleConfig.java | 42 +++++++++++++++++++++++++++++++++--------- 1 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/yssh/config/ScheduleConfig.java b/src/main/java/com/yssh/config/ScheduleConfig.java index 4a1aa1e..8058abd 100644 --- a/src/main/java/com/yssh/config/ScheduleConfig.java +++ b/src/main/java/com/yssh/config/ScheduleConfig.java @@ -10,10 +10,7 @@ import com.yssh.entity.DictRecord; import com.yssh.entity.SuYuan; import com.yssh.entity.VocVals; -import com.yssh.service.DictRecordService; -import com.yssh.service.SuYuanService; -import com.yssh.service.VocValsService; -import com.yssh.service.WarningAnalyseService; +import com.yssh.service.*; import com.yssh.utils.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,19 +29,22 @@ protected final Logger logger = LoggerFactory.getLogger(this.getClass()); @Resource - private VocValsService vocValsService; + VocValsService vocValsService; @Resource - private SuYuanService suYuanService; + SuYuanService suYuanService; @Resource - private CsvFilePathConfig csvFilePathConfig; + CsvFilePathConfig csvFilePathConfig; @Resource - private DictRecordService dictRecordService; + DictRecordService dictRecordService; @Resource - private WarningAnalyseService warningAnalyseService; + WarningAnalyseService warningAnalyseService; + + @Resource + XlsExportService xlsExportService; @Value("${csv.voc_max}") private int vocMax = 96; @@ -188,4 +188,28 @@ } warningAnalyseService.warningOperationStorage(date); } + + /** + * 鍒涘缓鏃ユ姤锛氭瘡鏃�0鏃�1鍒� + */ + @Scheduled(cron = "0 1 0 * * ?") + public void createDayReport() { + xlsExportService.createDayReport(new Date()); + } + + /** + * 鍒涘缓鍛ㄦ姤锛氭瘡鍛ㄤ竴0鏃�5鍒� + */ + @Scheduled(cron = "0 5 0 ? * MON") + public void createWeekReport() { + xlsExportService.createWeekReport(new Date()); + } + + /** + * 鍒涘缓鏈堟姤锛氭瘡鏈�1鏃�0鏃�9鍒� + */ + @Scheduled(cron = "0 9 0 1 * ?") + public void createMonthReport() { + xlsExportService.createMonthReport(new Date()); + } } -- Gitblit v1.9.3