| | |
| | | import com.iailab.module.data.common.enums.DataTypeEnum; |
| | | import com.iailab.module.data.common.enums.JsErrorCode; |
| | | import com.iailab.module.data.common.utils.JavaScriptHandler; |
| | | 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.dto.DaPointDTO; |
| | |
| | | BigDecimal coefficient = dto.getUnittransfactor() == null ? BigDecimal.ONE : dto.getUnittransfactor(); |
| | | BigDecimal calValue = new BigDecimal(rawValue.toString()).multiply(coefficient); |
| | | InfluxPointValuePOJO pojo = GenInfluxPointValueUtils.getByPoint(dto, calValue); |
| | | pojo.setTimestamp(collectTime.toInstant()); |
| | | pojo.setTimestamp(GenInfluxPointValueUtils.getByMin(collectTime, DataPointFreqEnum.getEumByCode(dto.getMinfreqid()))); |
| | | result.add(pojo); |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |