12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- package com.jiayue.biz.job;
- import cn.hutool.core.collection.ListUtil;
- import cn.hutool.core.date.DateUtil;
- import com.jiayue.biz.domain.ProphaseAnemometryData;
- import com.jiayue.biz.domain.ProphaseWeatherData;
- import com.jiayue.biz.domain.WindTowerInfo;
- import com.jiayue.biz.mapper.ProphaseAnemometryDataMapper;
- import com.jiayue.biz.mapper.ProphaseWeatherDataMapper;
- import com.jiayue.biz.service.ProphaseAnemometryDataService;
- import com.jiayue.biz.service.ProphaseWeatherDataService;
- import com.jiayue.biz.service.WindTowerDataParentTableService;
- import com.jiayue.biz.service.WindTowerInfoService;
- import com.jiayue.biz.service.impl.AnalysisDataImpl;
- import com.jiayue.biz.service.impl.EmailImpl;
- import com.jiayue.biz.util.CalculationUtil;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.scheduling.annotation.EnableScheduling;
- import org.springframework.scheduling.annotation.Scheduled;
- import org.springframework.stereotype.Service;
- import java.math.RoundingMode;
- import java.sql.Timestamp;
- import java.util.*;
- import java.util.stream.Collectors;
- /**
- * 定时扫描系统邮件并解析
- *
- * @author whc
- * @version 3.0
- */
- @Slf4j
- @Service
- @EnableScheduling
- public class FileAnalysisJob {
- @Autowired
- private final EmailImpl emailImpl;
- @Autowired
- AnalysisDataImpl analysisData;
- @Autowired
- WindTowerInfoService windTowerInfoService;
- @Autowired
- ProphaseAnemometryDataService prophaseAnemometryDataService;
- @Autowired
- ProphaseWeatherDataService prophaseWeatherDataService;
- public FileAnalysisJob(EmailImpl emailImpl) {
- this.emailImpl = emailImpl;
- }
- @Scheduled(fixedDelay = 60000)
- public void fileAnalysis() {
- log.debug("文件解析定时任务执行开始");
- this.emailImpl.readMail();
- log.debug("文件解析定时任务执行完成");
- }
- // @Scheduled(fixedDelay = 60000 * 15)
- public void sldFileAnalysis() {
- log.debug("声雷达文件解析定时任务执行开始");
- this.analysisData.AnalysisSldFile();
- log.debug("声雷达文件解析定时任务执行完成");
- }
- // @Scheduled(fixedDelay = 6000
- // @Scheduled(fixedDelay = 60000 * 15)
- public void eolFileAnalysis() {
- log.debug("eol文件解析定时任务执行开始");
- this.analysisData.moveEolFileAndParseEol();
- log.debug("eol文件解析定时任务执行完成");
- }
- // @Scheduled(fixedDelay = 60000 * 6000)
- }
|