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/CalculateHandle.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/CalculateHandle.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/CalculateHandle.java index 8b1376a..22b0cbd 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/CalculateHandle.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/CalculateHandle.java @@ -6,6 +6,7 @@ import com.iailab.module.data.common.enums.DataTypeEnum; import com.iailab.module.data.common.enums.JsErrorCode; import com.iailab.module.data.common.utils.JavaScriptHandler; +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.dto.DaPointDTO; @@ -67,7 +68,7 @@ BigDecimal coefficient = dto.getUnittransfactor() == null ? BigDecimal.ONE : dto.getUnittransfactor(); BigDecimal calValue = new BigDecimal(rawValue.toString()).multiply(coefficient); InfluxPointValuePOJO pojo = GenInfluxPointValueUtils.getByPoint(dto, calValue); - pojo.setTimestamp(collectTime.toInstant()); + pojo.setTimestamp(GenInfluxPointValueUtils.getByMin(collectTime, DataPointFreqEnum.getEumByCode(dto.getMinfreqid()))); result.add(pojo); } catch (Exception ex) { ex.printStackTrace(); -- Gitblit v1.9.3