| | |
| | | |
| | | @Override |
| | | public ApiPointDTO getInfoById(String pointId) { |
| | | return ConvertUtils.sourceToTarget(daPointService.getSimpleInfoById(pointId), ApiPointDTO.class); |
| | | return daPointService.getSimpleInfoById(pointId); |
| | | } |
| | | |
| | | @Override |
| | | public List<ApiPointDTO> getInfoByIds(List<String> pointIds) { |
| | | List<ApiPointDTO> result = new ArrayList<>(pointIds.size()); |
| | | for (String pointId : pointIds) { |
| | | result.add(daPointService.getSimpleInfoById(pointId)); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | |
| | | 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(InfluxDBServiceImpl.VALUE).toString())); |
| | | pointValue.setDataTime(DateUtils.parse(list.get(i).get(InfluxDBServiceImpl.TIME).toString(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)); |
| | | pointValue.setV(Double.parseDouble(list.get(i).get(InfluxDBServiceImpl.VALUE).toString())); |
| | | pointValue.setT(DateUtils.parse(list.get(i).get(InfluxDBServiceImpl.TIME).toString(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)); |
| | | pointValueList.add(pointValue); |
| | | } |
| | | return pointValueList; |