فهرست منبع

24小时功率曲线修改时间取值,调整计划电量代码

wangb@gyee-china.com 1 سال پیش
والد
کامیت
0da143aacd

+ 14 - 0
common/src/main/java/com/gyee/common/util/DateUtils.java

@@ -1018,6 +1018,20 @@ public class DateUtils  {
         calendar.set(Calendar.MILLISECOND,0);
         return calendar.getTime();
     }
+
+    /**
+     * 获取前一天23点59分59秒
+     * @return
+     */
+    public static Date geteleven() {
+        Calendar calendar = Calendar.getInstance();
+        calendar.add(Calendar.DAY_OF_MONTH, -1);
+        calendar.set(Calendar.HOUR_OF_DAY, 23);
+        calendar.set(Calendar.MINUTE, 59);
+        calendar.set(Calendar.SECOND, 59);
+        calendar.set(Calendar.MILLISECOND, 0);
+        return calendar.getTime();
+    }
     public static Date getSamedayZero(String date){
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(parseDate(date));

+ 11 - 5
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/monitor/MonitorController.java

@@ -4,9 +4,7 @@ import com.gyee.runeconomy.dto.AjaxResult;
 import com.gyee.runeconomy.dto.DataVo;
 import com.gyee.runeconomy.dto.PowercurveVo;
 import com.gyee.runeconomy.dto.ProjectplanVo;
-import com.gyee.runeconomy.service.monitor.GroupRealtimeService;
-import com.gyee.runeconomy.service.monitor.MonitorService;
-import com.gyee.runeconomy.service.monitor.ProjectPlanService;
+import com.gyee.runeconomy.service.monitor.*;
 import com.gyee.runeconomy.util.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -18,6 +16,7 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 
+import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -39,6 +38,13 @@ public class MonitorController {
 
     @Autowired
     private GroupRealtimeService groupRealtimeService;
+
+    @Resource
+    private HourpowerService hourpowerService;
+
+    @Resource
+    private MonitorprojectplanService monitorprojectplanService;
+
     @GetMapping("/monitor")
     @ResponseBody
     @ApiOperation(value = "首页", notes = "首页")
@@ -68,7 +74,7 @@ public class MonitorController {
 
         List<PowercurveVo> resultList = new ArrayList<>();
         if (StringUtils.notEmp(wpId)) {
-            resultList = monitorService.Powercurve24(wpId);
+            resultList = hourpowerService.Powercurve24(wpId);
         }
 
         if (null != resultList) {
@@ -155,7 +161,7 @@ public class MonitorController {
 
         Map<String, String> map = new HashMap<>();
         if (!wpId.isEmpty()) {
-            map = monitorService.plan(wpId);
+            map = monitorprojectplanService.plan(wpId);
         }
         if (null != map) {
             return AjaxResult.successData(200, map);

+ 266 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/HourpowerService.java

@@ -0,0 +1,266 @@
+package com.gyee.runeconomy.service.monitor;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.common.contant.ContantXk;
+import com.gyee.common.model.PointData;
+import com.gyee.common.util.DateUtils;
+import com.gyee.runeconomy.dto.PowercurveVo;
+import com.gyee.runeconomy.init.CacheContext;
+import com.gyee.runeconomy.model.auto.ProBasicPowerPoint;
+import com.gyee.runeconomy.model.auto.ProBasicPowerstationPoint;
+import com.gyee.runeconomy.model.auto.ProBasicProject;
+import com.gyee.runeconomy.service.TokenService;
+import com.gyee.runeconomy.service.auto.*;
+import com.gyee.runeconomy.util.MathUtil;
+import com.gyee.runeconomy.util.StringUtils;
+import com.gyee.runeconomy.util.realtimesource.IEdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+public class HourpowerService {
+
+    @Resource
+    private IProBasicProjectPlanService proBasicProjectPlanService;
+    @Resource
+    private IProBasicPowerstationPointService proBasicPowerstationPointService;
+    @Resource
+    private IProBasicEquipmentPointService proBasicEquipmentPointService;
+    @Resource
+    private IProBasicCompanyService proBasicCompanyService;
+    @Resource
+    private IProEconTargetdataService proEconTargetdataService;
+    @Resource
+    private IProEconTargetdataFristService proEconTargetdataFristService;
+
+    @Resource
+    private IProBasicPowerPointService powerPointService;
+
+    @Resource
+    private IProEconPowerstationInfoDay5Service proEconPowerstationInfoDay5Service;
+
+    private final String QS = "0";
+    private final String FD = "-1";
+    private final String GF = "-2";
+
+    @Resource
+    private IEdosUtil edosUtil;
+    Map<String, Object> map = new HashMap<>();
+    @Resource
+    private TokenService tokenService;
+
+    //24小时功率曲线
+    public List<PowercurveVo> Powercurve24(String wpId) throws Exception {
+
+        Date beginDate = DateUtils.geteleven();   //当日零点前一刻
+        Date endDate = DateUtils.getCurrentDate();   //当前时间
+
+
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(new Date()); // 设置时间为当前时间
+        calendar.add(Calendar.DAY_OF_YEAR, 1); // 将日期加一天
+
+        // 设置时、分、秒、毫秒为0,即获取当天后一天的0点时间值
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        calendar.set(Calendar.MILLISECOND, 0);
+
+        Date nextDayZeroTime = calendar.getTime();
+
+        int day = DateUtils.getCurrentHour();//4
+
+        List<PowercurveVo> vos = new ArrayList<PowercurveVo>();
+        List<PowercurveVo> vos1 = new ArrayList<PowercurveVo>();
+        for (int i = 0; i < 24; i++) {
+            PowercurveVo vo = new PowercurveVo();
+//            vo.setLlgl(0.0); //理论功率
+//            vo.setSjgl(0.0); //实际功率
+//            vo.setSsfs(0.0); //实时风速
+            vo.setBzgl(0.0); //保证功率
+            vo.setHours(i);  //时间戳
+            vo.setName(wpId);
+            vos.add(vo);
+        }
+        for (int i = 0; i < 24; i++) {
+            PowercurveVo vo1 = new PowercurveVo();
+//            vo.setLlgl(0.0); //理论功率
+//            vo.setSjgl(0.0); //实际功率
+//            vo.setSsfs(0.0); //实时风速
+            vo1.setBzgl(0.0); //保证功率
+            vo1.setHours(i);  //时间戳
+            vo1.setName(wpId);
+            vos1.add(vo1);
+        }
+
+        List<ProBasicProject> pjlist = new ArrayList<>();
+
+        for (ProBasicProject pj : CacheContext.pjls) {
+            if (wpId.equals(pj.getWindpowerstationId())) {
+                pjlist.add(pj);
+            }
+        }
+
+
+        ProBasicPowerstationPoint llgl = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZLLGL);
+        ProBasicPowerstationPoint sjgl = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZGL);
+
+        QueryWrapper<ProBasicPowerPoint> qw = new QueryWrapper<>();
+        List<ProBasicPowerPoint> powerls = new ArrayList<>();
+        List<ProBasicPowerPoint> qyls = null;
+        powerls = powerPointService.getBaseMapper().selectList(qw);
+
+        List<ProBasicPowerPoint> sxfd = powerls.stream().filter(i -> i.getTypeId().equals("SXJ_RGN-1")).collect(Collectors.toList());
+        List<ProBasicPowerPoint> sxgf = powerls.stream().filter(i -> i.getTypeId().equals("SXJ_RGN-2")).collect(Collectors.toList());
+
+        if (wpId.equals("SXJ_RGN0")){
+            qyls = powerls;
+        }else if (wpId.equals("SXJ_RGN-1")){
+            qyls = sxfd;
+        }else if (wpId.equals("SXJ_RGN-2")){
+            qyls = sxgf;
+        }
+        if (wpId.contains("SXJ_RGN")) {
+
+            List<List<PowercurveVo>> ls = new ArrayList<>();
+            for (ProBasicPowerPoint pp : qyls) {
+                if (pp.getWindpowerstationId().contains("MLJ_FDC_STA"))continue;
+                ProBasicPowerstationPoint ycgl = proBasicPowerstationPointService.getPowerstationPoint(pp.getWindpowerstationId(), ContantXk.GLYC);
+                List<PointData> ycglls = edosUtil.getHistoryDatasSnap(ycgl, beginDate.getTime() / 1000, nextDayZeroTime.getTime() / 1000, null, 3600L);
+                vos = new ArrayList<>();
+                double temp1 = 0;
+                for (int i = 0; i < ycglls.size(); i++) {
+//                    PointData po =new PointData();
+//                    po.setPointTime(ycglls.get(i).getPointTime()*1000);
+                    temp1 = ycglls.get(i).getPointValueInDouble();
+                    PowercurveVo vo = new PowercurveVo();
+                    vo.setHours(i);
+                    vo.setBzgl(StringUtils.round(temp1, 2));
+                    vos.add(vo);
+                }
+                ls.add(vos);
+            }
+
+            List<PowercurveVo> voList = ls.get(0);
+            for (int i = 1; i < ls.size(); i++) {
+                for (int j = 0; j < voList.size(); j++) {
+                    if (i < ls.size() && j < ls.get(i).size()) {
+                        voList.get(j).setBzgl(voList.get(j).getBzgl() + ls.get(i).get(j).getBzgl());
+                    }
+                }
+            }
+
+
+            double temp5 =0;
+            for (int i = 0; i < voList.size(); i++) {
+                temp5 = voList.get(i).getBzgl();
+                if (i < vos.size()) {
+                    vos.get(i).setBzgl(StringUtils.round(temp5, 2));
+                }
+            }
+
+            List<PointData> llglls = edosUtil.getHistoryDatasSnap(llgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600L);
+            double temp2 = 0;
+            for (int i = 0; i < llglls.size(); i++) {
+                temp2 = llglls.get(i).getPointValueInDouble();
+                if (i < vos.size()) {
+                    vos.get(i).setLlgl(StringUtils.round(temp2 / 1000, 2));
+                }
+            }
+
+
+            List<PointData> sjglls = edosUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600L);
+            double temp4 = 0;
+            for (int i = 0; i < sjglls.size(); i++) {
+                temp4 = sjglls.get(i).getPointValueInDouble();
+                if (i < vos.size()) {
+                    vos.get(i).setSjgl(StringUtils.round(temp4 / 1000, 2));
+                }
+
+            }
+
+        }
+
+        if (!wpId.contains("SXJ_RGN")) {
+            //单场请求特殊场站进行处理
+            if (wpId.contains("GJY") || wpId.contains("PTZ") || wpId.contains("NJL") || wpId.contains("TZ_GDC_STA") || wpId.contains("SY_GDC_STA")) {
+                Map<String, Object> map1 = new HashMap<>();
+
+                for (ProBasicProject pj : pjlist) {
+                    if (pj.getId().contains("GJYF02") || pj.getId().contains("TZG02") || pj.getId().contains("TZG03") || pj.getId().contains("TZG04"))
+                        continue;
+                    ProBasicPowerstationPoint bzgl = proBasicPowerstationPointService.getPowerstationPoint(pj.getId(), ContantXk.GLYC);
+                    List<PointData> bzglls = edosUtil.getHistoryDatasSnap(bzgl, beginDate.getTime() / 1000, nextDayZeroTime.getTime() / 1000, null, 3600L);
+                    if (bzglls != null && !bzglls.isEmpty() && bzglls.get(0).getPointName() != null) {
+                        double temp1 = 0;
+                        for (int i = 0; i < bzglls.size(); i++) {
+
+                            temp1 = bzglls.get(i).getPointValueInDouble();
+                            if (!pj.getId().contains("01")) {
+                                if (i < vos.size()) {
+                                    vos.get(i).setBzgl(StringUtils.round(temp1, 2));
+                                }
+                            } else {
+                                if (i < vos.size()) {
+                                    vos1.get(i).setBzgl(StringUtils.round(temp1, 2));
+                                }
+                            }
+                        }
+
+                    }
+                    if (map1.containsKey(wpId)) {
+                        List<PowercurveVo> previousVos1 = (List<PowercurveVo>) map1.get(wpId);
+                        for (int i = 0; i < vos.size(); i++) {
+                            PowercurveVo previousVo1 = previousVos1.get(i);
+                            PowercurveVo currentVo1 = vos.get(i);
+                            if (previousVo1 != null && currentVo1 != null) {
+                                if (previousVo1.getBzgl() != null && currentVo1.getBzgl() != null) {
+                                    currentVo1.setBzgl(MathUtil.twoBit((previousVo1.getBzgl() + currentVo1.getBzgl())));
+                                }
+                            }
+                        }
+                    }
+                    map1.put(wpId, vos1);
+                }
+
+            } else {
+                //正常场站请求
+                ProBasicPowerstationPoint bzgl = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.GLYC);
+
+                List<PointData> bzglls = edosUtil.getHistoryDatasSnap(bzgl, beginDate.getTime() / 1000, nextDayZeroTime.getTime() / 1000, null, 3600L);
+                double temp1 = 0;
+                for (int i = 0; i < bzglls.size(); i++) {
+                    temp1 = bzglls.get(i).getPointValueInDouble();
+                    if (i < vos.size()) {
+                        vos.get(i).setBzgl(StringUtils.round(temp1, 2));
+                    }
+                }
+            }
+
+            List<PointData> llglls = edosUtil.getHistoryDatasSnap(llgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600L);
+            double temp2 = 0;
+            for (int i = 0; i < llglls.size(); i++) {
+                temp2 = llglls.get(i).getPointValueInDouble();
+                if (i < vos.size()) {
+                    vos.get(i).setLlgl(StringUtils.round(temp2 /1000, 2));
+                }
+            }
+
+
+            List<PointData> sjglls = edosUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600L);
+            double temp4 = 0;
+            for (int i = 0; i < sjglls.size(); i++) {
+                temp4 = sjglls.get(i).getPointValueInDouble();
+                if (i < vos.size()) {
+                    vos.get(i).setSjgl(StringUtils.round(temp4 /1000, 2));
+                }
+
+            }
+        }
+        return vos;
+    }
+
+}

+ 3 - 675
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/MonitorService.java

@@ -38,7 +38,7 @@ public class MonitorService {
     @Resource
     private IProBasicEquipmentPointService proBasicEquipmentPointService;
     @Resource
-    private IProBasicCompanyService proBasicCompanyService;
+    private MonitorprojectplanService planService;
     @Resource
     private IProEconTargetdataService proEconTargetdataService;
     @Resource
@@ -619,7 +619,7 @@ public class MonitorService {
                 ProBasicPowerstationPoint jymvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.JYM);
                 jym = edosUtil.getRealData(jymvalue).getPointValueInDouble();
 
-                Map<String, Double> map=(Map<String, Double>)plan(wpId).get("proplanmap");
+                Map<String, Double> map=(Map<String, Double>)planService.plan(wpId).get("proplanmap");
 
 
                 double nfdltemp=0.0;
@@ -727,7 +727,7 @@ public class MonitorService {
                 ProBasicPowerstationPoint jymvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.JYM);
                 jym = edosUtil.getRealData(jymvalue).getPointValueInDouble();
 
-                Map<String, Double> map=(Map<String, Double>)plan(wpId).get("proplanmap");
+                Map<String, Double> map=(Map<String, Double>)planService.plan(wpId).get("proplanmap");
 
 
                 double nfdltemp=0.0;
@@ -1371,218 +1371,6 @@ public class MonitorService {
         return map;
     }
 
-
-    //24小时功率曲线
-    public List<PowercurveVo> Powercurve24(String wpId) throws Exception {
-
-        Date beginDate = com.gyee.common.util.DateUtils.getSamedayZero();   //当日零点
-        Date endDate = com.gyee.common.util.DateUtils.getCurrentDate();   //当前时间
-
-
-        Calendar calendar = Calendar.getInstance();
-        calendar.setTime(new Date()); // 设置时间为当前时间
-        calendar.add(Calendar.DAY_OF_YEAR, 1); // 将日期加一天
-
-        // 设置时、分、秒、毫秒为0,即获取当天后一天的0点时间值
-        calendar.set(Calendar.HOUR_OF_DAY, 0);
-        calendar.set(Calendar.MINUTE, 0);
-        calendar.set(Calendar.SECOND, 0);
-        calendar.set(Calendar.MILLISECOND, 0);
-
-        Date nextDayZeroTime = calendar.getTime();
-
-        int day = DateUtils.getCurrentHour();//4
-
-        List<PowercurveVo> vos = new ArrayList<PowercurveVo>();
-        List<PowercurveVo> vos1 = new ArrayList<PowercurveVo>();
-        for (int i = 0; i < 24; i++) {
-            PowercurveVo vo = new PowercurveVo();
-//            vo.setLlgl(0.0); //理论功率
-//            vo.setSjgl(0.0); //实际功率
-//            vo.setSsfs(0.0); //实时风速
-            vo.setBzgl(0.0); //保证功率
-            vo.setHours(i);  //时间戳
-            vo.setName(wpId);
-            vos.add(vo);
-        }
-        for (int i = 0; i < 24; i++) {
-            PowercurveVo vo1 = new PowercurveVo();
-//            vo.setLlgl(0.0); //理论功率
-//            vo.setSjgl(0.0); //实际功率
-//            vo.setSsfs(0.0); //实时风速
-            vo1.setBzgl(0.0); //保证功率
-            vo1.setHours(i);  //时间戳
-            vo1.setName(wpId);
-            vos1.add(vo1);
-        }
-
-        List<ProBasicProject> pjlist = new ArrayList<>();
-
-        for (ProBasicProject pj : CacheContext.pjls) {
-            if (wpId.equals(pj.getWindpowerstationId())) {
-                pjlist.add(pj);
-            }
-        }
-
-
-        ProBasicPowerstationPoint llgl = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZLLGL);
-        ProBasicPowerstationPoint sjgl = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZGL);
-
-        QueryWrapper<ProBasicPowerPoint> qw = new QueryWrapper<>();
-        List<ProBasicPowerPoint> powerls = new ArrayList<>();
-        List<ProBasicPowerPoint> qyls = null;
-        powerls = powerPointService.getBaseMapper().selectList(qw);
-
-        List<ProBasicPowerPoint> sxfd = powerls.stream().filter(i -> i.getTypeId().equals("SXJ_RGN-1")).collect(Collectors.toList());
-        List<ProBasicPowerPoint> sxgf = powerls.stream().filter(i -> i.getTypeId().equals("SXJ_RGN-2")).collect(Collectors.toList());
-
-        if (wpId.equals("SXJ_RGN0")){
-            qyls = powerls;
-        }else if (wpId.equals("SXJ_RGN-1")){
-            qyls = sxfd;
-        }else if (wpId.equals("SXJ_RGN-2")){
-            qyls = sxgf;
-        }
-        if (wpId.contains("SXJ_RGN")) {
-
-            List<List<PowercurveVo>> ls = new ArrayList<>();
-            for (ProBasicPowerPoint pp : qyls) {
-                if (pp.getWindpowerstationId().contains("MLJ_FDC_STA"))continue;
-                ProBasicPowerstationPoint ycgl = proBasicPowerstationPointService.getPowerstationPoint(pp.getWindpowerstationId(), ContantXk.GLYC);
-                List<PointData> ycglls = edosUtil.getHistoryDatasSnap(ycgl, beginDate.getTime() / 1000, nextDayZeroTime.getTime() / 1000, null, 3600L);
-                vos = new ArrayList<>();
-                double temp1 = 0;
-                for (int i = 0; i < ycglls.size(); i++) {
-//                    PointData po =new PointData();
-//                    po.setPointTime(ycglls.get(i).getPointTime()*1000);
-                    temp1 = ycglls.get(i).getPointValueInDouble();
-                    PowercurveVo vo = new PowercurveVo();
-                    vo.setHours(i);
-                    vo.setBzgl(StringUtils.round(temp1, 2));
-                    vos.add(vo);
-                }
-                ls.add(vos);
-            }
-
-            List<PowercurveVo> voList = ls.get(0);
-            for (int i = 1; i < ls.size(); i++) {
-                for (int j = 0; j < voList.size(); j++) {
-                    if (i < ls.size() && j < ls.get(i).size()) {
-                        voList.get(j).setBzgl(voList.get(j).getBzgl() + ls.get(i).get(j).getBzgl());
-                    }
-                }
-            }
-
-
-            double temp5 =0;
-            for (int i = 0; i < voList.size(); i++) {
-                temp5 = voList.get(i).getBzgl();
-                if (i < vos.size()) {
-                    vos.get(i).setBzgl(StringUtils.round(temp5, 2));
-                }
-            }
-
-            List<PointData> llglls = edosUtil.getHistoryDatasSnap(llgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600L);
-            double temp2 = 0;
-            for (int i = 0; i < llglls.size(); i++) {
-                temp2 = llglls.get(i).getPointValueInDouble();
-                if (i < vos.size()) {
-                    vos.get(i).setLlgl(StringUtils.round(temp2 / 1000, 2));
-                }
-            }
-
-
-            List<PointData> sjglls = edosUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600L);
-            double temp4 = 0;
-            for (int i = 0; i < sjglls.size(); i++) {
-                temp4 = sjglls.get(i).getPointValueInDouble();
-                if (i < vos.size()) {
-                    vos.get(i).setSjgl(StringUtils.round(temp4 / 1000, 2));
-                }
-
-            }
-
-        }
-
-        if (!wpId.contains("SXJ_RGN")) {
-            //单场请求特殊场站进行处理
-            if (wpId.contains("GJY") || wpId.contains("PTZ") || wpId.contains("NJL") || wpId.contains("TZ_GDC_STA") || wpId.contains("SY_GDC_STA")) {
-                Map<String, Object> map1 = new HashMap<>();
-
-                for (ProBasicProject pj : pjlist) {
-                    if (pj.getId().contains("GJYF02") || pj.getId().contains("TZG02") || pj.getId().contains("TZG03") || pj.getId().contains("TZG04"))
-                        continue;
-                    ProBasicPowerstationPoint bzgl = proBasicPowerstationPointService.getPowerstationPoint(pj.getId(), ContantXk.GLYC);
-                    List<PointData> bzglls = edosUtil.getHistoryDatasSnap(bzgl, beginDate.getTime() / 1000, nextDayZeroTime.getTime() / 1000, null, 3600L);
-                    if (bzglls != null && !bzglls.isEmpty() && bzglls.get(0).getPointName() != null) {
-                        double temp1 = 0;
-                        for (int i = 0; i < bzglls.size(); i++) {
-
-                            temp1 = bzglls.get(i).getPointValueInDouble();
-                            if (!pj.getId().contains("01")) {
-                                if (i < vos.size()) {
-                                    vos.get(i).setBzgl(StringUtils.round(temp1, 2));
-                                }
-                            } else {
-                                if (i < vos.size()) {
-                                    vos1.get(i).setBzgl(StringUtils.round(temp1, 2));
-                                }
-                            }
-                        }
-
-                    }
-                    if (map1.containsKey(wpId)) {
-                        List<PowercurveVo> previousVos1 = (List<PowercurveVo>) map1.get(wpId);
-                        for (int i = 0; i < vos.size(); i++) {
-                            PowercurveVo previousVo1 = previousVos1.get(i);
-                            PowercurveVo currentVo1 = vos.get(i);
-                            if (previousVo1 != null && currentVo1 != null) {
-                                if (previousVo1.getBzgl() != null && currentVo1.getBzgl() != null) {
-                                    currentVo1.setBzgl(MathUtil.twoBit((previousVo1.getBzgl() + currentVo1.getBzgl())));
-                                }
-                            }
-                        }
-                    }
-                    map1.put(wpId, vos1);
-                }
-
-            } else {
-                //正常场站请求
-                ProBasicPowerstationPoint bzgl = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.GLYC);
-
-                List<PointData> bzglls = edosUtil.getHistoryDatasSnap(bzgl, beginDate.getTime() / 1000, nextDayZeroTime.getTime() / 1000, null, 3600L);
-                double temp1 = 0;
-                for (int i = 0; i < bzglls.size(); i++) {
-                    temp1 = bzglls.get(i).getPointValueInDouble();
-                    if (i < vos.size()) {
-                        vos.get(i).setBzgl(StringUtils.round(temp1, 2));
-                    }
-                }
-            }
-
-            List<PointData> llglls = edosUtil.getHistoryDatasSnap(llgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600L);
-            double temp2 = 0;
-            for (int i = 0; i < llglls.size(); i++) {
-                temp2 = llglls.get(i).getPointValueInDouble();
-                if (i < vos.size()) {
-                    vos.get(i).setLlgl(StringUtils.round(temp2 /1000, 2));
-                }
-            }
-
-
-            List<PointData> sjglls = edosUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600L);
-            double temp4 = 0;
-            for (int i = 0; i < sjglls.size(); i++) {
-                temp4 = sjglls.get(i).getPointValueInDouble();
-                if (i < vos.size()) {
-                    vos.get(i).setSjgl(StringUtils.round(temp4 /1000, 2));
-                }
-
-            }
-        }
-        return vos;
-    }
-
     //实时数据
     public List<PowercurveVo> Realtimevalue(String wpId, String uniformCode) throws Exception {
 
@@ -1826,464 +1614,4 @@ public class MonitorService {
         }
         return vos;
     }
-
-
-    public Map plan(String wpId) throws Exception {
-
-        Map<String, Object> map = new HashMap<>();
-
-        if (wpId.endsWith(QS) || wpId.endsWith(FD) || wpId.endsWith(GF) || CacheContext.wpmapls.containsKey(wpId)) {
-
-            List<ProBasicPowerstation> wplist = new ArrayList<>();
-            if (CacheContext.wpmapls.containsKey(wpId)) {
-                wplist = CacheContext.wpmapls.get(wpId);
-            }
-            HttpServletRequest request = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest();
-            List<ProBasicPowerstation> wplsToken = tokenService.getWpls(request);
-            for (ProBasicPowerstation wp : wplsToken) {
-                if (wpId.contains(FD)) {
-                    if (wp.getId().endsWith("FDC_STA")) {
-                        wplist.add(wp);
-                    }
-                } else if (wpId.contains(GF)) {
-                    if (wp.getId().endsWith("GDC_STA")) {
-                        wplist.add(wp);
-                    }
-                } else if (wpId.contains(QS)) {
-                    wplist.add(wp);
-                }
-            }
-            List<ProBasicPowerstation> rglist = new ArrayList<>();
-            List<ProBasicRegion> rgls = CacheContext.rgls;
-
-            for (ProBasicPowerstation wp1 : wplsToken) {
-                for (ProBasicRegion rg : rgls) {
-                    if (wpId.contains(rg.getId()) && wpId.contains(wp1.getRegionId())) {
-                        rglist.add(wp1);
-                        wplist = rglist;
-                    }
-                }
-            }
-            Calendar cal = Calendar.getInstance();
-            cal.setTime(new Date());
-            int year = cal.get(Calendar.YEAR);
-
-            int month2 = DateUtils.getMonth(new Date());
-
-            double fd_r_jhdl = 0;
-            double fd_y_jhdl = 0;
-            double fd_n_jhdl = 0;
-            double gf_r_jhdl = 0;
-            double gf_y_jhdl = 0;
-            double gf_n_jhdl = 0;
-
-            double fd_r_sjdl = 0;
-            double fd_y_sjdl = 0;
-            double fd_n_sjdl = 0;
-            double gf_r_sjdl = 0;
-            double gf_y_sjdl = 0;
-            double gf_n_sjdl = 0;
-
-            BigDecimal fd_r_sjdl1 = BigDecimal.valueOf(0);
-            BigDecimal fd_y_sjdl1 = BigDecimal.valueOf(0);
-            BigDecimal fd_n_sjdl1 = BigDecimal.valueOf(0);
-            BigDecimal gf_r_sjdl1 = BigDecimal.valueOf(0);
-            BigDecimal gf_y_sjdl1 = BigDecimal.valueOf(0);
-            BigDecimal gf_n_sjdl1 = BigDecimal.valueOf(0);
-
-            BigDecimal fdnf = BigDecimal.valueOf(0);
-            BigDecimal fdyf = BigDecimal.valueOf(0);
-            BigDecimal gfnf = BigDecimal.valueOf(0);
-            BigDecimal gfyf = BigDecimal.valueOf(0);
-
-            // 获取当前日期 暂时
-            Date currentDate5 = new Date();
-
-            // 创建 Calendar 对象,并设置为当前日期
-            Calendar calendar5 = Calendar.getInstance();
-            calendar5.setTime(currentDate5);
-
-            // 设置 beginDate 为前一天的早上六点
-            calendar5.add(Calendar.DAY_OF_MONTH, -1);
-            calendar5.set(Calendar.HOUR_OF_DAY, 6);
-            calendar5.set(Calendar.MINUTE, 0);
-            calendar5.set(Calendar.SECOND, 0);
-            calendar5.set(Calendar.MILLISECOND, 0);
-            Date beginDate = calendar5.getTime();
-
-            // 设置 endDate 为当天的23点59分59秒
-            calendar5.set(Calendar.HOUR_OF_DAY, 23);
-            calendar5.set(Calendar.MINUTE, 59);
-            calendar5.set(Calendar.SECOND, 59);
-            calendar5.set(Calendar.MILLISECOND, 999);
-            Date endDate = calendar5.getTime();
-
-            List<ProEconPowerstationInfoDay5> qwt3 = null;
-
-            QueryWrapper<ProEconPowerstationInfoDay5> qw3 = new QueryWrapper<>();
-
-            qw3.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, wpId);
-            qw3.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, beginDate, endDate);
-            qwt3 = proEconPowerstationInfoDay5Service.list(qw3);
-
-            if (wpId.endsWith(QS) || wpId.endsWith(FD) || wpId.endsWith(GF)) {
-
-                double rfdlsj = 0.0;
-                double yfdlsj = 0.0;
-                double nfdlsj = 0.0;
-
-                double gfrfdlsj = 0.0;
-                double gfyfdlsj = 0.0;
-                double gfnfdlsj = 0.0;
-
-                String fdstr = null;
-                String gfstr = null;
-
-                String str = wpId;
-
-                Date current = com.gyee.common.util.DateUtils.getCurrentDate();
-                Calendar calendar = Calendar.getInstance();
-                calendar.setTime(current);
-                calendar.add(Calendar.DAY_OF_MONTH, -1);
-                Date previousDay = calendar.getTime();
-                List<ProEconTargetdataFrist> qwt = null;
-                List<ProEconPowerstationInfoDay5> qwt1 = null;
-
-                double gfrlr = 0.0;
-                double gfylr = 0.0;
-                double gfnlr = 0.0;
-
-                double fdrlr = 0.0;
-                double fdylr = 0.0;
-                double fdnlr = 0.0;
-
-                QueryWrapper<ProEconTargetdataFrist> qw = new QueryWrapper<>();
-                qw.eq("record_date", previousDay);
-                qwt = proEconTargetdataFristService.list(qw);
-
-
-                QueryWrapper<ProEconPowerstationInfoDay5> qw1 = new QueryWrapper<>();
-
-                if (wpId.equals("KGDL_FGS0")){
-                    qw1.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0", "SXJ_KGDL_FLFD_ZGS0");
-                } else if (wpId.equals("KGDL_FGS-1")) {
-                    qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_FLFD_ZGS0");
-                } else if (wpId.equals("KGDL_FGS-2")) {
-                    qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0");
-                } else if (wpId.equals("SXJ_RGN0")) {
-                    qw1.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1", "SXJ_RGN-2");
-                } else if (wpId.equals("SXJ_RGN-1")) {
-                    qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1");
-                }else if (wpId.equals("SXJ_RGN-2")) {
-                    qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-2");
-                }
-                qw1.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, beginDate, endDate);
-
-                qwt1 = proEconPowerstationInfoDay5Service.list(qw1);
-
-
-                if (qwt != null) {
-                    gfrlr = qwt.stream()
-                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("GF"))
-                            .mapToDouble(gf -> gf != null && gf.getRfdl() != null ? gf.getRfdl() : 0)
-                            .sum();
-                    fdrlr = qwt.stream()
-                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("FD"))
-                            .mapToDouble(gf -> gf != null && gf.getRfdl() != null ? gf.getRfdl() : 0)
-                            .sum();
-                    gfylr = qwt.stream()
-                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("GF"))
-                            .mapToDouble(gf -> gf != null && gf.getYfdl() != null ? gf.getYfdl() : 0)
-                            .sum();
-                    fdylr = qwt.stream()
-                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("FD"))
-                            .mapToDouble(gf -> gf != null && gf.getYfdl() != null ? gf.getYfdl() : 0)
-                            .sum();
-                    gfnlr = qwt.stream()
-                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("GF"))
-                            .mapToDouble(gf -> gf != null && gf.getNfdl() != null ? gf.getNfdl() : 0)
-                            .sum();
-                    fdnlr = qwt.stream()
-                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("FD"))
-                            .mapToDouble(gf -> gf != null && gf.getNfdl() != null ? gf.getNfdl() : 0)
-                            .sum();
-                }
-
-                if (wpId.endsWith(QS)) {
-                    fdstr = str.substring(0, str.indexOf("0")) + "-1";
-                    gfstr = str.substring(0, str.indexOf("0")) + "-2";
-                    ProBasicPowerstationPoint rfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(fdstr, ContantXk.RFDL);
-                    rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble();
-                    //月发电量
-                    ProBasicPowerstationPoint yfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(fdstr, ContantXk.YFDL);
-                    yfdlsj = edosUtil.getRealData(yfdlvalue).getPointValueInDouble();
-                    //年发电量
-                    ProBasicPowerstationPoint nfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(fdstr, ContantXk.NFDL);
-                    nfdlsj = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
-
-                    ProBasicPowerstationPoint gfrfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(gfstr, ContantXk.RFDL);
-                    gfrfdlsj = edosUtil.getRealData(gfrfdlvalue).getPointValueInDouble();
-                    //月发电量
-                    ProBasicPowerstationPoint gfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(gfstr, ContantXk.YFDL);
-                    gfyfdlsj = edosUtil.getRealData(gfdlvalue).getPointValueInDouble();
-                    //年发电量
-                    ProBasicPowerstationPoint gfnfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(gfstr, ContantXk.NFDL);
-                    gfnfdlsj = edosUtil.getRealData(gfnfdlvalue).getPointValueInDouble();
-
-                    if (fdrlr != 0 && fdylr != 0 && fdnlr != 0 && gfrlr != 0 && gfylr != 0 && gfnlr != 0) {
-//                        fd_r_sjdl = fd_r_sjdl + fdrlr * 10000;
-//                        fd_y_sjdl = fd_y_sjdl + fdylr * 10000;
-//                        fd_n_sjdl = fd_n_sjdl + fdnlr * 10000;
-//
-//                        gf_r_sjdl = gf_r_sjdl + gfrlr * 10000;
-//                        gf_y_sjdl = gf_y_sjdl + gfylr * 10000;
-//                        gf_n_sjdl = gf_n_sjdl + gfnlr * 10000;
-
-                    } else {
-//                        fd_r_sjdl = fd_r_sjdl + rfdlsj;
-//                        fd_y_sjdl = fd_y_sjdl + yfdlsj;
-//                        fd_n_sjdl = fd_n_sjdl + nfdlsj;
-
-//                        gf_r_sjdl = gf_r_sjdl + gfrfdlsj;
-//                        gf_y_sjdl = gf_y_sjdl + gfyfdlsj;
-//                        gf_n_sjdl = gf_n_sjdl + gfnfdlsj;
-
-                        fd_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
-                        gf_r_sjdl1 = BigDecimal.valueOf(gfrfdlsj);
-                    }
-                } else if (wpId.endsWith(FD) || wpId.endsWith(GF)) {
-                    ProBasicPowerstationPoint rfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.RFDL);
-
-                    rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble();
-
-                    //月发电量
-                    ProBasicPowerstationPoint yfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.YFDL);
-
-                    yfdlsj = edosUtil.getRealData(yfdlvalue).getPointValueInDouble();
-
-
-                    //年发电量
-                    ProBasicPowerstationPoint nfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.NFDL);
-
-                    nfdlsj = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
-
-                    if (fdrlr != 0 && fdylr != 0 && fdnlr != 0 && gfrlr != 0 && gfylr != 0 && gfnlr != 0) {
-//                        fd_r_sjdl = fd_r_sjdl + fdrlr * 10000;
-//                        fd_y_sjdl = fd_y_sjdl + fdylr * 10000;
-//                        fd_n_sjdl = fd_n_sjdl + fdnlr * 10000;
-//
-//                        gf_r_sjdl = gf_r_sjdl + gfrlr * 10000;
-//                        gf_y_sjdl = gf_y_sjdl + gfylr * 10000;
-//                        gf_n_sjdl = gf_n_sjdl + gfnlr * 10000;
-                    } else {
-//                        fd_r_sjdl = fd_r_sjdl + rfdlsj;
-//                        fd_y_sjdl = fd_y_sjdl + yfdlsj;
-//                        fd_n_sjdl = fd_n_sjdl + nfdlsj;
-//
-//                        gf_r_sjdl = gf_r_sjdl + rfdlsj;
-//                        gf_y_sjdl = gf_y_sjdl + yfdlsj;
-//                        gf_n_sjdl = gf_n_sjdl + nfdlsj;
-
-                        fd_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
-                        gf_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
-                    }
-                }
-
-                for ( ProEconPowerstationInfoDay5 fdsj : qwt1){
-                    if (fdsj.getForeignKeyId().equals("SXJ_KGDL_FLFD_ZGS0")){
-                        fdnf = fdsj.getNfdldb();
-                        fdyf = fdsj.getYfdldb();
-                    } else if (fdsj.getForeignKeyId().equals("SXJ_KGDL_GFFD_ZGS0")) {
-                        gfnf = fdsj.getNfdldb();
-                        gfyf = fdsj.getYfdldb();
-                    } else if (fdsj.getForeignKeyId().equals("SXJ_RGN-2")) {
-                        gfnf = fdsj.getNfdldb();
-                        gfyf = fdsj.getYfdldb();
-                    } else if (fdsj.getForeignKeyId().equals("SXJ_RGN-1")) {
-                        fdnf = fdsj.getNfdldb();
-                        fdyf = fdsj.getYfdldb();
-                    }
-                }
-
-//                if (wpId.endsWith("-1") && fdnf == null && fdyf == null){
-//                    fdnf = BigDecimal.valueOf(100);
-//                    fdyf = BigDecimal.valueOf(100);
-//                }else if (wpId.endsWith("-2") && gfnf == null && gfyf == null){
-//                    gfnf = BigDecimal.valueOf(100);
-//                    gfyf = BigDecimal.valueOf(100);
-//                } else if (wpId.endsWith("0") && fdnf == null && fdyf == null && gfnf == null && gfyf == null ) {
-//                    fdnf = BigDecimal.valueOf(100);
-//                    fdyf = BigDecimal.valueOf(100);
-//                    gfnf = BigDecimal.valueOf(100);
-//                    gfyf = BigDecimal.valueOf(100);
-//                }
-//                for ( ProEconPowerstationInfoDay5 fdsj : qwt2){
-//                    if (fdsj.getForeignKeyId().equals("SXJ_KGDL_FLFD_ZGS0")){
-//                        fd_r_sjdl1 = fdsj.getRfdldb();
-//                    } else if (fdsj.getForeignKeyId().equals("SXJ_KGDL_GFFD_ZGS0")) {
-//                        gf_r_sjdl1 = fdsj.getRfdldb();
-//                    }else if (fdsj.getForeignKeyId().equals("SXJ_RGN-2")) {
-//                        gf_r_sjdl1 = fdsj.getRfdldb();
-//                    } else if (fdsj.getForeignKeyId().equals("SXJ_RGN-1")) {
-//                        fd_r_sjdl1 = fdsj.getRfdldb();
-//                    }
-//                }
-                if (wpId.endsWith("0") ||wpId.endsWith("-1")) {
-//                    fd_r_sjdl1 = fd_r_sjdl1;
-                    fd_y_sjdl1 = fdyf.add(fd_r_sjdl1);
-                    fd_n_sjdl1 = fdnf.add(fd_r_sjdl1);
-                }
-
-                if (wpId.endsWith("0") ||wpId.endsWith("-2")) {
-//                    gf_r_sjdl1 = gf_r_sjdl1;
-                    gf_y_sjdl1 = gfyf.add(gf_r_sjdl1);
-                    gf_n_sjdl1 = gfnf.add(gf_r_sjdl1);
-                }
-            }
-
-            List<ProBasicProjectPlan> currentls = proBasicProjectPlanService.getList(String.valueOf(year));
-            List<ProBasicProjectPlan> monthls = proBasicProjectPlanService.getmonthList(String.valueOf(month2));
-
-            for (ProBasicPowerstation wp : wplist) {
-
-                List<ProBasicProjectPlan> currentjh = currentls.stream().filter(wp1 -> wp1.getWindpowerstationId().equals(wp.getId())).collect(Collectors.toList());
-                List<ProBasicProjectPlan> monthjh = monthls.stream().filter(wp1 -> wp1.getWindpowerstationId().equals(wp.getId())).collect(Collectors.toList());
-
-
-                double yfdljh = 0.0;
-                double rfdlsj = 0.0;
-                double yfdlsj = 0.0;
-                double nfdljh = 0.0;
-                double nfdlsj = 0.0;
-                yfdljh = monthjh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum();
-                nfdljh = currentjh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum();
-
-                if (wp.getId().indexOf("FDC_STA") >= 0) {
-
-                    if (wpId.endsWith("STA")) {
-                        //日发电量
-                        ProBasicPowerstationPoint rfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.RFDL);
-                        rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble();
-//                        //月发电量
-//                        ProBasicPowerstationPoint yfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.YFDL);
-//                        yfdlsj = edosUtil.getRealData(yfdlvalue).getPointValueInDouble();
-//                        //年发电量
-//                        ProBasicPowerstationPoint nfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.NFDL);
-//                        nfdlsj = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
-
-
-                        BigDecimal yfdl2 = null;
-                        BigDecimal nfdl2 = null;
-                        for (ProEconPowerstationInfoDay5 dla :qwt3){
-                            yfdl2 = dla.getYfdldb();
-                            nfdl2 = dla.getNfdldb();
-                        }
-
-                        fd_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
-                        fd_y_sjdl1 = yfdl2.add(BigDecimal.valueOf(rfdlsj));
-                        fd_n_sjdl1 = nfdl2.add(BigDecimal.valueOf(rfdlsj));
-
-//                        fd_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
-//                        fd_y_sjdl1 = BigDecimal.valueOf(yfdlsj);
-//                        fd_n_sjdl1 = BigDecimal.valueOf(nfdlsj);
-                    }
-                    fd_r_jhdl = fd_r_jhdl + yfdljh / 30;
-                    fd_y_jhdl = fd_y_jhdl + yfdljh;
-                    fd_n_jhdl = fd_n_jhdl + nfdljh;
-
-
-                } else {
-
-                    if (wpId.endsWith("STA")) {
-                        //日发电量
-                        ProBasicPowerstationPoint rfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.RFDL);
-                        rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble();
-//                        //月发电量
-//                        ProBasicPowerstationPoint yfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.YFDL);
-//                        yfdlsj = edosUtil.getRealData(yfdlvalue).getPointValueInDouble();
-//
-//                        //年发电量
-//                        ProBasicPowerstationPoint nfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.NFDL);
-//                        nfdlsj = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
-//
-//                        gf_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
-//                        gf_y_sjdl1 = BigDecimal.valueOf(yfdlsj);
-//                        gf_n_sjdl1 = BigDecimal.valueOf(nfdlsj);
-
-                        BigDecimal yfdl2 = null;
-                        BigDecimal nfdl2 = null;
-                        for (ProEconPowerstationInfoDay5 dla :qwt3){
-                            yfdl2 = dla.getYfdldb();
-                            nfdl2 = dla.getNfdldb();
-                        }
-
-                        gf_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
-                        gf_y_sjdl1 = yfdl2.add(BigDecimal.valueOf(rfdlsj));
-                        gf_n_sjdl1 = nfdl2.add(BigDecimal.valueOf(rfdlsj));
-                    }
-                    gf_r_jhdl = gf_r_jhdl + yfdljh / 30;
-                    gf_y_jhdl = gf_y_jhdl + yfdljh;
-                    gf_n_jhdl = gf_n_jhdl + nfdljh;
-
-                }
-
-            }
-
-
-            if (wpId.contains("FL")) {
-                gf_r_jhdl = 0;
-                gf_y_jhdl = 0;
-                gf_n_jhdl = 0;
-                gf_r_sjdl = 0;
-                gf_y_sjdl = 0;
-                gf_n_sjdl = 0;
-            } else if (wpId.contains("GF")) {
-                fd_r_jhdl = 0;
-                fd_y_jhdl = 0;
-                fd_n_jhdl = 0;
-                fd_r_sjdl = 0;
-                fd_y_sjdl = 0;
-                fd_n_sjdl = 0;
-            }
-
-            if (wpId.endsWith("-2") || wpId.contains("GDC")){
-                fd_r_sjdl1 = BigDecimal.valueOf(0);
-                fd_y_sjdl1 = BigDecimal.valueOf(0);
-                fd_n_sjdl1 = BigDecimal.valueOf(0);
-            }
-
-            if (wpId.endsWith("-1") || wpId.contains("FDC")){
-                gf_r_sjdl1 = BigDecimal.valueOf(0);
-                gf_y_sjdl1 = BigDecimal.valueOf(0);
-                gf_n_sjdl1 = BigDecimal.valueOf(0);
-            }
-
-            Map<String, Double> proplanmap = new HashMap<>();
-
-            proplanmap.put("fd_r_jhdl", StringUtils.round(fd_r_jhdl, 0));
-            proplanmap.put("fd_y_jhdl", StringUtils.round(fd_y_jhdl, 0));
-            proplanmap.put("fd_n_jhdl", StringUtils.round(fd_n_jhdl, 0));
-            proplanmap.put("fd_r_sjdl", StringUtils.round(fd_r_sjdl1.doubleValue(), 2));
-            proplanmap.put("fd_y_sjdl", StringUtils.round(fd_y_sjdl1.doubleValue(), 2));
-            proplanmap.put("fd_n_sjdl", StringUtils.round(fd_n_sjdl1.doubleValue(), 2));
-
-            proplanmap.put("gf_r_jhdl", StringUtils.round(gf_r_jhdl, 0));
-            proplanmap.put("gf_y_jhdl", StringUtils.round(gf_y_jhdl, 0));
-            proplanmap.put("gf_n_jhdl", StringUtils.round(gf_n_jhdl, 0));
-
-            proplanmap.put("gf_r_sjdl", StringUtils.round(gf_r_sjdl1.doubleValue(), 2));
-            proplanmap.put("gf_y_sjdl", StringUtils.round(gf_y_sjdl1.doubleValue(), 2));
-            proplanmap.put("gf_n_sjdl", StringUtils.round(gf_n_sjdl1.doubleValue(), 2));
-
-            proplanmap.put("qy_r_jhdl", StringUtils.round(fd_r_jhdl + gf_r_jhdl, 0));
-            proplanmap.put("qy_y_jhdl", StringUtils.round(fd_y_jhdl + gf_y_jhdl, 0));
-            proplanmap.put("qy_n_jhdl", StringUtils.round(fd_n_jhdl + gf_n_jhdl, 0));
-            proplanmap.put("qy_r_sjdl", StringUtils.round((fd_r_sjdl1.doubleValue()) + (gf_r_sjdl1.doubleValue()), 2));
-            proplanmap.put("qy_y_sjdl", StringUtils.round((fd_y_sjdl1.doubleValue())+ (gf_y_sjdl1.doubleValue()), 2));
-            proplanmap.put("qy_n_sjdl", StringUtils.round((fd_n_sjdl1.doubleValue()) + (gf_n_sjdl1.doubleValue()), 2));
-
-            map.put("proplanmap", proplanmap);
-        }
-        return map;
-    }
 }

+ 513 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/MonitorprojectplanService.java

@@ -0,0 +1,513 @@
+package com.gyee.runeconomy.service.monitor;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.common.contant.ContantXk;
+import com.gyee.common.util.DateUtils;
+import com.gyee.runeconomy.init.CacheContext;
+import com.gyee.runeconomy.model.auto.*;
+import com.gyee.runeconomy.service.TokenService;
+import com.gyee.runeconomy.service.auto.*;
+import com.gyee.runeconomy.util.StringUtils;
+import com.gyee.runeconomy.util.realtimesource.IEdosUtil;
+import org.springframework.stereotype.Service;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+public class MonitorprojectplanService {
+
+    @Resource
+    private IProBasicProjectPlanService proBasicProjectPlanService;
+    @Resource
+    private IProBasicPowerstationPointService proBasicPowerstationPointService;
+    @Resource
+    private IProBasicEquipmentPointService proBasicEquipmentPointService;
+    @Resource
+    private IProBasicCompanyService proBasicCompanyService;
+    @Resource
+    private IProEconTargetdataService proEconTargetdataService;
+    @Resource
+    private IProEconTargetdataFristService proEconTargetdataFristService;
+
+    @Resource
+    private IProBasicPowerPointService powerPointService;
+
+    @Resource
+    private IProEconPowerstationInfoDay5Service proEconPowerstationInfoDay5Service;
+
+    private final String QS = "0";
+    private final String FD = "-1";
+    private final String GF = "-2";
+
+    @Resource
+    private IEdosUtil edosUtil;
+    Map<String, Object> map = new HashMap<>();
+    @Resource
+    private TokenService tokenService;
+
+    public Map plan(String wpId) throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+        if (wpId.endsWith(QS) || wpId.endsWith(FD) || wpId.endsWith(GF) || CacheContext.wpmapls.containsKey(wpId)) {
+
+            List<ProBasicPowerstation> wplist = new ArrayList<>();
+            if (CacheContext.wpmapls.containsKey(wpId)) {
+                wplist = CacheContext.wpmapls.get(wpId);
+            }
+            HttpServletRequest request = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest();
+            List<ProBasicPowerstation> wplsToken = tokenService.getWpls(request);
+            for (ProBasicPowerstation wp : wplsToken) {
+                if (wpId.contains(FD)) {
+                    if (wp.getId().endsWith("FDC_STA")) {
+                        wplist.add(wp);
+                    }
+                } else if (wpId.contains(GF)) {
+                    if (wp.getId().endsWith("GDC_STA")) {
+                        wplist.add(wp);
+                    }
+                } else if (wpId.contains(QS)) {
+                    wplist.add(wp);
+                }
+            }
+            List<ProBasicPowerstation> rglist = new ArrayList<>();
+            List<ProBasicRegion> rgls = CacheContext.rgls;
+
+            for (ProBasicPowerstation wp1 : wplsToken) {
+                for (ProBasicRegion rg : rgls) {
+                    if (wpId.contains(rg.getId()) && wpId.contains(wp1.getRegionId())) {
+                        rglist.add(wp1);
+                        wplist = rglist;
+                    }
+                }
+            }
+            Calendar cal = Calendar.getInstance();
+            cal.setTime(new Date());
+            int year = cal.get(Calendar.YEAR);
+
+            int month2 = DateUtils.getMonth(new Date());
+
+            double fd_r_jhdl = 0;
+            double fd_y_jhdl = 0;
+            double fd_n_jhdl = 0;
+            double gf_r_jhdl = 0;
+            double gf_y_jhdl = 0;
+            double gf_n_jhdl = 0;
+
+            double fd_r_sjdl = 0;
+            double fd_y_sjdl = 0;
+            double fd_n_sjdl = 0;
+            double gf_r_sjdl = 0;
+            double gf_y_sjdl = 0;
+            double gf_n_sjdl = 0;
+
+            BigDecimal fd_r_sjdl1 = BigDecimal.valueOf(0);
+            BigDecimal fd_y_sjdl1 = BigDecimal.valueOf(0);
+            BigDecimal fd_n_sjdl1 = BigDecimal.valueOf(0);
+            BigDecimal gf_r_sjdl1 = BigDecimal.valueOf(0);
+            BigDecimal gf_y_sjdl1 = BigDecimal.valueOf(0);
+            BigDecimal gf_n_sjdl1 = BigDecimal.valueOf(0);
+
+            BigDecimal fdnf = BigDecimal.valueOf(0);
+            BigDecimal fdyf = BigDecimal.valueOf(0);
+            BigDecimal gfnf = BigDecimal.valueOf(0);
+            BigDecimal gfyf = BigDecimal.valueOf(0);
+
+            // 获取当前日期 暂时
+            Date currentDate5 = new Date();
+
+            // 创建 Calendar 对象,并设置为当前日期
+            Calendar calendar5 = Calendar.getInstance();
+            calendar5.setTime(currentDate5);
+
+            // 设置 beginDate 为前一天的早上六点
+            calendar5.add(Calendar.DAY_OF_MONTH, -1);
+            calendar5.set(Calendar.HOUR_OF_DAY, 6);
+            calendar5.set(Calendar.MINUTE, 0);
+            calendar5.set(Calendar.SECOND, 0);
+            calendar5.set(Calendar.MILLISECOND, 0);
+            Date beginDate = calendar5.getTime();
+
+            // 设置 endDate 为当天的23点59分59秒
+            calendar5.set(Calendar.HOUR_OF_DAY, 23);
+            calendar5.set(Calendar.MINUTE, 59);
+            calendar5.set(Calendar.SECOND, 59);
+            calendar5.set(Calendar.MILLISECOND, 999);
+            Date endDate = calendar5.getTime();
+
+            List<ProEconPowerstationInfoDay5> qwt3 = null;
+
+            QueryWrapper<ProEconPowerstationInfoDay5> qw3 = new QueryWrapper<>();
+
+            qw3.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, wpId);
+            qw3.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, beginDate, endDate);
+            qwt3 = proEconPowerstationInfoDay5Service.list(qw3);
+
+            if (wpId.endsWith(QS) || wpId.endsWith(FD) || wpId.endsWith(GF)) {
+
+                double rfdlsj = 0.0;
+                double yfdlsj = 0.0;
+                double nfdlsj = 0.0;
+
+                double gfrfdlsj = 0.0;
+                double gfyfdlsj = 0.0;
+                double gfnfdlsj = 0.0;
+
+                String fdstr = null;
+                String gfstr = null;
+
+                String str = wpId;
+
+                Date current = com.gyee.common.util.DateUtils.getCurrentDate();
+                Calendar calendar = Calendar.getInstance();
+                calendar.setTime(current);
+                calendar.add(Calendar.DAY_OF_MONTH, -1);
+                Date previousDay = calendar.getTime();
+                List<ProEconTargetdataFrist> qwt = null;
+                List<ProEconPowerstationInfoDay5> qwt1 = null;
+
+                double gfrlr = 0.0;
+                double gfylr = 0.0;
+                double gfnlr = 0.0;
+
+                double fdrlr = 0.0;
+                double fdylr = 0.0;
+                double fdnlr = 0.0;
+
+                QueryWrapper<ProEconTargetdataFrist> qw = new QueryWrapper<>();
+                qw.eq("record_date", previousDay);
+                qwt = proEconTargetdataFristService.list(qw);
+
+
+                QueryWrapper<ProEconPowerstationInfoDay5> qw1 = new QueryWrapper<>();
+
+                if (wpId.equals("KGDL_FGS0")){
+                    qw1.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0", "SXJ_KGDL_FLFD_ZGS0");
+                } else if (wpId.equals("KGDL_FGS-1")) {
+                    qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_FLFD_ZGS0");
+                } else if (wpId.equals("KGDL_FGS-2")) {
+                    qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0");
+                } else if (wpId.equals("SXJ_RGN0")) {
+                    qw1.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1", "SXJ_RGN-2");
+                } else if (wpId.equals("SXJ_RGN-1")) {
+                    qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1");
+                }else if (wpId.equals("SXJ_RGN-2")) {
+                    qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-2");
+                }
+                qw1.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, beginDate, endDate);
+
+                qwt1 = proEconPowerstationInfoDay5Service.list(qw1);
+
+
+                if (qwt != null) {
+                    gfrlr = qwt.stream()
+                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("GF"))
+                            .mapToDouble(gf -> gf != null && gf.getRfdl() != null ? gf.getRfdl() : 0)
+                            .sum();
+                    fdrlr = qwt.stream()
+                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("FD"))
+                            .mapToDouble(gf -> gf != null && gf.getRfdl() != null ? gf.getRfdl() : 0)
+                            .sum();
+                    gfylr = qwt.stream()
+                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("GF"))
+                            .mapToDouble(gf -> gf != null && gf.getYfdl() != null ? gf.getYfdl() : 0)
+                            .sum();
+                    fdylr = qwt.stream()
+                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("FD"))
+                            .mapToDouble(gf -> gf != null && gf.getYfdl() != null ? gf.getYfdl() : 0)
+                            .sum();
+                    gfnlr = qwt.stream()
+                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("GF"))
+                            .mapToDouble(gf -> gf != null && gf.getNfdl() != null ? gf.getNfdl() : 0)
+                            .sum();
+                    fdnlr = qwt.stream()
+                            .filter(gf -> gf != null && gf.getType() != null && gf.getType().endsWith("FD"))
+                            .mapToDouble(gf -> gf != null && gf.getNfdl() != null ? gf.getNfdl() : 0)
+                            .sum();
+                }
+
+                if (wpId.endsWith(QS)) {
+                    fdstr = str.substring(0, str.indexOf("0")) + "-1";
+                    gfstr = str.substring(0, str.indexOf("0")) + "-2";
+                    ProBasicPowerstationPoint rfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(fdstr, ContantXk.RFDL);
+                    rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble();
+                    //月发电量
+                    ProBasicPowerstationPoint yfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(fdstr, ContantXk.YFDL);
+                    yfdlsj = edosUtil.getRealData(yfdlvalue).getPointValueInDouble();
+                    //年发电量
+                    ProBasicPowerstationPoint nfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(fdstr, ContantXk.NFDL);
+                    nfdlsj = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
+
+                    ProBasicPowerstationPoint gfrfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(gfstr, ContantXk.RFDL);
+                    gfrfdlsj = edosUtil.getRealData(gfrfdlvalue).getPointValueInDouble();
+                    //月发电量
+                    ProBasicPowerstationPoint gfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(gfstr, ContantXk.YFDL);
+                    gfyfdlsj = edosUtil.getRealData(gfdlvalue).getPointValueInDouble();
+                    //年发电量
+                    ProBasicPowerstationPoint gfnfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(gfstr, ContantXk.NFDL);
+                    gfnfdlsj = edosUtil.getRealData(gfnfdlvalue).getPointValueInDouble();
+
+                    if (fdrlr != 0 && fdylr != 0 && fdnlr != 0 && gfrlr != 0 && gfylr != 0 && gfnlr != 0) {
+//                        fd_r_sjdl = fd_r_sjdl + fdrlr * 10000;
+//                        fd_y_sjdl = fd_y_sjdl + fdylr * 10000;
+//                        fd_n_sjdl = fd_n_sjdl + fdnlr * 10000;
+//
+//                        gf_r_sjdl = gf_r_sjdl + gfrlr * 10000;
+//                        gf_y_sjdl = gf_y_sjdl + gfylr * 10000;
+//                        gf_n_sjdl = gf_n_sjdl + gfnlr * 10000;
+
+                    } else {
+//                        fd_r_sjdl = fd_r_sjdl + rfdlsj;
+//                        fd_y_sjdl = fd_y_sjdl + yfdlsj;
+//                        fd_n_sjdl = fd_n_sjdl + nfdlsj;
+
+//                        gf_r_sjdl = gf_r_sjdl + gfrfdlsj;
+//                        gf_y_sjdl = gf_y_sjdl + gfyfdlsj;
+//                        gf_n_sjdl = gf_n_sjdl + gfnfdlsj;
+
+                        fd_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
+                        gf_r_sjdl1 = BigDecimal.valueOf(gfrfdlsj);
+                    }
+                } else if (wpId.endsWith(FD) || wpId.endsWith(GF)) {
+                    ProBasicPowerstationPoint rfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.RFDL);
+
+                    rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble();
+
+                    //月发电量
+                    ProBasicPowerstationPoint yfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.YFDL);
+
+                    yfdlsj = edosUtil.getRealData(yfdlvalue).getPointValueInDouble();
+
+
+                    //年发电量
+                    ProBasicPowerstationPoint nfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.NFDL);
+
+                    nfdlsj = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
+
+                    if (fdrlr != 0 && fdylr != 0 && fdnlr != 0 && gfrlr != 0 && gfylr != 0 && gfnlr != 0) {
+//                        fd_r_sjdl = fd_r_sjdl + fdrlr * 10000;
+//                        fd_y_sjdl = fd_y_sjdl + fdylr * 10000;
+//                        fd_n_sjdl = fd_n_sjdl + fdnlr * 10000;
+//
+//                        gf_r_sjdl = gf_r_sjdl + gfrlr * 10000;
+//                        gf_y_sjdl = gf_y_sjdl + gfylr * 10000;
+//                        gf_n_sjdl = gf_n_sjdl + gfnlr * 10000;
+                    } else {
+//                        fd_r_sjdl = fd_r_sjdl + rfdlsj;
+//                        fd_y_sjdl = fd_y_sjdl + yfdlsj;
+//                        fd_n_sjdl = fd_n_sjdl + nfdlsj;
+//
+//                        gf_r_sjdl = gf_r_sjdl + rfdlsj;
+//                        gf_y_sjdl = gf_y_sjdl + yfdlsj;
+//                        gf_n_sjdl = gf_n_sjdl + nfdlsj;
+
+                        fd_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
+                        gf_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
+                    }
+                }
+
+                for ( ProEconPowerstationInfoDay5 fdsj : qwt1){
+                    if (fdsj.getForeignKeyId().equals("SXJ_KGDL_FLFD_ZGS0")){
+                        fdnf = fdsj.getNfdldb();
+                        fdyf = fdsj.getYfdldb();
+                    } else if (fdsj.getForeignKeyId().equals("SXJ_KGDL_GFFD_ZGS0")) {
+                        gfnf = fdsj.getNfdldb();
+                        gfyf = fdsj.getYfdldb();
+                    } else if (fdsj.getForeignKeyId().equals("SXJ_RGN-2")) {
+                        gfnf = fdsj.getNfdldb();
+                        gfyf = fdsj.getYfdldb();
+                    } else if (fdsj.getForeignKeyId().equals("SXJ_RGN-1")) {
+                        fdnf = fdsj.getNfdldb();
+                        fdyf = fdsj.getYfdldb();
+                    }
+                }
+
+//                if (wpId.endsWith("-1") && fdnf == null && fdyf == null){
+//                    fdnf = BigDecimal.valueOf(100);
+//                    fdyf = BigDecimal.valueOf(100);
+//                }else if (wpId.endsWith("-2") && gfnf == null && gfyf == null){
+//                    gfnf = BigDecimal.valueOf(100);
+//                    gfyf = BigDecimal.valueOf(100);
+//                } else if (wpId.endsWith("0") && fdnf == null && fdyf == null && gfnf == null && gfyf == null ) {
+//                    fdnf = BigDecimal.valueOf(100);
+//                    fdyf = BigDecimal.valueOf(100);
+//                    gfnf = BigDecimal.valueOf(100);
+//                    gfyf = BigDecimal.valueOf(100);
+//                }
+//                for ( ProEconPowerstationInfoDay5 fdsj : qwt2){
+//                    if (fdsj.getForeignKeyId().equals("SXJ_KGDL_FLFD_ZGS0")){
+//                        fd_r_sjdl1 = fdsj.getRfdldb();
+//                    } else if (fdsj.getForeignKeyId().equals("SXJ_KGDL_GFFD_ZGS0")) {
+//                        gf_r_sjdl1 = fdsj.getRfdldb();
+//                    }else if (fdsj.getForeignKeyId().equals("SXJ_RGN-2")) {
+//                        gf_r_sjdl1 = fdsj.getRfdldb();
+//                    } else if (fdsj.getForeignKeyId().equals("SXJ_RGN-1")) {
+//                        fd_r_sjdl1 = fdsj.getRfdldb();
+//                    }
+//                }
+                if (wpId.endsWith("0") ||wpId.endsWith("-1")) {
+//                    fd_r_sjdl1 = fd_r_sjdl1;
+                    fd_y_sjdl1 = fdyf.add(fd_r_sjdl1);
+                    fd_n_sjdl1 = fdnf.add(fd_r_sjdl1);
+                }
+
+                if (wpId.endsWith("0") ||wpId.endsWith("-2")) {
+//                    gf_r_sjdl1 = gf_r_sjdl1;
+                    gf_y_sjdl1 = gfyf.add(gf_r_sjdl1);
+                    gf_n_sjdl1 = gfnf.add(gf_r_sjdl1);
+                }
+            }
+
+            List<ProBasicProjectPlan> currentls = proBasicProjectPlanService.getList(String.valueOf(year));
+            List<ProBasicProjectPlan> monthls = proBasicProjectPlanService.getmonthList(String.valueOf(month2));
+
+            for (ProBasicPowerstation wp : wplist) {
+
+                List<ProBasicProjectPlan> currentjh = currentls.stream().filter(wp1 -> wp1.getWindpowerstationId().equals(wp.getId())).collect(Collectors.toList());
+                List<ProBasicProjectPlan> monthjh = monthls.stream().filter(wp1 -> wp1.getWindpowerstationId().equals(wp.getId())).collect(Collectors.toList());
+
+
+                double yfdljh = 0.0;
+                double rfdlsj = 0.0;
+                double yfdlsj = 0.0;
+                double nfdljh = 0.0;
+                double nfdlsj = 0.0;
+                yfdljh = monthjh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum();
+                nfdljh = currentjh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum();
+
+                if (wp.getId().indexOf("FDC_STA") >= 0) {
+
+                    if (wpId.endsWith("STA")) {
+                        //日发电量
+                        ProBasicPowerstationPoint rfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.RFDL);
+                        rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble();
+//                        //月发电量
+//                        ProBasicPowerstationPoint yfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.YFDL);
+//                        yfdlsj = edosUtil.getRealData(yfdlvalue).getPointValueInDouble();
+//                        //年发电量
+//                        ProBasicPowerstationPoint nfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.NFDL);
+//                        nfdlsj = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
+
+
+                        BigDecimal yfdl2 = null;
+                        BigDecimal nfdl2 = null;
+                        for (ProEconPowerstationInfoDay5 dla :qwt3){
+                            yfdl2 = dla.getYfdldb();
+                            nfdl2 = dla.getNfdldb();
+                        }
+
+                        fd_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
+                        fd_y_sjdl1 = yfdl2.add(BigDecimal.valueOf(rfdlsj));
+                        fd_n_sjdl1 = nfdl2.add(BigDecimal.valueOf(rfdlsj));
+
+//                        fd_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
+//                        fd_y_sjdl1 = BigDecimal.valueOf(yfdlsj);
+//                        fd_n_sjdl1 = BigDecimal.valueOf(nfdlsj);
+                    }
+                    fd_r_jhdl = fd_r_jhdl + yfdljh / 30;
+                    fd_y_jhdl = fd_y_jhdl + yfdljh;
+                    fd_n_jhdl = fd_n_jhdl + nfdljh;
+
+
+                } else {
+
+                    if (wpId.endsWith("STA")) {
+                        //日发电量
+                        ProBasicPowerstationPoint rfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.RFDL);
+                        rfdlsj = edosUtil.getRealData(rfdlvalue).getPointValueInDouble();
+//                        //月发电量
+//                        ProBasicPowerstationPoint yfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.YFDL);
+//                        yfdlsj = edosUtil.getRealData(yfdlvalue).getPointValueInDouble();
+//
+//                        //年发电量
+//                        ProBasicPowerstationPoint nfdlvalue = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.NFDL);
+//                        nfdlsj = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
+//
+//                        gf_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
+//                        gf_y_sjdl1 = BigDecimal.valueOf(yfdlsj);
+//                        gf_n_sjdl1 = BigDecimal.valueOf(nfdlsj);
+
+                        BigDecimal yfdl2 = null;
+                        BigDecimal nfdl2 = null;
+                        for (ProEconPowerstationInfoDay5 dla :qwt3){
+                            yfdl2 = dla.getYfdldb();
+                            nfdl2 = dla.getNfdldb();
+                        }
+
+                        gf_r_sjdl1 = BigDecimal.valueOf(rfdlsj);
+                        gf_y_sjdl1 = yfdl2.add(BigDecimal.valueOf(rfdlsj));
+                        gf_n_sjdl1 = nfdl2.add(BigDecimal.valueOf(rfdlsj));
+                    }
+                    gf_r_jhdl = gf_r_jhdl + yfdljh / 30;
+                    gf_y_jhdl = gf_y_jhdl + yfdljh;
+                    gf_n_jhdl = gf_n_jhdl + nfdljh;
+
+                }
+
+            }
+
+
+            if (wpId.contains("FL")) {
+                gf_r_jhdl = 0;
+                gf_y_jhdl = 0;
+                gf_n_jhdl = 0;
+                gf_r_sjdl = 0;
+                gf_y_sjdl = 0;
+                gf_n_sjdl = 0;
+            } else if (wpId.contains("GF")) {
+                fd_r_jhdl = 0;
+                fd_y_jhdl = 0;
+                fd_n_jhdl = 0;
+                fd_r_sjdl = 0;
+                fd_y_sjdl = 0;
+                fd_n_sjdl = 0;
+            }
+
+            if (wpId.endsWith("-2") || wpId.contains("GDC")){
+                fd_r_sjdl1 = BigDecimal.valueOf(0);
+                fd_y_sjdl1 = BigDecimal.valueOf(0);
+                fd_n_sjdl1 = BigDecimal.valueOf(0);
+            }
+
+            if (wpId.endsWith("-1") || wpId.contains("FDC")){
+                gf_r_sjdl1 = BigDecimal.valueOf(0);
+                gf_y_sjdl1 = BigDecimal.valueOf(0);
+                gf_n_sjdl1 = BigDecimal.valueOf(0);
+            }
+
+            Map<String, Double> proplanmap = new HashMap<>();
+
+            proplanmap.put("fd_r_jhdl", StringUtils.round(fd_r_jhdl, 0));
+            proplanmap.put("fd_y_jhdl", StringUtils.round(fd_y_jhdl, 0));
+            proplanmap.put("fd_n_jhdl", StringUtils.round(fd_n_jhdl, 0));
+            proplanmap.put("fd_r_sjdl", StringUtils.round(fd_r_sjdl1.doubleValue(), 2));
+            proplanmap.put("fd_y_sjdl", StringUtils.round(fd_y_sjdl1.doubleValue(), 2));
+            proplanmap.put("fd_n_sjdl", StringUtils.round(fd_n_sjdl1.doubleValue(), 2));
+
+            proplanmap.put("gf_r_jhdl", StringUtils.round(gf_r_jhdl, 0));
+            proplanmap.put("gf_y_jhdl", StringUtils.round(gf_y_jhdl, 0));
+            proplanmap.put("gf_n_jhdl", StringUtils.round(gf_n_jhdl, 0));
+
+            proplanmap.put("gf_r_sjdl", StringUtils.round(gf_r_sjdl1.doubleValue(), 2));
+            proplanmap.put("gf_y_sjdl", StringUtils.round(gf_y_sjdl1.doubleValue(), 2));
+            proplanmap.put("gf_n_sjdl", StringUtils.round(gf_n_sjdl1.doubleValue(), 2));
+
+            proplanmap.put("qy_r_jhdl", StringUtils.round(fd_r_jhdl + gf_r_jhdl, 0));
+            proplanmap.put("qy_y_jhdl", StringUtils.round(fd_y_jhdl + gf_y_jhdl, 0));
+            proplanmap.put("qy_n_jhdl", StringUtils.round(fd_n_jhdl + gf_n_jhdl, 0));
+            proplanmap.put("qy_r_sjdl", StringUtils.round((fd_r_sjdl1.doubleValue()) + (gf_r_sjdl1.doubleValue()), 2));
+            proplanmap.put("qy_y_sjdl", StringUtils.round((fd_y_sjdl1.doubleValue())+ (gf_y_sjdl1.doubleValue()), 2));
+            proplanmap.put("qy_n_sjdl", StringUtils.round((fd_n_sjdl1.doubleValue()) + (gf_n_sjdl1.doubleValue()), 2));
+
+            map.put("proplanmap", proplanmap);
+        }
+        return map;
+    }
+
+}