| | |
| | | private ConstantHandle constantHandle; |
| | | |
| | | @Resource |
| | | private CumulateHandle cumulateHandle; |
| | | |
| | | @Resource |
| | | private ExtremalHandle extremalHandle; |
| | | |
| | | @Resource |
| | | private JavaScriptHandler javaScriptHandler; |
| | | |
| | | @Autowired |
| | |
| | | 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); |
| | |
| | | pointNos.add(s); |
| | | dataMap.putAll(measureHandle.getCurrent(pointNos)); |
| | | dataMap.putAll(constantHandle.getCurrent(pointNos)); |
| | | dataMap.putAll(cumulateHandle.getCurrent(pointNos)); |
| | | dataMap.putAll(extremalHandle.getCurrent(pointNos)); |
| | | if (dataMap.get(s) == null) { |
| | | log.info("计算点数据异常"); |
| | | log.info("pointNo=" + dto.getPointNo() + ";dataMap.key=" + s); |