| | |
| | | import com.iailab.module.data.point.dto.DaPointDTO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | public class CumulateHandle { |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private DataPointApi dataPointApi; |
| | | |
| | | public List<InfluxPointValuePOJO> handle(Date collectTime, List<DaPointDTO> dtos) { |
| | |
| | | |
| | | //找出缺少项 |
| | | Map<Long, Double> sourceDataMap = new HashMap<>(dataList.size()); |
| | | for (ApiPointValueDTO pv : dataList) { |
| | | sourceDataMap.put(pv.getT().getTime(), pv.getV()); |
| | | } |
| | | |
| | | Map<Long, Double> dataMap = new LinkedHashMap<>(); |
| | | for (int i = 0; i < mins; i++) { |
| | | Long key = start + oneMin * i; |