| | |
| | | package com.iailab.module.data.api.point; |
| | | |
| | | import com.iailab.framework.common.util.date.DateUtils; |
| | | import com.iailab.framework.common.util.object.ConvertUtils; |
| | | import com.iailab.module.data.api.point.dto.*; |
| | | import com.iailab.module.data.influxdb.pojo.InfluxPointValuePOJO; |
| | | import com.iailab.module.data.influxdb.service.InfluxDBService; |
| | | import com.iailab.module.data.influxdb.service.impl.InfluxDBServiceImpl; |
| | | import com.iailab.module.data.point.collection.PointCollector; |
| | | import com.iailab.module.data.point.dto.DaPointDTO; |
| | | import com.iailab.module.data.point.dto.DaPointWriteValueDTO; |
| | |
| | | List<ApiPointValueDTO> pointValueList = new ArrayList<>(); |
| | | for (int i = 0; list.size() - i >= 1; i++) { |
| | | ApiPointValueDTO pointValue = new ApiPointValueDTO(); |
| | | pointValue.setDataValue(Double.parseDouble(list.get(i).get("value").toString())); |
| | | pointValue.setDataTime((Date) (list.get(i).get("time"))); |
| | | pointValue.setDataValue(Double.parseDouble(list.get(i).get(InfluxDBServiceImpl.VALUE).toString())); |
| | | pointValue.setDataTime(DateUtils.parse(list.get(i).get(InfluxDBServiceImpl.TIME).toString(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)); |
| | | pointValueList.add(pointValue); |
| | | } |
| | | return pointValueList; |