| | |
| | | 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; |
| | |
| | | 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); |