Prechádzať zdrojové kódy

修改配置信息和多适配器切换

shilin 2 rokov pred
rodič
commit
2f85e644e0

+ 67 - 67
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/config/XxlJobConfig.java

@@ -1,67 +1,67 @@
-//package com.gyee.healthmodel.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")
-//    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();
-//     */
-//
-//
-//}
+package com.gyee.healthmodel.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")
+    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();
+     */
+
+
+}

+ 2 - 5
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/init/CacheContext.java

@@ -2,7 +2,6 @@ package com.gyee.healthmodel.init;
 
 
 import com.gyee.healthmodel.model.auto.*;
-import com.gyee.healthmodel.service.HealthpointsService;
 import com.gyee.healthmodel.service.auto.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -48,10 +47,8 @@ public class CacheContext implements CommandLineRunner {
     private IAlertrule2Service alertrule2Service;
     @Resource
     private IMismapService mismapService;
-    @Resource
-    private HealthpointsService healthpointsService;
     public static Map<String, Windturbine> wtmap = new HashMap<String, Windturbine>(); // 风电机MAP
-    public static Map<String, Healthpoint> hpmap = new HashMap<>();
+
 
     public static Map<String, Windpowerstation> wpmap = new HashMap<>();
 
@@ -82,7 +79,7 @@ public class CacheContext implements CommandLineRunner {
 
         log.info("-------------------------------缓存开始--------------------------------------");
 
-        hpmap=healthpointsService.findAllMap();
+
         alarmrulels=alertrule2Service.list();
         List<Mismap> misls=mismapService.list();
 

+ 4 - 3
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/HealthInitialService.java

@@ -7,6 +7,7 @@ import com.gyee.healthmodel.model.auto.Windturbineinfoday3;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.util.Calendar;
 import java.util.List;
 import java.util.Map;
@@ -32,8 +33,8 @@ public class HealthInitialService {
     private CurvefittingsubsService curvefittingsubsService;
 
 
-    @Autowired
-    private WindturbinewindyawService windturbinewindyawService;
+    @Resource
+    private WindturbinewindyawsService windturbinewindyawsService;
 
     public static Map<String, Losspowerrate> lwmap;
     public static Map<String, List<Windturbineinfoday3>> wimap;
@@ -74,7 +75,7 @@ public class HealthInitialService {
         //曲线偏差基准值
         cfsbase = curvefittingsubsService.findCurvefittingBaseVallue(c.getTime());
 
-        phdfpcmap=windturbinewindyawService.findWindturbinewindyaw(c.getTime());//偏航对风偏差分析
+        phdfpcmap=windturbinewindyawsService.findWindturbinewindyaw(c.getTime());//偏航对风偏差分析
 
 //		xnmap = masterDataService.findDjpg();
         djpgmap = xnmap;

+ 0 - 64
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/WindturbinewindyawService.java

@@ -1,64 +0,0 @@
-package com.gyee.healthmodel.service;
-
-import com.gyee.healthmodel.model.auto.Windturbinewindyaw;
-import com.gyee.healthmodel.service.auto.IWindturbinewindyawService;
-import com.gyee.healthmodel.util.DateUtils;
-import com.gyee.healthmodel.util.StringUtils;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.Resource;
-import java.util.*;
-
-/**
- * @ClassName : WindturbinewindyawService
- * @Description : 偏航对风统计service
- */
-@Service
-public class WindturbinewindyawService {
-
-    private final int DIGIT=2;
-    @Resource
-    private IWindturbinewindyawService windturbinewindyawService;
-
-
-    public Map<String,Integer> findWindturbinewindyaw(Date recodeDate)  {
-
-
-        Calendar c=Calendar.getInstance();
-        c.setTime(recodeDate);
-        c.add(Calendar.DAY_OF_MONTH, -1);
-        Date endDate = c.getTime();
-        c.add(Calendar.DAY_OF_MONTH, -7);
-        Date beginDate = c.getTime();
-
-        Map<String,Integer> map=new HashMap<>();
-        List<Windturbinewindyaw> windturbinewindyawlist = windturbinewindyawService.findWindturbinewindyaw(DateUtils.truncate(beginDate),DateUtils.truncate(endDate));
-        if (!windturbinewindyawlist.isEmpty()) {
-            for (Windturbinewindyaw yaw : windturbinewindyawlist)
-            {
-                if(StringUtils.notEmp(yaw.getWindturbineid()) && StringUtils.notEmp(yaw.getQualified()) && StringUtils.notEmp(yaw.getUnqualified())) {
-
-                    if (map.containsKey(yaw.getWindturbineid())) {
-
-                        if (yaw.getUnqualified() > yaw.getQualified()) {
-                            int time = map.get(yaw.getWindturbineid());
-                            map.put(yaw.getWindturbineid(), time + 1);
-                        }
-
-                    } else {
-
-                        if (yaw.getUnqualified() > yaw.getQualified()) {
-                            map.put(yaw.getWindturbineid(), 1);
-                        }
-
-                    }
-                }
-            }
-        }
-        return map;
-    }
-
-
-
-
-}

+ 161 - 134
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/util/realtimesource/EdosUtil.java

@@ -116,6 +116,7 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
             Optional<String> uniformCode = Optional.ofNullable(point.getUniformcode());
             Optional<Long> startTs = Optional.ofNullable(beginDate * 1000);
             Optional<Long> endTs = Optional.ofNullable(endDate * 1000);
+            String pointid =tagName.get();
             //通过时间区间和时间间隔获取点数
             Long finalInterval;
             if (pried != null)
@@ -158,52 +159,58 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
                         getHistsnapSameTiem(point.getCode(), beginDate, pried, resultList);
                     }else
                     {
-                        resultList=snapList;
-//                        resultList=snapList;
-//                        for (PointData snapItem : snapList) {
-//
-//                            long subTime = snapItem.getPointTime() - pried;
-//                            //查询时间区间的截面值(截面值为传入时间节点的上一个最近值,返回时间为值的真实时间),
-//                            // 再进行比较,若截面值的时间戳在以快照时间节点前推一个单位的时间区间中,
-//                            // 则代表该时间节点快照有效,否则为0
-//                            String rawUrl = baseURL + "/history/section?null=0&tagNames=" + point.getCode() + "&ts=" + snapItem.getPointTime() + "000";
-//                            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()>=subTime&&sectionlist.get(0).getPointTime()<=snapItem.getPointTime()){
-//                                        resultList.add(snapItem);
-//                                    }
-//                                    else{
-//                                        PointData data = new PointData();
-//                                        data.setEdnaId(point.getCode());
-//                                        data.setPointTime(0L);
-//                                        data.setPointValue("0");
-//                                        data.setPointName("1");
-//                                        data.setPointValueInDouble(0.0);
-//                                        resultList.add(data);
-//                                    }
-//                                } else {
-//                                    PointData data = new PointData();
-//                                    data.setEdnaId(point.getCode());
-//                                    data.setPointTime(0l);
-//                                    data.setPointValue("0");
-//                                    data.setPointName("1");
-//                                    data.setPointValueInDouble(0.0);
-//                                    resultList.add(data);
-//                                }
-//                            } else {
-//                                PointData data = new PointData();
-//                                data.setEdnaId(point.getCode());
-//                                data.setPointTime(0l);
-//                                data.setPointValue("0");
-//                                data.setPointName("1");
-//                                data.setPointValueInDouble(0.0);
-//                                resultList.add(data);
-//                            }
-//                        }
+                        if(StringUtils.notEmp(pointid) && !pointid.startsWith(JKFC) && !pointid.startsWith(JKFJ))
+                        {
+                            resultList=snapList;
+                        }else
+                        {
+
+                            for (PointData snapItem : snapList) {
+
+                                long subTime = snapItem.getPointTime() - pried;
+                                //查询时间区间的截面值(截面值为传入时间节点的上一个最近值,返回时间为值的真实时间),
+                                // 再进行比较,若截面值的时间戳在以快照时间节点前推一个单位的时间区间中,
+                                // 则代表该时间节点快照有效,否则为0
+                                String rawUrl = baseURL + "/history/section?null=0&tagNames=" + pointid + "&ts=" + snapItem.getPointTime() + "000";
+                                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()>=subTime&&sectionlist.get(0).getPointTime()<=snapItem.getPointTime()){
+                                            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(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(snapItem.getPointTime());
+                                    data.setPointValue("0");
+                                    data.setPointName("1");
+                                    data.setPointValueInDouble(0.0);
+                                    resultList.add(data);
+                                }
+                            }
+
+                        }
                     }
 
 
@@ -430,6 +437,8 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
             Optional<String> uniformCode = Optional.ofNullable(point.getUniformcode());
             Optional<Long> startTs = Optional.ofNullable(beginDate * 1000);
             Optional<Long> endTs = Optional.ofNullable(endDate * 1000);
+
+            String pointid =tagName.get();
             //通过时间区间和时间间隔获取点数
             Long finalInterval;
             if (pried != null)
@@ -473,50 +482,58 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
                     }else
                     {
 
-                        resultList=snapList;
-//                        for (PointData snapItem : snapList) {
-//                            long subTime = snapItem.getPointTime() - pried;
-//                            //查询时间区间的截面值(截面值为传入时间节点的上一个最近值,返回时间为值的真实时间),
-//                            // 再进行比较,若截面值的时间戳在以快照时间节点前推一个单位的时间区间中,
-//                            // 则代表该时间节点快照有效,否则为0
-//                            String rawUrl = baseURL + "/history/section?null=0&tagNames=" + point.getCode() + "&ts=" + snapItem.getPointTime() + "000";
-//                            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()>=subTime&&sectionlist.get(0).getPointTime()<=snapItem.getPointTime()){
-//                                        resultList.add(snapItem);
-//                                    }
-//                                    else{
-//                                        PointData data = new PointData();
-//                                        data.setEdnaId(point.getCode());
-//                                        data.setPointTime(0L);
-//                                        data.setPointValue("0");
-//                                        data.setPointName("1");
-//                                        data.setPointValueInDouble(0.0);
-//                                        resultList.add(data);
-//                                    }
-//                                } else {
-//                                    PointData data = new PointData();
-//                                    data.setEdnaId(point.getCode());
-//                                    data.setPointTime(0l);
-//                                    data.setPointValue("0");
-//                                    data.setPointName("1");
-//                                    data.setPointValueInDouble(0.0);
-//                                    resultList.add(data);
-//                                }
-//                            } else {
-//                                PointData data = new PointData();
-//                                data.setEdnaId(point.getCode());
-//                                data.setPointTime(0l);
-//                                data.setPointValue("0");
-//                                data.setPointName("1");
-//                                data.setPointValueInDouble(0.0);
-//                                resultList.add(data);
-//                            }
-//                        }
+                        if(StringUtils.notEmp(pointid) && !pointid.startsWith(JKFC) && !pointid.startsWith(JKFJ))
+                        {
+                            resultList=snapList;
+                        }else
+                        {
+
+                            for (PointData snapItem : snapList) {
+
+                                long subTime = snapItem.getPointTime() - pried;
+                                //查询时间区间的截面值(截面值为传入时间节点的上一个最近值,返回时间为值的真实时间),
+                                // 再进行比较,若截面值的时间戳在以快照时间节点前推一个单位的时间区间中,
+                                // 则代表该时间节点快照有效,否则为0
+                                String rawUrl = baseURL + "/history/section?null=0&tagNames=" + point.getCode() + "&ts=" + snapItem.getPointTime() + "000";
+                                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()>=subTime&&sectionlist.get(0).getPointTime()<=snapItem.getPointTime()){
+                                            resultList.add(snapItem);
+                                        }
+                                        else{
+                                            PointData data = new PointData();
+                                            data.setEdnaId(point.getCode());
+                                            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.getCode());
+                                        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.getCode());
+                                    data.setPointTime(snapItem.getPointTime());
+                                    data.setPointValue("0");
+                                    data.setPointName("1");
+                                    data.setPointValueInDouble(0.0);
+                                    resultList.add(data);
+                                }
+                            }
+
+                        }
                     }
 
 
@@ -846,6 +863,8 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
                     }
 
                     ResponseEntity<JSONObject> resp = restTemplate.getForEntity(url, JSONObject.class);
+
+                    //  System.out.println("数据适配器"+url);
                     JSONObject jsonObject = resp.getBody();
                     if (jsonObject != null) {
 
@@ -1104,50 +1123,58 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
                     }else
                     {
 
-                        resultList=list;
-//                        for (PointData snapItem : list) {
-//                            long subTime = snapItem.getPointTime() - pried;
-//                            //查询时间区间的截面值(截面值为传入时间节点的上一个最近值,返回时间为值的真实时间),
-//                            // 再进行比较,若截面值的时间戳在以快照时间节点前推一个单位的时间区间中,
-//                            // 则代表该时间节点快照有效,否则为0
-//                            String rawUrl = baseURL + "/history/section?null=0&tagNames=" +pointid+ "&ts=" + snapItem.getPointTime() + "000";
-//                            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()>=subTime&&sectionlist.get(0).getPointTime()<=snapItem.getPointTime()){
-//                                        resultList.add(snapItem);
-//                                    }
-//                                    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);
-//                                }
-//                            } else {
-//                                PointData data = new PointData();
-//                                data.setEdnaId(pointid);
-//                                data.setPointTime(0l);
-//                                data.setPointValue("0");
-//                                data.setPointName("1");
-//                                data.setPointValueInDouble(0.0);
-//                                resultList.add(data);
-//                            }
-//                        }
+                        if(StringUtils.notEmp(pointid) && !pointid.startsWith(JKFC) && !pointid.startsWith(JKFJ))
+                        {
+                            resultList=list;
+                        }else
+                        {
+
+                            for (PointData snapItem : list) {
+
+                                long subTime = snapItem.getPointTime() - pried;
+                                //查询时间区间的截面值(截面值为传入时间节点的上一个最近值,返回时间为值的真实时间),
+                                // 再进行比较,若截面值的时间戳在以快照时间节点前推一个单位的时间区间中,
+                                // 则代表该时间节点快照有效,否则为0
+                                String rawUrl = baseURL + "/history/section?null=0&tagNames=" + pointid + "&ts=" + snapItem.getPointTime() + "000";
+                                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()>=subTime&&sectionlist.get(0).getPointTime()<=snapItem.getPointTime()){
+                                            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(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(snapItem.getPointTime());
+                                    data.setPointValue("0");
+                                    data.setPointName("1");
+                                    data.setPointValueInDouble(0.0);
+                                    resultList.add(data);
+                                }
+                            }
+
+                        }
                     }
 
                     return resultList;