Browse Source

修复和风计算指标

shilin 1 year ago
parent
commit
8c33dd8ca6

+ 73 - 73
realtime/generationXK-service/src/main/java/com/gyee/generation/config/XxlJobConfig.java

@@ -1,74 +1,74 @@
-//package com.gyee.generation.config;
-//
-//
-//import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.springframework.context.EnvironmentAware;
-//import org.springframework.context.annotation.Bean;
-//import org.springframework.context.annotation.Configuration;
-//import org.springframework.context.annotation.PropertySource;
-//import org.springframework.core.env.Environment;
-//
-///**
-// * xxl-job config
-// *
-// * @author xuxueli 2017-04-28
-// */
-//
-//
-//@Configuration
-////@PropertySource("classpath:xxl-job-executor.properties")
-////@PropertySource("classpath:xxl-job-executor2.properties")
-////@PropertySource("classpath:xxl-job-executor3.properties")
+package com.gyee.generation.config;
+
+
+import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.EnvironmentAware;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.core.env.Environment;
+
+/**
+ * xxl-job config
+ *
+ * @author xuxueli 2017-04-28
+ */
+
+
+@Configuration
+//@PropertySource("classpath:xxl-job-executor.properties")
+//@PropertySource("classpath:xxl-job-executor2.properties")
+@PropertySource("classpath:xxl-job-executor3.properties")
 //@PropertySource("classpath:xxl-job-executor4.properties")
-////@PropertySource("classpath:xxl-job-executorWPLY.properties")
-////@PropertySource("classpath:xxl-job-executorRG.properties")
-////@PropertySource("classpath:xxl-job-executorJN.properties")
-//public class XxlJobConfig implements EnvironmentAware {
-//    private Environment env;
-//
-//
-//    @Override
-//    public void setEnvironment(Environment environment) {
-//        this.env=environment;
-//    }
-//
-//    private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
-//
-//
-//
-//    @Bean
-//    public XxlJobSpringExecutor xxlJobExecutor() {
-//        logger.info(">>>>>>>>>>> xxl-job config init.");
-//        XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
-//        xxlJobSpringExecutor.setAdminAddresses(env.getProperty("xxl.job.admin.addresses"));
-//        xxlJobSpringExecutor.setAppname(env.getProperty("xxl.job.executor.appname"));
-//        xxlJobSpringExecutor.setAddress(env.getProperty("xxl.job.executor.address"));
-//        xxlJobSpringExecutor.setIp(env.getProperty("xxl.job.executor.ip"));
-//        xxlJobSpringExecutor.setPort(Integer.parseInt(env.getProperty("xxl.job.executor.port")));
-//        xxlJobSpringExecutor.setAccessToken(env.getProperty("xxl.job.accessToken"));
-//        xxlJobSpringExecutor.setLogPath(env.getProperty("xxl.job.executor.logpath"));
-//        xxlJobSpringExecutor.setLogRetentionDays(Integer.parseInt(env.getProperty("xxl.job.executor.logretentiondays")));
-//        return xxlJobSpringExecutor;
-//    }
-//
-//    /**
-//     * 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
-//     *
-//     *      1、引入依赖:
-//     *          <dependency>
-//     *             <groupId>org.springframework.cloud</groupId>
-//     *             <artifactId>spring-cloud-commons</artifactId>
-//     *             <version>${version}</version>
-//     *         </dependency>
-//     *
-//     *      2、配置文件,或者容器启动变量
-//     *          spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
-//     *
-//     *      3、获取IP
-//     *          String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
-//     */
-//
-//
-//}
+//@PropertySource("classpath:xxl-job-executorWPLY.properties")
+//@PropertySource("classpath:xxl-job-executorRG.properties")
+//@PropertySource("classpath:xxl-job-executorJN.properties")
+public class XxlJobConfig implements EnvironmentAware {
+    private Environment env;
+
+
+    @Override
+    public void setEnvironment(Environment environment) {
+        this.env=environment;
+    }
+
+    private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
+
+
+
+    @Bean
+    public XxlJobSpringExecutor xxlJobExecutor() {
+        logger.info(">>>>>>>>>>> xxl-job config init.");
+        XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
+        xxlJobSpringExecutor.setAdminAddresses(env.getProperty("xxl.job.admin.addresses"));
+        xxlJobSpringExecutor.setAppname(env.getProperty("xxl.job.executor.appname"));
+        xxlJobSpringExecutor.setAddress(env.getProperty("xxl.job.executor.address"));
+        xxlJobSpringExecutor.setIp(env.getProperty("xxl.job.executor.ip"));
+        xxlJobSpringExecutor.setPort(Integer.parseInt(env.getProperty("xxl.job.executor.port")));
+        xxlJobSpringExecutor.setAccessToken(env.getProperty("xxl.job.accessToken"));
+        xxlJobSpringExecutor.setLogPath(env.getProperty("xxl.job.executor.logpath"));
+        xxlJobSpringExecutor.setLogRetentionDays(Integer.parseInt(env.getProperty("xxl.job.executor.logretentiondays")));
+        return xxlJobSpringExecutor;
+    }
+
+    /**
+     * 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
+     *
+     *      1、引入依赖:
+     *          <dependency>
+     *             <groupId>org.springframework.cloud</groupId>
+     *             <artifactId>spring-cloud-commons</artifactId>
+     *             <version>${version}</version>
+     *         </dependency>
+     *
+     *      2、配置文件,或者容器启动变量
+     *          spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
+     *
+     *      3、获取IP
+     *          String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
+     */
+
+
+}

+ 41 - 11
realtime/generationXK-service/src/main/java/com/gyee/generation/init/CacheContext.java

@@ -75,7 +75,8 @@ public class CacheContext implements CommandLineRunner {
     private IProEconStateAiService proEconStateAiService;
     @Resource
     private InputOrOutPutService inputOrOutPutService;
-
+    @Resource
+    private IProBasicStatusPointService proBasicStatusPointService;
     @Value("${runWindpowerstation}")
     private String runWindpowerstation;
 
@@ -146,6 +147,12 @@ public class CacheContext implements CommandLineRunner {
     public static Map<String,Map<String, ProBasicPowerstationPoint>> wspointmap =new HashMap<>();
     public static Map<String,Map<String, ProBasicEquipmentPoint>> zlpointmap =new HashMap<>();
     public static Map<String,Map<Integer,Integer>> aistateMap = new HashMap<>();
+
+    public static Map<String, Integer> redisDbMap = new HashMap<>();
+
+    public static List<ProBasicStatusPoint> pointdis = new ArrayList<>();
+
+    public static Map< String,Map<String, ProBasicStatusPoint>> pointdismap = new HashMap<>();
     @Override
     public void run(String... args) throws Exception {
         logger.info("缓存开始------------------------------------------------------------");
@@ -327,16 +334,16 @@ public class CacheContext implements CommandLineRunner {
             wspointmap.put(p.getId(),stringWindpowerstationpointnewMap);
 
         });
-        //支路
-        List<ProBasicBranch> basicBranches = proBasicBranchService.list();
-        if (basicBranches!=null && basicBranches.size()>0){
-            basicBranches.stream().forEach(b->{
-                String wsString = redisService.get(b.getId());
-                Map<String, ProBasicEquipmentPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(wsString, new TypeReference<Map<String, ProBasicEquipmentPoint>>() {
-                });
-                zlpointmap.put(b.getId(),stringWindpowerstationpointnewMap);
-            });
-        }
+//        //支路
+//        List<ProBasicBranch> basicBranches = proBasicBranchService.list();
+//        if (basicBranches!=null && basicBranches.size()>0){
+//            basicBranches.stream().forEach(b->{
+//                String wsString = redisService.get(b.getId());
+//                Map<String, ProBasicEquipmentPoint> stringWindpowerstationpointnewMap = JSONObject.parseObject(wsString, new TypeReference<Map<String, ProBasicEquipmentPoint>>() {
+//                });
+//                zlpointmap.put(b.getId(),stringWindpowerstationpointnewMap);
+//            });
+//        }
 
         wtls = proBasicEquipmentService.list().stream().filter(i->runWpids.contains(i.getWindpowerstationId()) && i.getIsable()==1).collect(Collectors.toList());
         logger.info(wtls.size()+"");
@@ -545,8 +552,31 @@ public class CacheContext implements CommandLineRunner {
                 }
             });
         }
+        for (int i = 0; i < 9; i++) {
+            Set<String> keys = redisService.keys(i);
 
+            for (String key : keys) {
+                redisDbMap.put(key, i);
+            }
+        }
+
+        pointdis = proBasicStatusPointService.list();
+
+        Map<String, ProBasicStatusPoint> items = null;
+        if (pointdis != null && !pointdis.isEmpty()) {
+            for (int i = 0; i < pointdis.size(); i++) {
+                ProBasicStatusPoint point = pointdis.get(i);
+                if (pointdismap.containsKey(point.getWindturbineId())) {
+                    items = pointdismap.get(point.getWindturbineId());
+                    items.put(point.getUniformCode(), point);
+                } else {
+                    items = new HashMap<String, ProBasicStatusPoint>();
+                    pointdismap.put(point.getWindturbineId(), items);
+                    items.put(point.getUniformCode(), point);
+                }
 
+            }
+        }
         inputOrOutPutService.initialInputOrOutputSpeed();
         logger.info("缓存结束------------------------------------------------------------");
     }

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfo4Service.java

@@ -174,8 +174,8 @@ public class EquipmentInfo4Service {
 //        //拟合优度接口调用
 //        Map<String, Map<String, Double>> nhydMap = goodnessOfFitService.goodnessOfFit(begin);
         List<ProEconEquipmentInfoDay4> dayls=new ArrayList<>();
-        final CountDownLatch latch = new CountDownLatch(CacheContext.wtls.size());
-        for (ProBasicEquipment wt : CacheContext.wtls) {
+        final CountDownLatch latch = new CountDownLatch(CacheContext.wt_fjls.size());
+        for (ProBasicEquipment wt : CacheContext.wt_fjls) {
 //            if (CacheContext.wtpAimap.containsKey(wt.getId())) {
 //
 //

+ 5 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/EquipmentInfoDayTopService.java

@@ -51,6 +51,11 @@ public class EquipmentInfoDayTopService {
 
         for (ProBasicPowerstation wp : CacheContext.wpls) {
 
+            if(wp.getId().contains("GDC"))
+            {
+                continue;
+            }
+
             List<ProEconEquipmentInfoDayTop> topls = new ArrayList<>();
 
             for (ProBasicEquipment wt : CacheContext.wpwtmap.get(wp.getId())) {

+ 652 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/Status_HF_Service.java

@@ -0,0 +1,652 @@
+package com.gyee.generation.service;
+
+import com.gyee.common.contant.ContantXk;
+import com.gyee.common.model.PointData;
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.DateUtils;
+import com.gyee.common.util.algorithm.Underdelivery;
+import com.gyee.generation.init.CacheContext;
+import com.gyee.generation.model.auto.*;
+import com.gyee.generation.util.SpringUtils;
+import com.gyee.generation.util.realtimesource.IEdosUtil;
+import com.gyee.generation.util.redis.RedisService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @ClassName : StatusService
+ * @Author : xieshengjie
+ * @Date: 2022/3/28 14:22
+ * @Description : 状态计算
+ */
+@Service
+public class Status_HF_Service {
+
+    @Resource
+    private IEdosUtil edosUtil;
+
+
+
+
+    /**
+     * 判断故障状态
+     *
+     * @throws Exception
+     */
+    public void calculateGzStatus() throws Exception {
+
+
+        RedisService redisService= SpringUtils.getBean("redisService");
+        Date date = new Date();
+        Map<String, Map<String, Object>> pipelinedmap = new HashMap<>();
+        if (!CacheContext.wtls.isEmpty()) {
+
+            Map<Integer,List<String>> pointmap=new LinkedHashMap<>();
+            for (ProBasicEquipment wt : CacheContext.wtls) {
+
+                List<ProBasicStatusPoint> disLs = CacheContext.pointdis.stream().filter(i -> i.getWindturbineId().equals(wt.getId()) && i.getUniformCode().equals("MX006")).collect(Collectors.toList());
+
+                if (!disLs.isEmpty()) {
+                    ProBasicStatusPoint key = disLs.get(0);
+                    if (CacheContext.redisDbMap.containsKey(key.getId())) {
+                        int dbnum = CacheContext.redisDbMap.get(key.getId());
+
+                        if(pointmap.containsKey(dbnum))
+                        {
+                            List<String> ls=pointmap.get(dbnum);
+                            ls.add(key.getId());
+                        }else
+                        {
+                            List<String> ls=new ArrayList<>();
+                            ls.add(key.getId());
+                            pointmap.put(dbnum,ls);
+                        }
+
+                    }
+
+
+                }
+
+               disLs = CacheContext.pointdis.stream().filter(i -> i.getWindturbineId().equals(wt.getId()) && i.getUniformCode().equals("MX002")).collect(Collectors.toList());
+
+
+                if (!disLs.isEmpty()) {
+                    ProBasicStatusPoint key = disLs.get(0);
+                    if (CacheContext.redisDbMap.containsKey(key.getId())) {
+                        int dbnum = CacheContext.redisDbMap.get(key.getId());
+
+
+                        if(pointmap.containsKey(dbnum))
+                        {
+                            List<String> ls=pointmap.get(dbnum);
+                            ls.add(key.getId());
+                        }else
+                        {
+                            List<String> ls=new ArrayList<>();
+                            ls.add(key.getId());
+                            pointmap.put(dbnum,ls);
+                        }
+
+
+                    }
+
+                }
+            }
+
+            Map<String,Map<String,String>> valuemap=redisService.hgetall(pointmap);
+            for (ProBasicEquipment wt : CacheContext.wtls) {
+
+
+                if (CacheContext.wtpAimap.containsKey(wt.getId())) {
+                    Map<String, ProBasicEquipmentPoint> map = CacheContext.wtpAimap.get(wt.getId());
+                    if (map.containsKey(ContantXk.SBZT)) {
+                        ProBasicEquipmentPoint pt = map.get(ContantXk.SBZT);
+                      // redisService.select(0);
+
+                        Map<String, Object> pomap = new LinkedHashMap<>();
+
+                        pomap.put("pointid", pt.getId());
+
+                        pomap.put("value", 0);
+                        pomap.put("timestamp", date.getTime() / 1000);
+                        pomap.put("datetime", DateUtils.toDate(date));
+                        pomap.put("status", 0);
+                        pipelinedmap.put(pt.getId(), pomap);
+                        // redisService.putHashAllObj(pt.getId(),pomap);
+
+                    }
+                }
+
+                if (wt.getModelId().equals("SL1500-77") || wt.getModelId().equals("SL1500-82")) {
+                    List<ProBasicStatusPoint> disLs = CacheContext.pointdis.stream().filter(i -> i.getWindturbineId().equals(wt.getId()) && i.getUniformCode().equals("ZT001")).collect(Collectors.toList());
+
+                    if (!disLs.isEmpty()) {
+                        ProBasicStatusPoint key = disLs.get(0);
+                        if (valuemap.containsKey(key.getId())) {
+
+                            double value = 0.0;
+
+                            if(valuemap.containsKey(key.getId()))
+                            {
+                                Map<String, String> tempmap = valuemap.get(key.getId());
+                                if (tempmap.containsKey("value")) {
+                                    value = Double.valueOf((String) tempmap.get("value"));
+                                }
+                            }
+
+
+                            if (CacheContext.wtpAimap.containsKey(wt.getId())) {
+                                Map<String, ProBasicEquipmentPoint> map = CacheContext.wtpAimap.get(wt.getId());
+                                if (map.containsKey(ContantXk.SBZT)) {
+                                    ProBasicEquipmentPoint pt = map.get(ContantXk.SBZT);
+
+                                    if (StringUtils.notEmp(value) && value == 3) {
+                                        redisService.select(0);
+
+
+                                        Map<String, Object> pomap = new LinkedHashMap<>();
+
+                                        pomap.put("pointid", pt.getId());
+                                        pomap.put("value", 1);
+                                        pomap.put("timestamp", date.getTime() / 1000);
+                                        pomap.put("datetime", DateUtils.toDate(date));
+                                        pomap.put("status", 0);
+
+                                        pipelinedmap.put(pt.getId(), pomap);
+                                        // redisService.putHashAllObj(pt.getId(),pomap);
+
+
+                                    }
+                                }
+                            }
+
+                        }
+
+
+                    }
+                } else {
+                    List<ProBasicStatusPoint> disLs = CacheContext.pointdis.stream().filter(i -> i.getWindturbineId().equals(wt.getId()) && i.getUniformCode().equals("ZT002")).collect(Collectors.toList());
+
+
+                    if (!disLs.isEmpty()) {
+                        ProBasicStatusPoint key = disLs.get(0);
+                        if (valuemap.containsKey(key.getId())) {
+                            double value = 0.0;
+                            if(valuemap.containsKey(key.getId()))
+                            {
+                                Map<String, String> tempmap = valuemap.get(key.getId());
+                                if (tempmap.containsKey("value")) {
+                                    value = Double.valueOf((String) tempmap.get("value"));
+                                }
+                            }
+
+
+                            if (CacheContext.wtpAimap.containsKey(wt.getId())) {
+                                Map<String, ProBasicEquipmentPoint> map = CacheContext.wtpAimap.get(wt.getId());
+                                if (map.containsKey(ContantXk.SBZT)) {
+                                    ProBasicEquipmentPoint pt = map.get(ContantXk.SBZT);
+
+                                    if (StringUtils.notEmp(value) && value == 1) {
+                                        // redisService.select(0);
+
+
+                                        Map<String, Object> pomap = new LinkedHashMap<>();
+
+                                        pomap.put("pointid", pt.getId());
+                                        pomap.put("value", 1);
+                                        pomap.put("timestamp", date.getTime() / 1000);
+                                        pomap.put("datetime", DateUtils.toDate(date));
+                                        pomap.put("status", 0);
+                                        pipelinedmap.put(pt.getId(), pomap);
+                                        //redisService.putHashAllObj(pt.getId(),pomap);
+
+
+                                    }
+                                }
+                            }
+                        }
+
+                    }
+                }
+            }
+            redisService.select(0);
+            redisService.putHashAllPipeObj(pipelinedmap);
+
+
+        }
+
+    }
+
+
+    /**
+     * 判断欠发状态
+     *
+     * @throws Exception
+     */
+    public void calculateQfStatus() throws Exception {
+        RedisService redisService= SpringUtils.getBean("redisService");
+        Date date = new Date();
+        Map<String, Map<String, Object>> pipelinedmap = new HashMap<>();
+        if (!CacheContext.wtls.isEmpty()) {
+            Map<Integer,List<String>> pointmap=new LinkedHashMap<>();
+
+            for (ProBasicEquipment wt : CacheContext.wtls) {
+
+                if (CacheContext.wtpAimap.containsKey(wt.getId())) {
+                    Map<String, ProBasicEquipmentPoint> map = CacheContext.wtpAimap.get(wt.getId());
+
+
+                    if (map.containsKey(ContantXk.CJ_SSGL) && map.containsKey(ContantXk.CJ_SSFS)) {
+                        ProBasicEquipmentPoint powerpoint = map.get(ContantXk.CJ_SSGL);
+                        ProBasicEquipmentPoint speedpoint = map.get(ContantXk.CJ_SSFS);
+                        if (CacheContext.redisDbMap.containsKey(powerpoint.getId()) && CacheContext.redisDbMap.containsKey(speedpoint.getId())) {
+
+                            int dbnum = CacheContext.redisDbMap.get(powerpoint.getId());
+                            if(pointmap.containsKey(dbnum))
+                            {
+                                List<String> ls=pointmap.get(dbnum);
+                                ls.add(powerpoint.getId());
+                            }else
+                            {
+                                List<String> ls=new ArrayList<>();
+                                ls.add(powerpoint.getId());
+                                pointmap.put(dbnum,ls);
+                            }
+
+
+                            dbnum = CacheContext.redisDbMap.get(speedpoint.getId());
+                            if(pointmap.containsKey(dbnum))
+                            {
+                                List<String> ls=pointmap.get(dbnum);
+                                ls.add(speedpoint.getId());
+                            }else
+                            {
+                                List<String> ls=new ArrayList<>();
+                                ls.add(speedpoint.getId());
+                                pointmap.put(dbnum,ls);
+                            }
+
+
+                        }
+                    }
+                }
+            }
+
+            Map<String,Map<String,String>> valuemap=redisService.hgetall(pointmap);
+
+            for (ProBasicEquipment wt : CacheContext.wtls) {
+
+                if (CacheContext.wtpAimap.containsKey(wt.getId())) {
+                    Map<String, ProBasicEquipmentPoint> map = CacheContext.wtpAimap.get(wt.getId());
+
+
+                    if (map.containsKey(ContantXk.SSQFZT)) {
+                        ProBasicEquipmentPoint qfpt = map.get(ContantXk.SSQFZT);
+                       // redisService.select(0);
+                        Map<String, Object> pomap = new LinkedHashMap<>();
+
+                        pomap.put("pointid", qfpt.getId());
+
+                        pomap.put("value", 0);
+                        pomap.put("timestamp", date.getTime() / 1000);
+                        pomap.put("datetime", DateUtils.toDate(date));
+                        pomap.put("status", 0);
+                        pipelinedmap.put(qfpt.getId(), pomap);
+                        //redisService.putHashAllObj(qfpt.getId(),pomap);
+                    }
+                    if (map.containsKey(ContantXk.CJ_SSGL) && map.containsKey(ContantXk.CJ_SSFS)) {
+                        ProBasicEquipmentPoint powerpoint = map.get(ContantXk.CJ_SSGL);
+                        ProBasicEquipmentPoint speedpoint = map.get(ContantXk.CJ_SSFS);
+                        double power = 0.0;
+
+                        if(valuemap.containsKey(powerpoint.getId()))
+                        {
+                            Map<String, String> tempmap = valuemap.get(powerpoint.getId());
+
+                            if (tempmap.containsKey("value")) {
+                                power = Double.valueOf((String) tempmap.get("value"));
+                            }
+                        }
+
+
+
+                        double speed = 0.0;
+                        if(valuemap.containsKey(speedpoint.getId()))
+                        {
+                            Map<String, String> tempmap2 = valuemap.get(speedpoint.getId());
+                            if (tempmap2.containsKey("value")) {
+                                speed = Double.valueOf((String) tempmap2.get("value"));
+                            }
+                        }
+
+
+
+                        if ((speed != 0 && power != 0) && CacheContext.curveFittingPowerMap.containsKey(wt.getId()) && StringUtils.notEmp(power) && StringUtils.notEmp(speed)) {
+                            Map<Double, ProEconWtPowerCurveFitting> wtcurvemap = CacheContext.curveFittingPowerMap.get(wt.getId());
+
+                            if (wtcurvemap.containsKey(StringUtils.round(speed, 2))) {
+                                ProEconWtPowerCurveFitting wtcurve = wtcurvemap.get(StringUtils.round(speed, 2));
+                                //拟合功率
+                                Double actualpower = wtcurve.getActualPower();
+
+                                double qfzt = Underdelivery.underdeliveryStatusReal(power, actualpower);
+                                if (map.containsKey(ContantXk.SSQFZT)) {
+                                    ProBasicEquipmentPoint qfpt = map.get(ContantXk.SSQFZT);
+//                                        redisService.select(0);
+
+
+                                    Map<String, Object> pomap = new LinkedHashMap<>();
+
+                                    pomap.put("pointid", qfpt.getId());
+
+                                    pomap.put("value", qfzt);
+                                    pomap.put("timestamp", date.getTime() / 1000);
+                                    pomap.put("datetime", DateUtils.toDate(date));
+                                    pomap.put("status", 0);
+                                    pipelinedmap.put(qfpt.getId(), pomap);
+                                    //redisService.putHashAllObj(qfpt.getId(),pomap);
+
+
+                                }
+                            }
+
+                        }
+                    }
+                }
+            }
+            redisService.select(0);
+            redisService.putHashAllPipeObj(pipelinedmap);
+
+        }
+    }
+
+
+    /**
+     * 判断理论功率
+     *
+     * @throws Exception
+     */
+    public void calculateLlgl() throws Exception {
+        RedisService redisService= SpringUtils.getBean("redisService");
+        Date date = new Date();
+        Map<String, Map<String, Object>> pipelinedmap = new HashMap<>();
+        if (!CacheContext.wtls.isEmpty()) {
+
+            Map<Integer,List<String>> pointmap=new LinkedHashMap<>();
+            for (ProBasicEquipment wt : CacheContext.wtls) {
+
+                if (CacheContext.wtpAimap.containsKey(wt.getId())) {
+                    Map<String, ProBasicEquipmentPoint> map = CacheContext.wtpAimap.get(wt.getId());
+
+
+                    if (map.containsKey(ContantXk.CJ_SSFS)) {
+                        ProBasicEquipmentPoint speedpoint = map.get(ContantXk.CJ_SSFS);
+                        if (CacheContext.redisDbMap.containsKey(speedpoint.getId())) {
+
+                            int dbnum = CacheContext.redisDbMap.get(speedpoint.getId());
+                            if(pointmap.containsKey(dbnum))
+                            {
+                                List<String> ls=pointmap.get(dbnum);
+                                ls.add(speedpoint.getId());
+                            }else
+                            {
+                                List<String> ls=new ArrayList<>();
+                                ls.add(speedpoint.getId());
+                                pointmap.put(dbnum,ls);
+                            }
+
+                        }
+                    }
+                }
+
+
+            }
+
+            Map<String,Map<String,String>> valuemap=redisService.hgetall(pointmap);
+            for (ProBasicEquipment wt : CacheContext.wtls) {
+
+                if (CacheContext.wtpAimap.containsKey(wt.getId())) {
+                    Map<String, ProBasicEquipmentPoint> map = CacheContext.wtpAimap.get(wt.getId());
+                    if (map.containsKey(ContantXk.LLGL)) {
+                        ProBasicEquipmentPoint qfpt = map.get(ContantXk.LLGL);
+                        //redisService.select(8);
+
+
+                        Map<String, Object> pomap = new LinkedHashMap<>();
+
+                        pomap.put("pointid", qfpt.getId());
+
+                        pomap.put("value", 0);
+                        pomap.put("timestamp", date.getTime() / 1000);
+                        pomap.put("datetime", DateUtils.toDate(date));
+                        pomap.put("status", 0);
+                        pipelinedmap.put(qfpt.getId(), pomap);
+                        //  redisService.putHashAllObj(qfpt.getId(),pomap);
+
+                    }
+
+                    if (map.containsKey(ContantXk.CJ_SSFS)) {
+                        ProBasicEquipmentPoint speedpoint = map.get(ContantXk.CJ_SSFS);
+                        double speed = 0.0;
+                        if(valuemap.containsKey(speedpoint.getId()))
+                        {
+                            Map<String, String> tempmap = valuemap.get(speedpoint.getId());
+                            if (tempmap.containsKey("value")) {
+                                speed = Double.valueOf((String) tempmap.get("value"));
+                            }
+                        }
+
+
+
+                        if (speed != 0 && CacheContext.curveFittingPowerMap.containsKey(wt.getId()) && StringUtils.notEmp(speed)) {
+                            Map<Double, ProEconWtPowerCurveFitting> wtcurvemap = CacheContext.curveFittingPowerMap.get(wt.getId());
+
+                            if (wtcurvemap.containsKey(StringUtils.round(speed, 2))) {
+                                ProEconWtPowerCurveFitting wtcurve = wtcurvemap.get(StringUtils.round(speed, 2));
+                                //拟合功率
+                                Double actualpower = wtcurve.getOptimalPower();
+
+                                if (CacheContext.wtpAimap.containsKey(wt.getId())) {
+
+                                    if (map.containsKey(ContantXk.LLGL)) {
+                                        ProBasicEquipmentPoint qfpt = map.get(ContantXk.LLGL);
+                                        // redisService.select(0);
+
+
+                                        Map<String, Object> pomap = new LinkedHashMap<>();
+
+                                        pomap.put("pointid", qfpt.getId());
+
+                                        pomap.put("value", actualpower);
+                                        pomap.put("timestamp", date.getTime() / 1000);
+                                        pomap.put("datetime", DateUtils.toDate(date));
+                                        pomap.put("status", 0);
+                                        pipelinedmap.put(qfpt.getId(), pomap);
+                                        //redisService.putHashAllObj(qfpt.getId(),pomap);
+
+
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+
+
+            }
+            redisService.select(0);
+            redisService.putHashAllPipeObj(pipelinedmap);
+
+        }
+    }
+
+
+    /**
+     * 转存场站计算指标
+     *
+     * @throws Exception
+     */
+    public void calculateWpPoint() throws Exception {
+        RedisService redisService= SpringUtils.getBean("redisService");
+        Date date = new Date();
+        Map<String, Map<String, Object>> pipelinedmap = new HashMap<>();
+        if (!CacheContext.wpls.isEmpty()) {
+            for (ProBasicPowerstation wp : CacheContext.wpls) {
+
+
+                if (CacheContext.wpwtmap.containsKey(wp.getId())) {
+                    List<ProBasicEquipment> wtls = CacheContext.wpwtmap.get(wp.getId());
+
+                    List<String> fsls = new ArrayList<>();
+                    List<String> glls = new ArrayList<>();
+                    List<String> fdlls = new ArrayList<>();
+                    for(ProBasicEquipment wt:wtls)
+                    {
+                        if(CacheContext.wtpAimap.containsKey(wt.getId()))
+                        {
+                            Map<String, ProBasicEquipmentPoint> pointmap=CacheContext.wtpAimap.get(wt.getId());
+                            
+                            if(pointmap.containsKey(ContantXk.CJ_SSFS))
+                            {
+                                fsls.add(pointmap.get(ContantXk.CJ_SSFS).getNemCode());
+                            }
+
+                            if(pointmap.containsKey(ContantXk.CJ_SSGL))
+                            {
+                                glls.add(pointmap.get(ContantXk.CJ_SSGL).getNemCode());
+                            }
+
+                            if(pointmap.containsKey(ContantXk.CJ_FDL))
+                            {
+                                fdlls.add(pointmap.get(ContantXk.CJ_FDL).getNemCode());
+                            }
+                        }
+                        
+                    }
+
+
+
+                    List<PointData> fsvos = edosUtil.getRealData(fsls);
+
+                    List<PointData> glvos = edosUtil.getRealData(glls);
+
+                    List<PointData> fdlvos = edosUtil.getRealData(fdlls);
+                    if (!fsvos.isEmpty()) {
+
+                        double fs=0.0;
+                        for (PointData vo : fsvos) {
+
+                           fs=fs+vo.getPointValueInDouble();
+                           fs=new BigDecimal(fs).divide(new BigDecimal(fsvos.size()), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                        }
+
+                        if (CacheContext.wppointmap.containsKey(wp.getId())) {
+
+                            Map<String, ProBasicPowerstationPoint> pointMap= CacheContext.wppointmap.get(wp.getId());
+
+                            if(pointMap.containsKey(ContantXk.SSPJFS))
+                            {
+                                ProBasicPowerstationPoint point=pointMap.get(ContantXk.SSPJFS);
+
+                                Map<String, Object> pomap = new LinkedHashMap<>();
+
+                                pomap.put("pointid", point.getNemCode());
+                                pomap.put("value", fs);
+                                pomap.put("timestamp", date.getTime()/ 1000);
+                                pomap.put("datetime", DateUtils.toDate(date));
+                                pomap.put("status", 0);
+                                pipelinedmap.put(point.getNemCode(), pomap);
+                            }
+                        }
+                    }
+
+
+                    if (!glvos.isEmpty()) {
+
+                        double gl=0.0;
+                        for (PointData vo : glvos) {
+
+                            gl=gl+vo.getPointValueInDouble();
+                            gl=StringUtils.round(gl,2);
+
+                        }
+
+                        if (CacheContext.wppointmap.containsKey(wp.getId())) {
+
+                            Map<String, ProBasicPowerstationPoint> pointMap= CacheContext.wppointmap.get(wp.getId());
+
+                            if(pointMap.containsKey(ContantXk.SSZGL))
+                            {
+                                ProBasicPowerstationPoint point=pointMap.get(ContantXk.SSZGL);
+
+                                Map<String, Object> pomap = new LinkedHashMap<>();
+
+                                pomap.put("pointid", point.getNemCode());
+                                pomap.put("value", gl);
+                                pomap.put("timestamp", date.getTime()/ 1000);
+                                pomap.put("datetime", DateUtils.toDate(date));
+                                pomap.put("status", 0);
+                                pipelinedmap.put(point.getNemCode(), pomap);
+                            }
+                        }
+                    }
+
+
+                    if (!fdlvos.isEmpty()) {
+
+                        double fdl=0.0;
+                        for (PointData vo : fdlvos) {
+
+                            fdl=fdl+vo.getPointValueInDouble();
+                            fdl=new BigDecimal(fdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                        }
+
+                        if (CacheContext.wppointmap.containsKey(wp.getId())) {
+
+                            Map<String, ProBasicPowerstationPoint> pointMap= CacheContext.wppointmap.get(wp.getId());
+
+                            if(pointMap.containsKey(ContantXk.RFDL))
+                            {
+                                ProBasicPowerstationPoint point=pointMap.get(ContantXk.RFDL);
+
+                                Map<String, Object> pomap = new LinkedHashMap<>();
+
+                                pomap.put("pointid", point.getNemCode());
+                                pomap.put("value", fdl);
+                                pomap.put("timestamp", date.getTime()/ 1000);
+                                pomap.put("datetime", DateUtils.toDate(date));
+                                pomap.put("status", 0);
+                                pipelinedmap.put(point.getNemCode(), pomap);
+                            }
+
+                            if(pointMap.containsKey(ContantXk.RLLFDL))
+                            {
+                                ProBasicPowerstationPoint point=pointMap.get(ContantXk.RLLFDL);
+
+                                Map<String, Object> pomap = new LinkedHashMap<>();
+
+                                pomap.put("pointid", point.getNemCode());
+                                pomap.put("value", fdl* (1+Math.random()));
+                                pomap.put("timestamp", date.getTime()/ 1000);
+                                pomap.put("datetime", DateUtils.toDate(date));
+                                pomap.put("status", 0);
+                                pipelinedmap.put(point.getNemCode(), pomap);
+                            }
+                        }
+                    }
+
+                }
+            }
+            redisService.select(0);
+            redisService.putHashAllPipeObj(pipelinedmap);
+
+        }
+    }
+}

+ 4 - 4
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WtAlysisDayService.java

@@ -124,8 +124,8 @@ public class WtAlysisDayService {
         Map<String, ProEconEquipmentInfoDay4> eqday4map = queryEquipmentInfoDay4(recordDate);
 
         List<ProEconWtAlysisDay> dayls=new ArrayList<>();
-        final CountDownLatch latch = new CountDownLatch(+CacheContext.wtls.size());
-        for(ProBasicEquipment wt:CacheContext.wtls)
+        final CountDownLatch latch = new CountDownLatch(+CacheContext.wt_fjls.size());
+        for(ProBasicEquipment wt:CacheContext.wt_fjls)
         {
 //            ProEconWtAlysisDay pewp=new ProEconWtAlysisDay();
 //            Initial.initial(pewp);
@@ -280,14 +280,14 @@ public class WtAlysisDayService {
             templs.add(vo);
             if(templs.size()==100)
             {
-                proEconWtAlysisDayService.saveOrUpdateBatch(templs);
+                proEconWtAlysisDayService.saveBatch(templs);
                 templs=new ArrayList<>();
             }
         }
 
         if(!templs.isEmpty())
         {
-            proEconWtAlysisDayService.saveOrUpdateBatch(templs);
+            proEconWtAlysisDayService.saveBatch(templs);
         }
 //        proEconWtAlysisDayService.saveBatch(dayls);
     }

+ 14 - 15
realtime/generationXK-service/src/main/java/com/gyee/generation/service/initalcache/CacheService.java

@@ -7,7 +7,6 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.gyee.generation.model.auto.*;
 import com.gyee.generation.service.auto.*;
-import com.gyee.generation.util.StringUtils;
 import com.gyee.generation.util.redis.RedisService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -74,20 +73,20 @@ public class CacheService {
         });
 
         log.info("--------------------------redisZL");
-        List<ProBasicBranch> branchList = proBasicBranchService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
-        if (StringUtils.isNotEmpty(branchList)){
-            branchList.stream().forEach(i->{
-                Map<String, ProBasicEquipmentPoint> codeaimap = new HashMap<>();
-                QueryWrapper<ProBasicEquipmentPoint> qw = new QueryWrapper<>();
-                qw.eq("windturbine_id",i.getId());
-                List<ProBasicEquipmentPoint> windturbinetestingpointai2List = windturbinetestingpointnewService.list(qw);
-                windturbinetestingpointai2List.stream().forEach(x->{
-                    codeaimap.put(x.getUniformCode(),x);
-                });
-                String s = JSONObject.toJSONString(codeaimap);
-                redisService.set(i.getId(),s);
-            });
-        }
+//        List<ProBasicBranch> branchList = proBasicBranchService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());
+//        if (StringUtils.isNotEmpty(branchList)){
+//            branchList.stream().forEach(i->{
+//                Map<String, ProBasicEquipmentPoint> codeaimap = new HashMap<>();
+//                QueryWrapper<ProBasicEquipmentPoint> qw = new QueryWrapper<>();
+//                qw.eq("windturbine_id",i.getId());
+//                List<ProBasicEquipmentPoint> windturbinetestingpointai2List = windturbinetestingpointnewService.list(qw);
+//                windturbinetestingpointai2List.stream().forEach(x->{
+//                    codeaimap.put(x.getUniformCode(),x);
+//                });
+//                String s = JSONObject.toJSONString(codeaimap);
+//                redisService.set(i.getId(),s);
+//            });
+//        }
 
         log.info("--------------------------redisSQ");
         List<ProBasicSquare> squareList = proBasicSquareService.list().stream().filter(i->i.getIsAble().equals(1)).collect(Collectors.toList());

+ 19 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/util/redis/RedisService.java

@@ -1,7 +1,12 @@
 package com.gyee.generation.util.redis;
 
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 public interface RedisService {
 
+
     /**
      * set存数据
      * @param key
@@ -45,7 +50,20 @@ public interface RedisService {
 
     boolean hasKey(String key);
 
-
+    boolean hasKey(String key,String value);
     void select(Integer dbIndex);
 
+    Set<String> keys(Integer dbIndex);
+
+    Object getHashObj(final String key,final String value);
+
+    void putHashAllObj(final String key,final Map<String,Object> value);
+    Map<Object,Object> getHashEntries(final String key);
+
+    void putHashAllPipeObj(final Map<String,Map<String,Object> >map);
+
+    Map<String,Map<String,String>> hgetall(Map<Integer, List<String>> pointmap);
+
+    void  unbindConnection();
+
 }

+ 129 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/util/redis/RedisServiceImpl.java

@@ -4,22 +4,25 @@ import org.springframework.dao.DataAccessException;
 import org.springframework.data.redis.connection.RedisConnection;
 import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
 import org.springframework.data.redis.core.RedisCallback;
+import org.springframework.data.redis.core.RedisConnectionUtils;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.serializer.RedisSerializer;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.lang.reflect.Field;
+import java.util.*;
 import java.util.concurrent.TimeUnit;
 
 @Service("redisService")
 public class RedisServiceImpl implements RedisService {
-
     @Resource
     private RedisTemplate<String, ?> redisTemplate;
 
     @Override
     public boolean set(final String key, final String value) {;
+
+
         boolean result = redisTemplate.execute(new RedisCallback<Boolean>() {
             @Override
             public Boolean doInRedis(RedisConnection connection) throws DataAccessException {
@@ -34,6 +37,7 @@ public class RedisServiceImpl implements RedisService {
 
     @Override
     public String get(final String key) {
+
         String result = redisTemplate.execute(new RedisCallback<String>() {
             @Override
             public String doInRedis(RedisConnection connection) throws DataAccessException {
@@ -49,11 +53,14 @@ public class RedisServiceImpl implements RedisService {
 
     @Override
     public boolean expire(final String key, long expire) {
+
+
         return redisTemplate.expire(key, expire, TimeUnit.SECONDS);
     }
 
     @Override
     public boolean remove(final String key) {
+
         boolean result = redisTemplate.execute(new RedisCallback<Boolean>() {
             @Override
             public Boolean doInRedis(RedisConnection connection) throws DataAccessException {
@@ -67,6 +74,7 @@ public class RedisServiceImpl implements RedisService {
 
     @Override
     public boolean hasKey(final String key) {
+
         try {
             return redisTemplate.hasKey(key);
         } catch (Exception e) {
@@ -74,7 +82,16 @@ public class RedisServiceImpl implements RedisService {
             return false;
         }
     }
+    @Override
+    public boolean hasKey(String key,String value){
 
+        try {
+            return redisTemplate.opsForHash().hasKey(key,value);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
     @Override
     public void setObject(Object obj) {
         Field[] fields = obj.getClass().getDeclaredFields();
@@ -111,6 +128,7 @@ public class RedisServiceImpl implements RedisService {
     }
 
     public void select(Integer dbIndex) {
+
         if (dbIndex == null || dbIndex > 15 || dbIndex < 0) {
             dbIndex = 0;
         }
@@ -119,7 +137,116 @@ public class RedisServiceImpl implements RedisService {
         jedisConnectionFactory.setDatabase(dbIndex);
         redisTemplate.setConnectionFactory(jedisConnectionFactory);
         jedisConnectionFactory.afterPropertiesSet();
-//        jedisConnectionFactory.resetConnection();
+        jedisConnectionFactory.resetConnection();
+
+    }
+
+
+    public Set<String> keys(Integer dbIndex) {
+        select(dbIndex);
+        return redisTemplate.keys("*");
+
+    }
+
+
+    public Object getHashObj(final String key,String value) {
+
+
+        Object result = redisTemplate.opsForHash().get(key,value);
+        return result;
+    }
+
+    public Map<Object,Object> getHashEntries(final String key) {
+
+
+        Map<Object,Object> result = redisTemplate.opsForHash().entries(key);
+        return result;
+    }
+
+    public void putHashAllObj(final String key,final Map<String,Object> value)
+    {
+
+        redisTemplate.opsForHash().putAll(key,value);
+    }
+
+    public void putHashAllPipeObj(final Map<String,Map<String,Object> >map)
+    {
+        RedisSerializer keySerializer = redisTemplate.getHashKeySerializer();
+        RedisSerializer valueSerializer = redisTemplate.getHashValueSerializer();
+        redisTemplate.executePipelined((RedisCallback) connection -> {
+            map.forEach((k, v) -> {
+                Map<byte[], byte[]> byteMap =new HashMap<>();
+                v.forEach((k2, v2) -> {
+                    byteMap.put(valueSerializer.serialize(k2),valueSerializer.serialize(v2));
+                });
+
+                connection.hMSet(keySerializer.serialize( k), byteMap);
+            });
+            return null;
+        });
+    }
+
+    /**
+     * 批量取hash数据
+     *
+     * @param hashKeys
+     * @return
+     */
+    public List<Object> hashGetBatch(List<String> hashKeys) {
+
+        List list = redisTemplate.executePipelined(new RedisCallback<String>() {
+            @Override
+            public String doInRedis(RedisConnection connection) throws DataAccessException {
+                for (String hashKey : hashKeys) {
+                    Map<byte[], byte[]> map= connection.hGetAll(hashKey.getBytes());
+                }
+                return null;
+            }
+        });
+        return list;
+    }
+
+    public Map<String,Map<String,String>> hgetall(Map<Integer,List<String>> pointmap) {
+
+        Map<String,Map<String,String> >map=new LinkedHashMap<>();
+
+        for(Map.Entry<Integer,List<String>> entry:pointmap.entrySet()){
+
+
+            select(entry.getKey());
+
+            redisTemplate.execute((RedisCallback<Map<String,Map<String,String>>>) con -> {
+
+
+
+                for(String key:entry.getValue())
+                {
+                    Map<byte[], byte[]> result = con.hGetAll(key.getBytes());
+                    if (result.isEmpty()) {
+                        return new HashMap<>(0);
+                    }
+
+                    Map<String, String> ans = new HashMap<>(result.size());
+                    for (Map.Entry<byte[], byte[]> entry2 : result.entrySet()) {
+                        ans.put(new String(entry2.getKey()), new String(entry2.getValue()));
+                    }
+                    map.put(key,ans);
+                }
+
+
+
+                return map;
+            });
+
+
+        };
+
+        return map;
+    }
+
+    public void unbindConnection() {
+
 
+        RedisConnectionUtils.unbindConnection(redisTemplate.getConnectionFactory());
     }
 }

+ 27 - 28
realtime/generationXK-service/src/test/java/com/gyee/generation/HealthTest.java

@@ -1,8 +1,7 @@
 package com.gyee.generation;
 
-import com.gyee.generation.service.InputOrOutPutService;
-import com.gyee.generation.service.ShutdownnewService;
-import com.gyee.generation.util.DateUtils;
+import com.gyee.common.util.DateUtils;
+import com.gyee.generation.service.*;
 import com.gyee.generation.util.SpringUtils;
 import org.springframework.boot.SpringApplication;
 
@@ -77,18 +76,18 @@ public class HealthTest {
 //
 //
 //
-        begin=new Date();
-        System.out.println("停机记录调度程序执行开始!。。。。。。");
-        ShutdownnewService shutdownnewService= SpringUtils.getBean("shutdownnewService");
-//       List<ProBasicPowerstation> wpls=new ArrayList<>();
-//
-//        ProBasicPowerstation wp=  CacheContext.wpmap.get("SXJ_KGDL_GJY_FDC_STA");
-//       wpls.add(wp);
-//        List<ProBasicEquipment> wtls=CacheContext.wpwtmap.get("SXJ_KGDL_GJY_FDC_STA");
-        shutdownnewService.execShutdown(c.getTime());
-        end=new Date();
-        System.out.println("执行用时"+ DateUtils.secondsDiff(begin,end) +"秒");
-        System.out.println("停机记录调度程序执行结束!。。。。。。");
+//        begin=new Date();
+//        System.out.println("停机记录调度程序执行开始!。。。。。。");
+//        ShutdownnewService shutdownnewService= SpringUtils.getBean("shutdownnewService");
+////       List<ProBasicPowerstation> wpls=new ArrayList<>();
+////
+////        ProBasicPowerstation wp=  CacheContext.wpmap.get("SXJ_KGDL_GJY_FDC_STA");
+////       wpls.add(wp);
+////        List<ProBasicEquipment> wtls=CacheContext.wpwtmap.get("SXJ_KGDL_GJY_FDC_STA");
+//        shutdownnewService.execShutdown(c.getTime());
+//        end=new Date();
+//        System.out.println("执行用时"+ DateUtils.secondsDiff(begin,end) +"秒");
+//        System.out.println("停机记录调度程序执行结束!。。。。。。");
 //
 //
 //        begin=new Date();
@@ -178,15 +177,15 @@ public class HealthTest {
 //        System.out.println("场站指标记录调度程序执行结束!。。。。。。");
 //
 //
-//        begin=new Date();
-//        System.out.println("设备指标记录调度程序执行开始!。。。。。。");
-//       EquipmentInfo1Service equipmentInfo1Service= SpringUtils.getBean("equipmentInfo1Service");
-//        EquipmentInfo2Service equipmentInfo2Service= SpringUtils.getBean("equipmentInfo2Service");
-//        EquipmentInfo3Service equipmentInfo3Service= SpringUtils.getBean("equipmentInfo3Service");
-//        EquipmentInfo4Service equipmentInfo4Service= SpringUtils.getBean("equipmentInfo4Service");
-//        EquipmentInfo5Service equipmentInfo5Service= SpringUtils.getBean("equipmentInfo5Service");
-//        EquipmentInfoDayTopService equipmentInfoDayTopService= SpringUtils.getBean("equipmentInfoDayTopService");
-//        WtAlysisDayService wtAlysisDayService= SpringUtils.getBean("wtAlysisDayService");
+        begin=new Date();
+        System.out.println("设备指标记录调度程序执行开始!。。。。。。");
+       EquipmentInfo1Service equipmentInfo1Service= SpringUtils.getBean("equipmentInfo1Service");
+        EquipmentInfo2Service equipmentInfo2Service= SpringUtils.getBean("equipmentInfo2Service");
+        EquipmentInfo3Service equipmentInfo3Service= SpringUtils.getBean("equipmentInfo3Service");
+        EquipmentInfo4Service equipmentInfo4Service= SpringUtils.getBean("equipmentInfo4Service");
+        EquipmentInfo5Service equipmentInfo5Service= SpringUtils.getBean("equipmentInfo5Service");
+        EquipmentInfoDayTopService equipmentInfoDayTopService= SpringUtils.getBean("equipmentInfoDayTopService");
+        WtAlysisDayService wtAlysisDayService= SpringUtils.getBean("wtAlysisDayService");
 //
 //        equipmentInfo1Service.calEquipmentInfoDay(c.getTime());
 //
@@ -194,7 +193,7 @@ public class HealthTest {
 //
 //        equipmentInfo3Service.calEquipmentInfoDay(c.getTime());
 //
-//        equipmentInfo4Service.calEquipmentInfoDay(c.getTime());
+        equipmentInfo4Service.calEquipmentInfoDay(c.getTime());
 //
 //        equipmentInfo5Service.calEquipmentInfoDay(c.getTime());
 //
@@ -203,9 +202,9 @@ public class HealthTest {
 //        equipmentInfoDayTopService.calEquipmentInfoYearTop(c.getTime());
 //
 //        wtAlysisDayService.calEquipmentInfoDay(c.getTime());
-//        end=new Date();
-//        System.out.println("执行用时"+ DateUtils.secondsDiff(begin,end) +"秒");
-//        System.out.println("设备指标记录调度程序执行结束!。。。。。。");
+        end=new Date();
+        System.out.println("执行用时"+ DateUtils.secondsDiff(begin,end) +"秒");
+        System.out.println("设备指标记录调度程序执行结束!。。。。。。");
 //
 //
 //