From 0dfdafe759f50060c39581e68b08333c4512edf7 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期五, 28 三月 2025 13:31:50 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 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 f5a40de..6e06075 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 @@ -3,6 +3,8 @@ import com.iailab.framework.common.util.string.StrUtils; import com.iailab.module.data.channel.http.collector.SourceApiEnum; import com.iailab.module.data.channel.http.collector.asdb.HttpCollectorForAsdb; +import com.iailab.module.data.channel.http.collector.asdb.HttpCollectorForAsdc; +import com.iailab.module.data.channel.http.collector.asdb.HttpCollectorForAsde; import com.iailab.module.data.channel.http.collector.ihdb.HttpCollectorForIhd; import com.iailab.module.data.channel.opcda.collector.OpcDACollector; import com.iailab.module.data.common.enums.CommonConstant; @@ -41,10 +43,6 @@ @Component public class MeasureHandle { - private BigDecimal maxValue = new BigDecimal("1000000000"); - - private BigDecimal minValue = new BigDecimal("0"); - @Resource private ModBusCollector modBusCollector; @@ -62,6 +60,12 @@ @Autowired private HttpCollectorForAsdb httpCollectorForAsdb; + + @Autowired + private HttpCollectorForAsde httpCollectorForAsde; + + @Autowired + private HttpCollectorForAsdc httpCollectorForAsdc; @Resource private DaPointService daPointService; @@ -82,6 +86,8 @@ List<String[]> kioTagIds = new ArrayList<>(); List<Object[]> httpTagIhd = new ArrayList<>(); List<Object[]> httpTagAsdb = new ArrayList<>(); + List<Object[]> httpTagAsde = new ArrayList<>(); + List<Object[]> httpTagAsdc = new ArrayList<>(); dtos.stream().forEach(item -> { if (DataSourceType.OPCUA.getCode().equals(item.getSourceType())) { @@ -100,6 +106,14 @@ } else if (SourceApiEnum.ASDB.getCode().equals(item.getSourceName())) { if (item.getTagNo() != null && item.getDimension() != null && item.getValueType() != null) { httpTagAsdb.add(new Object[]{item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType()}); + } + } else if (SourceApiEnum.ASDE.getCode().equals(item.getSourceName())) { + if (item.getTagNo() != null && item.getDimension() != null && item.getValueType() != null) { + httpTagAsde.add(new Object[]{item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType()}); + } + } else if (SourceApiEnum.ASDC.getCode().equals(item.getSourceName())) { + if (item.getTagNo() != null && item.getDimension() != null && item.getValueType() != null) { + httpTagAsdc.add(new Object[]{item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType()}); } } } @@ -124,6 +138,12 @@ if (!CollectionUtils.isEmpty(httpTagAsdb)) { tagValues.putAll(httpCollectorForAsdb.getTagValues(httpTagAsdb, collectTime)); } + if (!CollectionUtils.isEmpty(httpTagAsde)) { + tagValues.putAll(httpCollectorForAsde.getTagValues(httpTagAsde, collectTime)); + } + if (!CollectionUtils.isEmpty(httpTagAsdc)) { + tagValues.putAll(httpCollectorForAsdc.getTagValues(httpTagAsdc, collectTime)); + } this.toCommonResult(collectTime, dtos, tagValues, dataMap, result,listGood,listBad); log.info("测量点处理结束"); return result; -- Gitblit v1.9.3