dongyukun
3 天以前 49e41fde757ce77904930641d471a5c459979d40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.iailab.module.data.job.task;
 
import com.iailab.module.data.common.enums.ArcTypeEnum;
import com.iailab.module.data.arc.service.ArcDataService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
 
import javax.annotation.Resource;
import java.time.LocalDateTime;
 
/**
 * @description: Point归档1h
 * @author: dyk
 * @date: 2025/2/20 16:30
 **/
@Component("pointArchivingTaskNet1h")
public class PointArchivingTaskNet1h implements ITask {
    private Logger logger = LoggerFactory.getLogger(getClass());
 
    @Resource
    private ArcDataService arcPointDataService;
 
    @Override
    public void run(String params){
        logger.debug("PointArchivingTaskNet1h定时任务正在执行,参数为:{}", params);
        try {
            arcPointDataService.archiving(ArcTypeEnum.HOUR.getCode());
            logger.info("PointArchivingTaskNet1h定时任务完成时间:" + LocalDateTime.now());
        } catch (Exception ex) {
            ex.printStackTrace();
            logger.error("PointArchivingTaskNet1h定时任务失败时间:" + LocalDateTime.now());
        }
 
    }
}