| | |
| | | } |
| | | for (PowerGenStatusEntity entity : list) { |
| | | PowerGenStatusDTO dto = new PowerGenStatusDTO(); |
| | | dto.setId(entity.getId()); |
| | | dto.setName(entity.getName()); |
| | | dto.setSort(entity.getSort()); |
| | | |
| | | List<String> points = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(entity.getCurP())) { |
| | | points.add(entity.getCurP()); |
| | |
| | | } |
| | | if (!CollectionUtils.isEmpty(points)) { |
| | | Map<String, Object> pointsRealValue = dataPointApi.queryPointsRealValue(points); |
| | | if (pointsRealValue.get(dto.getCurP()) != null) { |
| | | dto.setCurP(new BigDecimal(pointsRealValue.get(dto.getCurP()).toString())); |
| | | if (pointsRealValue.get(entity.getCurP()) != null) { |
| | | dto.setCurP(new BigDecimal(pointsRealValue.get(entity.getCurP()).toString())); |
| | | } |
| | | if (pointsRealValue.get(dto.getCurQ()) != null) { |
| | | dto.setCurQ(new BigDecimal(pointsRealValue.get(dto.getCurQ()).toString())); |
| | | if (pointsRealValue.get(entity.getCurQ()) != null) { |
| | | dto.setCurQ(new BigDecimal(pointsRealValue.get(entity.getCurQ()).toString())); |
| | | } |
| | | } |
| | | |