|
@@ -24,6 +24,7 @@ import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
+import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
@@ -121,10 +122,27 @@ public class BenchmarkingService {
|
|
|
oe -> wpids.contains(oe.getWindpowerstationId())||(oe.getNemName().contains("风机"))).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
- public List<ProBasicOrganizeTree> modellist(String wpids) {
|
|
|
- return CacheContext.wtls.stream().filter(wt -> wt.getOrgType().equals("EQ") && wt.getPcodes().contains(wpids)).collect(Collectors.toList());
|
|
|
+// public List<ProBasicOrganizeTree> modellist(String wpids) {
|
|
|
+// if (CacheContext.wtls == null) {
|
|
|
+// return new ArrayList<>();
|
|
|
+// }
|
|
|
+// return CacheContext.wtls.stream()
|
|
|
+// .filter(wt -> "EQ".equals(wt.getOrgType()) && wt.getPcodes() != null && wt.getPcodes().contains(wpids))
|
|
|
+// .collect(Collectors.toList());
|
|
|
+// }
|
|
|
+public List<ProBasicOrganizeTree> modellist(String wpids) {
|
|
|
+ if (CacheContext.wtls == null) {
|
|
|
+ return new ArrayList<>();
|
|
|
}
|
|
|
|
|
|
+ return CacheContext.wtls.stream()
|
|
|
+ .filter(wt -> "EQ".equals(wt.getOrgType()) && wt.getPcodes() != null && wt.getPcodes().contains(wpids))
|
|
|
+ .collect(Collectors.toMap(ProBasicOrganizeTree::getModelId, Function.identity(), (a, b) -> a))
|
|
|
+ .values()
|
|
|
+ .stream()
|
|
|
+ .collect(Collectors.toList());
|
|
|
+}
|
|
|
+
|
|
|
public List<FjjxbVo> performance(String companyid, String getype, String sttype, String beginDate, String endDate, String wpids, String projectids, String lineids, String target, String sort) {
|
|
|
List<FjjxbVo> resultList = new ArrayList<>();
|
|
|
QueryWrapper<ProEconEquipmentInfoDay1> qw = new QueryWrapper<>();
|