Explorar o código

光资源分析补充提交

wangb@gyee-china.com hai 1 ano
pai
achega
48fa69477e

+ 0 - 43
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/dto/AveVo.java

@@ -1,43 +0,0 @@
-package com.gyee.runeconomy.dto;/*
-@author   谢生杰
-@date   2023/6/28-18:06
-*/
-
-public class AveVo {
-    private String id;
-    private String name;
-    private Double aves;
-    private long time;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public Double getAves() {
-        return aves;
-    }
-
-    public void setAves(Double aves) {
-        this.aves = aves;
-    }
-
-    public long getTime() {
-        return time;
-    }
-
-    public void setTime(long time) {
-        this.time = time;
-    }
-}

+ 0 - 43
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/dto/MinVo.java

@@ -1,43 +0,0 @@
-package com.gyee.runeconomy.dto;/*
-@author   谢生杰
-@date   2023/6/28-18:06
-*/
-
-public class MinVo {
-    private String id;
-    private String name;
-    private Double mins;
-    private long time;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public Double getMins() {
-        return mins;
-    }
-
-    public void setMins(Double mins) {
-        this.mins = mins;
-    }
-
-    public long getTime() {
-        return time;
-    }
-
-    public void setTime(long time) {
-        this.time = time;
-    }
-}

+ 16 - 6
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/Economic/EconomicService.java

@@ -446,17 +446,22 @@ public class EconomicService {
 
     public Map<String, Object> irradiance(String companys, String wpids, String type, String starttime, String endtime, String dateType, String windturbineids) throws Exception {
 
-//        List<ProBasicOrganizeEquipment> wtls = CacheContext.organizeEquipmentList;
         List<MaxVo> maxvalue = new ArrayList<>();
-        List<MinVo> minvalue = new ArrayList<>();
-        List<AveVo> avevalue = new ArrayList<>();
         List<ProBasicOrganizeTree> eqs = CacheContext.proBasicOrganizeTrees;
 
         List<ProBasicOrganizeTree> wtls = null;
 
-        wtls = eqs.stream()
-                .filter(v -> "EMI".equals(v.getEqType()) && wpids.contains(v.getParentCode()))
-                .collect(Collectors.toList());
+        if (wpids.isEmpty()){
+
+            wtls = eqs.stream()
+                    .filter(v -> "EMI".equals(v.getEqType()))
+                    .collect(Collectors.toList());
+        }else {
+
+            wtls = eqs.stream()
+                    .filter(v -> "EMI".equals(v.getEqType()) && wpids.contains(v.getParentCode()))
+                    .collect(Collectors.toList());
+        }
 
         List<EconomicVo> wt = new ArrayList<>();
         List<Glqx> vo = new ArrayList<>();
@@ -484,6 +489,11 @@ public class EconomicService {
                 vo1.setId(wt1.getNemCode());
                 vo1.setName(wt1.getNemName());
                 wt.add(vo1);
+            }else if (wpids.isEmpty()&& wt1.getPcodes().contains(companys)){
+                EconomicVo vo1 = new EconomicVo();
+                vo1.setId(wt1.getNemCode());
+                vo1.setName(wt1.getNemName());
+                wt.add(vo1);
             }
         }