王波 3 ماه پیش
والد
کامیت
bf62ddf9fa

+ 6 - 0
common/src/main/java/com/gyee/common/vo/curve/CurveVo.java

@@ -14,7 +14,13 @@ public class CurveVo {
     private String wtid;
     private String nemCode;
     private Double speed;
+    /**
+     * 自算功率
+     */
     private Double theorypower;
+    /**
+     * 保证功率
+     */
     private Double ensurepower;
 
 }

+ 8 - 2
generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java

@@ -1,10 +1,15 @@
 package com.gyee.generation;
 
-import com.gyee.generation.service.*;
+
+import com.gyee.generation.service.EquipmentInfo5Service;
+import com.gyee.generation.service.EquipmentInfoDayTopService;
+import com.gyee.generation.service.ReCalSevice;
+import com.gyee.generation.service.WtAlysisDayService;
 import com.gyee.generation.util.SpringUtils;
-import org.mybatis.spring.annotation.MapperScan;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.mybatis.spring.annotation.MapperScan;
+
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.openfeign.EnableFeignClients;
@@ -16,6 +21,7 @@ import java.util.Calendar;
 import java.util.Date;
 import java.util.concurrent.TimeUnit;
 
+
 /**
  * @ClassName : GenerationMain
  * @Author : xieshengjie

+ 11 - 0
generationXK-service/src/main/java/com/gyee/generation/service/PowerCurveFittingByTimeService.java

@@ -27,6 +27,7 @@ import java.net.URI;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 @Service
 public class PowerCurveFittingByTimeService {
@@ -1686,9 +1687,11 @@ public class PowerCurveFittingByTimeService {
     }
 
     //功率曲线拟合
+
     private void curveFittingBuilder(Date begin, Date end, int dimension, double scale, String pointIdGL, String pointIdFS, String pointIdZT, List<PointVo> sjglPoints, List<PointVo> zyglPoints, String windturbineId) throws Exception {
         double maxPower = windturbineCapacity.get(windturbineId);
         double maxSpeed = 25;
+        List<ProBasicEquipment> wt2 = CacheContext.wtls.stream().filter(wt -> wt.getProjectId().equals("NX_FGS_HAF02_EG")).collect(Collectors.toList());
         List<PointfVo> sjglnhpoints = new ArrayList<>();
         Map<Double, PointfVo> zyglnhpoints = new HashMap<>();
 
@@ -1710,6 +1713,14 @@ public class PowerCurveFittingByTimeService {
 //                List<TsDoubleData> qfzttemp = remoteService.adapterfd().getHistorySnap(qfzt, begin.getTime(), end.getTime(), interval);
                 fspointstemp.sort(Comparator.comparingLong(PointData::getPointTime));
                 glpointstemp.sort(Comparator.comparingLong(PointData::getPointTime));
+                for (ProBasicEquipment wt : wt2){
+                    if (windturbineId.equals(wt.getId())) {
+                        for (PointData pointData : glpointstemp) {
+                            pointData.setPointValueInDouble(pointData.getPointValueInDouble() / 1000.0);
+                        }
+                    }
+                }
+
                 // 删除最后一条数据
                 if (!fspointstemp.isEmpty() && qfzttemp.size()!= fspointstemp.size()) {
                     fspointstemp.remove(fspointstemp.size() - 1);  // 删除最后一条数据

+ 122 - 122
generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/AccessStatusService.java

@@ -31,128 +31,128 @@ public class AccessStatusService {
      *
      * @throws Exception
      */
-    public void accessStatus() throws Exception {
-
-        List<PointData> resultList = new ArrayList<>();
-        List<ProBasicMeterPoint> meterpoints = CacheContext.meterpoints;
-        List<ProBasicPowerstation> wpls = CacheContext.wpls;
-        List<ProBasicSubStation> subwpls = CacheContext.subwpls;
-        List<ProBasicWeatherStation> wswpls = CacheContext.wswpls;
-        Map<String, Map<String, ProBasicPowerstationPoint>> subwppointmap = CacheContext.subwppointmap;
-        Map<String, Map<String, ProBasicPowerstationPoint>> wswppointmap = CacheContext.wswppointmap;
-        Map<String, Map<String, ProBasicPowerstationPoint>> wppointmap = CacheContext.wppointmap;
-        Date currentDate = DateUtils.getCurrentDate();
-
-        wpls.stream().forEach(wp -> {
-            Map<String, ProBasicPowerstationPoint> powerstationPointMap = wppointmap.get(wp.getId());
-            ProBasicPowerstationPoint djlpoint = powerstationPointMap.get(ContantXk.DQJRZT);
-            ProBasicPowerstationPoint agcpoint = powerstationPointMap.get(ContantXk.AGCJRZT);
-            ProBasicPowerstationPoint glycpoint = powerstationPointMap.get(ContantXk.GLYCJRZT);
-            ProBasicPowerstationPoint cftpoint = powerstationPointMap.get(ContantXk.QXZJRZT);
-            ProBasicPowerstationPoint sbjrpoint = powerstationPointMap.get(ContantXk.SBJRZT);
-            ProBasicPowerstationPoint czztpoint = powerstationPointMap.get(ContantXk.CZZT);
-
-            ProBasicPowerstationPoint qcztPoint = powerstationPointMap.get(ContantXk.QCZT);
-
-            ProBasicPowerstationPoint zycglpoint = powerstationPointMap.get(ContantXk.ZYCGL);
-            double djlzt = 0;
-            double fjzt = 0;
-            double agczt = 0;
-            double glyczt = 0;
-            double cftzt = 0;
-            double czzt = 0;
-
-            double zycgl = 0;
-            Optional<ProBasicMeterPoint> swdlOptional = meterpoints.stream().filter(me -> me.getWindpowerstationId().equals(wp.getId()) && "ZXYG".equals(me.getUniformCode()) && "出线".equals(me.getMeterType()) && "主".equals(me.getMeterSort())).findFirst();
-            Optional<ProBasicSubStation> subStationOptional = subwpls.stream().filter(sub -> sub.getWindpowerstationId().equals(wp.getId())).findFirst();
-            Optional<ProBasicWeatherStation> wsOptional = wswpls.stream().filter(ws -> ws.getWindpowerstationId().equals(wp.getId())).findFirst();
-            List<ProBasicSubStation> stations = subwpls.stream().filter(sub -> sub.getWindpowerstationId().equals(wp.getId())).collect(Collectors.toList());
-            List<String> pointList = new ArrayList<>();
-            stations.stream().forEach(station -> {
-                pointList.add(subwppointmap.get(station.getId()).get(ContantXk.TPOINT_WP_YCGL).getNemCode());
-            });
-            try {
-                zycgl = edosUtil.getRealData(pointList).stream().mapToDouble(PointData::getPointValueInDouble).sum();
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-
-
-            try {
-                double qczt = edosUtil.getSectionData(qcztPoint, currentDate.getTime()).getPointValueInDouble();
-                if (qczt != 6) {
-                    fjzt = 1;
-                }
-
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-            if (swdlOptional.isPresent()) {
-                ProBasicMeterPoint proBasicMeterPoint = swdlOptional.get();
-                try {
-                    Long pointTime = edosUtil.getRealData(proBasicMeterPoint.getNemCode()).getPointTime();
-                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)) {
-                        djlzt = 1;
-                    }
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-            if (wsOptional.isPresent()) {
-                Map<String, ProBasicPowerstationPoint> basicPowerstationPointMap = wswppointmap.get(wsOptional.get().getId());
-
-                ProBasicPowerstationPoint proBasicPowerstationPoint = null;
-                if (wp.getWindType().equals("-1")) {
-                    proBasicPowerstationPoint = basicPowerstationPointMap.get(ContantXk.FCCFTWD);
-                } else if (wp.getWindType().equals("-2")) {
-                    proBasicPowerstationPoint = basicPowerstationPointMap.get(ContantXk.QXZWD);
-                }
-
-                //                ProBasicPowerstationPoint proBasicPowerstationPoint = basicPowerstationPointMap.get(ContantXk.FCCFTWD);
-                try {
-                    Long pointTime = edosUtil.getRealData(proBasicPowerstationPoint.getNemCode()).getPointTime();
-                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)) {
-                        cftzt = 1;
-                    }
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-            if (subStationOptional.isPresent()) {
-                Map<String, ProBasicPowerstationPoint> basicPowerstationPointMap = subwppointmap.get(subStationOptional.get().getId());
-                ProBasicPowerstationPoint agcpowerstationPoint = basicPowerstationPointMap.get(ContantXk.TPOINT_WP_CXGL);
-                try {
-                    Long pointTime = edosUtil.getRealData(agcpowerstationPoint.getNemCode()).getPointTime();
-                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)) {
-                        agczt = 1;
-                    }
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-                ProBasicPowerstationPoint glycpowerstationPoint = basicPowerstationPointMap.get(ContantXk.TPOINT_WP_YCGL);
-                try {
-                    Long pointTime = edosUtil.getRealData(glycpowerstationPoint.getNemCode()).getPointTime();
-                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)) {
-                        glyczt = 1;
-                    }
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-            if (djlzt == 1 || agczt == 1 || glyczt == 1 || fjzt == 1 || cftzt == 1) {
-                czzt = 1;
-            }
-            resultList.add(PointUtil.createPointData(currentDate, zycgl, zycglpoint.getNemCode(), zycglpoint.getName()));
-            resultList.add(PointUtil.createPointData(currentDate, djlzt, djlpoint.getNemCode(), djlpoint.getName()));
-            resultList.add(PointUtil.createPointData(currentDate, agczt, agcpoint.getNemCode(), agcpoint.getName()));
-            resultList.add(PointUtil.createPointData(currentDate, glyczt, glycpoint.getNemCode(), glycpoint.getName()));
-            resultList.add(PointUtil.createPointData(currentDate, cftzt, cftpoint.getNemCode(), cftpoint.getName()));
-            resultList.add(PointUtil.createPointData(currentDate, fjzt, sbjrpoint.getNemCode(), sbjrpoint.getName()));
-            resultList.add(PointUtil.createPointData(currentDate, czzt, czztpoint.getNemCode(), czztpoint.getName()));
-        });
-        edosUtil.sendMultiPoint(resultList);
-
-    }
+//    public void accessStatus() throws Exception {
+//
+//        List<PointData> resultList = new ArrayList<>();
+//        List<ProBasicMeterPoint> meterpoints = CacheContext.meterpoints;
+//        List<ProBasicPowerstation> wpls = CacheContext.wpls;
+//        List<ProBasicSubStation> subwpls = CacheContext.subwpls;
+//        List<ProBasicWeatherStation> wswpls = CacheContext.wswpls;
+//        Map<String, Map<String, ProBasicPowerstationPoint>> subwppointmap = CacheContext.subwppointmap;
+//        Map<String, Map<String, ProBasicPowerstationPoint>> wswppointmap = CacheContext.wswppointmap;
+//        Map<String, Map<String, ProBasicPowerstationPoint>> wppointmap = CacheContext.wppointmap;
+//        Date currentDate = DateUtils.getCurrentDate();
+//
+//        wpls.stream().forEach(wp -> {
+//            Map<String, ProBasicPowerstationPoint> powerstationPointMap = wppointmap.get(wp.getId());
+//            ProBasicPowerstationPoint djlpoint = powerstationPointMap.get(ContantXk.DQJRZT);
+//            ProBasicPowerstationPoint agcpoint = powerstationPointMap.get(ContantXk.AGCJRZT);
+//            ProBasicPowerstationPoint glycpoint = powerstationPointMap.get(ContantXk.GLYCJRZT);
+//            ProBasicPowerstationPoint cftpoint = powerstationPointMap.get(ContantXk.QXZJRZT);
+//            ProBasicPowerstationPoint sbjrpoint = powerstationPointMap.get(ContantXk.SBJRZT);
+//            ProBasicPowerstationPoint czztpoint = powerstationPointMap.get(ContantXk.CZZT);
+//
+//            ProBasicPowerstationPoint qcztPoint = powerstationPointMap.get(ContantXk.QCZT);
+//
+//            ProBasicPowerstationPoint zycglpoint = powerstationPointMap.get(ContantXk.ZYCGL);
+//            double djlzt = 0;
+//            double fjzt = 0;
+//            double agczt = 0;
+//            double glyczt = 0;
+//            double cftzt = 0;
+//            double czzt = 0;
+//
+//            double zycgl = 0;
+//            Optional<ProBasicMeterPoint> swdlOptional = meterpoints.stream().filter(me -> me.getWindpowerstationId().equals(wp.getId()) && "ZXYG".equals(me.getUniformCode()) && "出线".equals(me.getMeterType()) && "主".equals(me.getMeterSort())).findFirst();
+//            Optional<ProBasicSubStation> subStationOptional = subwpls.stream().filter(sub -> sub.getWindpowerstationId().equals(wp.getId())).findFirst();
+//            Optional<ProBasicWeatherStation> wsOptional = wswpls.stream().filter(ws -> ws.getWindpowerstationId().equals(wp.getId())).findFirst();
+//            List<ProBasicSubStation> stations = subwpls.stream().filter(sub -> sub.getWindpowerstationId().equals(wp.getId())).collect(Collectors.toList());
+//            List<String> pointList = new ArrayList<>();
+//            stations.stream().forEach(station -> {
+//                pointList.add(subwppointmap.get(station.getId()).get(ContantXk.TPOINT_WP_YCGL).getNemCode());
+//            });
+//            try {
+//                zycgl = edosUtil.getRealData(pointList).stream().mapToDouble(PointData::getPointValueInDouble).sum();
+//            } catch (Exception e) {
+//                e.printStackTrace();
+//            }
+//
+//
+//            try {
+//                double qczt = edosUtil.getSectionData(qcztPoint, currentDate.getTime()).getPointValueInDouble();
+//                if (qczt != 6) {
+//                    fjzt = 1;
+//                }
+//
+//            } catch (Exception e) {
+//                e.printStackTrace();
+//            }
+//            if (swdlOptional.isPresent()) {
+//                ProBasicMeterPoint proBasicMeterPoint = swdlOptional.get();
+//                try {
+//                    Long pointTime = edosUtil.getRealData(proBasicMeterPoint.getNemCode()).getPointTime();
+//                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)) {
+//                        djlzt = 1;
+//                    }
+//                } catch (Exception e) {
+//                    e.printStackTrace();
+//                }
+//            }
+//            if (wsOptional.isPresent()) {
+//                Map<String, ProBasicPowerstationPoint> basicPowerstationPointMap = wswppointmap.get(wsOptional.get().getId());
+//
+//                ProBasicPowerstationPoint proBasicPowerstationPoint = null;
+//                if (wp.getWindType().equals("-1")) {
+//                    proBasicPowerstationPoint = basicPowerstationPointMap.get(ContantXk.FCCFTWD);
+//                } else if (wp.getWindType().equals("-2")) {
+//                    proBasicPowerstationPoint = basicPowerstationPointMap.get(ContantXk.QXZWD);
+//                }
+//
+//                //                ProBasicPowerstationPoint proBasicPowerstationPoint = basicPowerstationPointMap.get(ContantXk.FCCFTWD);
+//                try {
+//                    Long pointTime = edosUtil.getRealData(proBasicPowerstationPoint.getNemCode()).getPointTime();
+//                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)) {
+//                        cftzt = 1;
+//                    }
+//                } catch (Exception e) {
+//                    e.printStackTrace();
+//                }
+//            }
+//            if (subStationOptional.isPresent()) {
+//                Map<String, ProBasicPowerstationPoint> basicPowerstationPointMap = subwppointmap.get(subStationOptional.get().getId());
+//                ProBasicPowerstationPoint agcpowerstationPoint = basicPowerstationPointMap.get(ContantXk.TPOINT_WP_CXGL);
+//                try {
+//                    Long pointTime = edosUtil.getRealData(agcpowerstationPoint.getNemCode()).getPointTime();
+//                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)) {
+//                        agczt = 1;
+//                    }
+//                } catch (Exception e) {
+//                    e.printStackTrace();
+//                }
+//                ProBasicPowerstationPoint glycpowerstationPoint = basicPowerstationPointMap.get(ContantXk.TPOINT_WP_YCGL);
+//                try {
+//                    Long pointTime = edosUtil.getRealData(glycpowerstationPoint.getNemCode()).getPointTime();
+//                    if ((currentDate.getTime() - pointTime) / 1000 < Integer.parseInt(second)) {
+//                        glyczt = 1;
+//                    }
+//                } catch (Exception e) {
+//                    e.printStackTrace();
+//                }
+//            }
+//            if (djlzt == 1 || agczt == 1 || glyczt == 1 || fjzt == 1 || cftzt == 1) {
+//                czzt = 1;
+//            }
+//            resultList.add(PointUtil.createPointData(currentDate, zycgl, zycglpoint.getNemCode(), zycglpoint.getName()));
+//            resultList.add(PointUtil.createPointData(currentDate, djlzt, djlpoint.getNemCode(), djlpoint.getName()));
+//            resultList.add(PointUtil.createPointData(currentDate, agczt, agcpoint.getNemCode(), agcpoint.getName()));
+//            resultList.add(PointUtil.createPointData(currentDate, glyczt, glycpoint.getNemCode(), glycpoint.getName()));
+//            resultList.add(PointUtil.createPointData(currentDate, cftzt, cftpoint.getNemCode(), cftpoint.getName()));
+//            resultList.add(PointUtil.createPointData(currentDate, fjzt, sbjrpoint.getNemCode(), sbjrpoint.getName()));
+//            resultList.add(PointUtil.createPointData(currentDate, czzt, czztpoint.getNemCode(), czztpoint.getName()));
+//        });
+//        edosUtil.sendMultiPoint(resultList);
+//
+//    }
 
     /**
      * 全场状态

+ 164 - 164
generationXK-service/src/main/java/com/gyee/generation/task/AnalysisTask.java

@@ -1,164 +1,164 @@
-package com.gyee.generation.task;
-
-import com.gyee.generation.service.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.scheduling.annotation.EnableAsync;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-import java.util.Date;
-
-@Component
-@EnableAsync  // 启用异步方法执行
-public class AnalysisTask {
-    private static final Logger logger = LoggerFactory.getLogger(AnalysisTask.class);
-
-    @Autowired
-    private PowerCurveFittingByTimeService powerCurveFittingByTimeService;
-    @Autowired
-    private InputOrOutPutService inputOrOutPutService;
-    @Autowired
-    private WindturbineGoodnessService windturbineGoodnessService;
-    @Autowired
-    private EquipmentInfo3Service equipmentInfo3Service;
-    @Autowired
-    private EquipmentInfo2Service equipmentInfo2Service;
-    @Autowired
-    private EquipmentInfo4Service equipmentInfo4Service;
-    @Autowired
-    private EquipmentInfo1Service equipmentInfo1Service;
-
-    @Resource
-    @Qualifier("taskScheduler") // 指定使用特定的 TaskScheduler
-    private ThreadPoolTaskScheduler taskScheduler;
-    // 每日1点 - 日曲线偏差
-    @Async
-    @Scheduled(cron = "0 0 1 * * ?")
-    public void rqxpc() {
-        try {
-            logger.info("日曲线偏差开始运行");
-
-            Date date = new Date();
-            powerCurveFittingByTimeService.cureFittingDay(date, "NX_FGS_HA_FDC_STA");
-            logger.info("日曲线偏差运行完成");
-        } catch (Exception e) {
-            logger.error("日曲线偏差运行失败", e);
-        }
-    }
-
-    // 每日1点10分 - 月曲线偏差
-    @Async
-    @Scheduled(cron = "0 10 1 * * ?")
-    public void yqxpc() {
-        try {
-            logger.info("月曲线偏差开始运行");
-            Date date = new Date();
-            powerCurveFittingByTimeService.cureFittingMonth(date, "0", null);
-            logger.info("月曲线偏差运行完成");
-        } catch (Exception e) {
-            logger.error("月曲线偏差运行失败", e);
-        }
-    }
-
-    // 每5分钟 - 切入切出状态切换记录
-    @Async
-    @Scheduled(cron = "0 0/5 * * * ?")
-    public void qrqc() {
-        try {
-            logger.info("切入切出状态切换记录调度程序执行开始");
-            inputOrOutPutService.inputOrOutputSpeed(new Date());
-            logger.info("切入切出状态切换记录调度任务处理完成");
-        } catch (Exception e) {
-            logger.error("切入切出状态切换记录调度任务执行失败", e);
-        }
-    }
-
-    // 每日1点 - 切入切出统计
-    @Async
-    @Scheduled(cron = "0 0 1 * * ?")
-    public void qrqctool() {
-        try {
-            logger.info("切入切出统计调度程序执行开始");
-            inputOrOutPutService.inputOrOutput(new Date());
-            logger.info("切入切出统计调度任务处理完成");
-        } catch (Exception e) {
-            logger.error("切入切出统计调度任务执行失败", e);
-        }
-    }
-
-    // 每日2点 - 功率一致性系数和拟合优度统计
-    @Async
-    @Scheduled(cron = "0 0 2 * * ?")
-    public void glyzx() {
-        try {
-            logger.info("功率一致性系数和拟合优度统计调度程序执行开始");
-            windturbineGoodnessService.calWindturbineGoodness(new Date());
-            logger.info("功率一致性系数和拟合优度统计调度任务处理完成");
-        } catch (Exception e) {
-            logger.error("功率一致性系数和拟合优度统计调度任务执行失败", e);
-        }
-    }
-
-    // 每15分钟 - 设备指标2
-    @Async
-    @Scheduled(cron = "0 0/15 * * * ?")
-    public void sbzb1() {
-        try {
-            logger.info("设备指标1调度程序执行开始");
-            Date date = new Date();
-            equipmentInfo1Service.calEquipmentInfoDay(date);
-            logger.info("设备指标1调度程序执行完成");
-        } catch (Exception e) {
-            logger.error("设备指标1调度任务执行失败", e);
-        }
-    }
-
-    // 每15分钟 - 设备指标2
-    @Async
-    @Scheduled(cron = "0 0/15 * * * ?")
-    public void sbzb2() {
-        try {
-            logger.info("设备指标2调度程序执行开始");
-            Date date = new Date();
-            equipmentInfo2Service.calEquipmentInfoDay(date);
-            logger.info("设备指标2调度程序执行完成");
-        } catch (Exception e) {
-            logger.error("设备指标2调度任务执行失败", e);
-        }
-    }
-
-    // 每15分钟 - 设备指标3
-    @Async
-    @Scheduled(cron = "0 0/15 * * * ?")
-    public void sbzb3() {
-        try {
-            logger.info("设备指标3调度程序执行开始");
-            Date date = new Date();
-            equipmentInfo3Service.calEquipmentInfoDay(date);
-            logger.info("设备指标3调度程序执行完成");
-        } catch (Exception e) {
-            logger.error("设备指标3调度任务执行失败", e);
-        }
-    }
-
-    // 每15分钟 - 设备指标4
-    @Async
-    @Scheduled(cron = "0 0/15 * * * ?")
-    public void sbzb4() {
-        try {
-            logger.info("设备指标4调度程序执行开始");
-            Date date = new Date();
-            equipmentInfo4Service.calEquipmentInfoDay(date);
-            logger.info("设备指标4调度程序执行完成");
-        } catch (Exception e) {
-            logger.error("设备指标4调度任务执行失败", e);
-        }
-    }
-}
+//package com.gyee.generation.task;
+//
+//import com.gyee.generation.service.*;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.beans.factory.annotation.Qualifier;
+//import org.springframework.scheduling.annotation.Async;
+//import org.springframework.scheduling.annotation.EnableAsync;
+//import org.springframework.scheduling.annotation.Scheduled;
+//import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
+//import org.springframework.stereotype.Component;
+//
+//import javax.annotation.Resource;
+//import java.util.Date;
+//
+//@Component
+//@EnableAsync  // 启用异步方法执行
+//public class AnalysisTask {
+//    private static final Logger logger = LoggerFactory.getLogger(AnalysisTask.class);
+//
+//    @Autowired
+//    private PowerCurveFittingByTimeService powerCurveFittingByTimeService;
+//    @Autowired
+//    private InputOrOutPutService inputOrOutPutService;
+//    @Autowired
+//    private WindturbineGoodnessService windturbineGoodnessService;
+//    @Autowired
+//    private EquipmentInfo3Service equipmentInfo3Service;
+//    @Autowired
+//    private EquipmentInfo2Service equipmentInfo2Service;
+//    @Autowired
+//    private EquipmentInfo4Service equipmentInfo4Service;
+//    @Autowired
+//    private EquipmentInfo1Service equipmentInfo1Service;
+//
+//    @Resource
+//    @Qualifier("taskScheduler") // 指定使用特定的 TaskScheduler
+//    private ThreadPoolTaskScheduler taskScheduler;
+//    // 每日1点 - 日曲线偏差
+//    @Async
+//    @Scheduled(cron = "0 0 1 * * ?")
+//    public void rqxpc() {
+//        try {
+//            logger.info("日曲线偏差开始运行");
+//
+//            Date date = new Date();
+//            powerCurveFittingByTimeService.cureFittingDay(date, "NX_FGS_HA_FDC_STA");
+//            logger.info("日曲线偏差运行完成");
+//        } catch (Exception e) {
+//            logger.error("日曲线偏差运行失败", e);
+//        }
+//    }
+//
+//    // 每日1点10分 - 月曲线偏差
+//    @Async
+//    @Scheduled(cron = "0 10 1 * * ?")
+//    public void yqxpc() {
+//        try {
+//            logger.info("月曲线偏差开始运行");
+//            Date date = new Date();
+//            powerCurveFittingByTimeService.cureFittingMonth(date, "0", null);
+//            logger.info("月曲线偏差运行完成");
+//        } catch (Exception e) {
+//            logger.error("月曲线偏差运行失败", e);
+//        }
+//    }
+//
+//    // 每5分钟 - 切入切出状态切换记录
+//    @Async
+//    @Scheduled(cron = "0 0/5 * * * ?")
+//    public void qrqc() {
+//        try {
+//            logger.info("切入切出状态切换记录调度程序执行开始");
+//            inputOrOutPutService.inputOrOutputSpeed(new Date());
+//            logger.info("切入切出状态切换记录调度任务处理完成");
+//        } catch (Exception e) {
+//            logger.error("切入切出状态切换记录调度任务执行失败", e);
+//        }
+//    }
+//
+//    // 每日1点 - 切入切出统计
+//    @Async
+//    @Scheduled(cron = "0 0 1 * * ?")
+//    public void qrqctool() {
+//        try {
+//            logger.info("切入切出统计调度程序执行开始");
+//            inputOrOutPutService.inputOrOutput(new Date());
+//            logger.info("切入切出统计调度任务处理完成");
+//        } catch (Exception e) {
+//            logger.error("切入切出统计调度任务执行失败", e);
+//        }
+//    }
+//
+//    // 每日2点 - 功率一致性系数和拟合优度统计
+//    @Async
+//    @Scheduled(cron = "0 0 2 * * ?")
+//    public void glyzx() {
+//        try {
+//            logger.info("功率一致性系数和拟合优度统计调度程序执行开始");
+//            windturbineGoodnessService.calWindturbineGoodness(new Date());
+//            logger.info("功率一致性系数和拟合优度统计调度任务处理完成");
+//        } catch (Exception e) {
+//            logger.error("功率一致性系数和拟合优度统计调度任务执行失败", e);
+//        }
+//    }
+//
+//    // 每15分钟 - 设备指标2
+//    @Async
+//    @Scheduled(cron = "0 0/15 * * * ?")
+//    public void sbzb1() {
+//        try {
+//            logger.info("设备指标1调度程序执行开始");
+//            Date date = new Date();
+//            equipmentInfo1Service.calEquipmentInfoDay(date);
+//            logger.info("设备指标1调度程序执行完成");
+//        } catch (Exception e) {
+//            logger.error("设备指标1调度任务执行失败", e);
+//        }
+//    }
+//
+//    // 每15分钟 - 设备指标2
+//    @Async
+//    @Scheduled(cron = "0 0/15 * * * ?")
+//    public void sbzb2() {
+//        try {
+//            logger.info("设备指标2调度程序执行开始");
+//            Date date = new Date();
+//            equipmentInfo2Service.calEquipmentInfoDay(date);
+//            logger.info("设备指标2调度程序执行完成");
+//        } catch (Exception e) {
+//            logger.error("设备指标2调度任务执行失败", e);
+//        }
+//    }
+//
+//    // 每15分钟 - 设备指标3
+//    @Async
+//    @Scheduled(cron = "0 0/15 * * * ?")
+//    public void sbzb3() {
+//        try {
+//            logger.info("设备指标3调度程序执行开始");
+//            Date date = new Date();
+//            equipmentInfo3Service.calEquipmentInfoDay(date);
+//            logger.info("设备指标3调度程序执行完成");
+//        } catch (Exception e) {
+//            logger.error("设备指标3调度任务执行失败", e);
+//        }
+//    }
+//
+//    // 每15分钟 - 设备指标4
+//    @Async
+//    @Scheduled(cron = "0 0/15 * * * ?")
+//    public void sbzb4() {
+//        try {
+//            logger.info("设备指标4调度程序执行开始");
+//            Date date = new Date();
+//            equipmentInfo4Service.calEquipmentInfoDay(date);
+//            logger.info("设备指标4调度程序执行完成");
+//        } catch (Exception e) {
+//            logger.error("设备指标4调度任务执行失败", e);
+//        }
+//    }
+//}

+ 1 - 1
generationXK-service/src/main/java/com/gyee/generation/task/SaticScheduleCALTask.java

@@ -67,7 +67,7 @@ public class SaticScheduleCALTask {
         XxlJobHelper.log("全场状态调度程序执行开始!........");
         try {
             //场站接入状态,总预测功率
-            accessStatusService.accessStatus();
+//            accessStatusService.accessStatus();
             //全场状态
             accessStatusService.fullFieldState();
         } catch (Exception e) {

+ 10 - 10
generationXK-service/src/main/java/com/gyee/generation/task/SaticSchedulePgTask.java

@@ -313,27 +313,27 @@ public class SaticSchedulePgTask {
 
 
     /**
-     * 平遥朱坑风电场功率预测
+     * 惠安风电场功率预测
      * 每天一次
      */
-    @XxlJob("shutdown_SXJ_KGDL_ZK_FDC_STA")
-    public void shutdown_SXJ_KGDL_ZK_FDC_STA() {
+    @XxlJob("shutdown_NX_FGS_HA_FDC_STA")
+    public void shutdown_NX_FGS_HA_FDC_STA() {
 
-        XxlJobHelper.log("平遥朱坑风电场功率预测调度程序执行开始!........");
+        XxlJobHelper.log("惠安风电场功率预测调度程序执行开始!........");
 
         Date date = new Date();
         try {
             XxlJobHelper.log("日序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingDay(date, "SXJ_KGDL_ZK_FDC_STA");
+            powerCurveFittingByTimeService.cureFittingDay(date, "NX_FGS_HA_FDC_STA");
             XxlJobHelper.log("日处理完成!........");
 
             XxlJobHelper.log("月序执行开始!........");
-            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "SXJ_KGDL_ZK_FDC_STA");
+            powerCurveFittingByTimeService.cureFittingMonth(date, "0", "NX_FGS_HA_FDC_STA");
             XxlJobHelper.log("月处理完成!........");
 
-            //            XxlJobHelper.log("年序执行开始!........");
-            //            powerCurveFittingByTimeService.cureFittingYear(date, "SXJ_KGDL_ZK_FDC_STA");
-            //            XxlJobHelper.log("年处理完成!........");
+            XxlJobHelper.log("年序执行开始!........");
+            powerCurveFittingByTimeService.cureFittingYear(date, "NX_FGS_HA_FDC_STA");
+            XxlJobHelper.log("年处理完成!........");
 
 
         } catch (Exception e) {
@@ -341,7 +341,7 @@ public class SaticSchedulePgTask {
             XxlJobHelper.log(e.getMessage());
         }
 
-        XxlJobHelper.log("平遥朱坑风电场功率预测调度任务处理完成!........");
+        XxlJobHelper.log("惠安风电场功率预测调度任务处理完成!........");
     }
 
 

+ 5 - 0
generationXK-service/src/main/java/com/gyee/generation/task/thread/EquipmentInfo4ThreadPool.java

@@ -265,6 +265,11 @@ public class EquipmentInfo4ThreadPool implements Callable<String>, Serializable
                     point = wtpointmap.get(ContantXk.CJ_SSGL);
                     List<PointData> glls = edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000);
                     double powerProduction = model.getPowerProduction();
+                    if (wt.getProjectId().equals("NX_FGS_HAF02_EG")) {
+                        for (PointData gl : glls) {
+                            gl.setPointValueInDouble(gl.getPointValueInDouble() / 1000);
+                        }
+                    }
                     if (!glls.isEmpty() && glls.size() == fsls.size()) {
                         for (int i = 0; i < glls.size(); i++) {
                             //如果功率达到装机容量