| | |
| | | Object rawValue = singleCompute(dto, dataMap, listGood, listBad); |
| | | BigDecimal coefficient = dto.getUnittransfactor() == null ? BigDecimal.ONE : dto.getUnittransfactor(); |
| | | BigDecimal calValue = new BigDecimal(rawValue.toString()).multiply(coefficient); |
| | | if (dto.getMaxValue() != null && calValue.compareTo(dto.getMaxValue()) > 0) { |
| | | calValue = dto.getMaxValue(); |
| | | } else if (dto.getMinValue() != null && calValue.compareTo(dto.getMinValue()) < 0) { |
| | | calValue = dto.getMinValue(); |
| | | } |
| | | |
| | | InfluxPointValuePOJO pojo = GenInfluxPointValueUtils.getByPoint(dto, calValue); |
| | | pojo.setTimestamp(GenInfluxPointValueUtils.getByMin(collectTime, DataPointFreqEnum.getEumByCode(dto.getMinfreqid()))); |
| | | result.add(pojo); |