Browse Source

功率曲线

wangb@gyee-china.com 1 year ago
parent
commit
2ea34fb0d6

+ 12 - 0
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/controller/bmk/BenchmarkingController.java

@@ -505,4 +505,16 @@ public class BenchmarkingController {
         }
     }
 
+    @GetMapping(value = "/wtByWplistxin")
+    @ApiOperation(value = "风机列表", notes = "风机列表")
+    public R wtByWplistxin(@RequestParam(value = "wpids", required = true) String wpids)  {
+
+        List<ProBasicOrganizeEquipment> resultList = benchmarkingService.wtByWplistxin(wpids);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
 }

+ 5 - 4
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/Economic/EconomicService.java

@@ -11,6 +11,7 @@ import com.gyee.runeconomy.model.auto.ProBasicEquipmentPoint;
 import com.gyee.runeconomy.model.auto.ProBasicOrganizeTree;
 import com.gyee.runeconomy.model.auto.ProBasicPowerstationPoint;
 import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay1;
+import com.gyee.runeconomy.model.fitting.ProBasicOrganizeEquipment;
 import com.gyee.runeconomy.service.auto.*;
 import com.gyee.runeconomy.util.DateUtils;
 import com.gyee.runeconomy.util.StringUtils;
@@ -350,7 +351,7 @@ public class EconomicService {
         Map<String, List<List<Glqx>>> resultMap = new HashMap<>();
 
 
-        List<ProBasicOrganizeTree> wtls = CacheContext.wtls;
+        List<ProBasicOrganizeEquipment> wtls = CacheContext.organizeEquipmentList;
         List<EconomicVo> wt = new ArrayList<>();
 
         List<List<Glqx>> tempList = new ArrayList<>();
@@ -363,10 +364,10 @@ public class EconomicService {
 
         if (type.equals("-2")) {
 
-            for (ProBasicOrganizeTree wt1: wtls){
-                if (wpids.contains(wt1.getParentCode())){
+            for (ProBasicOrganizeEquipment wt1: wtls){
+                if (wpids.contains(wt1.getWindpowerstationId())){
                     EconomicVo vo1 = new EconomicVo();
-                    vo1.setId(wt1.getId());
+                    vo1.setId(wt1.getWindturbineId());
                     vo1.setName(wt1.getAname());
                     wt.add(vo1);
                 }

+ 4 - 0
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/bmk/BenchmarkingService.java

@@ -116,6 +116,10 @@ public class BenchmarkingService {
         return CacheContext.organizeEquipmentList.stream().filter(
                 oe -> wpids.contains(oe.getWindpowerstationId())&&(oe.getNemName().contains("逆变器") || oe.getNemName().contains("风机"))).collect(Collectors.toList());
     }
+    public List<ProBasicOrganizeEquipment> wtByWplistxin(String wpids) {
+        return CacheContext.organizeEquipmentList.stream().filter(
+                oe -> wpids.contains(oe.getWindpowerstationId())&&(oe.getNemName().contains("风机"))).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<>();