dengzedong
4 天以前 cc6270c5f434f93bf51f4c454e3de512be70b584
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java
@@ -14,6 +14,7 @@
import com.iailab.module.data.channel.kio.collector.KingIOCollector;
import com.iailab.module.data.channel.modbus.collector.ModBusCollector;
import com.iailab.module.data.channel.opcua.collector.OpcUaCollector;
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.common.PointDataTypeEnum;
@@ -111,11 +112,11 @@
                    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())) {
                } 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()});
                    }
                }*/
                }
            }
        });
@@ -158,13 +159,13 @@
                if (tagValues.containsKey(tagId)) {
                    Object value = handleData(dto, tagValues.get(tagId));
                    InfluxPointValuePOJO pojo = GenInfluxPointValueUtils.getByPoint(dto, value);
                    pojo.setTimestamp(collectTime.toInstant());
                    pojo.setTimestamp(GenInfluxPointValueUtils.getByMin(collectTime, DataPointFreqEnum.getEumByCode(dto.getMinfreqid())));
                    dataMap.put(dto.getPointNo(), value);
                    result.add(pojo);
                    listGood.add(dto.getPointNo());
                } else {
                    InfluxPointValuePOJO pojo = GenInfluxPointValueUtils.getByPoint(dto, CommonConstant.BAD_VALUE);
                    pojo.setTimestamp(collectTime.toInstant());
                    pojo.setTimestamp(GenInfluxPointValueUtils.getByMin(collectTime, DataPointFreqEnum.getEumByCode(dto.getMinfreqid())));
                    result.add(pojo);
                    listBad.add(dto.getPointNo());
                    log.info("值异常!TagId=" + tagId);
@@ -233,6 +234,10 @@
                                value = httpCollectorForIhd.getTagValue(item.getSourceId(), item.getTagNo(), item.getDimension(), item.getValueType());
                            } 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());
                            } else if (SourceApiEnum.ASDC.getCode().equals(item.getSourceName())) {
                                value = httpCollectorForAsdc.getTagValue(item.getSourceId(), item.getTagNo());
                            }
                        } else {
                            log.info("没有匹配的TagNo=" + item.getTagNo());