From 49e41fde757ce77904930641d471a5c459979d40 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期二, 01 四月 2025 14:55:55 +0800 Subject: [PATCH] point归档 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNet1h.java | 4 ++-- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetMonth.java | 4 ++-- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetShift.java | 4 ++-- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNet15min.java | 36 ++++++++++++++++++++++++++++++++++++ iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetDay.java | 4 ++-- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetYear.java | 4 ++-- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ArcTypeEnum.java | 2 ++ 7 files changed, 48 insertions(+), 10 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ArcTypeEnum.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ArcTypeEnum.java index 5fc70d7..99f4c45 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ArcTypeEnum.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/enums/ArcTypeEnum.java @@ -12,6 +12,8 @@ @AllArgsConstructor public enum ArcTypeEnum { + MIN15("MIN15","15分钟"), + HOUR("HOUR","时"), SHIFT("SHIFT","班"), diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNet15min.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNet15min.java new file mode 100644 index 0000000..585c1a8 --- /dev/null +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNet15min.java @@ -0,0 +1,36 @@ +package com.iailab.module.data.job.task; + +import com.iailab.module.data.arc.service.ArcDataService; +import com.iailab.module.data.common.enums.ArcTypeEnum; +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("pointArchivingTaskNet15min") +public class PointArchivingTaskNet15min 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.MIN15.getCode()); + logger.info("PointArchivingTaskNet1h定时任务完成时间:" + LocalDateTime.now()); + } catch (Exception ex) { + ex.printStackTrace(); + logger.error("PointArchivingTaskNet1h定时任务失败时间:" + LocalDateTime.now()); + } + + } +} diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNet1h.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNet1h.java index 66b9680..0182ca8 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNet1h.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNet1h.java @@ -4,6 +4,7 @@ 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; @@ -13,10 +14,9 @@ * @author: dyk * @date: 2025/2/20 16:30 **/ +@Component("pointArchivingTaskNet1h") public class PointArchivingTaskNet1h implements ITask { private Logger logger = LoggerFactory.getLogger(getClass()); - - private final String NET = "1h"; @Resource private ArcDataService arcPointDataService; diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetDay.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetDay.java index da242b6..002b329 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetDay.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetDay.java @@ -4,6 +4,7 @@ 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; @@ -13,10 +14,9 @@ * @author: dyk * @date: 2025/2/20 16:30 **/ +@Component("pointArchivingTaskNetDay") public class PointArchivingTaskNetDay implements ITask { private Logger logger = LoggerFactory.getLogger(getClass()); - - private final String NET = "1h"; @Resource private ArcDataService arcPointDataService; diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetMonth.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetMonth.java index aabd610..4ab393a 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetMonth.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetMonth.java @@ -4,6 +4,7 @@ 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; @@ -13,10 +14,9 @@ * @author: dyk * @date: 2025/2/20 16:30 **/ +@Component("pointArchivingTaskNetMonth") public class PointArchivingTaskNetMonth implements ITask { private Logger logger = LoggerFactory.getLogger(getClass()); - - private final String NET = "1h"; @Resource private ArcDataService arcPointDataService; diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetShift.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetShift.java index 5035f9b..48d5ae4 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetShift.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetShift.java @@ -4,6 +4,7 @@ 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; @@ -13,10 +14,9 @@ * @author: dyk * @date: 2025/2/20 16:30 **/ +@Component("pointArchivingTaskNetShift") public class PointArchivingTaskNetShift implements ITask { private Logger logger = LoggerFactory.getLogger(getClass()); - - private final String NET = "1h"; @Resource private ArcDataService arcPointDataService; diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetYear.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetYear.java index c54a114..7dd5cfe 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetYear.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/job/task/PointArchivingTaskNetYear.java @@ -4,6 +4,7 @@ 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; @@ -13,10 +14,9 @@ * @author: dyk * @date: 2025/2/20 16:30 **/ +@Component("pointArchivingTaskNetYear") public class PointArchivingTaskNetYear implements ITask { private Logger logger = LoggerFactory.getLogger(getClass()); - - private final String NET = "1h"; @Resource private ArcDataService arcPointDataService; -- Gitblit v1.9.3