Commit 3821c645 authored by caotao's avatar caotao

场站下的逆变器sncode进行去重操作。

parent 4990c1df
......@@ -182,7 +182,8 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
Map<String,List<String>> inverterMap=dataJpInverter.stream().collect(Collectors.groupingBy(JpInverter::getThirdStationId,Collectors.mapping(JpInverter::getSnCode,Collectors.toList())));
List<JpStation> list= jpStationMapper.getJpStationList(reviewDto);
list.forEach(jpStation -> {
jpStation.setSnCodes(inverterMap.get(jpStation.getThirdStationId()));
List<String> sncodes =inverterMap.get(jpStation.getThirdStationId()).stream().distinct().collect(Collectors.toList());
jpStation.setSnCodes(sncodes);
});
return list;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment