| | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | public List<InfluxPointValuePOJO> handle(Date collectTime, List<DaPointDTO> dtos,List<String> listGood,List<String> listBad) { |
| | | public List<InfluxPointValuePOJO> handle(Date collectTime, List<DaPointDTO> dtos, List<String> listGood, List<String> listBad) { |
| | | List<InfluxPointValuePOJO> result = new ArrayList<>(); |
| | | try { |
| | | log.info("累计点处理开始"); |
| | |
| | | } |
| | | dtos.forEach(dto -> { |
| | | try { |
| | | Object value = singleCompute(dto, collectTime,listGood,listBad); |
| | | Object value = singleCompute(dto, collectTime, listGood, listBad); |
| | | InfluxPointValuePOJO pojo = GenInfluxPointValueUtils.getByPoint(dto, value); |
| | | pojo.setTimestamp(collectTime.toInstant()); |
| | | result.add(pojo); |
| | |
| | | } |
| | | |
| | | private Object singleCompute(DaPointDTO dto, Date collectTime) { |
| | | return singleCompute(dto,collectTime,null,null); |
| | | return singleCompute(dto, collectTime, null, null); |
| | | } |
| | | |
| | | private Object singleCompute(DaPointDTO dto, Date collectTime,List<String> listGood,List<String> listBad) { |
| | | private Object singleCompute(DaPointDTO dto, Date collectTime, List<String> listGood, List<String> listBad) { |
| | | ApiPointDTO pointDTO = dataPointApi.getInfoByNo(dto.getMomentPoint()); |
| | | if (pointDTO == null) { |
| | | if (listBad != null) { |