From 85b2001c0ec2f1adc598db3bf47ad457dcca7074 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期四, 19 十二月 2024 16:37:53 +0800 Subject: [PATCH] item-chart 空point校验 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/CumulateHandle.java | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/CumulateHandle.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/CumulateHandle.java index d66ceab..46d4b47 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/CumulateHandle.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/CumulateHandle.java @@ -11,6 +11,7 @@ import com.iailab.module.data.point.dto.DaPointDTO; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -29,6 +30,7 @@ public class CumulateHandle { @Autowired + @Lazy private DataPointApi dataPointApi; public List<InfluxPointValuePOJO> handle(Date collectTime, List<DaPointDTO> dtos) { @@ -100,6 +102,10 @@ //找出缺少项 Map<Long, Double> sourceDataMap = new HashMap<>(dataList.size()); + for (ApiPointValueDTO pv : dataList) { + sourceDataMap.put(pv.getT().getTime(), pv.getV()); + } + Map<Long, Double> dataMap = new LinkedHashMap<>(); for (int i = 0; i < mins; i++) { Long key = start + oneMin * i; -- Gitblit v1.9.3