潘志宝
12 小时以前 56e254f4c6a3eab1218a4fbea3f60609d209ff95
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java
@@ -3,8 +3,7 @@
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.asdb.HttpCollectorForAsMediaType;
import com.iailab.module.data.channel.http.collector.asdb.HttpCollectorForAsdy;
import com.iailab.module.data.channel.http.collector.ihdb.HttpCollectorForIhd;
import com.iailab.module.data.channel.opcda.collector.OpcDACollector;
@@ -64,10 +63,7 @@
    private HttpCollectorForAsdb httpCollectorForAsdb;
    @Autowired
    private HttpCollectorForAsde httpCollectorForAsde;
    @Autowired
    private HttpCollectorForAsdc httpCollectorForAsdc;
    private HttpCollectorForAsMediaType httpCollectorForAsMediaType;
    @Autowired
    private HttpCollectorForAsdy httpCollectorForAsdy;
@@ -94,6 +90,7 @@
        List<Object[]> httpTagAsde = new ArrayList<>();
        List<Object[]> httpTagAsdc = new ArrayList<>();
        List<Object[]> httpTagAsdy = new ArrayList<>();
        List<Object[]> httpTagAsdm = new ArrayList<>();
        dtos.stream().forEach(item -> {
            if (DataSourceType.OPCUA.getCode().equals(item.getSourceType())) {
@@ -125,6 +122,10 @@
                    if (item.getTagNo() != null && item.getDimension() != null && item.getValueType() != null) {
                        httpTagAsdy.add(new Object[]{item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType()});
                    }
                } else if (SourceApiEnum.ASDM.getCode().equals(item.getSourceName())) {
                    if (item.getTagNo() != null && item.getDimension() != null && item.getValueType() != null) {
                        httpTagAsdm.add(new Object[]{item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType()});
                    }
                }
            }
        });
@@ -149,10 +150,13 @@
            tagValues.putAll(httpCollectorForAsdb.getTagValues(httpTagAsdb, collectTime));
        }
        if (!CollectionUtils.isEmpty(httpTagAsde)) {
            tagValues.putAll(httpCollectorForAsde.getTagValues(httpTagAsde, collectTime));
            tagValues.putAll(httpCollectorForAsMediaType.getTagValues(httpTagAsde, collectTime));
        }
        if (!CollectionUtils.isEmpty(httpTagAsdc)) {
            tagValues.putAll(httpCollectorForAsdc.getTagValues(httpTagAsdc, collectTime));
            tagValues.putAll(httpCollectorForAsMediaType.getTagValues(httpTagAsdc, collectTime));
        }
        if (!CollectionUtils.isEmpty(httpTagAsdm)) {
            tagValues.putAll(httpCollectorForAsMediaType.getTagValues(httpTagAsdm, collectTime));
        }
        if (!CollectionUtils.isEmpty(httpTagAsdy)) {
            tagValues.putAll(httpCollectorForAsdy.getTagValues(httpTagAsdy, collectTime));
@@ -248,9 +252,11 @@
                    } else if (SourceApiEnum.ASDB.getCode().equals(item.getSourceName())) {
                        value = httpCollectorForAsdb.getTagValue(item.getSourceId(), item.getTagNo());
                    } else if (SourceApiEnum.ASDE.getCode().equals(item.getSourceName())) {
                        value = httpCollectorForAsde.getTagValue(item.getSourceId(), item.getTagNo());
                        value = httpCollectorForAsMediaType.getTagValue(item.getSourceId(), item.getTagNo());
                    } else if (SourceApiEnum.ASDC.getCode().equals(item.getSourceName())) {
                        value = httpCollectorForAsdc.getTagValue(item.getSourceId(), item.getTagNo());
                        value = httpCollectorForAsMediaType.getTagValue(item.getSourceId(), item.getTagNo());
                    } else if (SourceApiEnum.ASDM.getCode().equals(item.getSourceName())) {
                        value = httpCollectorForAsMediaType.getTagValue(item.getSourceId(), item.getTagNo());
                    } else if (SourceApiEnum.ASDY.getCode().equals(item.getSourceName())) {
                        value = httpCollectorForAsdy.getTagValue(item.getSourceId(), item.getTagNo());
                    }