xieshengjie 1 سال پیش
والد
کامیت
7850bb14d4

+ 17 - 7
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/Economic/EconomicService.java

@@ -448,7 +448,7 @@ public class EconomicService {
         List<MaxVo> maxvalue = new ArrayList<>();
         List<ProBasicOrganizeTree> eqs = CacheContext.proBasicOrganizeTrees;
 
-        List<ProBasicOrganizeTree> wtls = null;
+        List<ProBasicOrganizeTree> wtls = new ArrayList<>();
 
         if (wpids.isEmpty()) {
 
@@ -457,11 +457,16 @@ public class EconomicService {
                     .collect(Collectors.toList());
         } else {
 
-            wtls = eqs.stream()
-                    .filter(v -> "EMI".equals(v.getEqType()) && wpids.contains(v.getParentCode()))
-                    .collect(Collectors.toList());
+            String[] split = wpids.split(",");
+            if (!wpids.isEmpty()) {
+                for (String s1 : split) {
+                    List<ProBasicOrganizeTree> filteredList = eqs.stream()
+                            .filter(v -> "EMI".equals(v.getEqType()) && v.getPcodes().contains(s1))
+                            .collect(Collectors.toList());
+                    wtls.addAll(filteredList);
+                }
+            }
         }
-
         List<EconomicVo> wt = new ArrayList<>();
         List<Glqx> vo = new ArrayList<>();
 
@@ -473,12 +478,12 @@ public class EconomicService {
         }
 
         for (ProBasicOrganizeTree wt1 : wtls) {
-            if (wpids.contains(wt1.getParentCode()) && windturbineids.isEmpty()) {
+            if (wt1.getPcodes().contains(wpids) && windturbineids.isEmpty()) {
                 EconomicVo vo1 = new EconomicVo();
                 vo1.setId(wt1.getNemCode());
                 vo1.setName(wt1.getNemName());
                 wt.add(vo1);
-            } else if (wpids.contains(wt1.getParentCode()) && windturbineids.contains(wt1.getId())) {
+            } else if (wt1.getPcodes().contains(wpids) && windturbineids.contains(wt1.getId())) {
                 EconomicVo vo1 = new EconomicVo();
                 vo1.setId(wt1.getNemCode());
                 vo1.setName(wt1.getNemName());
@@ -493,6 +498,11 @@ public class EconomicService {
                 vo1.setId(wt1.getNemCode());
                 vo1.setName(wt1.getNemName());
                 wt.add(vo1);
+            }else {
+                EconomicVo vo1 = new EconomicVo();
+                vo1.setId(wt1.getNemCode());
+                vo1.setName(wt1.getNemName());
+                wt.add(vo1);
             }
         }
 

+ 1 - 4
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/auto/IProEconCleaningInputService.java

@@ -4,9 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.gyee.runeconomy.model.auto.ProEconCleaningInput;
 
-import java.util.Date;
-import java.util.List;
-
 /**
  * <p>
  * 清洗录入表 服务类
@@ -18,5 +15,5 @@ import java.util.List;
 public interface IProEconCleaningInputService extends IService<ProEconCleaningInput> {
 
     IPage<ProEconCleaningInput> getList(String windpowerstationId, String windpowerstationName, String begindate, String planEnddate, String pageNum, String pageSize);
-    List<ProEconCleaningInput> getlist(Date beginDate, Date endDate);
+
 }

+ 24 - 10
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/bmk/BenchmarkingService.java

@@ -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.wtls.stream().filter(c -> !Objects.isNull(c.getModelId()) && c.getNemName().contains("逆变器") &&
 //                            s1.equals(c.getModelId())).map(ot -> ot.getId()).collect(Collectors.toList());
 
-                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));

+ 1 - 1
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/goodness/WindturbinegoodnessService.java

@@ -1021,7 +1021,7 @@ public class WindturbinegoodnessService {
         Map<String, List<StationAnalysis>> resultMap = new HashMap<>();
         List<ProBasicOrganizeTree> eqs = CacheContext.proBasicOrganizeTrees;
         //拿到场站下的环境监测仪id
-        List<String> emils = eqs.stream().filter(v -> "EMI".equals(v.getEqType()) && v.getParentCode().equals(wpid))
+        List<String> emils = eqs.stream().filter(v -> "EMI".equals(v.getEqType()) && v.getPcodes().contains(wpid))
                 .map(ProBasicOrganizeTree::getId)
                 .collect(Collectors.toList());
         List<String> emil = null;