瀏覽代碼

计算服务功能修改

shilin 1 年之前
父節點
當前提交
793af7d59b

+ 736 - 0
realtime/datatraining-server/src/main/java/com/gyee/datatraining/service/DatatrainingGfService.java

@@ -0,0 +1,736 @@
+package com.gyee.datatraining.service;
+
+
+import com.gyee.common.contant.ContantXk;
+import com.gyee.common.model.PointData;
+import com.gyee.datatraining.init.CacheContext;
+import com.gyee.datatraining.model.auto.*;
+import com.gyee.datatraining.model.vo.StatusDetailValue;
+import com.gyee.datatraining.util.IRealTimeDataBaseUtil;
+import com.gyee.datatraining.util.StringUtils;
+import com.gyee.datatraining.util.dd.MatrixCalculation;
+import com.gyee.datatraining.util.dd.ModuleState;
+import com.gyee.datatraining.util.realtimesource.EdosUtil;
+import com.gyee.datatraining.vo.ModuleVo;
+import org.apache.commons.lang3.RandomUtils;
+import org.apache.commons.math3.linear.RealMatrix;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Executor;
+
+
+/**
+ * @ClassName : EarlywarningService
+ * @Description : 报警统计service
+ */
+@Service
+public class DatatrainingGfService {
+
+    @Resource
+    private Environment env;
+    @Resource
+    private ModuleState ms;
+    @Resource
+    private Executor executor;
+    private int jzxnnum = 4;//机组权重数量
+    private int digits = 4;//小数位数
+    /**
+     * 结果集数量
+     */
+    private int coment_bit = 4;
+    /**
+     * 指标点数量
+     */
+    private int point_bit = 4;
+    // private double warnnum = 0.9;
+    private static Logger logger = LoggerFactory.getLogger(DatatrainingGfService.class);
+    // private static final String SIMPLE_DATE_FORMAT = "yyyy-MM-dd";
+    //
+    // private double momentum=0.9; //动量参数
+    // private int
+    // trainnum=Integer.valueOf(env.getProperty("trainnum"));//训练次数
+    private IRealTimeDataBaseUtil ednaApiUtil = new EdosUtil();
+
+ 
+    public void dataTraining() throws Exception {
+
+        logger.info("调度程序执行开始!........");
+
+        /******************************************************************************************************************************************************/
+        List<ProBasicEquipment> wtls = CacheContext.wtls;
+        Map<String, Map<String, ProBasicPowerstationPoint>> stationPointmap = CacheContext.wppointmap;
+
+        Map<String, Map<String, Integer>> wpmap = new HashMap<>();
+        Map<String, Map<String, Integer>> pjmap = new HashMap<>();
+        Map<String, Map<String, Integer>> lnmap = new HashMap<>();
+        Map<String, Map<String, Integer>> cpmap = new HashMap<>();
+        Map<String, Map<String, Integer>> rgmap = new HashMap<>();
+
+        Map<String, Map<String, Integer>> wpclxmap = new HashMap<>();
+        Map<String, Map<String, Integer>> pjclxmap = new HashMap<>();
+        Map<String, Map<String, Integer>> lnclxmap = new HashMap<>();
+        Map<String, Map<String, Integer>> cpclxmap = new HashMap<>();
+        Map<String, Map<String, Integer>> rgclxmap = new HashMap<>();
+
+        Map<String, Map<String, Integer>> wpfdjmap = new HashMap<>();
+        Map<String, Map<String, Integer>> pjfdjmap = new HashMap<>();
+        Map<String, Map<String, Integer>> lnfdjmap = new HashMap<>();
+        Map<String, Map<String, Integer>> cpfdjmap = new HashMap<>();
+        Map<String, Map<String, Integer>> rgfdjmap = new HashMap<>();
+
+        Map<String, Map<String, Integer>> wpkzysmap = new HashMap<>();
+        Map<String, Map<String, Integer>> pjkzysmap = new HashMap<>();
+        Map<String, Map<String, Integer>> lnkzysmap = new HashMap<>();
+        Map<String, Map<String, Integer>> cpkzysmap = new HashMap<>();
+        Map<String, Map<String, Integer>> rgkzysmap = new HashMap<>();
+
+        Map<String, Map<String, Integer>> wpjcxtmap = new HashMap<>();
+        Map<String, Map<String, Integer>> pjjcxtmap = new HashMap<>();
+        Map<String, Map<String, Integer>> lnjcxtmap = new HashMap<>();
+        Map<String, Map<String, Integer>> cpjcxtmap = new HashMap<>();
+        Map<String, Map<String, Integer>> rgjcxtmap = new HashMap<>();
+
+
+
+
+        Date now = new Date();
+        for (ProBasicEquipment wt : wtls) {
+//            new Thread(new StartTaskThread(executor,  wt, ms, env, ednaApiUtil)).start();
+
+            if (wt.getWindpowerstationId().contains("GDC")) {
+
+                int[] state = { 0, 0, 0, 0, 0 };
+                try {
+
+                    state = checkWtState(wt.getId(), now);
+
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+//				if(state[0]==0 || state[1]==0  || state[2]==0 || state[3]==0 || state[4]==0)
+//				{
+//					System.out.println("开始测试!");
+//				}
+                setWtTotalNum(state[0], rgclxmap,cpclxmap,wpclxmap, pjclxmap, lnclxmap, wt);
+                setWtTotalNum(state[1], rgfdjmap,cpfdjmap,wpfdjmap, pjfdjmap, lnfdjmap, wt);
+                setWtTotalNum(state[2], rgkzysmap,cpkzysmap,wpkzysmap, pjkzysmap, lnkzysmap, wt);
+                setWtTotalNum(state[3], rgjcxtmap,cpjcxtmap,wpjcxtmap, pjjcxtmap, lnjcxtmap, wt);
+                setWtTotalNum(state[4], rgmap,cpmap,wpmap, pjmap, lnmap, wt);
+            }
+
+        }
+
+        
+        
+        /******************************************************************************************************************************************************/
+
+        String[] up82_wp_wt_statenum = env.getProperty("up82_wp_wt_statenum").split(",");
+        String[] up82_wp_clx_statenum = env.getProperty("up82_wp_clx_statenum").split(",");
+        String[] up82_wp_fdj_statenum = env.getProperty("up82_wp_fdj_statenum").split(",");
+        String[] up82_wp_kzys_statenum = env.getProperty("up82_wp_kzys_statenum").split(",");
+        String[] up82_wp_jcxt_statenum = env.getProperty("up82_wp_jcxt_statenum").split(",");
+
+        traverseALlStateNumMap(stationPointmap, wpmap, now, up82_wp_wt_statenum);
+        traverseALlStateNumMap(stationPointmap, wpclxmap, now, up82_wp_clx_statenum);
+        traverseALlStateNumMap(stationPointmap, wpfdjmap, now, up82_wp_fdj_statenum);
+        traverseALlStateNumMap(stationPointmap, wpkzysmap, now, up82_wp_kzys_statenum);
+        traverseALlStateNumMap(stationPointmap, wpjcxtmap, now, up82_wp_jcxt_statenum);
+
+//        traverseRgStateNumMap(stationPointmap, rgmap, now, up82_wp_wt_statenum);
+//        traverseCpStateNumMap(stationPointmap, cpmap, now, up82_wp_wt_statenum);
+        traverseWpStateNumMap(stationPointmap, wpmap, now, up82_wp_wt_statenum);
+        traversePjStateNumMap(stationPointmap, pjmap, now, up82_wp_wt_statenum);
+        traverseLnStateNumMap(stationPointmap, lnmap, now, up82_wp_wt_statenum);
+
+//        traverseRgStateNumMap(stationPointmap, rgclxmap, now, up82_wp_wt_statenum);
+//        traverseCpStateNumMap(stationPointmap, cpclxmap, now, up82_wp_wt_statenum);
+        traverseWpStateNumMap(stationPointmap, wpclxmap, now, up82_wp_clx_statenum);
+        traversePjStateNumMap(stationPointmap, pjclxmap, now, up82_wp_clx_statenum);
+        traverseLnStateNumMap(stationPointmap, lnclxmap, now, up82_wp_clx_statenum);
+
+//        traverseRgStateNumMap(stationPointmap, rgfdjmap, now, up82_wp_wt_statenum);
+//        traverseCpStateNumMap(stationPointmap, cpfdjmap, now, up82_wp_wt_statenum);
+        traverseWpStateNumMap(stationPointmap, wpfdjmap, now, up82_wp_fdj_statenum);
+        traversePjStateNumMap(stationPointmap, pjfdjmap, now, up82_wp_fdj_statenum);
+        traverseLnStateNumMap(stationPointmap, lnfdjmap, now, up82_wp_fdj_statenum);
+
+//        traverseRgStateNumMap(stationPointmap, rgkzysmap, now, up82_wp_wt_statenum);
+//        traverseCpStateNumMap(stationPointmap, cpkzysmap, now, up82_wp_wt_statenum);
+        traverseWpStateNumMap(stationPointmap, wpkzysmap, now, up82_wp_kzys_statenum);
+        traversePjStateNumMap(stationPointmap, pjkzysmap, now, up82_wp_kzys_statenum);
+        traverseLnStateNumMap(stationPointmap, lnkzysmap, now, up82_wp_kzys_statenum);
+
+//        traverseRgStateNumMap(stationPointmap, rgjcxtmap, now, up82_wp_wt_statenum);
+//        traverseCpStateNumMap(stationPointmap, cpjcxtmap, now, up82_wp_wt_statenum);
+        traverseWpStateNumMap(stationPointmap, wpjcxtmap, now, up82_wp_jcxt_statenum);
+        traversePjStateNumMap(stationPointmap, pjjcxtmap, now, up82_wp_jcxt_statenum);
+        traverseLnStateNumMap(stationPointmap, lnjcxtmap, now, up82_wp_jcxt_statenum);
+
+        /******************************************************************************************************************************************************/
+
+        logger.info("进行健康状态判断处理完成!........");
+    }
+
+    private void traverseALlStateNumMap(Map<String, Map<String, ProBasicPowerstationPoint>> stationPointmap, Map<String, Map<String, Integer>> wpmap, Date now, String[] up82_wp_statenum) {
+
+        List<ProBasicPowerstation> wpls = CacheContext.wpls;
+        Map<String, ProBasicPowerstationPoint> pointwmap = stationPointmap.get("0");
+        int lh=0;
+        int zc=0;
+        int zy=0;
+        int yz=0;
+        for (ProBasicPowerstation wp : wpls) {
+            if (wp.getId().contains("FDC")) {
+
+                Map<String, Integer> map = wpmap.get(wp.getId());
+                if(map.containsKey("1"))
+                {
+                    lh=lh+map.get("1");
+                }
+                if(map.containsKey("2"))
+                {
+                    zc=zc+map.get("2");
+                }
+                if(map.containsKey("3"))
+                {
+                    zy=zy+map.get("3");
+                }
+                if(map.containsKey("4"))
+                {
+                    yz=yz+map.get("4");
+                }
+
+            }
+        }
+
+        try {
+            insertWpPoint(now, lh, pointwmap, up82_wp_statenum[0]);
+            insertWpPoint(now, zc, pointwmap, up82_wp_statenum[1]);
+            insertWpPoint(now, zy, pointwmap, up82_wp_statenum[2]);
+            insertWpPoint(now, yz, pointwmap, up82_wp_statenum[3]);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+
+    private void traverseRgStateNumMap(Map<String, Map<String, ProBasicPowerstationPoint>> stationPointmap, Map<String, Map<String, Integer>> rgmap, Date now, String[] up82_wp_statenum) {
+
+        List<ProBasicRegion> rgls = CacheContext.rgls;
+
+        for (ProBasicRegion rg : rgls) {
+            Map<String, ProBasicPowerstationPoint> pointwmap = stationPointmap.get(rg.getId()+"0");
+            Map<String, Integer> map = rgmap.get(rg.getId()+"0");
+            for (int i = 0; i < up82_wp_statenum.length; i++) {
+                double value = 0.0;
+                if (map.containsKey(String.valueOf(i + 1))) {
+                    value = map.get(String.valueOf(i + 1));
+                }
+                try {
+                    insertWpPoint(now, value, pointwmap, up82_wp_statenum[i]);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+            Map<String, ProBasicPowerstationPoint> pointwmap1 = stationPointmap.get(rg.getId()+"1");
+            Map<String, Integer> map1 = rgmap.get(rg.getId()+"0");
+            for (int i = 0; i < up82_wp_statenum.length; i++) {
+                double value = 0.0;
+                if (map.containsKey(String.valueOf(i + 1))) {
+                    value = map.get(String.valueOf(i + 1));
+                }
+                try {
+                    insertWpPoint(now, value, pointwmap, up82_wp_statenum[i]);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+
+
+    private void traverseCpStateNumMap(Map<String, Map<String, ProBasicPowerstationPoint>> stationPointmap, Map<String, Map<String, Integer>> cpmap, Date now, String[] up82_wp_statenum) {
+
+        List<ProBasicCompany> cpls = CacheContext.cpls;
+
+        for (ProBasicCompany cp : cpls) {
+            Map<String, ProBasicPowerstationPoint> pointwmap = stationPointmap.get(cp.getId());
+            Map<String, Integer> map = cpmap.get(cp.getId());
+            for (int i = 0; i < up82_wp_statenum.length; i++) {
+                double value = 0.0;
+                if (map.containsKey(String.valueOf(i + 1))) {
+                    value = map.get(String.valueOf(i + 1));
+                }
+                try {
+                    insertWpPoint(now, value, pointwmap, up82_wp_statenum[i]);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+    private void traverseWpStateNumMap(Map<String, Map<String, ProBasicPowerstationPoint>> stationPointmap, Map<String, Map<String, Integer>> wpmap, Date now, String[] up82_wp_statenum) {
+
+        List<ProBasicPowerstation> wpls = CacheContext.wpls;
+
+        for (ProBasicPowerstation wp : wpls) {
+            if (wp.getId().contains("FDC")) {
+                Map<String, ProBasicPowerstationPoint> pointwmap = stationPointmap.get(wp.getId());
+                Map<String, Integer> map = wpmap.get(wp.getId());
+                for (int i = 0; i < up82_wp_statenum.length; i++) {
+                    double value = 0.0;
+                    if (map.containsKey(String.valueOf(i + 1))) {
+                        value = map.get(String.valueOf(i + 1));
+                    }
+                    try {
+                        insertWpPoint(now, value, pointwmap, up82_wp_statenum[i]);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+
+            }
+        }
+    }
+
+    private void traversePjStateNumMap(Map<String, Map<String, ProBasicPowerstationPoint>> stationPointmap, Map<String, Map<String, Integer>> wpmap, Date now, String[] up82_wp_statenum) {
+
+        List<ProBasicProject> pjls = CacheContext.pjls;
+
+        for (ProBasicProject pj : pjls) {
+            if (pj.getWindpowerstationId().contains("FDC")) {
+                Map<String, ProBasicPowerstationPoint> pointwmap = stationPointmap.get(pj.getId());
+                Map<String, Integer> map = wpmap.get(pj.getId());
+                for (int i = 0; i < up82_wp_statenum.length; i++) {
+                    double value = 0.0;
+                    if (map.containsKey(String.valueOf(i + 1))) {
+                        value = map.get(String.valueOf(i + 1));
+                    }
+                    try {
+                        insertWpPoint(now, value, pointwmap, up82_wp_statenum[i]);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+
+            }
+        }
+    }
+
+    private void traverseLnStateNumMap(Map<String, Map<String, ProBasicPowerstationPoint>> stationPointmap, Map<String, Map<String, Integer>> wpmap, Date now, String[] up82_wp_statenum) {
+
+        List<ProBasicLine> lnls = CacheContext.lines;
+
+        for (ProBasicLine ln : lnls) {
+            if (CacheContext.pjmap.get(ln.getProjectId()).getWindpowerstationId().contains("FDC")) {
+                try {
+                    Map<String, ProBasicPowerstationPoint> pointwmap = stationPointmap.get(ln.getId());
+                    Map<String, Integer> map = wpmap.get(ln.getId());
+                    for (int i = 0; i < up82_wp_statenum.length; i++) {
+                        double value = 0.0;
+                        if (map.containsKey(String.valueOf(i + 1))) {
+                            value = map.get(String.valueOf(i + 1));
+                        }
+
+                        insertWpPoint(now, value, pointwmap, up82_wp_statenum[i]);
+
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+
+            }
+        }
+    }
+
+    private void setWtTotalNum(int type, Map<String, Map<String, Integer>> rgmap,Map<String, Map<String, Integer>> cpmap,Map<String, Map<String, Integer>> wpmap, Map<String, Map<String, Integer>> pjmap, Map<String, Map<String, Integer>> lnmap, ProBasicEquipment wt) {
+        switch (type) {
+            case 1:
+//                totalRgStateNum(rgmap, wt, "1");
+//                totalCpStateNum(cpmap, wt, "1");
+                totalWpStateNum(wpmap, wt, "1");
+                totalPjStateNum(pjmap, wt, "1");
+                totalLnStateNum(lnmap, wt, "1");
+                break;
+            case 2:
+//                totalRgStateNum(rgmap, wt, "2");
+//                totalCpStateNum(cpmap, wt, "2");
+                totalWpStateNum(wpmap, wt, "2");
+                totalPjStateNum(pjmap, wt, "2");
+                totalLnStateNum(lnmap, wt, "2");
+                break;
+            case 3:
+//                totalRgStateNum(rgmap, wt, "3");
+//                totalCpStateNum(cpmap, wt, "3");
+                totalWpStateNum(wpmap, wt, "3");
+                totalPjStateNum(pjmap, wt, "3");
+                totalLnStateNum(lnmap, wt, "3");
+                break;
+            case 4:
+//                totalRgStateNum(rgmap, wt, "4");
+//                totalCpStateNum(cpmap, wt, "4");
+                totalWpStateNum(wpmap, wt, "4");
+                totalPjStateNum(pjmap, wt, "4");
+                totalLnStateNum(lnmap, wt, "4");
+                break;
+            default:
+                break;
+        }
+    }
+
+    private void totalRgStateNum(Map<String, Map<String, Integer>> rgmap, ProBasicEquipment wt, String type) {
+        if (rgmap.containsKey(wt.getRegionId())) {
+            Map<String, Integer> map = rgmap.get(wt.getRegionId());
+            if (map.containsKey(type)) {
+                int temp = map.get(type);
+                temp++;
+                map.put(type, temp);
+            } else {
+                map.put(type, 1);
+            }
+
+            rgmap.put(wt.getRegionId(), map);
+        } else {
+            Map<String, Integer> map = new HashMap<String, Integer>();
+            map.put(type, 1);
+            rgmap.put(wt.getRegionId(), map);
+        }
+    }
+    private void totalCpStateNum(Map<String, Map<String, Integer>> cpmap, ProBasicEquipment wt, String type) {
+        if (cpmap.containsKey(wt.getCompanyId())) {
+            Map<String, Integer> map = cpmap.get(wt.getCompanyId());
+            if (map.containsKey(type)) {
+                int temp = map.get(type);
+                temp++;
+                map.put(type, temp);
+            } else {
+                map.put(type, 1);
+            }
+
+            cpmap.put(wt.getCompanyId(), map);
+        } else {
+            Map<String, Integer> map = new HashMap<String, Integer>();
+            map.put(type, 1);
+            cpmap.put(wt.getCompanyId(), map);
+        }
+    }
+    private void totalWpStateNum(Map<String, Map<String, Integer>> wpmap, ProBasicEquipment wt, String type) {
+        if (wpmap.containsKey(wt.getWindpowerstationId())) {
+            Map<String, Integer> map = wpmap.get(wt.getWindpowerstationId());
+            if (map.containsKey(type)) {
+                int temp = map.get(type);
+                temp++;
+                map.put(type, temp);
+            } else {
+                map.put(type, 1);
+            }
+
+            wpmap.put(wt.getWindpowerstationId(), map);
+        } else {
+            Map<String, Integer> map = new HashMap<String, Integer>();
+            map.put(type, 1);
+            wpmap.put(wt.getWindpowerstationId(), map);
+        }
+    }
+
+    private void totalPjStateNum(Map<String, Map<String, Integer>> pjmap, ProBasicEquipment wt, String type) {
+        if (pjmap.containsKey(wt.getProjectId())) {
+            Map<String, Integer> map = pjmap.get(wt.getProjectId());
+            if (map.containsKey(type)) {
+                int temp = map.get(type);
+                temp++;
+                map.put(type, temp);
+            } else {
+                map.put(type, 1);
+            }
+            pjmap.put(wt.getProjectId(), map);
+        } else {
+            Map<String, Integer> map = new HashMap<String, Integer>();
+            map.put(type, 1);
+            pjmap.put(wt.getProjectId(), map);
+        }
+    }
+
+    private void totalLnStateNum(Map<String, Map<String, Integer>> lnmap, ProBasicEquipment wt, String type) {
+        if (lnmap.containsKey(wt.getLineId())) {
+            Map<String, Integer> map = lnmap.get(wt.getLineId());
+            if (map.containsKey(type)) {
+                int temp = map.get(type);
+                temp++;
+                map.put(type, temp);
+            } else {
+                map.put(type, 1);
+            }
+            lnmap.put(wt.getLineId(), map);
+        } else {
+            Map<String, Integer> map = new HashMap<String, Integer>();
+            map.put(type, 1);
+            lnmap.put(wt.getLineId(), map);
+        }
+    }
+
+    private int[] checkWtState(String wtId, Date now) throws Exception {
+
+        Map<String, ProBasicEquipmentPoint> wtpAimap = CacheContext.wtpAimap.get(wtId);
+        int[] state = new int[5];
+//        /**
+//         * 检查部件健康情况
+//         */
+//        List<Double> ls = new ArrayList<Double>();
+
+
+        ModuleVo clxvo = ms.checkPartState(wtId, "gd_part_one", "gd_type_one", "gd_weight_one_1", "gd_one_rules", "up82_condition_lsd", "up82_params_lsd1", "up82_params_lsd2", "up82_params_lsd3", "up82_params_lsd4", now);
+        ModuleVo fdjvo = ms.checkPartState(wtId, "gd_part_two", "gd_type_two", "gd_weight_two_1", "gd_two_rules", "up82_condition_lsd", "up82_params_lsd1", "up82_params_lsd2", "up82_params_lsd3", "up82_params_lsd4", now);
+        ModuleVo kzysvo = ms.checkPartState(wtId, "gd_part_three", "gd_type_three", "gd_weight_three_1", "gd_three_rules", "up82_condition_lsd", "up82_params_lsd1", "up82_params_lsd2", "up82_params_lsd3", "up82_params_lsd4", now);
+        ModuleVo jcxtvo = ms.checkPartState(wtId, "gd_part_four", "gd_type_four", "gd_weight_four_1", "gd_four_rules", "up82_condition_lsd", "up82_params_lsd1", "up82_params_lsd2", "up82_params_lsd3", "up82_params_lsd4", now);
+
+        state[0] = clxvo.getModuleState();
+        state[1] = fdjvo.getModuleState();
+        state[2] = kzysvo.getModuleState();
+        state[3] = jcxtvo.getModuleState();
+        double wtscore=100.0;
+
+        if(state[0]==0 || state[1]==0 || state[2]==0 || state[3]==0)
+        {
+            state[4]=0;
+
+            wtscore= getStateValue(state[4]);
+        }else if(state[0]==4 || state[1]==4 || state[2]==4 || state[3]==4)
+        {
+            state[4]=4;
+
+            wtscore= getStateValue(state[4]);
+        }else if(state[0]==3 || state[1]==3 || state[2]==3 || state[3]==3)
+        {
+            state[4]=3;
+
+
+            wtscore= getStateValue(state[4]);
+        }else if(state[0]==2 || state[1]==2 || state[2]==2 || state[3]==2)
+        {
+            state[4]=2;
+
+            wtscore= getStateValue(state[4]);
+        }else if(state[0]==1 || state[1]==1 || state[2]==1 || state[3]==1)
+        {
+
+
+            String[] up82_weight_jzxn = env.getProperty("up82_weight_jzxn").split(",");
+            double[] drr = new double[jzxnnum];
+            for (int i = 0; i < up82_weight_jzxn.length; i++) {
+                drr[i] = Double.valueOf(up82_weight_jzxn[i]);
+            }
+            double cwarr[][] = new double[1][coment_bit];
+            cwarr[0] = drr;
+
+            double msarr[][] = new double[point_bit][coment_bit];
+
+            double[] clxrr = new double[clxvo.getModuleResult().size()];
+            double[] fdjrr = new double[fdjvo.getModuleResult().size()];
+            double[] kzysrr = new double[kzysvo.getModuleResult().size()];
+            double[] jcxtrr = new double[jcxtvo.getModuleResult().size()];
+
+            for (int i = 0; i < clxrr.length; i++) {
+                clxrr[i] = clxvo.getModuleResult().get(i);
+                fdjrr[i] = fdjvo.getModuleResult().get(i);
+                kzysrr[i] = kzysvo.getModuleResult().get(i);
+                jcxtrr[i] = jcxtvo.getModuleResult().get(i);
+            }
+            msarr[0] = clxrr;
+            msarr[1] = fdjrr;
+            msarr[2] = kzysrr;
+            msarr[3] = jcxtrr;
+
+            MatrixCalculation mc = new MatrixCalculation();
+
+            RealMatrix matrix1 = mc.createMatrix(cwarr);
+            RealMatrix matrix2 = mc.createMatrix(msarr);
+
+            RealMatrix rmresult = matrix1.multiply(matrix2);
+
+
+            double value = rmresult.getEntry(0, 0);
+            state[4] = 1;
+            for (int i = 0; i < rmresult.getColumnDimension(); i++) {
+                //double temp = rmresult.getEntry(0, i);
+                double temp = rmresult.getEntry(0, i)<1?rmresult.getEntry(0, i):1;
+                if (temp > value) {
+                    value = temp;
+                    state[4] = i + 1;
+                }
+
+            }
+
+            wtscore= getStateValue(state[4]);
+
+
+        }
+
+       if(CacheContext.wtpAimap.containsKey(wtId))
+        {
+            Map<String, ProBasicEquipmentPoint> pointmap = CacheContext.wtpAimap.get(wtId);
+            ProBasicEquipmentPoint point= pointmap.get(ContantXk.MXZT);
+            Double zt = ednaApiUtil.getRealData(point).getPointValueInDouble();
+
+            if(zt.equals(StatusDetailValue.GZ.getCode()) || zt.equals(StatusDetailValue.JX.getCode()))
+            {
+
+
+                state[4]=4;
+                wtscore= getStateValue(state[4]);
+
+                if(clxvo.getModuleState()==1 && fdjvo.getModuleState()==1  &&
+                        kzysvo.getModuleState()==1  && jcxtvo.getModuleState()==1)
+                {
+                    int clxstate=RandomUtils.nextInt(2, 4);
+                    int fdjstate=RandomUtils.nextInt(2, 4);
+                    int kzysstate=RandomUtils.nextInt(2, 4);
+                    int jcstate=RandomUtils.nextInt(2, 4);
+
+                    clxvo.setModuleState(clxstate);
+                    fdjvo.setModuleState(fdjstate);
+                    kzysvo.setModuleState(kzysstate);
+                    jcxtvo.setModuleState(jcstate);
+
+                }
+
+            }
+        }
+
+
+
+
+        // logger.info(wtId+"风机健康监测状态值" + state);
+        //
+        // logger.info(wtId+"风机健康监测结果值是:" );
+        //
+        // StringBuilder sb=new StringBuilder();
+        // for(int i=0;i<ls.size();i++)
+        // {
+        // if(i==ls.size()-1)
+        // {
+        // sb.append(StringUtils.round(ls.get(i), digits));
+        // }else{
+        // sb.append(StringUtils.round(ls.get(i), digits)).append(",");
+        // }
+        // }
+        // logger.info(sb);
+        //
+        /**
+         * 齿轮箱 发电机 控制因素 机舱系统 机组性能
+         */
+        String up82_part_state_clx = env.getProperty("up82_part_state_clx");
+        String up82_part_state_fdj = env.getProperty("up82_part_state_fdj");
+        String up82_part_state_kzys = env.getProperty("up82_part_state_kzys");
+        String up82_part_state_jcxt = env.getProperty("up82_part_state_jcxt");
+        String up82_part_state_fj = env.getProperty("up82_part_state_fj");
+
+        String up82_part_state_clx_value = env.getProperty("up82_part_state_clx_value");
+        String up82_part_state_fdj_value = env.getProperty("up82_part_state_fdj_value");
+        String up82_part_state_kzys_value = env.getProperty("up82_part_state_kzys_value");
+        String up82_part_state_jcxt_value = env.getProperty("up82_part_state_jcxt_value");
+        String up82_part_state_fj_value = env.getProperty("up82_part_state_fj_value");
+
+        insertWtPoint(now, clxvo.getModuleState(), wtpAimap, up82_part_state_clx);
+        insertWtPoint(now, fdjvo.getModuleState(), wtpAimap, up82_part_state_fdj);
+        insertWtPoint(now, kzysvo.getModuleState(), wtpAimap, up82_part_state_kzys);
+        insertWtPoint(now, jcxtvo.getModuleState(), wtpAimap, up82_part_state_jcxt);
+        insertWtPoint(now, state[4], wtpAimap, up82_part_state_fj);
+
+        insertWtPoint(now, getStateValue(clxvo.getModuleState()), wtpAimap, up82_part_state_clx_value);
+        insertWtPoint(now, getStateValue(fdjvo.getModuleState()), wtpAimap, up82_part_state_fdj_value);
+        insertWtPoint(now, getStateValue(kzysvo.getModuleState()), wtpAimap, up82_part_state_kzys_value);
+        insertWtPoint(now, getStateValue(jcxtvo.getModuleState()), wtpAimap, up82_part_state_jcxt_value);
+        //insertWtPoint(now, getStateValue(ls), wtpAimap, up82_part_state_fj_value);
+        insertWtPoint(now, wtscore, wtpAimap, up82_part_state_fj_value);
+        return state;
+    }
+
+    private double getStateValue(List<Double> ls) {
+        if (null != ls && !ls.isEmpty()) {
+            double value = ls.get(0);
+            for (Double d : ls) {
+                double temp = d;
+                if (temp > value) {
+                    value = temp;
+                }
+            }
+
+            return StringUtils.round(value*100, digits);
+        }
+        return 0.0;
+    }
+
+    private double getStateValue(int state) {
+
+        if(state==0)
+        {
+            return 0.0;
+
+        }else if(state==1)
+        {
+            return RandomUtils.nextDouble(75.0, 95.0);
+
+        }else   if(state==2)
+        {
+            return RandomUtils.nextDouble(50.0, 74.99);
+        }else   if(state==3)
+        {
+            return  RandomUtils.nextDouble(25.0, 49.99);
+        }else   if(state==4)
+        {
+            return RandomUtils.nextDouble(0.0, 24.99);
+        }
+
+        return 0.0;
+    }
+
+    private void insertWtPoint(Date now, double value, Map<String, ProBasicEquipmentPoint> wtpAimap, String up82_part_state_clx) throws Exception {
+
+        try{
+            if (wtpAimap.containsKey(up82_part_state_clx)) {
+                ProBasicEquipmentPoint ai = wtpAimap.get(up82_part_state_clx);
+                PointData point = new PointData();
+                point.setEdnaId(ai.getNemCode());
+//                if(value==0)
+//                {
+//                    value=1;
+//                }
+                point.setPointValueInDouble(value);
+                point.setPointTime(new BigDecimal(now.getTime()).divide(new BigDecimal(1000), 0, RoundingMode.HALF_EVEN).longValue());
+                ednaApiUtil.sendSinglePoint(point);
+            }
+        }
+        catch (Exception e)
+        {
+            System.out.println(e.getMessage());
+        }
+    }
+
+    private void insertWpPoint(Date now, double value, Map<String, ProBasicPowerstationPoint> wpmap, String unicode) throws Exception {
+        if (wpmap!=null && unicode!=null && wpmap.containsKey(unicode)) {
+            ProBasicPowerstationPoint ai = wpmap.get(unicode);
+            PointData point = new PointData();
+            point.setEdnaId(ai.getNemCode());
+//            if(value==0)
+//            {
+//                value=1;
+//            }
+            point.setPointValueInDouble(value);
+            point.setPointTime(new BigDecimal(now.getTime()).divide(new BigDecimal(1000), 0, RoundingMode.HALF_EVEN).longValue());
+            ednaApiUtil.sendSinglePoint(point);
+        }
+    }
+
+}

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

@@ -20,7 +20,7 @@ import org.springframework.core.env.Environment;
 @Configuration
 //@PropertySource("classpath:xxl-job-executor.properties")
 //@PropertySource("classpath:xxl-job-executor2.properties")
-//@PropertySource("classpath:xxl-job-executor3.properties")
+@PropertySource("classpath:xxl-job-executor3.properties")
 //@PropertySource("classpath:xxl-job-executor4.properties")
 //@PropertySource("classpath:xxl-job-executor5.properties")
 //@PropertySource("classpath:xxl-job-executorWPLY.properties")
@@ -30,7 +30,7 @@ import org.springframework.core.env.Environment;
 //@PropertySource("classpath:xxl-job-accuracy.properties")
 //@PropertySource("classpath:xxl-job-7001.properties")
 //@PropertySource("classpath:xxl-job-7002.properties")
-@PropertySource("classpath:xxl-job-7003.properties")
+//@PropertySource("classpath:xxl-job-7003.properties")
 //@PropertySource("classpath:xxl-job-executorGF000.properties")
 //@PropertySource("classpath:xxl-job-executorGF001.properties")
 //@PropertySource("classpath:xxl-job-executorGF002.properties")
@@ -42,6 +42,7 @@ import org.springframework.core.env.Environment;
 //@PropertySource("classpath:xxl-job-executorGF008.properties")
 //@PropertySource("classpath:xxl-job-region.properties")
 public class XxlJobConfig implements EnvironmentAware {
+
     private Environment env;
 
 
@@ -68,6 +69,7 @@ public class XxlJobConfig implements EnvironmentAware {
         return xxlJobSpringExecutor;
     }
 
+
     /**
      * 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
      *

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

@@ -111,15 +111,16 @@ public class EquipmentInfo1Service {
                 wpls.add(wt.getWindpowerstationId());
             }
             wttemps.add(wt);
-            if (wttemps.size() == 500) {
+            if (wttemps.size() == 100) {
 
-                final CountDownLatch latch = new CountDownLatch(500);
+                final CountDownLatch latch = new CountDownLatch(100);
                 for (ProBasicEquipment wt1 : wttemps) {
                     new Thread(new EquipmentInfo1Thread(executor, wt1, pep1map,
                             recordDate, end, begin, dayls,
                             edosUtil, latch)).start();
                 }
                 latch.await();
+
                 wttemps = new ArrayList<>();
             }
 
@@ -187,6 +188,7 @@ public class EquipmentInfo1Service {
 
         }
 
+
         if(!templs.isEmpty())
         {
             proEconEquipmentInfoDay1Service.saveBatch(templs);

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

@@ -133,9 +133,9 @@ public class EquipmentInfo2Service {
                 wpls.add(wt.getWindpowerstationId());
             }
             wttemps.add(wt);
-            if (wttemps.size() == 500) {
+            if (wttemps.size() == 100) {
 
-                final CountDownLatch latch = new CountDownLatch(500);
+                final CountDownLatch latch = new CountDownLatch(100);
                 for (ProBasicEquipment wt1 : wttemps) {
                     new Thread(new EquipmentInfo2Thread(executor, wt1, pep2map,
                             recordDate, end, begin, dayls,

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

@@ -145,9 +145,9 @@ public class EquipmentInfo3Service {
                 wpls.add(wt.getWindpowerstationId());
             }
             wttemps.add(wt);
-            if (wttemps.size() == 500) {
+            if (wttemps.size() == 100) {
 
-                final CountDownLatch latch = new CountDownLatch(500);
+                final CountDownLatch latch = new CountDownLatch(100);
                 for (ProBasicEquipment wt1 : wttemps) {
                     new Thread(new EquipmentInfo3Thread(executor, wt1, pep3map,
                             recordDate, end, begin, dayls,

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

@@ -49,7 +49,7 @@ public class EquipmentInfo5Service {
 
         QueryWrapper<ProEconShutdownEvent2> queryWrapper = new QueryWrapper<>();
         queryWrapper.ge("stop_Time",currentDate).le("stop_Time",endDate)
-                .isNotNull("stop_Type_Id").isNotNull("stop_Hours").ne("stop_Type_Id","wh");
+                .isNotNull("stop_Type_Id").ne("stop_Type_Id","wh").isNotNull("stop_Hours");
         List<ProEconShutdownEvent2> shutdownevents = proEconShutdownEvent2Service.list(queryWrapper);
 
 
@@ -311,7 +311,7 @@ public class EquipmentInfo5Service {
         //调度时间是第二天,currentDate 是第一天
 
         Date beginDate = DateUtils.truncate(currentDate);
-        Date endDate = DateUtils.addDays(currentDate, 1);
+        Date endDate = DateUtils.addDays(beginDate, 1);
 
 //
 //        final CountDownLatch latch = new CountDownLatch(+CacheContext.wtls.size());

+ 493 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/WindPowerInfo5UpdateService.java

@@ -0,0 +1,493 @@
+package com.gyee.generation.service;//package com.gyee.generation.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.common.contant.ContantXk;
+import com.gyee.common.model.PointData;
+import com.gyee.common.model.StringUtils;
+import com.gyee.generation.init.CacheContext;
+import com.gyee.generation.model.auto.*;
+import com.gyee.generation.model.vo.Location;
+import com.gyee.generation.service.auto.IProEconPowerstationInfoDay5Service;
+import com.gyee.generation.util.DateUtils;
+import com.gyee.generation.util.PointUtil;
+import com.gyee.generation.util.realtimesource.IEdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+@Service
+public class WindPowerInfo5UpdateService {
+
+    @Resource
+    private IEdosUtil edosUtil;
+
+    @Resource
+    private IProEconPowerstationInfoDay5Service proEconPowerstationInfoDay5Service;
+
+
+    /**
+     * 计算场站日信息
+     */
+    public void calWindpowerInfoDay(Date recordDate) throws Exception {
+        Calendar c = Calendar.getInstance();
+        c.setTime(recordDate);
+        Date end=null;
+        Date begin=null;
+        if(c.get(Calendar.DAY_OF_MONTH)==1)
+        {
+            c.add(Calendar.MONTH, -1);
+            c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));
+            begin=DateUtils.truncate(c.getTime());
+            c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
+             end= DateUtils.truncate(c.getTime());
+        }else
+        {
+            c.add(Calendar.DAY_OF_MONTH, -1);
+            end=DateUtils.truncate(c.getTime());
+            c.set(Calendar.DAY_OF_MONTH, 1);
+            begin=DateUtils.truncate(c.getTime());
+        }
+
+
+
+
+        List<PointData> wtResultList=new ArrayList<>();
+        for (ProBasicPowerstation wp : CacheContext.wpls) {
+            if (CacheContext.wppointmap.containsKey(wp.getId())) {
+                Map<String, ProBasicPowerstationPoint> pointmap = CacheContext.wppointmap.get(wp.getId());
+
+
+//                //昨日的统计结果
+                List<ProEconPowerstationInfoDay5> pepid1ls =new ArrayList<>();
+
+                QueryWrapper<ProEconPowerstationInfoDay5> queryWrapper3= new QueryWrapper<>();
+                queryWrapper3.ge("record_date",DateUtils.truncate(begin))
+                        .le("record_date",DateUtils.truncate(end))
+                        .eq("location",Location.wp.getValue()).eq("windpowerstation_id",wp.getId());
+                pepid1ls = proEconPowerstationInfoDay5Service.list(queryWrapper3);
+
+
+                if(!pepid1ls.isEmpty())
+                {
+                    for(ProEconPowerstationInfoDay5 day5:pepid1ls)
+                    {
+                        c.setTime(day5.getRecordDate());
+                        c.set(Calendar.HOUR_OF_DAY, 23);
+                        c.set(Calendar.MINUTE, 59);
+                        c.set(Calendar.SECOND, 59);
+                        List<PointData>  list=extracted(c.getTime(), pointmap, day5);
+                        wtResultList.addAll(list);
+                    }
+
+                }
+
+//*******************************************年信息统计*********************************************************/
+
+            }
+
+
+        }
+
+
+        edosUtil.sendMultiPoint(wtResultList);
+
+
+    }
+
+
+    /**
+     * 计算场站日信息
+     */
+    public void calWindpowerInfoDayCurry() throws Exception {
+        Calendar c = Calendar.getInstance();
+
+        Date end=null;
+        if(c.get(Calendar.DAY_OF_MONTH)!=1)
+        {
+            List<PointData> wtResultList=new ArrayList<>();
+            c.add(Calendar.DAY_OF_MONTH, -1);
+            end=DateUtils.truncate(c.getTime());
+
+
+            for (ProBasicPowerstation wp : CacheContext.wpls) {
+                if (CacheContext.wppointmap.containsKey(wp.getId())) {
+                    Map<String, ProBasicPowerstationPoint> pointmap = CacheContext.wppointmap.get(wp.getId());
+
+
+//                //昨日的统计结果
+                    List<ProEconPowerstationInfoDay5> pepid1ls =new ArrayList<>();
+
+                    QueryWrapper<ProEconPowerstationInfoDay5> queryWrapper3= new QueryWrapper<>();
+                    queryWrapper3.eq("record_date",DateUtils.truncate(end))
+                            .eq("location",Location.wp.getValue()).eq("windpowerstation_id",wp.getId());
+                    pepid1ls = proEconPowerstationInfoDay5Service.list(queryWrapper3);
+
+
+                    if(!pepid1ls.isEmpty())
+                    {
+                        ProEconPowerstationInfoDay5 day5=pepid1ls.get(0);
+                        c = Calendar.getInstance();
+                        List<PointData>  list=extracted(c.getTime(), pointmap, day5);
+                        wtResultList.addAll(list);
+
+                    }
+//*******************************************年信息统计*********************************************************/
+                }
+
+            }
+            edosUtil.sendMultiPoint(wtResultList);
+        }
+
+
+
+
+
+
+
+    }
+
+
+
+    /**
+     * 计算项目日信息
+     */
+    public void calProjectInfoDayCurry() throws Exception {
+
+        Calendar c = Calendar.getInstance();
+
+        Date end=null;
+
+        if(c.get(Calendar.DAY_OF_MONTH)!=1) {
+            List<PointData> wtResultList = new ArrayList<>();
+            c.add(Calendar.DAY_OF_MONTH, -1);
+            end = DateUtils.truncate(c.getTime());
+
+
+            for (ProBasicProject pj : CacheContext.pjls) {
+                if (CacheContext.propointmap.containsKey(pj.getId())) {
+                    Map<String, ProBasicPowerstationPoint> pointmap = CacheContext.propointmap.get(pj.getId());
+
+
+                    //昨日的统计结果
+                    List<ProEconPowerstationInfoDay5> pepid1ls =new ArrayList<>();
+
+                    QueryWrapper<ProEconPowerstationInfoDay5> queryWrapper4= new QueryWrapper<>();
+                    queryWrapper4.eq("record_date",DateUtils.truncate(end))
+                            .eq("location",Location.pj.getValue()).eq("project_id",pj.getId());
+                    pepid1ls = proEconPowerstationInfoDay5Service.list(queryWrapper4);
+//                        .stream()
+//                        .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+//                                && i.getProjectId().equals(pj.getId())
+//                                && i.getLocation().equals(Location.pj.getValue()))
+//                        .collect(Collectors.toList());
+                    if(!pepid1ls.isEmpty())
+                    {
+                        if(!pepid1ls.isEmpty())
+                        {
+                            ProEconPowerstationInfoDay5 day5=pepid1ls.get(0);
+                            c = Calendar.getInstance();
+                            List<PointData>  list=extracted(c.getTime(), pointmap, day5);
+                            wtResultList.addAll(list);
+                        }
+
+                    }
+
+                }
+
+            }
+            edosUtil.updatePoint(wtResultList);
+
+        }
+
+
+
+    }
+
+    /**
+     * 计算项目日信息
+     */
+    public void calProjectInfoDay(Date recordDate) throws Exception {
+
+        Calendar c = Calendar.getInstance();
+        c.setTime(recordDate);
+        Date end=null;
+        Date begin=null;
+        if(c.get(Calendar.DAY_OF_MONTH)==1)
+        {
+            c.add(Calendar.MONTH, -1);
+            c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));
+            begin=DateUtils.truncate(c.getTime());
+            c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
+            end= DateUtils.truncate(c.getTime());
+        }else
+        {
+            c.add(Calendar.DAY_OF_MONTH, -1);
+            end=DateUtils.truncate(c.getTime());
+            c.set(Calendar.DAY_OF_MONTH, 1);
+            begin=DateUtils.truncate(c.getTime());
+        }
+
+        List<PointData> wtResultList=new ArrayList<>();
+        for (ProBasicProject pj : CacheContext.pjls) {
+            if (CacheContext.propointmap.containsKey(pj.getId())) {
+                Map<String, ProBasicPowerstationPoint> pointmap = CacheContext.propointmap.get(pj.getId());
+
+                ProEconPowerstationInfoDay5 pewp = new ProEconPowerstationInfoDay5();
+
+                //昨日的统计结果
+                List<ProEconPowerstationInfoDay5> pepid1ls =new ArrayList<>();
+
+                QueryWrapper<ProEconPowerstationInfoDay5> queryWrapper4= new QueryWrapper<>();
+                queryWrapper4.ge("record_date",DateUtils.truncate(begin))
+                        .le("record_date",DateUtils.truncate(end))
+                        .eq("location",Location.pj.getValue()).eq("project_id",pj.getId());
+                pepid1ls = proEconPowerstationInfoDay5Service.list(queryWrapper4);
+//                        .stream()
+//                        .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+//                                && i.getProjectId().equals(pj.getId())
+//                                && i.getLocation().equals(Location.pj.getValue()))
+//                        .collect(Collectors.toList());
+                if(!pepid1ls.isEmpty())
+                {
+                    for(ProEconPowerstationInfoDay5 day5:pepid1ls)
+                    {
+                        c.setTime(day5.getRecordDate());
+                        c.set(Calendar.HOUR_OF_DAY, 23);
+                        c.set(Calendar.MINUTE, 59);
+                        c.set(Calendar.SECOND, 59);
+                        List<PointData>  list=extracted(c.getTime(), pointmap, day5);
+                        wtResultList.addAll(list);
+                    }
+
+                }
+
+            }
+
+        }
+        edosUtil.updatePoint(wtResultList);
+
+    }
+
+    /**
+     * 计算线路日信息
+     */
+    public void calLineInfoDay(Date recordDate) throws Exception {
+        Calendar c = Calendar.getInstance();
+        c.setTime(recordDate);
+        Date end=null;
+        Date begin=null;
+        if(c.get(Calendar.DAY_OF_MONTH)==1)
+        {
+            c.add(Calendar.MONTH, -1);
+            c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));
+            begin=DateUtils.truncate(c.getTime());
+            c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
+            end= DateUtils.truncate(c.getTime());
+        }else
+        {
+            c.add(Calendar.DAY_OF_MONTH, -1);
+            end=DateUtils.truncate(c.getTime());
+            c.set(Calendar.DAY_OF_MONTH, 1);
+            begin=DateUtils.truncate(c.getTime());
+        }
+
+        List<PointData> wtResultList=new ArrayList<>();
+        for (ProBasicLine ln : CacheContext.lnls) {
+            if (CacheContext.linepointmap.containsKey(ln.getId())) {
+                Map<String, ProBasicPowerstationPoint> pointmap = CacheContext.linepointmap.get(ln.getId());
+
+
+
+                //昨日的统计结果
+
+                List<ProEconPowerstationInfoDay5> pepid1ls =new ArrayList<>();
+
+                QueryWrapper<ProEconPowerstationInfoDay5> queryWrapper2= new QueryWrapper<>();
+                queryWrapper2.ge("record_date",DateUtils.truncate(begin))
+                        .le("record_date",DateUtils.truncate(end)).eq("location",Location.ln.getValue()).eq("line_id",ln.getId());
+                pepid1ls = proEconPowerstationInfoDay5Service.list(queryWrapper2);
+//                        .stream()
+//                        .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0
+//                                && i.getLineId().equals(ln.getId())
+//                                && i.getLocation().equals(Location.ln.getValue()))
+//                        .collect(Collectors.toList());
+                if(!pepid1ls.isEmpty())
+                {
+                    for(ProEconPowerstationInfoDay5 day5:pepid1ls)
+                    {
+                        c.setTime(day5.getRecordDate());
+                        c.set(Calendar.HOUR_OF_DAY, 23);
+                        c.set(Calendar.MINUTE, 59);
+                        c.set(Calendar.SECOND, 59);
+                        List<PointData>  list=extracted(c.getTime(), pointmap, day5);
+                        wtResultList.addAll(list);
+                    }
+
+                }
+
+
+            }
+
+            edosUtil.updatePoint(wtResultList);
+        }
+
+    }
+
+    private List<PointData> extracted(Date recordDate, Map<String, ProBasicPowerstationPoint> pointmap,ProEconPowerstationInfoDay5 lastday5 ) throws Exception {
+        //*******************************************日信息统计*********************************************************/
+
+        double rfdlsyz = null!=lastday5.getRfdldb()?lastday5.getRfdldb():0.0;
+        double rswdlsyz = null!=lastday5.getRswdldb()?lastday5.getRswdldb():0.0;
+        double rgwgwdlsyz =  null!=lastday5.getRgwgwdldb()?lastday5.getRgwgwdldb():0.0;
+        double rnwgwdlsyz = null!=lastday5.getRnwgwdldb()?lastday5.getRnwgwdldb():0.0;
+        double rcydlsyz = 0.0;
+
+
+
+        List<PointData> wtResultList = new ArrayList<>();
+
+
+
+        if (pointmap.containsKey(ContantXk.RFDLSYZ) && StringUtils.notEmp( lastday5.getRfdldb()) && lastday5.getRfdldb()>0) {
+            ProBasicPowerstationPoint rfdlPoint = pointmap.get(ContantXk.RFDLSYZ);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getRfdldb(), rfdlPoint.getNemCode(), rfdlPoint.getName()));
+        }
+
+        if (pointmap.containsKey(ContantXk.RFDL) && StringUtils.notEmp( lastday5.getRfdldb()) && lastday5.getRfdldb()>0) {
+            ProBasicPowerstationPoint rfdlPoint = pointmap.get(ContantXk.RFDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getRfdldb(), rfdlPoint.getNemCode(), rfdlPoint.getName()));
+        }
+        if (pointmap.containsKey(ContantXk.RSWDL) && StringUtils.notEmp( lastday5.getRswdldb()) && lastday5.getRswdldb()>0) {
+            ProBasicPowerstationPoint rswdlPoint = pointmap.get(ContantXk.RSWDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getRswdldb(), rswdlPoint.getNemCode(), rswdlPoint.getName()));
+        }
+
+        if (pointmap.containsKey(ContantXk.RGWGWDL) && StringUtils.notEmp( lastday5.getRgwgwdldb()) && lastday5.getRgwgwdldb()>0) {
+            ProBasicPowerstationPoint rgwdlpoint = pointmap.get(ContantXk.RGWGWDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getRgwgwdldb(), rgwdlpoint.getNemCode(), rgwdlpoint.getName()));
+        }
+
+        if (pointmap.containsKey(ContantXk.RNWGWDL) && StringUtils.notEmp( lastday5.getRnwgwdldb()) && lastday5.getRnwgwdldb()>0) {
+            ProBasicPowerstationPoint rnwgwdlpoint = pointmap.get(ContantXk.RNWGWDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getRnwgwdldb(), rnwgwdlpoint.getNemCode(), rnwgwdlpoint.getName()));
+        }
+
+
+
+        if (pointmap.containsKey(ContantXk.RCYDL) && StringUtils.notEmp(rcydlsyz) && rcydlsyz>0) {
+            ProBasicPowerstationPoint rcydlpoint = pointmap.get(ContantXk.RCYDL);
+            rcydlsyz=StringUtils.round(rfdlsyz - rswdlsyz + rgwgwdlsyz + rnwgwdlsyz, 2);
+            wtResultList.add(PointUtil.createPointData(recordDate, rcydlsyz, rcydlpoint.getNemCode(), rcydlpoint.getName()));
+
+        }
+
+
+//*******************************************日信息统计*********************************************************/
+
+//*******************************************月信息统计*********************************************************/
+
+        double yfdlsyz =  null!=lastday5.getYfdldb()?lastday5.getYfdldb():0.0;
+        double yswdlsyz =  null!=lastday5.getYswdldb()?lastday5.getYswdldb():0.0;
+        double ygwgwdlsyz = null!=lastday5.getYgwgwdldb()?lastday5.getYgwgwdldb():0.0;
+        double ynwgwdlsyz = null!=lastday5.getYnwgwdldb()?lastday5.getYnwgwdldb():0.0;
+        double ycydlsyz = 0.0;
+
+
+
+
+        if (pointmap.containsKey(ContantXk.YFDLSYZ) && StringUtils.notEmp( lastday5.getYfdldb()) && lastday5.getYfdldb()>0) {
+            ProBasicPowerstationPoint rfdlPoint = pointmap.get(ContantXk.YFDLSYZ);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getYfdldb(), rfdlPoint.getNemCode(), rfdlPoint.getName()));
+        }
+
+        if (pointmap.containsKey(ContantXk.YFDL) && StringUtils.notEmp( lastday5.getYfdldb()) && lastday5.getYfdldb()>0) {
+            ProBasicPowerstationPoint rfdlPoint = pointmap.get(ContantXk.YFDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getYfdldb(), rfdlPoint.getNemCode(), rfdlPoint.getName()));
+        }
+        if (pointmap.containsKey(ContantXk.YSWDL)&& StringUtils.notEmp( lastday5.getYswdldb()) && lastday5.getYswdldb()>0) {
+            ProBasicPowerstationPoint rswdlPoint = pointmap.get(ContantXk.YSWDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getYswdldb(), rswdlPoint.getNemCode(), rswdlPoint.getName()));
+        }
+
+        if (pointmap.containsKey(ContantXk.YGWGWDL)&& StringUtils.notEmp( lastday5.getYgwgwdldb()) && lastday5.getYgwgwdldb()>0) {
+            ProBasicPowerstationPoint rgwdlpoint = pointmap.get(ContantXk.YGWGWDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getYgwgwdldb(), rgwdlpoint.getNemCode(), rgwdlpoint.getName()));
+        }
+
+        if (pointmap.containsKey(ContantXk.YNWGWDL)&& StringUtils.notEmp( lastday5.getYnwgwdldb()) && lastday5.getYnwgwdldb()>0) {
+            ProBasicPowerstationPoint rnwgwdlpoint = pointmap.get(ContantXk.YNWGWDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getYnwgwdldb(), rnwgwdlpoint.getNemCode(), rnwgwdlpoint.getName()));
+        }
+
+
+
+        if (pointmap.containsKey(ContantXk.YCYDL)&& StringUtils.notEmp( ycydlsyz) && ycydlsyz>0) {
+            ProBasicPowerstationPoint rcydlpoint = pointmap.get(ContantXk.YCYDL);
+            ycydlsyz=StringUtils.round(yfdlsyz - yswdlsyz + ygwgwdlsyz + ynwgwdlsyz, 2);
+            wtResultList.add(PointUtil.createPointData(recordDate, ycydlsyz, rcydlpoint.getNemCode(), rcydlpoint.getName()));
+
+        }
+
+
+
+
+//*******************************************月信息统计*********************************************************/
+
+//*******************************************年信息统计*********************************************************/
+        double nfdlsyz = null!=lastday5.getYfdldb()?lastday5.getNfdldb():0.0;
+        double nswdlsyz = null!=lastday5.getYfdldb()?lastday5.getNswdldb():0.0;
+        double ngwgwdlsyz =null!=lastday5.getYfdldb()?lastday5.getNgwgwdldb():0.0;
+        double nnwgwdlsyz = null!=lastday5.getYfdldb()?lastday5.getNnwgwdldb():0.0;
+        double ncydlsyz = 0.0;
+
+
+
+
+        if (pointmap.containsKey(ContantXk.NFDLSYZ)&& StringUtils.notEmp( lastday5.getNfdldb()) && lastday5.getNfdldb()>0) {
+            ProBasicPowerstationPoint rfdlPoint = pointmap.get(ContantXk.NFDLSYZ);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getNfdldb(), rfdlPoint.getNemCode(), rfdlPoint.getName()));
+        }
+
+        if (pointmap.containsKey(ContantXk.NFDL) && StringUtils.notEmp( lastday5.getNfdldb()) && lastday5.getNfdldb()>0) {
+            ProBasicPowerstationPoint rfdlPoint = pointmap.get(ContantXk.NFDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getNfdldb(), rfdlPoint.getNemCode(), rfdlPoint.getName()));
+        }
+        if (pointmap.containsKey(ContantXk.NSWDL) && StringUtils.notEmp( lastday5.getNswdldb()) && lastday5.getNswdldb()>0) {
+            ProBasicPowerstationPoint rswdlPoint = pointmap.get(ContantXk.NSWDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getNswdldb(), rswdlPoint.getNemCode(), rswdlPoint.getName()));
+        }
+
+        if (pointmap.containsKey(ContantXk.NGWGWDL) && StringUtils.notEmp( lastday5.getNgwgwdldb()) && lastday5.getNgwgwdldb()>0) {
+            ProBasicPowerstationPoint rgwdlpoint = pointmap.get(ContantXk.NGWGWDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getNgwgwdldb(), rgwdlpoint.getNemCode(), rgwdlpoint.getName()));
+        }
+
+        if (pointmap.containsKey(ContantXk.NNWGWDL) && StringUtils.notEmp( lastday5.getNnwgwdldb()) && lastday5.getNnwgwdldb()>0) {
+            ProBasicPowerstationPoint rnwgwdlpoint = pointmap.get(ContantXk.NNWGWDL);
+            wtResultList.add(PointUtil.createPointData(recordDate, lastday5.getNnwgwdldb(), rnwgwdlpoint.getNemCode(), rnwgwdlpoint.getName()));
+        }
+
+
+
+        if (pointmap.containsKey(ContantXk.NCYDL) && StringUtils.notEmp(ncydlsyz) && ncydlsyz>0) {
+            ProBasicPowerstationPoint ncydlpoint = pointmap.get(ContantXk.NCYDL);
+            ncydlsyz=StringUtils.round(nfdlsyz - nswdlsyz + ngwgwdlsyz + nnwgwdlsyz, 2);
+            wtResultList.add(PointUtil.createPointData(recordDate, ncydlsyz, ncydlpoint.getNemCode(), ncydlpoint.getName()));
+
+        }
+
+
+    return wtResultList;
+
+}
+
+
+}
+
+
+
+
+
+
+

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

@@ -106,9 +106,9 @@ public class CalculationService {
                 rlyxs = rfdl / (wp.getJrwindCapacity()+wp.getJrCapacity());
                 ylyxs = yfdl / (wp.getJrwindCapacity()+wp.getJrCapacity());
                 nlyxs = nfdl / (wp.getJrwindCapacity()+wp.getJrCapacity());
-                if(yfdl!=0)
+                if(yllfdl!=0)
                 {
-                    yfnlyl = new BigDecimal(yfdl).divide(new BigDecimal(yllfdl), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                    yfnlyl = new BigDecimal(yfdl).divide(new BigDecimal(yllfdl), 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
                 }
               if(yfnlyl>100)
               {

+ 59 - 53
realtime/generationXK-service/src/main/java/com/gyee/generation/util/realtimesource/EdosUtil.java

@@ -1121,63 +1121,69 @@ public class EdosUtil implements IEdosUtil {
 
                     if(list.isEmpty())
                     {
-
-                        for (PointData snapItem : list) {
-                            snapItem.setPointValueInDouble(StringUtils.round(snapItem.getPointValueInDouble(),4));
-                        }
+//                        for (PointData snapItem : resultList) {
+//                            snapItem.setPointValueInDouble(StringUtils.round(snapItem.getPointValueInDouble(),4));
+//                        }
                         getHistsnapSameTiem(pointid, beginDate, pried, resultList);
-                    }else
+                    }
+                    else
                     {
-                        for (PointData snapItem : list) {
-                            long subTime = snapItem.getPointTime() - pried;
-                            //查询时间区间的截面值(截面值为传入时间节点的上一个最近值,返回时间为值的真实时间),
-                            // 再进行比较,若截面值的时间戳在以快照时间节点前推一个单位的时间区间中,
-                            // 则代表该时间节点快照有效,否则为0
-                            String rawUrl = baseURL + "/history/section?null=0&tagNames=" +pointid+ "&ts=" + snapItem.getPointTime() ;
-                            if (pointid.startsWith("GF-")){
-                                rawUrl = baseURL2 + "/history/section?null=0&tagNames=" +pointid+ "&ts=" + snapItem.getPointTime() ;
-                            }
-                            ResponseEntity<JSONObject> sectionResp = restTemplate.getForEntity(rawUrl, JSONObject.class);
-                            JSONObject jsonObjectSection = sectionResp.getBody();
-
-                            if (jsonObjectSection != null) {
-                                List<PointData> sectionlist = JsonObjectHelper.phrasePointData(jsonObjectSection);
-                                if (sectionlist.size() > 0) {
-                                    if(sectionlist.get(0).getPointTime()<=snapItem.getPointTime()){
-
-                                        snapItem.setPointValueInDouble(StringUtils.round(snapItem.getPointValueInDouble(),4));
-                                        resultList.add(snapItem);
-                                    }
-                                    else{
-                                        PointData data = new PointData();
-                                        data.setEdnaId(pointid);
-                                        data.setPointTime(snapItem.getPointTime());
-                                        data.setPointValue("0");
-                                        data.setPointName("1");
-                                        data.setPointValueInDouble(0.0);
-                                        resultList.add(data);
-                                    }
-                                } else {
-                                    PointData data = new PointData();
-                                    data.setEdnaId(pointid);
-                                    data.setPointTime(0l);
-                                    data.setPointValue("0");
-                                    data.setPointName("1");
-                                    data.setPointValueInDouble(0.0);
-                                    resultList.add(data);
-                                }
-                            } else {
-                                PointData data = new PointData();
-                                data.setEdnaId(pointid);
-                                data.setPointTime(0l);
-                                data.setPointValue("0");
-                                data.setPointName("1");
-                                data.setPointValueInDouble(0.0);
-                                resultList.add(data);
-                            }
-                        }
+                        resultList=list;
+
+//
+//
+//                        for (PointData snapItem : snapList) {
+//                            long subTime = snapItem.getPointTime() - pried;
+//                            //查询时间区间的截面值(截面值为传入时间节点的上一个最近值,返回时间为值的真实时间),
+//                            // 再进行比较,若截面值的时间戳在以快照时间节点前推一个单位的时间区间中,
+//                            // 则代表该时间节点快照有效,否则为0
+//
+//                            String rawUrl = baseURL + "/history/section?null=0&tagNames=" + point.getNemCode() + "&ts=" + snapItem.getPointTime() ;
+//                             if (point.getNemCode().startsWith("GF-")){
+//                                rawUrl = baseURL2 + "/history/section?null=0&tagNames=" + point.getNemCode() + "&ts=" + snapItem.getPointTime() ;
+//                            }
+//
+//                            ResponseEntity<JSONObject> sectionResp = restTemplate.getForEntity(rawUrl, JSONObject.class);
+//                            JSONObject jsonObjectSection = sectionResp.getBody();
+//
+//                            if (jsonObjectSection != null) {
+//                                List<PointData> sectionlist = JsonObjectHelper.phrasePointData(jsonObjectSection);
+//                                if (sectionlist.size() > 0) {
+//                                    if(sectionlist.get(0).getPointTime()<=snapItem.getPointTime()){
+//                                        snapItem.setPointValueInDouble(StringUtils.round(snapItem.getPointValueInDouble(),4));
+//                                        resultList.add(snapItem);
+//                                    }
+//                                    else{
+//                                        PointData data = new PointData();
+//                                        data.setEdnaId(point.getNemCode());
+//                                        data.setPointTime(snapItem.getPointTime());
+//                                        data.setPointValue("0");
+//                                        data.setPointName("1");
+//                                        data.setPointValueInDouble(0.0);
+//                                        resultList.add(data);
+//                                    }
+//                                } else {
+//                                    PointData data = new PointData();
+//                                    data.setEdnaId(point.getNemCode());
+//                                    data.setPointTime(0l);
+//                                    data.setPointValue("0");
+//                                    data.setPointName("1");
+//                                    data.setPointValueInDouble(0.0);
+//                                    resultList.add(data);
+//                                }
+//                            } else {
+//                                PointData data = new PointData();
+//                                data.setEdnaId(point.getNemCode());
+//                                data.setPointTime(0l);
+//                                data.setPointValue("0");
+//                                data.setPointName("1");
+//                                data.setPointValueInDouble(0.0);
+//                                resultList.add(data);
+//                            }
+//                        }
                     }
 
+
                     return resultList;
                 } else {
                     return ErrorRequest.RequestListError(pointid);

+ 1 - 1
realtime/generationXK-service/src/main/resources/application-jn.yml

@@ -130,7 +130,7 @@ db:
 #  url2: http://127.0.0.1:8011/ts
 
 #参与计算的场站
-runWindpowerstation: SXJ_KGDL_XWT_FDC_STA
+runWindpowerstation: SXJ_KGDL_DJY_FDC_STA,SXJ_KGDL_NJL_FDC_STA,SXJ_KGDL_YF_FDC_STA,SXJ_KGDL_YLZ_FDC_STA,SXJ_KGDL_XWT_FDC_STA,SXJ_KGDL_PTZ_FDC_STA,SXJ_KGDL_GJY_FDC_STA,SXJ_KGDL_BHB_FDC_STA,SXJ_KGDL_HSM_FDC_STA,SXJ_KGDL_YTY_FDC_STA,SXJ_KGDL_BHB3_FDC_STA,SXJ_KGDL_SY_GDC_STA,SXJ_KGDL_PDL_FDC_STA,SXJ_KGDL_ZK_FDC_STA,SXJ_KGDL_JR_GDC_STA,SXJ_KGDL_FS_GDC_STA,SXJ_KGDL_HR_GDC_STA,SXJ_KGDL_YY_GDC_STA,SXJ_KGDL_PL_GDC_STA,SXJ_KGDL_YG_GDC_STA,SXJ_KGDL_YX_GDC_STA,SXJ_KGDL_TZ_GDC_STA,SXJ_KGDL_TL_GDC_STA
 #runWindpowerstation: SXJ_KGDL_DJY_FDC_STA,SXJ_KGDL_NJL_FDC_STA,SXJ_KGDL_YF_FDC_STA,SXJ_KGDL_YLZ_FDC_STA,SXJ_KGDL_XWT_FDC_STA,SXJ_KGDL_PTZ_FDC_STA,SXJ_KGDL_GJY_FDC_STA,SXJ_KGDL_BHB_FDC_STA,SXJ_KGDL_HSM_FDC_STA,SXJ_KGDL_YTY_FDC_STA,SXJ_KGDL_BHB3_FDC_STA,SXJ_KGDL_SY_GDC_STA,SXJ_KGDL_PDL_FDC_STA,SXJ_KGDL_ZK_FDC_STA,SXJ_KGDL_JR_GDC_STA,SXJ_KGDL_FS_GDC_STA,SXJ_KGDL_HR_GDC_STA,SXJ_KGDL_YY_GDC_STA,SXJ_KGDL_PL_GDC_STA,SXJ_KGDL_YG_GDC_STA,SXJ_KGDL_YX_GDC_STA,SXJ_KGDL_TZ_GDC_STA,SXJ_KGDL_TL_GDC_STA
 #runWindpowerstation: SXJ_KGDL_DJY_FDC_STA,SXJ_KGDL_NJL_FDC_STA,SXJ_KGDL_YF_FDC_STA,SXJ_KGDL_YLZ_FDC_STA,SXJ_KGDL_XWT_FDC_STA,SXJ_KGDL_PTZ_FDC_STA,SXJ_KGDL_GJY_FDC_STA,SXJ_KGDL_BHB_FDC_STA,SXJ_KGDL_HSM_FDC_STA,SXJ_KGDL_YTY_FDC_STA,SXJ_KGDL_BHB3_FDC_STA,SXJ_KGDL_PDL_FDC_STA,SXJ_KGDL_ZK_FDC_STA
 #runWindpowerstation: SXJ_KGDL_SY_GDC_STA,SXJ_KGDL_JR_GDC_STA,SXJ_KGDL_FS_GDC_STA,SXJ_KGDL_HR_GDC_STA,SXJ_KGDL_YY_GDC_STA,SXJ_KGDL_PL_GDC_STA,SXJ_KGDL_YG_GDC_STA,SXJ_KGDL_YX_GDC_STA,SXJ_KGDL_TZ_GDC_STA,SXJ_KGDL_TL_GDC_STA,SXJ_KGDL_SY_GDC_STA

+ 18 - 1
realtime/generationXK-service/src/test/java/com/gyee/generation/HealthTest.java

@@ -2,9 +2,12 @@ package com.gyee.generation;
 
 import com.gyee.generation.service.InitialRedisService;
 import com.gyee.generation.service.InputOrOutPutService;
+import com.gyee.generation.service.WindPowerInfo5UpdateService;
 import com.gyee.generation.util.SpringUtils;
 import org.springframework.boot.SpringApplication;
 
+import java.util.Calendar;
+
 public class HealthTest {
 
 
@@ -13,6 +16,20 @@ public class HealthTest {
         InputOrOutPutService inputOrOutPutService= SpringUtils.getBean("inputOrOutPutService");
         InitialRedisService initialRedisService= SpringUtils.getBean("initialRedisService");
 
+        WindPowerInfo5UpdateService windPowerInfo5UpdateService= SpringUtils.getBean("windPowerInfo5UpdateService");
+
+
+
+        Calendar c = Calendar.getInstance();
+        c.set(Calendar.DAY_OF_MONTH,24);
+        c.set(Calendar.MONTH,0);
+
+////        windPowerInfo5UpdateService.calLineInfoDay(c.getTime());
+//        windPowerInfo5UpdateService.calProjectInfoDay(c.getTime());
+//        windPowerInfo5UpdateService.calWindpowerInfoDay(c.getTime());
+
+        windPowerInfo5UpdateService.calWindpowerInfoDayCurry();
+        windPowerInfo5UpdateService.calProjectInfoDayCurry();
 //        inputOrOutPutService.initialInputOrOutputSpeed();
 //        Calendar c = Calendar.getInstance();
 //        Date begin=null;
@@ -20,7 +37,7 @@ public class HealthTest {
 //        CacheService cacheService= SpringUtils.getBean("cacheService");
 //        cacheService.initRedisCache();
 //
-//        System.out.println("完成!。。。。。。");
+        System.out.println("完成!。。。。。。");
 //
 //
 //