Explorar o código

修改光伏所用接口

xieshengjie hai 1 ano
pai
achega
38c64e8204

+ 26 - 0
common/src/main/java/com/gyee/common/vo/threerate/PvVo.java

@@ -0,0 +1,26 @@
+package com.gyee.common.vo.threerate;/*
+@author   谢生杰
+@date   2023/3/23-9:49
+*/
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class PvVo {
+
+    private String wtid;
+    private String wtname;
+    private Date date;
+    private String model;
+    private Double rxtxl;
+    private Double rlsl;
+    private Double rzhxl;
+    private Double yxtxl;
+    private Double ylsl;
+    private Double yzhxl;
+    private Double nxtxl;
+    private Double nlsl;
+    private Double nzhxl;
+}

+ 10 - 3
realtime/computing-services7001/src/main/java/com/gyee/generation/service/AverageAndGeneratingService.java

@@ -35,6 +35,7 @@ public class AverageAndGeneratingService {
     private Map<String, Map<String, Windpowerstationpointnew>> linepointmap;
     private Map<String, Map<String, Windpowerstationpointnew>> propointmap;
     private Map<String, Map<String, Windturbinetestingpointnew>> wtpAimap;
+    private Map<String, Double> modelpower;
     @Resource
     private IEdosUtil edosUtil;
     @Value("${typeOfElectric.direct}")
@@ -55,6 +56,7 @@ public class AverageAndGeneratingService {
         propointmap = CacheContext.propointmap;
         wtpAimap = CacheContext.wtpAimap;
         linewtmap = CacheContext.linewtmap;
+        modelpower = CacheContext.modelpower;
         tomorrow = DateUtils.addDays(samedayZero,1);
     }
 
@@ -202,7 +204,7 @@ public class AverageAndGeneratingService {
                                 double time = DateUtils.hoursDiff2(samedayZero, currentDate);
                                 double minute = DateUtils.minutesDiff2(samedayZero, currentDate);
 
-                                List<PointData> ssglList = edosUtil.getHistoryDatasSnap(avePowerPoint, samedayZero.getTime()/1000, currentDate.getTime()/1000, null, 600l);
+                                List<PointData> ssglList = edosUtil.getHistoryDatasSnap(fjssgl, samedayZero.getTime()/1000, currentDate.getTime()/1000, null, 600l);
                                 int glSize = ssglList.size();
                                 long samedayZeroTime = samedayZero.getTime();
 
@@ -214,8 +216,13 @@ public class AverageAndGeneratingService {
                                 }
 
                             }
-                            PointData fdlpointData = createPointData(fjfdl, rfdlnew);
-//                            PointData fdlpointData = createPointData(fjfdl, rfdl);
+                            PointData fdlpointData = null;
+                            if (rfdl<0 || rfdl>modelpower.get(wt.getModelid())*24*1.5){
+                                fdlpointData = createPointData(fjfdl, rfdlnew);
+                            }else {
+                                fdlpointData = createPointData(fjfdl, rfdl);
+                            }
+
                             rfdlList.add(fdlpointData);
 
                             PointData yfdlpointData = createPointData(fjyfdl, yfdl);

+ 15 - 9
realtime/computing-services7002/src/main/java/com/gyee/generation/service/AverageAndGeneratingService.java

@@ -35,6 +35,7 @@ public class AverageAndGeneratingService {
     private Map<String, Map<String, Windpowerstationpointnew>> linepointmap;
     private Map<String, Map<String, Windpowerstationpointnew>> propointmap;
     private Map<String, Map<String, Windturbinetestingpointnew>> wtpAimap;
+    private Map<String, Double> modelpower;
     @Resource
     private IEdosUtil edosUtil;
     @Value("${typeOfElectric.direct}")
@@ -55,6 +56,7 @@ public class AverageAndGeneratingService {
         propointmap = CacheContext.propointmap;
         wtpAimap = CacheContext.wtpAimap;
         linewtmap = CacheContext.linewtmap;
+        modelpower = CacheContext.modelpower;
         tomorrow = DateUtils.addDays(samedayZero,1);
     }
 
@@ -202,7 +204,7 @@ public class AverageAndGeneratingService {
                                 double time = DateUtils.hoursDiff2(samedayZero, currentDate);
                                 double minute = DateUtils.minutesDiff2(samedayZero, currentDate);
 
-                                List<PointData> ssglList = edosUtil.getHistoryDatasSnap(avePowerPoint, samedayZero.getTime()/1000, currentDate.getTime()/1000, null, 600l);
+                                List<PointData> ssglList = edosUtil.getHistoryDatasSnap(fjssgl, samedayZero.getTime()/1000, currentDate.getTime()/1000, null, 600l);
                                 int glSize = ssglList.size();
                                 long samedayZeroTime = samedayZero.getTime();
 
@@ -214,8 +216,13 @@ public class AverageAndGeneratingService {
                                 }
 
                             }
-                            PointData fdlpointData = createPointData(fjfdl, rfdlnew);
-//                            PointData fdlpointData = createPointData(fjfdl, rfdl);
+                            PointData fdlpointData = null;
+                            if (rfdl<0 || rfdl>modelpower.get(wt.getModelid())*24*1.5){
+                                fdlpointData = createPointData(fjfdl, rfdlnew);
+                            }else {
+                                fdlpointData = createPointData(fjfdl, rfdl);
+                            }
+
                             rfdlList.add(fdlpointData);
 
                             PointData yfdlpointData = createPointData(fjyfdl, yfdl);
@@ -713,10 +720,9 @@ public class AverageAndGeneratingService {
                                 rfdlnew += hours*1/glSize*ssglList.get(i).getPointValueInDouble();
                             }
 
-                                PointData fdlpointData = createPointData(fjfdl, rfdlnew);
-                            fdlpointData.setPointTime(endOfDay.getTime());
+                            PointData fdlpointData = createPointData(fjfdl, rfdlnew);
 //                            PointData fdlpointData = createPointData(fjfdl, rfdl);
-                                rfdlList.add(fdlpointData);
+                            rfdlList.add(fdlpointData);
 
 
 
@@ -727,7 +733,7 @@ public class AverageAndGeneratingService {
                         double linefdl = rfdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
 
                         PointData fdlpoint = createWpPointData(linefdlpointnew, linefdl);
-                        fdlpoint.setPointTime(endOfDay.getTime());
+                        fdlpoint.setPointTime(endOfDay.getTime()/1000);
                         linefdlList.add(fdlpoint);
 
 
@@ -738,7 +744,7 @@ public class AverageAndGeneratingService {
 
                     Double prorfdl = linefdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
                     PointData fdlpoint = createWpPointData(fdlprojectpointnew, prorfdl);
-                    fdlpoint.setPointTime(endOfDay.getTime());
+                    fdlpoint.setPointTime(endOfDay.getTime()/1000);
                     projectfdlList.add(fdlpoint);
 
                     resultList.addAll(linefdlList);
@@ -753,7 +759,7 @@ public class AverageAndGeneratingService {
 
                 double fcrfdl = projectfdlList.stream().mapToDouble(PointData::getPointValueInDouble).sum();
                 PointData fdlpointData = createWpPointData(fdlwppointnew, fcrfdl);
-                fdlpointData.setPointTime(endOfDay.getTime());
+                fdlpointData.setPointTime(endOfDay.getTime()/1000);
                 resultList.add(fdlpointData);
 
                 try {

+ 10 - 3
realtime/computing-services7003/src/main/java/com/gyee/generation/service/AverageAndGeneratingService.java

@@ -35,6 +35,7 @@ public class AverageAndGeneratingService {
     private Map<String, Map<String, Windpowerstationpointnew>> linepointmap;
     private Map<String, Map<String, Windpowerstationpointnew>> propointmap;
     private Map<String, Map<String, Windturbinetestingpointnew>> wtpAimap;
+    private Map<String, Double> modelpower;
     @Resource
     private IEdosUtil edosUtil;
     @Value("${typeOfElectric.direct}")
@@ -55,6 +56,7 @@ public class AverageAndGeneratingService {
         propointmap = CacheContext.propointmap;
         wtpAimap = CacheContext.wtpAimap;
         linewtmap = CacheContext.linewtmap;
+        modelpower = CacheContext.modelpower;
         tomorrow = DateUtils.addDays(samedayZero,1);
     }
 
@@ -202,7 +204,7 @@ public class AverageAndGeneratingService {
                                 double time = DateUtils.hoursDiff2(samedayZero, currentDate);
                                 double minute = DateUtils.minutesDiff2(samedayZero, currentDate);
 
-                                List<PointData> ssglList = edosUtil.getHistoryDatasSnap(avePowerPoint, samedayZero.getTime()/1000, currentDate.getTime()/1000, null, 600l);
+                                List<PointData> ssglList = edosUtil.getHistoryDatasSnap(fjssgl, samedayZero.getTime()/1000, currentDate.getTime()/1000, null, 600l);
                                 int glSize = ssglList.size();
                                 long samedayZeroTime = samedayZero.getTime();
 
@@ -214,8 +216,13 @@ public class AverageAndGeneratingService {
                                 }
 
                             }
-                            PointData fdlpointData = createPointData(fjfdl, rfdlnew);
-//                            PointData fdlpointData = createPointData(fjfdl, rfdl);
+                            PointData fdlpointData = null;
+                            if (rfdl<0 || rfdl>modelpower.get(wt.getModelid())*24*1.5){
+                                fdlpointData = createPointData(fjfdl, rfdlnew);
+                            }else {
+                                fdlpointData = createPointData(fjfdl, rfdl);
+                            }
+
                             rfdlList.add(fdlpointData);
 
                             PointData yfdlpointData = createPointData(fjyfdl, yfdl);

+ 45 - 3
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbinegoodnessController.java

@@ -1,6 +1,9 @@
 package com.gyee.runeconomy.controller.goodness;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.vo.benchmark.WxsslVo;
+import com.gyee.common.vo.threerate.PvVo;
 import com.gyee.runeconomy.dto.R;
 import com.gyee.runeconomy.dto.ResultMsg;
 import com.gyee.runeconomy.init.CacheContext;
@@ -14,11 +17,10 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * 单机性能分析列表
@@ -109,4 +111,44 @@ public class WindturbinegoodnessController {
 
     }
 
+
+
+    @GetMapping("/pvgoodness")
+    @ResponseBody
+    @ApiOperation(value = "光伏性能分析", notes = "光伏性能分析")
+    public R pvgoodness(@RequestParam(value = "companys",required = true) String companys,
+                  @RequestParam(value = "wpid",required = true) String wpid,
+                    @RequestParam(value = "recorddate",required = true) String recorddate,
+                  @RequestParam(value = "target",required = true) String target,
+                  @RequestParam(value = "sort",required = true) String sort
+    ){
+        List<PvVo> resultList = windturbinegoodnessService.pvgoodness(companys,wpid,recorddate,target,sort);
+
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
+    @GetMapping("/pvgoodnesshis")
+    @ResponseBody
+    @ApiOperation(value = "光伏性能分析历史", notes = "光伏性能分析历史")
+    public R pvgoodness(
+                        @RequestParam(value = "wpid",required = true) String wpid,
+                        @RequestParam(value = "wtid",required = true) String wtid,
+                        @RequestParam(value = "beginDate",required = true) String beginDate,
+                        @RequestParam(value = "endDate",required = true) String endDate,
+                        @RequestParam(value = "target",required = true) String target,
+                        @RequestParam(value = "sort",required = true) String sort
+    ){
+        List<PvVo> resultList = windturbinegoodnessService.pvgoodnesshis(wpid,wtid,beginDate,endDate,target,sort);
+
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        } else {
+            return R.error(ResultMsg.error());
+        }
+    }
+
 }

+ 57 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/specific/SpecificController.java

@@ -280,6 +280,63 @@ public class SpecificController {
     }
 
     /**
+     * 查询系统效率
+     * @return
+     */
+    @GetMapping("/xtxlList")
+    @ResponseBody
+    @ApiOperation(value = "专题分析-系统效率", notes = "专题分析-系统效率")
+    public R xtxlList(@RequestParam(value = "companys",required = true) String companys,
+                       @RequestParam(value = "type",required = true) String type,
+                       @RequestParam(value = "year",required = true) String year) throws ParseException {
+
+        List<SpecificTarget> resultList = specificService.xtxlList(companys,type,year);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        }else{
+            return R.error(ResultMsg.error());
+        }
+    }
+
+    /**
+     * 查询离散率
+     * @return
+     */
+    @GetMapping("/lslList")
+    @ResponseBody
+    @ApiOperation(value = "专题分析-离散率", notes = "专题分析-离散率")
+    public R lslList(@RequestParam(value = "companys",required = true) String companys,
+                      @RequestParam(value = "type",required = true) String type,
+                      @RequestParam(value = "year",required = true) String year) throws ParseException {
+
+        List<SpecificTarget> resultList = specificService.lslList(companys,type,year);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        }else{
+            return R.error(ResultMsg.error());
+        }
+    }
+
+    /**
+     * 查询转换效率
+     * @return
+     */
+    @GetMapping("/zhxlList")
+    @ResponseBody
+    @ApiOperation(value = "专题分析-转换效率", notes = "专题分析-转换效率")
+    public R zhxlList(@RequestParam(value = "companys",required = true) String companys,
+                     @RequestParam(value = "type",required = true) String type,
+                     @RequestParam(value = "year",required = true) String year) throws ParseException {
+
+        List<SpecificTarget> resultList = specificService.zhxlList(companys,type,year);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.data(ResultMsg.ok(resultList));
+        }else{
+            return R.error(ResultMsg.error());
+        }
+    }
+
+    /**
      * 查询MTBF
      * @return
      */

+ 109 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/goodness/WindturbinegoodnessService.java

@@ -1,14 +1,20 @@
 package com.gyee.runeconomy.service.goodness;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gyee.common.contant.ContantXk;
 import com.gyee.common.model.PointData;
+import com.gyee.common.util.DoubleUtils;
+import com.gyee.common.util.SortUtils;
 import com.gyee.common.vo.benchmark.DataVo;
+import com.gyee.common.vo.benchmark.WxsslVo;
+import com.gyee.common.vo.threerate.PvVo;
 import com.gyee.runeconomy.dto.EchartDataVo;
 import com.gyee.runeconomy.init.CacheContext;
-import com.gyee.runeconomy.model.auto.ProBasicEquipmentPoint;
-import com.gyee.runeconomy.model.auto.ProEconWindturbineGoodness;
+import com.gyee.runeconomy.model.auto.*;
+import com.gyee.runeconomy.service.auto.IProEconEquipmentInfoDay5Service;
+import com.gyee.runeconomy.service.auto.IProEconEquipmentInfoDay6Service;
 import com.gyee.runeconomy.service.auto.IProEconWindturbineGoodnessService;
 import com.gyee.runeconomy.util.DateUtils;
 import com.gyee.runeconomy.util.StringUtils;
@@ -31,6 +37,8 @@ import java.util.*;
 public class WindturbinegoodnessService {
     @Resource
     private IProEconWindturbineGoodnessService proEconWindturbineGoodnessService;
+    @Resource
+    private IProEconEquipmentInfoDay6Service proEconEquipmentInfoDay6Service;
 
     @Resource
     private IEdosUtil edosUtil;
@@ -866,4 +874,103 @@ public class WindturbinegoodnessService {
 
         return vos;
     }
+
+    public List<PvVo> pvgoodness(String companys, String wpid, String recorddate, String target, String sort) {
+
+        Map<String, ProEconEquipmentmodel> modelMap = CacheContext.modelMap;
+        Map<String, ProBasicEquipment> wtmap = CacheContext.wtmap;
+        List<PvVo> resultList = new ArrayList<>();
+        LambdaQueryWrapper<ProEconEquipmentInfoDay6> qw = new LambdaQueryWrapper<>();
+
+        qw.eq(ProEconEquipmentInfoDay6::getRecordDate,DateUtils.parseDate(recorddate));
+
+        if (StringUtils.isNotEmpty(companys)){
+            if (companys.endsWith("ZGS")){
+                qw.eq(ProEconEquipmentInfoDay6::getCompanyId,companys);
+            }
+
+            if (companys.endsWith("RGN")){
+                qw.eq(ProEconEquipmentInfoDay6::getRegionId,companys);
+            }
+
+        }
+        if (StringUtils.isNotEmpty(wpid)){
+            qw.eq(ProEconEquipmentInfoDay6::getWindpowerstationId,wpid);
+        }
+        List<ProEconEquipmentInfoDay6> equipmentInfoDay6s = proEconEquipmentInfoDay6Service.list(qw);
+
+        equipmentInfoDay6s.stream().forEach(i->{
+            PvVo vo = new PvVo();
+            vo.setWtid(i.getWindturbineId());
+            vo.setWtname(wtmap.get(i.getWindturbineId()).getAname());
+            vo.setModel(modelMap.get(wtmap.get(i.getWindturbineId()).getModelId()).getAname());
+            vo.setRxtxl(DoubleUtils.keepPrecision(i.getRxtxl(),2));
+            vo.setRlsl(DoubleUtils.keepPrecision(i.getRlsl(),2));
+            vo.setRzhxl(DoubleUtils.keepPrecision(i.getRnbqzhxl(),2));
+
+            vo.setYxtxl(DoubleUtils.keepPrecision(i.getYxtxl(),2));
+            vo.setYlsl(DoubleUtils.keepPrecision(i.getYlsl(),2));
+            vo.setYzhxl(DoubleUtils.keepPrecision(i.getYnbqzhxl(),2));
+
+            vo.setNxtxl(DoubleUtils.keepPrecision(i.getNxtxl(),2));
+            vo.setNlsl(DoubleUtils.keepPrecision(i.getNlsl(),2));
+            vo.setNzhxl(DoubleUtils.keepPrecision(i.getNnbqzhxl(),2));
+            resultList.add(vo);
+        });
+
+        if (StringUtils.isNotEmpty(target)){
+            if (sort.equals("1"))
+                SortUtils.sort(resultList,target,SortUtils.ASC);
+            SortUtils.sort(resultList,target,SortUtils.DESC);
+        }
+
+        return resultList;
+    }
+
+    public List<PvVo> pvgoodnesshis(String wpid, String wtid, String beginDate, String endDate, String target, String sort) {
+        Map<String, ProEconEquipmentmodel> modelMap = CacheContext.modelMap;
+        Map<String, ProBasicEquipment> wtmap = CacheContext.wtmap;
+        List<PvVo> resultList = new ArrayList<>();
+        LambdaQueryWrapper<ProEconEquipmentInfoDay6> qw = new LambdaQueryWrapper<>();
+
+        qw.le(ProEconEquipmentInfoDay6::getRecordDate,DateUtils.parseDate(endDate));
+        qw.ge(ProEconEquipmentInfoDay6::getRecordDate,DateUtils.parseDate(beginDate));
+
+
+        if (StringUtils.isNotEmpty(wpid)){
+            qw.eq(ProEconEquipmentInfoDay6::getWindpowerstationId,wpid);
+        }
+        if (StringUtils.isNotEmpty(wtid)){
+            qw.eq(ProEconEquipmentInfoDay6::getWindturbineId,wtid);
+        }
+        List<ProEconEquipmentInfoDay6> equipmentInfoDay6s = proEconEquipmentInfoDay6Service.list(qw);
+
+        equipmentInfoDay6s.stream().forEach(i->{
+            PvVo vo = new PvVo();
+            vo.setWtid(i.getWindturbineId());
+            vo.setWtname(wtmap.get(i.getWindturbineId()).getAname());
+            vo.setDate(i.getRecordDate());
+            vo.setModel(modelMap.get(wtmap.get(i.getWindturbineId()).getModelId()).getAname());
+            vo.setRxtxl(DoubleUtils.keepPrecision(i.getRxtxl(),2));
+            vo.setRlsl(DoubleUtils.keepPrecision(i.getRlsl(),2));
+            vo.setRzhxl(DoubleUtils.keepPrecision(i.getRnbqzhxl(),2));
+
+            vo.setYxtxl(DoubleUtils.keepPrecision(i.getYxtxl(),2));
+            vo.setYlsl(DoubleUtils.keepPrecision(i.getYlsl(),2));
+            vo.setYzhxl(DoubleUtils.keepPrecision(i.getYnbqzhxl(),2));
+
+            vo.setNxtxl(DoubleUtils.keepPrecision(i.getNxtxl(),2));
+            vo.setNlsl(DoubleUtils.keepPrecision(i.getNlsl(),2));
+            vo.setNzhxl(DoubleUtils.keepPrecision(i.getNnbqzhxl(),2));
+            resultList.add(vo);
+        });
+
+        if (StringUtils.isNotEmpty(target)){
+            if (sort.equals("1"))
+                SortUtils.sort(resultList,target,SortUtils.ASC);
+            SortUtils.sort(resultList,target,SortUtils.DESC);
+        }
+
+        return resultList;
+    }
 }

+ 550 - 23
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/specific/SpecificService.java

@@ -10,13 +10,11 @@ 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;
-import com.gyee.runeconomy.model.auto.ProBasicPowerstation;
-import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay1;
-import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay4;
-import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay5;
+import com.gyee.runeconomy.model.auto.*;
 import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay1Service;
 import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay4Service;
 import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay5Service;
+import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay7Service;
 import com.gyee.runeconomy.service.bmk.BenchmarkingService;
 import org.springframework.stereotype.Service;
 
@@ -40,6 +38,8 @@ public class SpecificService {
     @Resource
     private IProEconPowerstationInfoDay5Service proEconPowerstationInfoDay5Service;
     @Resource
+    private IProEconPowerstationInfoDay7Service proEconPowerstationInfoDay7Service;
+    @Resource
     private BenchmarkingService benchmarkingService;
 
 
@@ -402,20 +402,29 @@ public class SpecificService {
         String year = String.valueOf(Integer.parseInt(yearString) - 1);
         String yearMonth = year+"-"+yearmonth.split("-")[1];
         QueryWrapper<ProEconPowerstationInfoDay4> qw = new QueryWrapper<>();
+        QueryWrapper<ProEconPowerstationInfoDay7> qw1 = new QueryWrapper<>();
 
-        qw.select("foreign_key_id,max(ymtbf) ymtbf,max(ymttr) ymttr,max(yfwjsl) yfwjsl,max(yztzhjsl) yztzhjsl,max(ygzxqjsl) ygzxqjsl");
+        qw.select("foreign_key_id,max(ymtbf) ymtbf,max(ymttr) ymttr,avg(rfwjsl) yfwjsl,avg(rztzhjsl) yztzhjsl,avg(rgzxqjsl) ygzxqjsl");
+        qw1.select("foreign_key_id,avg(rxtxlpr) yxtxlpr,avg(rlsl) ylsl,avg(rnbqzhxl) ynbqzhxl");
         qw.eq("location","wp");
+        qw1.eq("location","wp");
         if (type.endsWith("-1")){
             qw.like("foreign_key_id","_FDC_");
+            qw1.like("foreign_key_id","_FDC_");
         }else if (type.endsWith("-2")){
             qw.like("foreign_key_id","_GDC_");
+            qw1.like("foreign_key_id","_GDC_");
         }
         if (companys.endsWith("ZGS")){
             qw.in("foreign_key_id",CacheContext.wpls.stream().filter(wp->wp.getCompanyId().equals(companys)).map(wp->wp.getId()).collect(Collectors.toList()));
+            qw1.in("foreign_key_id",CacheContext.wpls.stream().filter(wp->wp.getCompanyId().equals(companys)).map(wp->wp.getId()).collect(Collectors.toList()));
         }
         qw.eq("to_char(record_date,'yyyy-MM')",yearMonth);
+        qw1.eq("to_char(record_date,'yyyy-MM')",yearMonth);
         qw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        qw1.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
         List<ProEconPowerstationInfoDay4> tqList = proEconPowerstationInfoDay4Service.list(qw);
+        List<ProEconPowerstationInfoDay7> tq1List = proEconPowerstationInfoDay7Service.list(qw1);
         if (StringUtils.isNotEmpty(tqList)){
             tqList.stream().forEach(i->{
                 Optional<SpecificCenterVo> optionMonth = monthresultList.stream().filter(j -> j.getWpid().equals(i.getWindpowerstationId())).findFirst();
@@ -423,9 +432,23 @@ public class SpecificService {
                 if (optionMonth.isPresent()){
                     leftVo.setTqmtbf(DoubleUtils.keepPrecision(i.getYmtbf().doubleValue(),2));
                     leftVo.setTqmttr(DoubleUtils.keepPrecision(i.getYmttr().doubleValue(),2));
-                    leftVo.setTqfwjsl(DoubleUtils.keepPrecision(i.getYfwjsl().doubleValue(),2));
-                    leftVo.setTqztzhl(DoubleUtils.keepPrecision(i.getYztzhjsl().doubleValue(),2));
-                    leftVo.setTqxqjsl(DoubleUtils.keepPrecision(i.getYgzxqjsl().doubleValue(),2));
+                    if (type.equals("-1")){
+                        leftVo.setTqfwjsl(DoubleUtils.keepPrecision(i.getYfwjsl().doubleValue(),2));
+                        leftVo.setTqztzhl(DoubleUtils.keepPrecision(i.getYztzhjsl().doubleValue(),2));
+                        leftVo.setTqxqjsl(DoubleUtils.keepPrecision(i.getYgzxqjsl().doubleValue(),2));
+                    }else if (type.equals("-2")){
+                        Optional<ProEconPowerstationInfoDay7> first = tq1List.stream().filter(d -> d.getForeignKeyId().equals(i.getForeignKeyId())).findFirst();
+                        if (first.isPresent()){
+                            ProEconPowerstationInfoDay7 proEconPowerstationInfoDay7 = first.get();
+                            leftVo.setFwjsl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getYxtxlpr().doubleValue(),2));
+                            leftVo.setZtzhl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getYlsl().doubleValue(),2));
+                            leftVo.setXqjsl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getYnbqzhxl().doubleValue(),2));
+                        }else {
+                            leftVo.setFwjsl(0.0);
+                            leftVo.setZtzhl(0.0);
+                            leftVo.setXqjsl(0.0);
+                        }
+                    }
                 }else{
                     leftVo.setTqmtbf(0.0);
                     leftVo.setTqmttr(0.0);
@@ -462,19 +485,28 @@ public class SpecificService {
         String yearString = yearmonth.split("-")[0];
         String year = String.valueOf(Integer.parseInt(yearString) - 1);
         QueryWrapper<ProEconPowerstationInfoDay4> qw = new QueryWrapper<>();
-        qw.select("foreign_key_id,max(nmtbf) nmtbf,max(nmttr) nmttr,max(nfwjsl) nfwjsl,max(nztzhjsl) nztzhjsl,max(ngzxqjsl) ngzxqjsl");
+        QueryWrapper<ProEconPowerstationInfoDay7> qw1 = new QueryWrapper<>();
+        qw.select("foreign_key_id,max(nmtbf) nmtbf,max(nmttr) nmttr,avg(rfwjsl) nfwjsl,avg(rztzhjsl) nztzhjsl,avg(rgzxqjsl) ngzxqjsl");
+        qw1.select("foreign_key_id,avg(rxtxlpr) nxtxlpr,avg(rlsl) nlsl,avg(rnbqzhxl) nnbqzhxl");
         qw.eq("location","wp");
+        qw1.eq("location","wp");
         if (type.endsWith("-1")){
             qw.like("foreign_key_id","_FDC_");
+            qw1.like("foreign_key_id","_FDC_");
         }else if (type.endsWith("-2")){
             qw.like("foreign_key_id","_GDC_");
+            qw1.like("foreign_key_id","_GDC_");
         }
         if (companys.endsWith("ZGS")){
             qw.in("foreign_key_id",CacheContext.wpls.stream().filter(wp->wp.getCompanyId().equals(companys)).map(wp->wp.getId()).collect(Collectors.toList()));
+            qw1.in("foreign_key_id",CacheContext.wpls.stream().filter(wp->wp.getCompanyId().equals(companys)).map(wp->wp.getId()).collect(Collectors.toList()));
         }
         qw.eq("to_char(record_date,'yyyy')",year);
+        qw1.eq("to_char(record_date,'yyyy')",year);
         qw.groupBy("to_char(record_date,'yyyy'),foreign_key_id");
+        qw1.groupBy("to_char(record_date,'yyyy'),foreign_key_id");
         List<ProEconPowerstationInfoDay4> tqList = proEconPowerstationInfoDay4Service.list(qw);
+        List<ProEconPowerstationInfoDay7> tq1List = proEconPowerstationInfoDay7Service.list(qw1);
         if (StringUtils.isNotEmpty(tqList)){
             tqList.stream().forEach(i->{
                 Optional<SpecificCenterVo> optionYear = yearresultList.stream().filter(j -> j.getWpid().equals(i.getWindpowerstationId())).findFirst();
@@ -482,9 +514,23 @@ public class SpecificService {
                     SpecificCenterVo rightVo = optionYear.get();
                     rightVo.setTqmtbf(DoubleUtils.keepPrecision(i.getNmtbf().doubleValue(),2));
                     rightVo.setTqmttr(DoubleUtils.keepPrecision(i.getNmttr().doubleValue(),2));
-                    rightVo.setTqfwjsl(DoubleUtils.keepPrecision(i.getNfwjsl().doubleValue(),2));
-                    rightVo.setTqztzhl(DoubleUtils.keepPrecision(i.getNztzhjsl().doubleValue(),2));
-                    rightVo.setTqxqjsl(DoubleUtils.keepPrecision(i.getNgzxqjsl().doubleValue(),2));
+                    if (type.equals("-1")){
+                        rightVo.setTqfwjsl(DoubleUtils.keepPrecision(i.getNfwjsl().doubleValue(),2));
+                        rightVo.setTqztzhl(DoubleUtils.keepPrecision(i.getNztzhjsl().doubleValue(),2));
+                        rightVo.setTqxqjsl(DoubleUtils.keepPrecision(i.getNgzxqjsl().doubleValue(),2));
+                    }else if (type.equals("-2")){
+                        Optional<ProEconPowerstationInfoDay7> first = tq1List.stream().filter(d -> d.getForeignKeyId().equals(i.getForeignKeyId())).findFirst();
+                        if (first.isPresent()){
+                            ProEconPowerstationInfoDay7 proEconPowerstationInfoDay7 = first.get();
+                            rightVo.setFwjsl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getNxtxlpr().doubleValue(),2));
+                            rightVo.setZtzhl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getNlsl().doubleValue(),2));
+                            rightVo.setXqjsl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getNnbqzhxl().doubleValue(),2));
+                        }else {
+                            rightVo.setFwjsl(0.0);
+                            rightVo.setZtzhl(0.0);
+                            rightVo.setXqjsl(0.0);
+                        }
+                    }
                 }
             });
         }else {
@@ -513,31 +559,53 @@ public class SpecificService {
      */
     private void setCenterDyInfo(String companys,String type,String yearmonth, List<SpecificCenterVo> monthresultList) {
         QueryWrapper<ProEconPowerstationInfoDay4> qw = new QueryWrapper<>();
-
-        qw.select("foreign_key_id,max(ymtbf) ymtbf,max(ymttr) ymttr,max(yfwjsl) yfwjsl,max(yztzhjsl) yztzhjsl,max(ygzxqjsl) ygzxqjsl");
+        QueryWrapper<ProEconPowerstationInfoDay7> qw1 = new QueryWrapper<>();
+        qw.select("foreign_key_id,max(ymtbf) ymtbf,max(ymttr) ymttr,avg(rfwjsl) yfwjsl,avg(rztzhjsl) yztzhjsl,avg(rgzxqjsl) ygzxqjsl");
+        qw1.select("foreign_key_id,avg(rxtxlpr) yxtxlpr,avg(rlsl) ylsl,avg(rnbqzhxl) ynbqzhxl");
         qw.eq("location","wp");
+        qw1.eq("location","wp");
         if (type.endsWith("-1")){
             qw.like("foreign_key_id","_FDC_");
+            qw1.like("foreign_key_id","_FDC_");
         }else if (type.endsWith("-2")){
             qw.like("foreign_key_id","_GDC_");
+            qw1.like("foreign_key_id","_GDC_");
         }
 
         if (companys.endsWith("ZGS")){
-            List<String> collect = CacheContext.wpls.stream().filter(wp -> wp.getCompanyId().equals(companys)).map(wp -> wp.getId()).collect(Collectors.toList());
             qw.in("foreign_key_id",CacheContext.wpls.stream().filter(wp -> wp.getCompanyId().equals(companys)).map(wp -> wp.getId()).collect(Collectors.toList()));
+            qw1.in("foreign_key_id",CacheContext.wpls.stream().filter(wp -> wp.getCompanyId().equals(companys)).map(wp -> wp.getId()).collect(Collectors.toList()));
         }
         qw.eq("to_char(record_date,'yyyy-MM')",yearmonth);
+        qw1.eq("to_char(record_date,'yyyy-MM')",yearmonth);
         qw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        qw1.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
         List<ProEconPowerstationInfoDay4> dyList = proEconPowerstationInfoDay4Service.list(qw);
+        List<ProEconPowerstationInfoDay7> dy1List = proEconPowerstationInfoDay7Service.list(qw1);
         if (StringUtils.isNotEmpty(dyList)){
             dyList.stream().forEach(i->{
                 SpecificCenterVo leftVo = new SpecificCenterVo();
                 leftVo.setWpid(i.getForeignKeyId());
                 leftVo.setMtbf(DoubleUtils.keepPrecision(i.getYmtbf().doubleValue(),2));
                 leftVo.setMttr(DoubleUtils.keepPrecision(i.getYmttr().doubleValue(),2));
-                leftVo.setFwjsl(DoubleUtils.keepPrecision(i.getYfwjsl().doubleValue(),2));
-                leftVo.setZtzhl(DoubleUtils.keepPrecision(i.getYztzhjsl().doubleValue(),2));
-                leftVo.setXqjsl(DoubleUtils.keepPrecision(i.getYgzxqjsl().doubleValue(),2));
+                if (type.equals("-1")){
+                    leftVo.setFwjsl(DoubleUtils.keepPrecision(i.getYfwjsl().doubleValue(),2));
+                    leftVo.setZtzhl(DoubleUtils.keepPrecision(i.getYztzhjsl().doubleValue(),2));
+                    leftVo.setXqjsl(DoubleUtils.keepPrecision(i.getYgzxqjsl().doubleValue(),2));
+                }else if (type.equals("-2")){
+                    Optional<ProEconPowerstationInfoDay7> first = dy1List.stream().filter(d -> d.getForeignKeyId().equals(i.getForeignKeyId())).findFirst();
+                    if (first.isPresent()){
+                        ProEconPowerstationInfoDay7 proEconPowerstationInfoDay7 = first.get();
+                        leftVo.setFwjsl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getYxtxlpr().doubleValue(),2));
+                        leftVo.setZtzhl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getYlsl().doubleValue(),2));
+                        leftVo.setXqjsl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getYnbqzhxl().doubleValue(),2));
+                    }else {
+                        leftVo.setFwjsl(0.0);
+                        leftVo.setZtzhl(0.0);
+                        leftVo.setXqjsl(0.0);
+                    }
+                }
+
                 monthresultList.add(leftVo);
             });
         }else {
@@ -565,29 +633,51 @@ public class SpecificService {
 
 
         QueryWrapper<ProEconPowerstationInfoDay4> qw = new QueryWrapper<>();
-
-        qw.select("foreign_key_id,max(nmtbf) nmtbf,max(nmttr) nmttr,max(nfwjsl) nfwjsl,max(nztzhjsl) nztzhjsl,max(ngzxqjsl) ngzxqjsl");
+        QueryWrapper<ProEconPowerstationInfoDay7> qw1 = new QueryWrapper<>();
+        qw.select("foreign_key_id,max(nmtbf) nmtbf,max(nmttr) nmttr,avg(rfwjsl) nfwjsl,avg(rztzhjsl) nztzhjsl,avg(rgzxqjsl) ngzxqjsl");
+        qw1.select("foreign_key_id,avg(rxtxlpr) nxtxlpr,avg(rlsl) nlsl,avg(rnbqzhxl) nnbqzhxl");
         qw.eq("location","wp");
+        qw1.eq("location","wp");
         if (type.endsWith("-1")){
             qw.like("foreign_key_id","_FDC_");
+            qw1.like("foreign_key_id","_FDC_");
         }else if (type.endsWith("-2")){
             qw.like("foreign_key_id","_GDC_");
+            qw1.like("foreign_key_id","_GDC_");
         }
         if (companys.endsWith("ZGS")){
             qw.in("foreign_key_id",CacheContext.wpls.stream().filter(wp->wp.getCompanyId().equals(companys)).map(wp->wp.getId()).collect(Collectors.toList()));
+            qw1.in("foreign_key_id",CacheContext.wpls.stream().filter(wp->wp.getCompanyId().equals(companys)).map(wp->wp.getId()).collect(Collectors.toList()));
         }
         qw.eq("to_char(record_date,'yyyy')",yearmonth.split("-")[0]);
+        qw1.eq("to_char(record_date,'yyyy')",yearmonth.split("-")[0]);
         qw.groupBy("to_char(record_date,'yyyy'),foreign_key_id");
+        qw1.groupBy("to_char(record_date,'yyyy'),foreign_key_id");
         List<ProEconPowerstationInfoDay4> dyList = proEconPowerstationInfoDay4Service.list(qw);
+        List<ProEconPowerstationInfoDay7> dy1List = proEconPowerstationInfoDay7Service.list(qw1);
         if (StringUtils.isNotEmpty(dyList)){
             dyList.stream().forEach(i->{
                 SpecificCenterVo rightVo = new SpecificCenterVo();
                 rightVo.setWpid(i.getForeignKeyId());
                 rightVo.setMtbf(DoubleUtils.keepPrecision(i.getNmtbf().doubleValue(),2));
                 rightVo.setMttr(DoubleUtils.keepPrecision(i.getNmttr().doubleValue(),2));
-                rightVo.setFwjsl(DoubleUtils.keepPrecision(i.getNfwjsl().doubleValue(),2));
-                rightVo.setZtzhl(DoubleUtils.keepPrecision(i.getNztzhjsl().doubleValue(),2));
-                rightVo.setXqjsl(DoubleUtils.keepPrecision(i.getNgzxqjsl().doubleValue(),2));
+                if (type.equals("-1")){
+                    rightVo.setFwjsl(DoubleUtils.keepPrecision(i.getNfwjsl().doubleValue(),2));
+                    rightVo.setZtzhl(DoubleUtils.keepPrecision(i.getNztzhjsl().doubleValue(),2));
+                    rightVo.setXqjsl(DoubleUtils.keepPrecision(i.getNgzxqjsl().doubleValue(),2));
+                }else if (type.equals("-2")){
+                    Optional<ProEconPowerstationInfoDay7> first = dy1List.stream().filter(d -> d.getForeignKeyId().equals(i.getForeignKeyId())).findFirst();
+                    if (first.isPresent()){
+                        ProEconPowerstationInfoDay7 proEconPowerstationInfoDay7 = first.get();
+                        rightVo.setFwjsl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getNxtxlpr().doubleValue(),2));
+                        rightVo.setZtzhl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getNlsl().doubleValue(),2));
+                        rightVo.setXqjsl(DoubleUtils.keepPrecision(proEconPowerstationInfoDay7.getNnbqzhxl().doubleValue(),2));
+                    }else {
+                        rightVo.setFwjsl(0.0);
+                        rightVo.setZtzhl(0.0);
+                        rightVo.setXqjsl(0.0);
+                    }
+                }
                 yearresultList.add(rightVo);
             });
         }else {
@@ -2517,4 +2607,441 @@ public class SpecificService {
     }
 
 
+    public List<SpecificTarget> xtxlList(String companys, String type, String year) {
+        //获取年份所有当月的数据
+        QueryWrapper<ProEconPowerstationInfoDay7> currentqw = new QueryWrapper<>();
+        currentqw.select("foreign_key_id,max(record_date) record_date,avg(yxtxlpr) yxtxlpr");
+        currentqw.eq("location","wp");
+        currentqw.eq("to_char(record_date,'yyyy')",year);
+        if (type.equals("-1")){
+            currentqw.like("foreign_key_id","_FDC_");
+        }else {
+            currentqw.like("foreign_key_id","_GDC_");
+        }
+        if (companys.endsWith("ZGS")){
+            currentqw.eq("company_id",companys);
+        }else {
+            currentqw.eq("region_id",companys);
+        }
+        currentqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        List<ProEconPowerstationInfoDay7> currentList = proEconPowerstationInfoDay7Service.list(currentqw);
+        currentqw.clear();
+        currentqw.select("foreign_key_id,max(record_date) record_date,avg(yxtxlpr) yxtxlpr");
+        currentqw.eq("foreign_key_id",companys+type);
+        currentqw.eq("to_char(record_date,'yyyy')",year);
+        currentqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        currentList.addAll(proEconPowerstationInfoDay7Service.list(currentqw));
+
+        int subYear = Integer.parseInt(year) - 1;
+        QueryWrapper<ProEconPowerstationInfoDay7> sameperiodqw = new QueryWrapper<>();
+        sameperiodqw.select("foreign_key_id,max(record_date) record_date,avg(yxtxlpr) yxtxlpr");
+        sameperiodqw.eq("location","wp");
+        if (type.equals("-1")){
+            currentqw.like("foreign_key_id","_FDC_");
+        }else {
+            currentqw.like("foreign_key_id","_GDC_");
+        }
+        if (companys.endsWith("ZGS")){
+            currentqw.eq("company_id",companys);
+        }else {
+            currentqw.eq("region_id",companys);
+        }
+        sameperiodqw.eq("to_char(record_date,'yyyy')",String.valueOf(subYear));
+        sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        List<ProEconPowerstationInfoDay7> sameperiodList = proEconPowerstationInfoDay7Service.list(sameperiodqw);
+        sameperiodqw.clear();
+        sameperiodqw.select("foreign_key_id,max(record_date) record_date,avg(yxtxlpr) yxtxlpr");
+        sameperiodqw.eq("foreign_key_id",companys+type);
+        sameperiodqw.eq("to_char(record_date,'yyyy')",String.valueOf(subYear));
+        sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        sameperiodList.addAll(proEconPowerstationInfoDay7Service.list(sameperiodqw));
+
+        //合并当月与同期数据为返回结果
+        List<SpecificTargetVo> resultList = new ArrayList<>();
+
+        currentList.stream().forEach(i->{
+            SpecificTargetVo vo = new SpecificTargetVo();
+            String wpid = i.getForeignKeyId();
+            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());
+            }
+            vo.setYear(DateUtils.getYear(i.getRecordDate()));
+            vo.setMonth(DateUtils.getMonth(i.getRecordDate()));
+            vo.setCurrent(DoubleUtils.keepPrecision(i.getYxtxlpr().doubleValue(),2));
+            resultList.add(vo);
+        });
+        resultList.stream().forEach(i->{
+            Optional<ProEconPowerstationInfoDay7> optional = sameperiodList.stream()
+                    .filter(j -> j.getForeignKeyId().equals(i.getWpid()) && String.valueOf(DateUtils.getMonth(j.getRecordDate())).equals(i.getMonth()))
+                    .findFirst();
+            if (optional.isPresent()){
+                ProEconPowerstationInfoDay7 tqinfoday = optional.get();
+                i.setSameperiod(DoubleUtils.keepPrecision(tqinfoday.getYxtxlpr().doubleValue(),2));
+                i.setCompare(i.getCurrent().compareTo(i.getSameperiod()));
+            }else {
+                i.setSameperiod(0.0);
+                i.setCompare(0);
+            }
+        });
+        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);
+                int orderNum = 100;
+                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());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
+                }
+                vo.setOrderNum(orderNum);
+                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);
+            });
+        }
+        SortUtils.sort(resultendList,"orderNum",SortUtils.ASC);
+
+        return resultendList;
+    }
+
+    public List<SpecificTarget> lslList(String companys, String type, String year) {
+        //获取年份所有当月的数据
+        QueryWrapper<ProEconPowerstationInfoDay7> currentqw = new QueryWrapper<>();
+        currentqw.select("foreign_key_id,max(record_date) record_date,avg(ylsl) ylsl");
+        currentqw.eq("location","wp");
+        currentqw.eq("to_char(record_date,'yyyy')",year);
+        if (type.equals("-1")){
+            currentqw.like("foreign_key_id","_FDC_");
+        }else {
+            currentqw.like("foreign_key_id","_GDC_");
+        }
+        if (companys.endsWith("ZGS")){
+            currentqw.eq("company_id",companys);
+        }else {
+            currentqw.eq("region_id",companys);
+        }
+        currentqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        List<ProEconPowerstationInfoDay7> currentList = proEconPowerstationInfoDay7Service.list(currentqw);
+        currentqw.clear();
+        currentqw.select("foreign_key_id,max(record_date) record_date,avg(ylsl) ylsl");
+        currentqw.eq("foreign_key_id",companys+type);
+        currentqw.eq("to_char(record_date,'yyyy')",year);
+        currentqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        currentList.addAll(proEconPowerstationInfoDay7Service.list(currentqw));
+
+        int subYear = Integer.parseInt(year) - 1;
+        QueryWrapper<ProEconPowerstationInfoDay7> sameperiodqw = new QueryWrapper<>();
+        sameperiodqw.select("foreign_key_id,max(record_date) record_date,avg(ylsl) ylsl");
+        sameperiodqw.eq("location","wp");
+        if (type.equals("-1")){
+            currentqw.like("foreign_key_id","_FDC_");
+        }else {
+            currentqw.like("foreign_key_id","_GDC_");
+        }
+        if (companys.endsWith("ZGS")){
+            currentqw.eq("company_id",companys);
+        }else {
+            currentqw.eq("region_id",companys);
+        }
+        sameperiodqw.eq("to_char(record_date,'yyyy')",String.valueOf(subYear));
+        sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        List<ProEconPowerstationInfoDay7> sameperiodList = proEconPowerstationInfoDay7Service.list(sameperiodqw);
+        sameperiodqw.clear();
+        sameperiodqw.select("foreign_key_id,max(record_date) record_date,avg(ylsl) ylsl");
+        sameperiodqw.eq("foreign_key_id",companys+type);
+        sameperiodqw.eq("to_char(record_date,'yyyy')",String.valueOf(subYear));
+        sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        sameperiodList.addAll(proEconPowerstationInfoDay7Service.list(sameperiodqw));
+
+        //合并当月与同期数据为返回结果
+        List<SpecificTargetVo> resultList = new ArrayList<>();
+
+        currentList.stream().forEach(i->{
+            SpecificTargetVo vo = new SpecificTargetVo();
+            String wpid = i.getForeignKeyId();
+            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());
+            }
+            vo.setYear(DateUtils.getYear(i.getRecordDate()));
+            vo.setMonth(DateUtils.getMonth(i.getRecordDate()));
+            vo.setCurrent(DoubleUtils.keepPrecision(i.getYxtxlpr().doubleValue(),2));
+            resultList.add(vo);
+        });
+        resultList.stream().forEach(i->{
+            Optional<ProEconPowerstationInfoDay7> optional = sameperiodList.stream()
+                    .filter(j -> j.getForeignKeyId().equals(i.getWpid()) && String.valueOf(DateUtils.getMonth(j.getRecordDate())).equals(i.getMonth()))
+                    .findFirst();
+            if (optional.isPresent()){
+                ProEconPowerstationInfoDay7 tqinfoday = optional.get();
+                i.setSameperiod(DoubleUtils.keepPrecision(tqinfoday.getYxtxlpr().doubleValue(),2));
+                i.setCompare(i.getCurrent().compareTo(i.getSameperiod()));
+            }else {
+                i.setSameperiod(0.0);
+                i.setCompare(0);
+            }
+        });
+        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);
+                int orderNum = 100;
+                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());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
+                }
+                vo.setOrderNum(orderNum);
+                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);
+            });
+        }
+        SortUtils.sort(resultendList,"orderNum",SortUtils.ASC);
+
+        return resultendList;
+    }
+
+    public List<SpecificTarget> zhxlList(String companys, String type, String year) {
+        //获取年份所有当月的数据
+        QueryWrapper<ProEconPowerstationInfoDay7> currentqw = new QueryWrapper<>();
+        currentqw.select("foreign_key_id,max(record_date) record_date,avg(ynbqzhxl) ynbqzhxl");
+        currentqw.eq("location","wp");
+        currentqw.eq("to_char(record_date,'yyyy')",year);
+        if (type.equals("-1")){
+            currentqw.like("foreign_key_id","_FDC_");
+        }else {
+            currentqw.like("foreign_key_id","_GDC_");
+        }
+        if (companys.endsWith("ZGS")){
+            currentqw.eq("company_id",companys);
+        }else {
+            currentqw.eq("region_id",companys);
+        }
+        currentqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        List<ProEconPowerstationInfoDay7> currentList = proEconPowerstationInfoDay7Service.list(currentqw);
+        currentqw.clear();
+        currentqw.select("foreign_key_id,max(record_date) record_date,avg(ynbqzhxl) ynbqzhxl");
+        currentqw.eq("foreign_key_id",companys+type);
+        currentqw.eq("to_char(record_date,'yyyy')",year);
+        currentqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        currentList.addAll(proEconPowerstationInfoDay7Service.list(currentqw));
+
+        int subYear = Integer.parseInt(year) - 1;
+        QueryWrapper<ProEconPowerstationInfoDay7> sameperiodqw = new QueryWrapper<>();
+        sameperiodqw.select("foreign_key_id,max(record_date) record_date,avg(ynbqzhxl) ynbqzhxl");
+        sameperiodqw.eq("location","wp");
+        if (type.equals("-1")){
+            currentqw.like("foreign_key_id","_FDC_");
+        }else {
+            currentqw.like("foreign_key_id","_GDC_");
+        }
+        if (companys.endsWith("ZGS")){
+            currentqw.eq("company_id",companys);
+        }else {
+            currentqw.eq("region_id",companys);
+        }
+        sameperiodqw.eq("to_char(record_date,'yyyy')",String.valueOf(subYear));
+        sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        List<ProEconPowerstationInfoDay7> sameperiodList = proEconPowerstationInfoDay7Service.list(sameperiodqw);
+        sameperiodqw.clear();
+        sameperiodqw.select("foreign_key_id,max(record_date) record_date,avg(ynbqzhxl) ynbqzhxl");
+        sameperiodqw.eq("foreign_key_id",companys+type);
+        sameperiodqw.eq("to_char(record_date,'yyyy')",String.valueOf(subYear));
+        sameperiodqw.groupBy("to_char(record_date,'yyyy-MM'),foreign_key_id");
+        sameperiodList.addAll(proEconPowerstationInfoDay7Service.list(sameperiodqw));
+
+        //合并当月与同期数据为返回结果
+        List<SpecificTargetVo> resultList = new ArrayList<>();
+
+        currentList.stream().forEach(i->{
+            SpecificTargetVo vo = new SpecificTargetVo();
+            String wpid = i.getForeignKeyId();
+            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());
+            }
+            vo.setYear(DateUtils.getYear(i.getRecordDate()));
+            vo.setMonth(DateUtils.getMonth(i.getRecordDate()));
+            vo.setCurrent(DoubleUtils.keepPrecision(i.getYxtxlpr().doubleValue(),2));
+            resultList.add(vo);
+        });
+        resultList.stream().forEach(i->{
+            Optional<ProEconPowerstationInfoDay7> optional = sameperiodList.stream()
+                    .filter(j -> j.getForeignKeyId().equals(i.getWpid()) && String.valueOf(DateUtils.getMonth(j.getRecordDate())).equals(i.getMonth()))
+                    .findFirst();
+            if (optional.isPresent()){
+                ProEconPowerstationInfoDay7 tqinfoday = optional.get();
+                i.setSameperiod(DoubleUtils.keepPrecision(tqinfoday.getYxtxlpr().doubleValue(),2));
+                i.setCompare(i.getCurrent().compareTo(i.getSameperiod()));
+            }else {
+                i.setSameperiod(0.0);
+                i.setCompare(0);
+            }
+        });
+        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);
+                int orderNum = 100;
+                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());
+                    orderNum = CacheContext.wpmap.get(wpid).getOrderNum();
+                }
+                vo.setOrderNum(orderNum);
+                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);
+            });
+        }
+        SortUtils.sort(resultendList,"orderNum",SortUtils.ASC);
+
+        return resultendList;
+    }
 }