| | |
| | | if (StringUtils.isNotBlank(dto.getActivePower())) { |
| | | points.add(dto.getActivePower()); |
| | | } |
| | | |
| | | if (!CollectionUtils.isEmpty(points)) { |
| | | |
| | | Map<String, Object> pointsRealValue = dataPointApi.queryPointsRealValue(points); |
| | | |
| | | if (pointsRealValue.get(dto.getCurDemand()) != null) { |
| | | dto.setCurDemand(pointsRealValue.get(dto.getCurDemand()).toString()); |
| | | } |
| | |
| | | Date start = calendar.getTime(); |
| | | ApiPointValueQueryDTO apiPointValueQueryDTO = new ApiPointValueQueryDTO(); |
| | | apiPointValueQueryDTO.setStart(start); |
| | | apiPointValueQueryDTO.setEnd(new Date()); |
| | | apiPointValueQueryDTO.setPointNo(dto.getMaxDemand()); |
| | | |
| | | List<ApiPointValueDTO> monthValues = dataPointApi.queryPointHistoryValue(apiPointValueQueryDTO); |
| | | double max = 0; |
| | | for (int i = 0; i < monthValues.size() - 1; i++) { |
| | | if (max < monthValues.get(i).getV()) { |
| | | max = monthValues.get(i).getV(); |
| | | } |
| | | } |
| | | dto.setMaxDemand(String.valueOf(max)); |
| | | Object maxValue = dataPointApi.queryPointMaxValue(apiPointValueQueryDTO); |
| | | dto.setMaxDemand(maxValue == null ? "" : maxValue.toString()); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | return success(result); |
| | | } |
| | | |