| | |
| | | if (CollectionUtils.isEmpty(result)) { |
| | | return success(result); |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.set(Calendar.DAY_OF_MONTH, 1); |
| | | calendar.set(Calendar.HOUR_OF_DAY, 0); |
| | | calendar.set(Calendar.MINUTE, 0); |
| | | calendar.set(Calendar.SECOND, 0); |
| | | calendar.set(Calendar.MILLISECOND, 0); |
| | | |
| | | for (PowerDemandDTO dto : result) { |
| | | List<String> points = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(dto.getCurDemand())) { |
| | |
| | | } |
| | | |
| | | if (!StringUtils.isEmpty(dto.getMaxDemand())) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.set(Calendar.DAY_OF_MONTH, 1); |
| | | calendar.set(Calendar.HOUR_OF_DAY, 0); |
| | | calendar.set(Calendar.MINUTE, 0); |
| | | calendar.set(Calendar.SECOND, 0); |
| | | calendar.set(Calendar.MILLISECOND, 0); |
| | | Date start = calendar.getTime(); |
| | | ApiPointValueQueryDTO apiPointValueQueryDTO = new ApiPointValueQueryDTO(); |
| | | apiPointValueQueryDTO.setStart(start); |
| | | apiPointValueQueryDTO.setPointNo(dto.getMaxDemand()); |
| | | Map<String, Object> maxValue = dataPointApi.queryPointMaxValue(apiPointValueQueryDTO); |
| | | if (maxValue != null) { |
| | | dto.setMaxDemand(maxValue.get(dto.getMaxDemand()) == null ? "" : maxValue.get(dto.getMaxDemand()).toString()); |
| | | } |
| | | |
| | | Object maxValue = dataPointApi.queryPointMaxValue(apiPointValueQueryDTO); |
| | | dto.setMaxDemand(maxValue == null ? "" : maxValue.toString()); |
| | | } |
| | | } |
| | | return success(result); |