From c7ec0ceff9cf30cabbd8d071c1ef75d20d04548f Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期二, 01 四月 2025 17:33:28 +0800
Subject: [PATCH] Day频率数据采集时分秒置0 getByMin

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java
index c03f5ef..9fbd7ee 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java
@@ -14,6 +14,7 @@
 import com.iailab.module.data.channel.kio.collector.KingIOCollector;
 import com.iailab.module.data.channel.modbus.collector.ModBusCollector;
 import com.iailab.module.data.channel.opcua.collector.OpcUaCollector;
+import com.iailab.module.data.enums.DataPointFreqEnum;
 import com.iailab.module.data.point.collection.PointCollector;
 import com.iailab.module.data.point.collection.utils.GenInfluxPointValueUtils;
 import com.iailab.module.data.point.common.PointDataTypeEnum;
@@ -158,13 +159,13 @@
                 if (tagValues.containsKey(tagId)) {
                     Object value = handleData(dto, tagValues.get(tagId));
                     InfluxPointValuePOJO pojo = GenInfluxPointValueUtils.getByPoint(dto, value);
-                    pojo.setTimestamp(collectTime.toInstant());
+                    pojo.setTimestamp(GenInfluxPointValueUtils.getByMin(collectTime, DataPointFreqEnum.getEumByCode(dto.getMinfreqid())));
                     dataMap.put(dto.getPointNo(), value);
                     result.add(pojo);
                     listGood.add(dto.getPointNo());
                 } else {
                     InfluxPointValuePOJO pojo = GenInfluxPointValueUtils.getByPoint(dto, CommonConstant.BAD_VALUE);
-                    pojo.setTimestamp(collectTime.toInstant());
+                    pojo.setTimestamp(GenInfluxPointValueUtils.getByMin(collectTime, DataPointFreqEnum.getEumByCode(dto.getMinfreqid())));
                     result.add(pojo);
                     listBad.add(dto.getPointNo());
                     log.info("值异常!TagId=" + tagId);

--
Gitblit v1.9.3