| | |
| | | import com.iailab.module.data.point.vo.DaPointPageReqVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Object queryPointMaxValue(ApiPointValueQueryDTO queryDto) { |
| | | if (StringUtils.isEmpty(queryDto.getPointNo())) { |
| | | return null; |
| | | } |
| | | if (queryDto.getStart() == null) { |
| | | return null; |
| | | } |
| | | DaPointDTO daPointDTO = daPointService.getByNo(queryDto.getPointNo()); |
| | | InfluxPointValuePOJO pojo = new InfluxPointValuePOJO(); |
| | | pojo.setPoint(queryDto.getPointNo()); |
| | | pojo.setType(daPointDTO.getDataType()); |
| | | return influxDBService.queryPointMaxValue(pojo, queryDto.getStart()); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<Map<String, Object>>> queryPointsHistoryValue(ApiPointsValueQueryDTO queryDto) { |
| | | Map<String, List<Map<String, Object>>> data = new HashMap<>(); |
| | | Calendar calendar = Calendar.getInstance(); |