From 14cb329f0fec66711e3ddeba7e80db289c7fe8fc Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期四, 31 十月 2024 08:51:04 +0800 Subject: [PATCH] 测点列表.xlsx --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 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 c9af776..41299ec 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 @@ -1,5 +1,6 @@ package com.iailab.module.data.point.collection.handler; +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; import com.iailab.module.data.common.enums.DataSourceType; @@ -12,7 +13,6 @@ import com.iailab.module.data.point.common.PointDataTypeEnum; import com.iailab.module.data.point.dto.DaPointDTO; import com.iailab.module.data.point.service.DaPointService; -import com.iailab.module.data.http.collector.HttpCollectorForZxzk; import com.iailab.module.data.influxdb.pojo.InfluxPointValuePOJO; import lombok.extern.slf4j.Slf4j; import javax.annotation.Resource; @@ -51,8 +51,8 @@ @Autowired private OpcDACollector opcDACollector; - @Resource - private HttpCollectorForZxzk httpCollectorForZxzk; + @Autowired + private HttpCollectorForIhd httpCollectorForIhd; @Resource private DaPointService daPointService; @@ -68,7 +68,7 @@ List<String[]> opcDaTagIds = new ArrayList<>(); List<String[]> modbusTagIds = new ArrayList<>(); List<String[]> kioTagIds = new ArrayList<>(); - List<String[]> httpTagZxzk = new ArrayList<>(); + List<Object[]> httpTagIhd = new ArrayList<>(); dtos.stream().forEach(item -> { @@ -80,6 +80,10 @@ modbusTagIds.add(new String[]{item.getSourceId(), item.getTagNo()}); } else if (DataSourceType.KIO.getCode().equals(item.getSourceType())) { kioTagIds.add(new String[]{item.getSourceId(), item.getTagNo()}); + } else if (DataSourceType.HTTP.getCode().equals(item.getSourceType())) { + if (CommonConstant.iHyperDB.equals(item.getSourceName())) { + httpTagIhd.add(new Object[]{item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType()}); + } } }); @@ -96,9 +100,8 @@ if (!CollectionUtils.isEmpty(kioTagIds)) { tagValues.putAll(kingIOCollector.getTagValues(kioTagIds)); } - if (!CollectionUtils.isEmpty(httpTagZxzk)) { - tagValues.putAll(httpCollectorForZxzk.getTagValues(httpTagZxzk)); - + if (!CollectionUtils.isEmpty(httpTagIhd)) { + tagValues.putAll(httpCollectorForIhd.getTagValues(httpTagIhd)); } this.toCommonResult(collectTime, dtos, tagValues, dataMap, result); log.info("测量点处理结束"); @@ -175,9 +178,7 @@ } else if (DataSourceType.KIO.getCode().equals(item.getSourceType())) { value = kingIOCollector.getTagValue(item.getSourceId(), item.getTagNo()); } else if (DataSourceType.HTTP.getCode().equals(item.getSourceType())) { - if (CommonConstant.HTTP_API_ZXZK_IH.equals(item.getSourceName())) { - value = httpCollectorForZxzk.getTagValue(item.getSourceId(), item.getTagNo()); - } + value = httpCollectorForIhd.getTagValue(item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType()); } else { log.info("没有匹配的TagNo=" + item.getTagNo()); } -- Gitblit v1.9.3