Przeglądaj źródła

专题返回数据格式修改

xieshengjie 2 lat temu
rodzic
commit
3f085934e5

+ 15 - 0
common/src/main/java/com/gyee/common/vo/specific/SpecificTarget.java

@@ -0,0 +1,15 @@
+package com.gyee.common.vo.specific;/*
+@author   谢生杰
+@date   2022/12/4-21:40
+*/
+
+import lombok.Data;
+
+import java.util.List;
+@Data
+public class SpecificTarget {
+    private String wpid;
+    private String wpname;
+//    private Integer year;
+    List<SpecificTargetVo> targetList;
+}

+ 5 - 0
common/src/main/java/com/gyee/common/vo/specific/SpecificTargetVo.java

@@ -2,6 +2,8 @@ package com.gyee.common.vo.specific;
 
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * @ClassName : SpecificTargetVo
  * @Author : xieshengjie
@@ -18,4 +20,7 @@ public class SpecificTargetVo {
     private Double current;
     private Double sameperiod;
     private Integer compare;
+
 }
+
+

+ 14 - 13
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/specific/SpecificController.java

@@ -5,6 +5,7 @@ package com.gyee.runeconomy.controller.specific;/*
 
 import com.gyee.common.model.StringUtils;
 import com.gyee.common.vo.specific.SpecificCenterVo;
+import com.gyee.common.vo.specific.SpecificTarget;
 import com.gyee.common.vo.specific.SpecificTargetVo;
 import com.gyee.common.vo.specific.SpecificTopVo;
 import com.gyee.runeconomy.dto.R;
@@ -80,7 +81,7 @@ public class SpecificController {
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.fnlylList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.fnlylList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -99,7 +100,7 @@ public class SpecificController {
                      @RequestParam(value = "type",required = true) String type,
                      @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.fdlList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.fdlList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -118,7 +119,7 @@ public class SpecificController {
                         @RequestParam(value = "type",required = true) String type,
                         @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.zhcydlList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.zhcydlList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -137,7 +138,7 @@ public class SpecificController {
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.gzsslList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.gzsslList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -156,7 +157,7 @@ public class SpecificController {
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.whsslList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.whsslList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -175,7 +176,7 @@ public class SpecificController {
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.xdsslList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.xdsslList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -194,7 +195,7 @@ public class SpecificController {
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.xnsslList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.xnsslList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -213,7 +214,7 @@ public class SpecificController {
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.slsslList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.slsslList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -232,7 +233,7 @@ public class SpecificController {
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.fwjslList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.fwjslList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -251,7 +252,7 @@ public class SpecificController {
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.ztzhlList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.ztzhlList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -270,7 +271,7 @@ public class SpecificController {
                        @RequestParam(value = "type",required = true) String type,
                        @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.xqjslList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.xqjslList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -289,7 +290,7 @@ public class SpecificController {
                       @RequestParam(value = "type",required = true) String type,
                       @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.mtbfList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.mtbfList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{
@@ -308,7 +309,7 @@ public class SpecificController {
                       @RequestParam(value = "type",required = true) String type,
                       @RequestParam(value = "year",required = true) String year) throws ParseException {
 
-        List<SpecificTargetVo> resultList = specificService.mttrList(companys,type,year);
+        List<SpecificTarget> resultList = specificService.mttrList(companys,type,year);
         if (StringUtils.isNotNull(resultList)) {
             return R.data(ResultMsg.ok(resultList));
         }else{

+ 795 - 26
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/specific/SpecificService.java

@@ -5,6 +5,7 @@ import com.gyee.common.model.StringUtils;
 import com.gyee.common.util.DateUtils;
 import com.gyee.common.util.DoubleUtils;
 import com.gyee.common.vo.specific.SpecificCenterVo;
+import com.gyee.common.vo.specific.SpecificTarget;
 import com.gyee.common.vo.specific.SpecificTargetVo;
 import com.gyee.common.vo.specific.SpecificTopVo;
 import com.gyee.runeconomy.init.CacheContext;
@@ -605,7 +606,7 @@ public class SpecificService {
      * @param year
      * @return
      */
-    public List<SpecificTargetVo> fnlylList(String companys, String type, String year) {
+    public List<SpecificTarget> fnlylList(String companys, String type, String year) {
 
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
@@ -669,6 +670,7 @@ public class SpecificService {
             }else{
                 vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
             }
+
             vo.setYear(DateUtils.getYear(i.getRecordDate()));
             vo.setMonth(DateUtils.getMonth(i.getRecordDate()));
             vo.setCurrent(DoubleUtils.keepPrecision(i.getYllfdl().doubleValue()!=0?i.getYfdl().doubleValue()/i.getYllfdl().doubleValue()*100:0,2));
@@ -687,11 +689,70 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
     
-    public List<SpecificTargetVo> fdlList(String companys, String type, String year) {
+    public List<SpecificTarget> fdlList(String companys, String type, String year) {
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
         currentqw.select("foreign_key_id,max(record_date) record_date,max(yfdl) yfdl");
@@ -772,10 +833,69 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
-    public List<SpecificTargetVo> zhcydlList(String companys, String type, String year) {
+    public List<SpecificTarget> zhcydlList(String companys, String type, String year) {
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay5> currentqw = new QueryWrapper<>();
         currentqw.select("foreign_key_id,max(record_date) record_date,max(yzhcydldb) yzhcydldb");
@@ -856,11 +976,70 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
 
     }
 
-    public List<SpecificTargetVo> gzsslList(String companys, String type, String year) {
+    public List<SpecificTarget> gzsslList(String companys, String type, String year) {
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
         currentqw.select("foreign_key_id,max(record_date) record_date,max(ygzssdl) ygzssdl,max(ycnslgzssdl) ycnslgzssdl,max(yllfdl) yllfdl");
@@ -941,10 +1120,69 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
-    public List<SpecificTargetVo> whsslList(String companys, String type, String year) {
+    public List<SpecificTarget> whsslList(String companys, String type, String year) {
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
         currentqw.select("foreign_key_id,max(record_date) record_date,max(yjxssdl) yjxssdl,max(ycnsljxssdl) ycnsljxssdl,max(yllfdl) yllfdl");
@@ -1025,10 +1263,69 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
-    public List<SpecificTargetVo> xdsslList(String companys, String type, String year) {
+    public List<SpecificTarget> xdsslList(String companys, String type, String year) {
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
         currentqw.select("foreign_key_id,max(record_date) record_date,max(yxdtjssdl) yxdtjssdl,max(yxdjclssdl) yxdjclssdl,max(yllfdl) yllfdl");
@@ -1109,10 +1406,69 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
-    public List<SpecificTargetVo> xnsslList(String companys, String type, String year) {
+    public List<SpecificTarget> xnsslList(String companys, String type, String year) {
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
         currentqw.select("foreign_key_id,max(record_date) record_date,max(ydjssdl) ydjssdl,max(yqxjclssdl) yqxjclssdl,max(ysdtjssdl) ysdtjssdl,max(yxnssdl) yxnssdl,max(yllfdl) yllfdl");
@@ -1193,10 +1549,69 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
-    public List<SpecificTargetVo> slsslList(String companys, String type, String year) {
+    public List<SpecificTarget> slsslList(String companys, String type, String year) {
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
         currentqw.select("foreign_key_id,max(record_date) record_date,max(ycwsldwssdl) ycwsldwssdl,max(ycwsltqssdl) ycwsltqssdl,max(yllfdl) yllfdl");
@@ -1277,10 +1692,69 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
-    public List<SpecificTargetVo> fwjslList(String companys, String type, String year) {
+    public List<SpecificTarget> fwjslList(String companys, String type, String year) {
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay4> currentqw = new QueryWrapper<>();
         currentqw.select("foreign_key_id,max(record_date) record_date,avg(yfwjsl) yfwjsl");
@@ -1361,10 +1835,69 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
-    public List<SpecificTargetVo> ztzhlList(String companys, String type, String year) {
+    public List<SpecificTarget> ztzhlList(String companys, String type, String year) {
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay4> currentqw = new QueryWrapper<>();
         currentqw.select("foreign_key_id,max(record_date) record_date,avg(yztzhjsl) yztzhjsl");
@@ -1445,10 +1978,69 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
-    public List<SpecificTargetVo> xqjslList(String companys, String type, String year) {
+    public List<SpecificTarget> xqjslList(String companys, String type, String year) {
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay4> currentqw = new QueryWrapper<>();
         currentqw.select("foreign_key_id,max(record_date) record_date,avg(ygzxqjsl) ygzxqjsl");
@@ -1529,10 +2121,69 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
-    public List<SpecificTargetVo> mtbfList(String companys, String type, String year) {
+    public List<SpecificTarget> mtbfList(String companys, String type, String year) {
 
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay4> currentqw = new QueryWrapper<>();
@@ -1614,10 +2265,69 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
-    public List<SpecificTargetVo> mttrList(String companys, String type, String year) {
+    public List<SpecificTarget> mttrList(String companys, String type, String year) {
         //获取年份所有当月的数据
         QueryWrapper<ProEconPowerstationInfoDay4> currentqw = new QueryWrapper<>();
         currentqw.select("foreign_key_id,max(record_date) record_date,max(ymttr) ymttr");
@@ -1698,7 +2408,66 @@ public class SpecificService {
                 i.setCompare(0);
             }
         });
-        return resultList;
+        List<SpecificTarget> resultendList = new ArrayList<>();
+
+        Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
+
+        resultList.stream().forEach(i->{
+            if (map.containsKey(i.getWpid())){
+                Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
+                if (!integerListMap.containsKey(i.getMonth())){
+                    map.get(i.getWpid()).put(i.getMonth(),i);
+                }else {
+
+                }
+            }else {
+                Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
+                tempMap.put(i.getMonth(),i);
+                map.put(i.getWpid(),tempMap);
+            }
+        });
+        Set<String> wpids = map.keySet();
+        if (StringUtils.isNotNull(wpids)){
+            wpids.stream().forEach(wpid->{
+                SpecificTarget vo = new SpecificTarget();
+                vo.setWpid(wpid);
+                if(wpid.contains("_ZGS")){
+                    vo.setWpname(CacheContext.cpmap.get(companys).getAname());
+                }else if(wpid.contains("_RGN")){
+                    vo.setWpname(CacheContext.rgmap.get(companys).getAname());
+                }else{
+                    vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                }
+                List<SpecificTargetVo> tempList = new ArrayList<>();
+
+                Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
+                for(int x = 1;x<=12;x++){
+                    if (listMap.containsKey(x)){
+                        tempList.add(listMap.get(x));
+                    }else {
+                        SpecificTargetVo vo1 = new SpecificTargetVo();
+                        vo1.setWpid(wpid);
+                        if(wpid.contains("_ZGS")){
+                            vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
+                        }else if(wpid.contains("_RGN")){
+                            vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
+                        }else{
+                            vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
+                        }
+                        vo1.setYear(Integer.parseInt(year));
+                        vo1.setMonth(x);
+                        tempList.add(vo1);
+                    }
+                }
+
+
+                vo.setTargetList(tempList);
+                resultendList.add(vo);
+            });
+        }
+
+
+        return resultendList;
     }
 
 

+ 1 - 0
web/runeconomy-xk/src/main/resources/application-yun.yml

@@ -110,3 +110,4 @@ db:
   #url: http://192.168.11.250:8011/ts
 runWindpowerstation: SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_LYDL_BH1_FDC_STA,SD_LYDL_BH2_FDC_STA,SD_LYDL_CG_FDC_STA,SD_LYDL_FJ_FDC_STA,SD_LYDL_YS_FDC_STA,SD_SXNY_FXFC_FDC_STA,SD_SXNY_JNSS_FDC_STA,SD_SXNY_WFBH_FDC_STA,SD_SXNY_PLHS_FDC_STA,SD_SXNY_JNCQ_FDC_STA,SD_SXNY_LXLN_FDC_STA,SD_SXNY_LQJS_FDC_STA,SD_SXNY_ZYXD_FDC_STA,SD_SXNY_ZYFS_FDC_STA,SD_GHTZ_HZJ_GDC_STA
 
+#runWindpowerstation: SD_GDDL_RZLX_FDC_STA