package com.jiayue.insu.inclientqn.job;

import cn.hutool.core.date.DateUtil;
import com.jiayue.insu.inclientqn.service.BackForeUsForecastDataService;
import com.jiayue.insu.inclientqn.service.client.BackDataAnalysisService;
import com.jiayue.insu.inclientqn.util.DateTimeUtils;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 *  解析内网会回传超短期文件定时任务
 */
public class CdqFileAnalysisJob implements Job {

    @Autowired
    private BackDataAnalysisService backDataAnalysisService;
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        // 获取当前时间所在15分钟节点 例如 10:18=》10:15 、 11:29=>11:15
        long time = DateTimeUtils.get15min(DateUtil.date().getTime()) + 15 * 60 * 1000L;
        backDataAnalysisService.watchCdqFile(time);
    }
}
