|
@@ -66,7 +66,7 @@ public class BenchmarkingService {
|
|
|
|
|
|
SortUtils.sort(result, "orderNum", SortUtils.ASC);
|
|
|
|
|
|
- result.add(0,company);
|
|
|
+ result.add(0, company);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -100,6 +100,11 @@ public class BenchmarkingService {
|
|
|
list = list.stream().filter(wp -> companyids.contains(wp.getParentCode())).collect(Collectors.toList());
|
|
|
}
|
|
|
SortUtils.sort(list, "orderNum", SortUtils.ASC);
|
|
|
+ list = list.stream().sorted((t1, t2) -> {
|
|
|
+ if ("JS_JBGS_JBCN_GDC_STA".equals(t1.getId())) return -1;
|
|
|
+ else if ("JS_JBGS_JBCN_GDC_STA".equals(t2.getId())) return 1;
|
|
|
+ else return 0;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
return list;
|
|
|
|
|
|
}
|
|
@@ -190,10 +195,10 @@ public class BenchmarkingService {
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
- for (ProBasicOrganizeEquipment sqlist :collect) {
|
|
|
+ for (ProBasicOrganizeEquipment sqlist : collect) {
|
|
|
for (ProBasicOrganizeTree sq : CacheContext.sqls) {
|
|
|
|
|
|
- if (sqlist.getSquareId().equals(sq.getId())){
|
|
|
+ if (sqlist.getSquareId().equals(sq.getId())) {
|
|
|
sqlist.setParentCode(sq.getAname());
|
|
|
}
|
|
|
}
|
|
@@ -566,8 +571,12 @@ public class BenchmarkingService {
|
|
|
vo.setOrdernum(CacheContext.lnmap.get(i.getLineId().trim()).getOrderNum().doubleValue());
|
|
|
} else {
|
|
|
vo.setId(i.getWindpowerstationId());
|
|
|
- vo.setName(CacheContext.wpmap.get(i.getWindpowerstationId().trim()).getAname());
|
|
|
- vo.setOrdernum(station.get(i.getWindpowerstationId()).doubleValue());
|
|
|
+ if (CacheContext.wpmap.containsKey(i.getWindpowerstationId())) {
|
|
|
+ vo.setName(CacheContext.wpmap.get(i.getWindpowerstationId().trim()).getAname());
|
|
|
+ }
|
|
|
+ if(station.containsKey(i.getWindpowerstationId())){
|
|
|
+ vo.setOrdernum(station.get(i.getWindpowerstationId()).doubleValue());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
vo.setFdl(DoubleUtils.keepPrecision(i.getRfdl() / 10000, 2));
|
|
@@ -983,7 +992,7 @@ public class BenchmarkingService {
|
|
|
|
|
|
|
|
|
public List<WxsslVo> details(String id, String beginDate, String endDate, String target, String sort) {
|
|
|
- if(endDate==null){
|
|
|
+ if (endDate == null) {
|
|
|
beginDate = beginDate + "-01";
|
|
|
}
|
|
|
List<WxsslVo> resultList = new ArrayList<>();
|
|
@@ -1057,7 +1066,7 @@ public class BenchmarkingService {
|
|
|
|
|
|
SortUtils.sort(result, "orderNum", SortUtils.ASC);
|
|
|
|
|
|
- result.add(0,company);
|
|
|
+ result.add(0, company);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -1085,6 +1094,11 @@ public class BenchmarkingService {
|
|
|
list = list.stream().filter(wp -> companyids.contains(wp.getParentCode())).collect(Collectors.toList());
|
|
|
}
|
|
|
SortUtils.sort(list, "orderNum", SortUtils.ASC);
|
|
|
+ list = list.stream().sorted((t1, t2) -> {
|
|
|
+ if ("JS_JBGS_JBCN_GDC_STA".equals(t1.getId())) return -1;
|
|
|
+ else if ("JS_JBGS_JBCN_GDC_STA".equals(t2.getId())) return 1;
|
|
|
+ else return 0;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
return list;
|
|
|
|
|
|
}
|
|
@@ -1314,7 +1328,7 @@ public class BenchmarkingService {
|
|
|
|
|
|
|
|
|
|
|
|
- List<String> wtls = CacheContext.organizeEquipmentList.stream().filter(
|
|
|
+ List<String> wtls = CacheContext.organizeEquipmentList.stream().filter(
|
|
|
oe -> wpids.contains(oe.getWindpowerstationId())).map(ot -> ot.getWindturbineId()).collect(Collectors.toList());
|
|
|
|
|
|
if (wtls.size() == 0) continue;
|
|
@@ -1347,7 +1361,7 @@ public class BenchmarkingService {
|
|
|
peeidls.add(infoDay1);
|
|
|
}
|
|
|
} else if (model.isEmpty()) {
|
|
|
- List<String> wtls = CacheContext.organizeEquipmentList.stream().filter(
|
|
|
+ List<String> wtls = CacheContext.organizeEquipmentList.stream().filter(
|
|
|
oe -> wpids.contains(oe.getWindpowerstationId())).map(ot -> ot.getWindturbineId()).collect(Collectors.toList());
|
|
|
|
|
|
QueryWrapper<ProEconEquipmentInfoDay1> wiqw = qw.clone().in("windturbine_id", wtls);
|
|
@@ -1355,7 +1369,7 @@ public class BenchmarkingService {
|
|
|
|
|
|
ProEconEquipmentInfoDay1 infoDay1 = new ProEconEquipmentInfoDay1();
|
|
|
|
|
|
- for (ProBasicOrganizeTree t1: CacheContext.wtls){
|
|
|
+ for (ProBasicOrganizeTree t1 : CacheContext.wtls) {
|
|
|
for (ProEconEquipmentInfoDay1 listl : listls) {
|
|
|
infoDay1.setRfdl((infoDay1.getRfdl() != null ? infoDay1.getRfdl() : 0) + (listl.getRfdl() != null ? listl.getRfdl() : 0));
|
|
|
infoDay1.setRllfdl((infoDay1.getRllfdl() != null ? infoDay1.getRllfdl() : 0) + (listl.getRllfdl() != null ? listl.getRllfdl() : 0));
|