|
@@ -162,10 +162,21 @@ public class BenchmarkingService {
|
|
|
}
|
|
|
|
|
|
public List<ProBasicOrganizeEquipment> squarelist(String wpids) {
|
|
|
- return CacheContext.organizeEquipmentList.stream()
|
|
|
- .filter(oe -> wpids.contains(oe.getWindpowerstationId()) && (oe.getNemName().contains("逆变器") && oe.getSquareId()!= null || oe.getNemName().contains("风机")))
|
|
|
+ List<ProBasicOrganizeEquipment> collect = CacheContext.organizeEquipmentList.stream()
|
|
|
+ .filter(oe -> wpids.contains(oe.getWindpowerstationId()) && (oe.getNemName().contains("逆变器") && oe.getSquareId() != null || oe.getNemName().contains("风机")))
|
|
|
.filter(distinctByKey(ProBasicOrganizeEquipment::getSquareId))
|
|
|
.collect(Collectors.toList());
|
|
|
+
|
|
|
+
|
|
|
+ for (ProBasicOrganizeEquipment sqlist :collect) {
|
|
|
+ for (ProBasicOrganizeTree sq : CacheContext.sqls) {
|
|
|
+
|
|
|
+ if (sqlist.getSquareId().equals(sq.getId())){
|
|
|
+ sqlist.setAname(sq.getAname());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return collect;
|
|
|
}
|
|
|
|
|
|
public static <T> Predicate<T> distinctByKey(Function<? super T, ?> keyExtractor) {
|