| | |
| | | List<EnergyIndex> energyIndexList = energyIndexService.getEnergyIndexByIds(indexIds); |
| | | // 根据indexid查询对应计量器具信息 |
| | | List<String> meterIds = energyIndexList.stream().map(EnergyIndex::getMeterId).collect(Collectors.toList()); |
| | | if (CollectionUtils.isEmpty(meterIds)) return voList; |
| | | Map<String, List<MeterImplement>> meterImplementMap = meterImplementService.listMeterImplementByIds(meterIds).stream() |
| | | .filter(li -> StringUtils.isNotEmpty(li.getInstallactionLocation())) |
| | | .collect(Collectors.groupingBy(MeterImplement::getId)); |
| | |
| | | if (CollectionUtils.isNotEmpty(meterImplements)) { |
| | | MeterImplement infor = meterImplements.get(0); |
| | | indexName = infor.getInstallactionLocation() + "_" + infor.getMeterName() + "_" + indexName; |
| | | pointData.setIndexName(indexName); |
| | | pointData.setIndexId(indexInfo.getIndexId()); |
| | | voList.add(pointData); |
| | | } |
| | | pointData.setIndexName(indexName); |
| | | pointData.setIndexId(indexInfo.getIndexId()); |
| | | voList.add(pointData); |
| | | |
| | | } |
| | | return voList; |
| | | } |