| | |
| | | @Operation(summary = "功率因数-电容器投退指示灯") |
| | | public CommonResult<List<PowerCapacitorDetDTO>> getPowerCapacitorDetList(@RequestParam Map<String, Object> params) { |
| | | List<PowerCapacitorDetEntity> list = powerCapacitorDetService.list(params); |
| | | log.info("list.size=" + list.size()); |
| | | List<String> points = list.stream().map(item -> { |
| | | return item.getPointNo(); |
| | | }).collect(Collectors.toList()); |
| | |
| | | List<PowerCapacitorDetDTO> result = new ArrayList<>(); |
| | | for (PowerCapacitorDetEntity entity : list) { |
| | | PowerCapacitorDetDTO dto = ConvertUtils.sourceToTarget(entity, PowerCapacitorDetDTO.class); |
| | | result.add(dto); |
| | | dto.setStatus(0); |
| | | if (!pointsRealValue.containsKey(entity.getPointNo()) || pointsRealValue.get(entity.getPointNo()) == null) { |
| | | continue; |
| | |
| | | if (val.compareTo(BigDecimal.ZERO) >= 0.1) { |
| | | dto.setStatus(1); |
| | | } |
| | | result.add(dto); |
| | | } |
| | | return success(result); |
| | | } |