|
@@ -31,31 +31,31 @@ public class ParseSchedulerTask {
|
|
|
|
|
|
@PostConstruct
|
|
@PostConstruct
|
|
public void executeOnStartup() {
|
|
public void executeOnStartup() {
|
|
- try {
|
|
|
|
- // 定期报告从 其他文件夹/报告公告 文件夹获取邮件
|
|
|
|
- this.emailParseApiService.parseEmail(
|
|
|
|
- DateUtil.parseDateTime("2025-05-15 11:15:00"),
|
|
|
|
- DateUtil.parseDateTime("2025-05-15 15:25:00"),
|
|
|
|
- ListUtil.of("其他文件夹/报告公告"), EmailTypeConst.REPORT_EMAIL_TYPES);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- logger.error(ExceptionUtil.getMessage(e));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- try {
|
|
|
|
- // 确认函从 INBOX 文件夹获取邮件
|
|
|
|
- this.emailParseApiService.parseEmail(
|
|
|
|
- DateUtil.parseDateTime("2025-05-15 11:44:00"),
|
|
|
|
- DateUtil.parseDateTime("2025-05-15 16:32:00"),
|
|
|
|
- null, ListUtil.of(EmailTypeConst.REPORT_LETTER_EMAIL_TYPE));
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- logger.error(ExceptionUtil.getMessage(e));
|
|
|
|
- }
|
|
|
|
|
|
+// try {
|
|
|
|
+// // 定期报告从 其他文件夹/报告公告 文件夹获取邮件
|
|
|
|
+// this.emailParseApiService.parseEmail(
|
|
|
|
+// DateUtil.parseDateTime("2025-05-15 11:15:00"),
|
|
|
|
+// DateUtil.parseDateTime("2025-05-15 15:25:00"),
|
|
|
|
+// ListUtil.of("其他文件夹/报告公告"), EmailTypeConst.REPORT_EMAIL_TYPES);
|
|
|
|
+// } catch (Exception e) {
|
|
|
|
+// logger.error(ExceptionUtil.getMessage(e));
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// try {
|
|
|
|
+// // 确认函从 INBOX 文件夹获取邮件
|
|
|
|
+// this.emailParseApiService.parseEmail(
|
|
|
|
+// DateUtil.parseDateTime("2025-05-15 11:44:00"),
|
|
|
|
+// DateUtil.parseDateTime("2025-05-15 16:32:00"),
|
|
|
|
+// null, ListUtil.of(EmailTypeConst.REPORT_LETTER_EMAIL_TYPE));
|
|
|
|
+// } catch (Exception e) {
|
|
|
|
+// logger.error(ExceptionUtil.getMessage(e));
|
|
|
|
+// }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 定时任务每11分钟执行一次
|
|
* 定时任务每11分钟执行一次
|
|
*/
|
|
*/
|
|
- @Scheduled(cron = "0 0 15 * * ?")
|
|
|
|
|
|
+ @Scheduled(cron = "0 */11 * * * ?")
|
|
public void letter() {
|
|
public void letter() {
|
|
String taskKey = "mo_email_parse_letter_task";
|
|
String taskKey = "mo_email_parse_letter_task";
|
|
TaskRecordDO task = this.taskRecordService.getTaskRecord(taskKey, 11 * 2 * 60);
|
|
TaskRecordDO task = this.taskRecordService.getTaskRecord(taskKey, 11 * 2 * 60);
|
|
@@ -87,7 +87,7 @@ public class ParseSchedulerTask {
|
|
/**
|
|
/**
|
|
* 定时任务每60分钟执行一次
|
|
* 定时任务每60分钟执行一次
|
|
*/
|
|
*/
|
|
- @Scheduled(cron = "0 0 15 * * ?")
|
|
|
|
|
|
+ @Scheduled(cron = "0 15 * * * ?")
|
|
public void report() {
|
|
public void report() {
|
|
String taskKey = "mo_email_parser_report_task";
|
|
String taskKey = "mo_email_parser_report_task";
|
|
TaskRecordDO task = this.taskRecordService.getTaskRecord(taskKey, 60 * 2 * 60);
|
|
TaskRecordDO task = this.taskRecordService.getTaskRecord(taskKey, 60 * 2 * 60);
|