Browse Source

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

shilin 2 years ago
parent
commit
ab79e50d16

+ 9 - 0
realtime/failurestatistics-server-cph/src/main/java/com/gyee/failurestatistics/config/V2Config.java

@@ -19,7 +19,16 @@ public class V2Config
     private static String baseurl;
     /**测点初始码**/
     private  static  String initialcode;
+    /**健康管理数据适配器网址 **/
+    private static String healthurl;
 
+    public static String getHealthurl() {
+        return healthurl;
+    }
+
+    public  void setHealthurl(String healthurl) {
+        V2Config.healthurl = healthurl;
+    }
     public static String getInitialcode() {
         return initialcode;
     }

+ 6 - 3
realtime/failurestatistics-server-cph/src/main/java/com/gyee/failurestatistics/init/CacheContext.java

@@ -2,6 +2,7 @@ package com.gyee.failurestatistics.init;
 
 
 import com.gyee.failurestatistics.model.auto.*;
+import com.gyee.failurestatistics.service.HealthpointsService;
 import com.gyee.failurestatistics.service.auto.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -9,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.CommandLineRunner;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -40,10 +42,11 @@ public class CacheContext implements CommandLineRunner {
     private IWindturbinetestingpointnewService windturbinetestingpointnewService;
     @Autowired
     private IWindpowerstationpointnewService windpowerstationpointnewService;
-
+    @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<>();
 
     public static List<Windpowerstation> wpls = new ArrayList<Windpowerstation>(); // 风电场LIST集合
@@ -66,7 +69,7 @@ public class CacheContext implements CommandLineRunner {
     public void run(String... args) throws Exception {
 
         log.info("-------------------------------缓存开始--------------------------------------");
-
+        hpmap=healthpointsService.findAllMap();
         wpls = windpowerstationService.list();
         wpls.stream().filter(i->i.getId().endsWith("FDC")).forEach(i->{
             wpmap.put(i.getId(),i);

+ 17 - 0
realtime/failurestatistics-server-cph/src/main/java/com/gyee/failurestatistics/mapper/auto/HealthpointMapper.java

@@ -0,0 +1,17 @@
+package com.gyee.failurestatistics.mapper.auto;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.failurestatistics.model.auto.Healthpoint;
+
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-05-11
+ */
+public interface HealthpointMapper extends BaseMapper<Healthpoint> {
+
+}

+ 78 - 0
realtime/failurestatistics-server-cph/src/main/java/com/gyee/failurestatistics/model/auto/Healthpoint.java

@@ -0,0 +1,78 @@
+package com.gyee.failurestatistics.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-05-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("HEALTHPOINT")
+public class Healthpoint extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("VALUEUNIT")
+    private String valueunit;
+
+    @TableField("ENGLISHNAME")
+    private String englishname;
+
+    @TableField("TYPEID")
+    private String typeid;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("MAXVAL")
+    private BigDecimal maxval;
+
+    @TableField("MINVAL")
+    private BigDecimal minval;
+
+    @TableField("REASONABLEMAXVAL")
+    private BigDecimal reasonablemaxval;
+
+    @TableField("REASONABLEMINVAL")
+    private BigDecimal reasonableminval;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("SHORTID")
+    private String shortid;
+
+    @TableField("LONGID")
+    private String longid;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("REALTIMEID")
+    private String realtimeid;
+
+
+}

+ 38 - 0
realtime/failurestatistics-server-cph/src/main/java/com/gyee/failurestatistics/service/HealthpointsService.java

@@ -0,0 +1,38 @@
+package com.gyee.failurestatistics.service;
+
+
+import com.gyee.failurestatistics.model.auto.Healthpoint;
+import com.gyee.failurestatistics.service.auto.IHealthpointService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@Service
+public class HealthpointsService {
+
+    private final int DIGIT=2;
+    @Resource
+    private IHealthpointService healthpointService;
+
+
+    public Map<String, Healthpoint> findAllMap()  {
+
+        Map<String,Healthpoint> map=new HashMap<>();
+        List<Healthpoint> list = healthpointService.list();
+        if (!list.isEmpty()) {
+          for(Healthpoint vo:list)
+          {
+              map.put(vo.getCode(),vo);
+          }
+        }
+        return map;
+    }
+
+
+
+
+}

+ 17 - 0
realtime/failurestatistics-server-cph/src/main/java/com/gyee/failurestatistics/service/auto/IHealthpointService.java

@@ -0,0 +1,17 @@
+package com.gyee.failurestatistics.service.auto;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.failurestatistics.model.auto.Healthpoint;
+
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-05-11
+ */
+public interface IHealthpointService extends IService<Healthpoint> {
+
+}

+ 20 - 0
realtime/failurestatistics-server-cph/src/main/java/com/gyee/failurestatistics/service/auto/impl/HealthpointServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.failurestatistics.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.failurestatistics.mapper.auto.HealthpointMapper;
+import com.gyee.failurestatistics.model.auto.Healthpoint;
+import com.gyee.failurestatistics.service.auto.IHealthpointService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-05-11
+ */
+@Service
+public class HealthpointServiceImpl extends ServiceImpl<HealthpointMapper, Healthpoint> implements IHealthpointService {
+
+}

+ 362 - 231
realtime/failurestatistics-server-cph/src/main/java/com/gyee/failurestatistics/util/realtimesource/EdosUtil.java

@@ -20,20 +20,28 @@ import org.springframework.web.client.RestTemplate;
 
 import java.util.*;
 
-/**
- */
-public class EdosUtil implements IRealTimeDataBaseUtil {
 
+public class EdosUtil implements IRealTimeDataBaseUtil {
 
 
 
+    private final String JKFC="JKFC.";
+    private final String JKFJ="JKFJ.";
     private RestTemplate restTemplate =new RestTemplate();
 
-    static String baseURL = V2Config.getBaseurl();
+    private String baseURL = V2Config.getBaseurl();
 
     @Override
     public PointData getRealData(Windpowerstationpointnew point) throws Exception {
 
+        if(StringUtils.notEmp(point) &&  StringUtils.notEmp(point.getCode()) && !point.getCode().startsWith(JKFC) && !point.getCode().startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
+
         if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
         {
             try {
@@ -85,7 +93,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
     @Override
     public List<PointData> getHistoryDatasSnap(Windpowerstationpointnew point, Long beginDate, Long endDate, Long count, Long pried) throws Exception {
-
+        if(StringUtils.notEmp(point) &&  StringUtils.notEmp(point.getCode()) && !point.getCode().startsWith(JKFC) && !point.getCode().startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
         {
             Optional<String> tagName = Optional.ofNullable(point.getCode());
@@ -136,50 +150,52 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
                         getHistsnapSameTiem(point.getCode(), beginDate, pried, resultList);
                     }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(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);
-                            }
-                        }
+                        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);
+//                            }
+//                        }
                     }
 
 
@@ -216,7 +232,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
     private void getHistsnapSameTiem(String pointid, Long beginDate, Long pried,
                                      List<PointData> resultList) {
 
-
+        if(!pointid.startsWith(JKFC) && !pointid.startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         long subTime =beginDate - pried;
         String rawUrl = baseURL + "/history/section?null=0&tagNames=" + pointid + "&ts=" + beginDate + "000";
         ResponseEntity<JSONObject> sectionResp = restTemplate.getForEntity(rawUrl, JSONObject.class);
@@ -259,7 +281,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
     @Override
     public List<PointData> getHistoryDatasRaw(Windpowerstationpointnew point, Long beginDate, Long endDate) throws Exception {
-
+        if(StringUtils.notEmp(point) &&  StringUtils.notEmp(point.getCode()) && !point.getCode().startsWith(JKFC) && !point.getCode().startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
         {
             Optional<String> tagName = Optional.ofNullable(point.getCode());
@@ -319,7 +347,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
     @Override
     public PointData getRealData(Windturbinetestingpointnew point) throws Exception {
-
+        if(StringUtils.notEmp(point) &&  StringUtils.notEmp(point.getCode()) && !point.getCode().startsWith(JKFC) && !point.getCode().startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
         {
             Optional<String> keys = Optional.ofNullable(point.getCode());
@@ -373,7 +407,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
     @Override
     public List<PointData> getHistoryDatasSnap(Windturbinetestingpointnew point, Long beginDate, Long endDate, Long count, Long pried) throws Exception {
-
+        if(StringUtils.notEmp(point) &&  StringUtils.notEmp(point.getCode()) && !point.getCode().startsWith(JKFC) && !point.getCode().startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
         {
             Optional<String> tagName = Optional.ofNullable(point.getCode());
@@ -424,49 +464,51 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
                         getHistsnapSameTiem(point.getCode(), beginDate, pried, resultList);
                     }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(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);
-                            }
-                        }
+
+                        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);
+//                            }
+//                        }
                     }
 
 
@@ -498,6 +540,15 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
     @Override
     public List<PointData> getHistoryDatasRaw(Windturbinetestingpointnew point, Long beginDate, Long endDate) throws Exception {
+
+        if(StringUtils.notEmp(point) &&  StringUtils.notEmp(point.getCode()) && !point.getCode().startsWith(JKFC) && !point.getCode().startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
+
         if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
         {
             Optional<String> tagName = Optional.ofNullable(point.getCode());
@@ -556,6 +607,14 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
     @Override
     public PointData getRealData(String pointid) throws Exception {
 
+
+        if(StringUtils.notEmp(pointid) &&  !pointid.startsWith(JKFC) && !pointid.startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         if(StringUtils.notEmp(pointid) &&  !V2Config.getInitialcode().equals(pointid))
         {
             Optional<String> keys = Optional.ofNullable(pointid);
@@ -603,6 +662,14 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
         if(StringUtils.notEmp(pointids) )
         {
+            if(!pointids[0].startsWith(JKFC) && !pointids[0].startsWith(JKFJ))
+            {
+                baseURL = V2Config.getBaseurl();
+            }else
+            {
+                baseURL = V2Config.getHealthurl();
+            }
+
             List<String> idls=new ArrayList<>();
             for(String str:pointids)
             {
@@ -634,8 +701,8 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
                             if (pointDataHashMap.containsKey(pointids[i]) == false){
                                 PointData pd = new PointData();
-                                pd.setPointName(idls.get(i));
-                                pd.setEdnaId(idls.get(i));
+                                pd.setPointName(pointids[i]);
+                                pd.setEdnaId(pointids[i]);
                                 pd.setPointValueInDouble(0.0);
                                 pd.setPointTime(0l);
                                 result.add(pd);
@@ -643,7 +710,7 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
                                 pointDataHashMap.put(pd.getPointName(), pd);
                             }
                             else{
-                                result.add(pointDataHashMap.get(idls.get(i)));
+                                result.add(pointDataHashMap.get(pointids[i]));
                             }
 
                         }
@@ -741,6 +808,14 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
         if(StringUtils.notEmp(pointids) )
         {
+
+            if(!pointids.get(0).startsWith(JKFC) && !pointids.get(0).startsWith(JKFJ))
+            {
+                baseURL = V2Config.getBaseurl();
+            }else
+            {
+                baseURL = V2Config.getHealthurl();
+            }
             List<String> idls=new ArrayList<>();
             for(String str:pointids)
             {
@@ -775,8 +850,8 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
                             if (pointDataHashMap.containsKey(pointids.get(i)) == false){
                                 PointData pd = new PointData();
-                                pd.setPointName(idls.get(i));
-                                pd.setEdnaId(idls.get(i));
+                                pd.setPointName(pointids.get(i));
+                                pd.setEdnaId(pointids.get(i));
                                 pd.setPointValueInDouble(0.0);
                                 pd.setPointTime(0l);
                                 result.add(pd);
@@ -784,7 +859,7 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
                                 pointDataHashMap.put(pd.getPointName(), pd);
                             }
                             else{
-                                result.add(pointDataHashMap.get(idls.get(i)));
+                                result.add(pointDataHashMap.get(pointids.get(i)));
                             }
                         }
                         Iterator<String> sIterator = jsonObject.keySet().iterator();
@@ -878,6 +953,15 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
         if(StringUtils.notEmp(pointids) )
         {
+
+            if(!pointids[0].startsWith(JKFC) && !pointids[0].startsWith(JKFJ))
+            {
+                baseURL = V2Config.getBaseurl();
+            }else
+            {
+                baseURL = V2Config.getHealthurl();
+            }
+
             List<String> idls=new ArrayList<>();
             for(String str:pointids)
             {
@@ -962,6 +1046,14 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
     @Override
     public List<PointData> getHistoryDatasSnap(String pointid, Long beginDate, Long endDate, Long count, Long pried) throws Exception {
 
+
+        if(StringUtils.notEmp(pointid) && !pointid.startsWith(JKFC) && !pointid.startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         if(StringUtils.notEmp(pointid) &&  !V2Config.getInitialcode().equals(pointid))
         {
             Optional<String> tagName = Optional.ofNullable(pointid);
@@ -1003,49 +1095,51 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
                         getHistsnapSameTiem(pointid, beginDate, pried, resultList);
                     }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(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);
-                            }
-                        }
+
+                        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);
+//                            }
+//                        }
                     }
 
                     return resultList;
@@ -1079,7 +1173,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
     @Override
     public List<PointData> getHistoryDatasRaw(String pointid, Long beginDate, Long endDate) throws Exception {
 
-
+        if(StringUtils.notEmp(pointid) && StringUtils.notEmp(pointid) && !pointid.startsWith(JKFC) && !pointid.startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         if(StringUtils.notEmp(pointid) &&  !V2Config.getInitialcode().equals(pointid))
         {
             Optional<String> tagName = Optional.ofNullable(pointid);
@@ -1128,6 +1228,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
     @Override
     public List<PointData> getHistStat(Windturbinetestingpointnew point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception {
 
+        if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) &&   !point.getCode().startsWith(JKFC) && !point.getCode().startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
         {
             Optional<String> tagName = Optional.ofNullable(point.getCode());
@@ -1203,7 +1310,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
     @Override
     public List<PointData> getHistStat(Windpowerstationpointnew point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception {
-
+        if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !point.getCode().startsWith(JKFC) && !point.getCode().startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
         {
             Optional<String> tagName = Optional.ofNullable(point.getCode());
@@ -1273,7 +1386,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
     @Override
     public List<PointData> getHistStat(String pointid, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception {
 
-
+        if(StringUtils.notEmp(pointid) && !pointid.startsWith(JKFC) && !pointid.startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         if(StringUtils.notEmp(pointid) &&  !V2Config.getInitialcode().equals(pointid))
         {
             Optional<String> tagName = Optional.ofNullable(pointid);
@@ -1332,7 +1451,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
     @Override
     public DNAStatVal[] getHistStat(String point, Long beginDate, Long endDate, Integer pried) throws Exception {
 
-
+        if(StringUtils.notEmp(point) && !point.startsWith(JKFC) && !point.startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
         if(StringUtils.notEmp(point) &&  !V2Config.getInitialcode().equals(point))
         {
             Optional<String> tagName = Optional.ofNullable(point);
@@ -1429,16 +1554,28 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
     @Override
     public void updatePoint(PointData point) throws Exception {
-        String url = baseURL + "/history";
-        try {
-            String result = restTemplate.postForObject(url, convertPointData(point), String.class);
-        } catch (HttpClientErrorException exception) {
-            if (exception.getStatusCode() == HttpStatus.NOT_FOUND) {
-                return;
-            } else {
-                throw exception;
+
+        if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getEdnaId()) &&!point.getEdnaId().startsWith(JKFC) && !point.getEdnaId().startsWith(JKFJ))
+        {
+            baseURL = V2Config.getBaseurl();
+        }else
+        {
+            baseURL = V2Config.getHealthurl();
+        }
+        if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getEdnaId()))
+        {
+            String url = baseURL + "/history";
+            try {
+                String result = restTemplate.postForObject(url, convertPointData(point), String.class);
+            } catch (HttpClientErrorException exception) {
+                if (exception.getStatusCode() == HttpStatus.NOT_FOUND) {
+                    return;
+                } else {
+                    throw exception;
+                }
             }
         }
+
     }
 
     @Override
@@ -1448,6 +1585,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
         if (StringUtils.notEmp(tagNames) && tagNames.length > 0) {
 
 
+            if(!tagNames[0].startsWith(JKFC) && !tagNames[0].startsWith(JKFJ))
+            {
+                baseURL = V2Config.getBaseurl();
+            }else
+            {
+                baseURL = V2Config.getHealthurl();
+            }
             DNAVal[] result = new DNAVal[tagNames.length];
             for (int i = 0; i < tagNames.length; i++) {
                 if (StringUtils.notEmp(tagNames[i]) && !V2Config.getInitialcode().equals(tagNames[i])) {
@@ -1487,31 +1631,31 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
     @Override
     public void updatePoint(List<PointData> pointls) throws Exception {
-        String url = baseURL + "/history/batch";
 
-        List<JSONObject> writeList = new ArrayList<>();
-
-        if(StringUtils.notEmp(pointls) )
+        if(null!=pointls && !pointls.isEmpty())
         {
-            for(PointData entity:pointls)
+            if(!pointls.get(0).getEdnaId().startsWith(JKFC) && !pointls.get(0).getEdnaId().startsWith(JKFJ))
             {
-                if(StringUtils.notEmp(entity) && !V2Config.getInitialcode().equals(entity.getEdnaId()))
-                {
-                    writeList.add(convertPointData(entity));
-                }
-            }
-            if(!writeList.isEmpty())
+                baseURL = V2Config.getBaseurl();
+            }else
             {
-                try {
-                    String result = restTemplate.postForObject(url, writeList, String.class);
-                } catch (HttpClientErrorException exception) {
-                    if (exception.getStatusCode() == HttpStatus.NOT_FOUND) {
-                        //System.out.println("404请求错误");
-                    } else {
-                        throw exception;
-                    }
-                }
+                baseURL = V2Config.getHealthurl();
+            }
+
+            String url = baseURL + "/history/batch";
+            List<JSONObject> writeList = new ArrayList<>();
 
+            for (PointData entity : pointls) {
+                writeList.add(convertPointData(entity));
+            }
+            try {
+                String result = restTemplate.postForObject(url, writeList, String.class);
+            } catch (HttpClientErrorException exception) {
+                if (exception.getStatusCode() == HttpStatus.NOT_FOUND) {
+                    return;
+                } else {
+                    throw exception;
+                }
             }
         }
 
@@ -1519,10 +1663,19 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
     @Override
     public void sendSinglePoint(PointData point) throws Exception {
-        String url = baseURL + "/latest";
 
-        if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getEdnaId()) && !V2Config.getInitialcode().equals(point.getEdnaId()))
+        if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getEdnaId()))
         {
+            if(!point.getEdnaId().startsWith(JKFC) && !point.getEdnaId().startsWith(JKFJ))
+            {
+                baseURL = V2Config.getBaseurl();
+            }else
+            {
+                baseURL = V2Config.getHealthurl();
+            }
+            String url = baseURL + "/latest";
+
+
             try {
                 String result = restTemplate.postForObject(url, convertPointData(point), String.class);
             } catch (HttpClientErrorException exception) {
@@ -1539,72 +1692,50 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
     @Override
     public void sendMultiPoint(List<PointData> pointls) throws Exception {
 
-        String url = baseURL + "/latest/batch";
-
-        List<JSONObject> writeList = new ArrayList<>();
-
-        if(StringUtils.notEmp(pointls) )
+        if(null !=pointls && !pointls.isEmpty())
         {
-            for(PointData entity:pointls)
+            if(!pointls.get(0).getEdnaId().startsWith(JKFC) && !pointls.get(0).getEdnaId().startsWith(JKFJ))
             {
-                if(StringUtils.notEmp(entity) && !V2Config.getInitialcode().equals(entity.getEdnaId()))
-                {
-                    writeList.add(convertPointData(entity));
-                }
-            }
-            if(!writeList.isEmpty())
+                baseURL = V2Config.getBaseurl();
+            }else
             {
-                try {
-                    String result = restTemplate.postForObject(url, writeList, String.class);
-                } catch (HttpClientErrorException exception) {
-                    if (exception.getStatusCode() == HttpStatus.NOT_FOUND) {
-                        //System.out.println("404请求错误");
-                    } else {
-                        throw exception;
-                    }
-                }
+                baseURL = V2Config.getHealthurl();
+            }
+            String url = baseURL + "/latest/batch";
+            List<JSONObject> writeList = new ArrayList<>();
 
+            for (PointData entity : pointls) {
+                writeList.add(convertPointData(entity));
+            }
+            try {
+                String result = restTemplate.postForObject(url, writeList, String.class);
+            } catch (HttpClientErrorException exception) {
+                if (exception.getStatusCode() == HttpStatus.NOT_FOUND) {
+                    //System.out.println("404请求错误");
+                } else {
+                    throw exception;
+                }
             }
         }
 
-
     }
-//
-//    @Override
-//    public void sendMultiPoint(String[] realvalue, DNAVal[] pointls) throws Exception {
-//        String url = baseURL + "/latest/batch";
-//
-//        List<JSONObject> writeDataList = new ArrayList<>();
-//        if (realvalue != null && pointls != null & realvalue.length == pointls.length) {
-//            for (int i = 0; i < realvalue.length; i++) {
-//                PointData writeData = new PointData();
-//                writeData.setEdnaId(realvalue[i]);
-//                writeData.setPointValueInDouble(pointls[i].DValue);
-//                writeData.setPointTime((long)pointls[i].Time);
-//                JSONObject jsonObject=convertPointData(writeData);
-//                writeDataList.add(jsonObject);
-//            }
-//
-//            try {
-//                String result = restTemplate.postForObject(url, writeDataList, String.class);
-//            } catch (HttpClientErrorException exception) {
-//                if (exception.getStatusCode() == HttpStatus.NOT_FOUND) {
-//                    //System.out.println("404请求错误");
-//                } else {
-//                    throw exception;
-//                }
-//            }
-//        } else
-//            return;
-//    }
+
+
 
     //多点切面数据
     @Override
     public DNAVal[] getHistMatrix(String[] nameList, long tTime) throws Exception {
 
 
-        if(StringUtils.notEmp(nameList) )
+        if(StringUtils.notEmp(nameList) && nameList.length>0 && StringUtils.notEmp(tTime))
         {
+            if(!nameList[0].startsWith(JKFC) && !nameList[0].startsWith(JKFJ))
+            {
+                baseURL = V2Config.getBaseurl();
+            }else
+            {
+                baseURL = V2Config.getHealthurl();
+            }
             List<String> idls=new ArrayList<>();
             for(String str:nameList)
             {
@@ -1675,4 +1806,4 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
     }
 
 
-}
+}

+ 78 - 0
realtime/failurestatistics-server-cph/src/main/resources/application-hb.yml

@@ -0,0 +1,78 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+  baseurl: http://192.168.2.198:8011/ts
+  healthurl: http://192.168.2.198:8011/ts
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+server:
+  port: 8161
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    #    type: com.alibaba.druid.pool.DruidDataSource
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 79 - 0
realtime/failurestatistics-server-cph/src/main/resources/application-hwy.yml

@@ -0,0 +1,79 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+
+  baseurl: http://123.60.213.70:8011/ts
+
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+server:
+  port: 8161
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd
+    username: nxfdprod
+    password: gdnxfd123
+    oracle-schema=:
+    #    type: com.alibaba.druid.pool.DruidDataSource
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 78 - 0
realtime/failurestatistics-server-cph/src/main/resources/application-jn.yml

@@ -0,0 +1,78 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+  baseurl: http://10.81.3.155:8011/ts
+  healthurl: http://10.81.3.155:8011/ts
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+server:
+  port: 8161
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    #外网
+    driver-class-name: org.postgresql.Driver
+    url: jdbc:postgresql://10.81.3.151:5432/wisdom
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    #    type: com.alibaba.druid.pool.DruidDataSource
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 3 - 82
realtime/failurestatistics-server-cph/src/main/resources/application.yml

@@ -1,83 +1,4 @@
-# 项目相关配置
-gyee:
-  #实时数据库Url
-  #baseurl: http://10.0.118.73:8011/ts
-  baseurl: http://123.60.213.70:8011/ts
-  #实时数据库选择
-  realtimedataBase: mongodb #数据查询模式 golden、hwy
-  initialcode: INITIAL
-server:
-  port: 8161
-  servlet:
-    context-path: /
-
-management:
-  health:
-    redis:
-      enabled: false
-
 spring:
-  main:
-    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
-  autoconfigure:
-    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: oracle.jdbc.OracleDriver
-    #外网
-    #url: jdbc:oracle:thin:@10.0.118.71:1521:gdsj
-    url: jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd
-    #    url: jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd
-    #    url: jdbc:oracle:thin:@172.168.1.14:1521:gdnxfd
-#    username: gdprod
-#    password: gd123
-    username: nxfdprod
-    password: gdnxfd123
-    oracle-schema=:
-    #    type: com.alibaba.druid.pool.DruidDataSource
-    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
-    #    username: root
-    #    password: root
-    #    driver-class-name: com.mysql.jdbc.Driver
-    druid:
-      max-active: 20
-      initial-size: 1
-      min-idle: 3
-      max-wait: 60000
-      time-between-eviction-runs-millis: 60000
-      min-evictable-idle-time-millis: 300000
-      test-while-idle: true
-      test-on-borrow: false
-      test-on-return: false
-  servlet:
-    multipart:
-      # 开启 multipart 上传功能
-      enabled: true
-      # 文件写入磁盘的阈值
-      file-size-threshold: 2KB
-      # 最大文件大小
-      max-file-size: 200MB
-      # 最大请求大小
-      max-request-size: 215MB
-
-mybatis-plus:
-  configuration:
-    map-underscore-to-camel-case: true
-    auto-mapping-behavior: full
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-  mapper-locations: classpath*:mapper/**/*Mapper.xml
-  global-config:
-    # 逻辑删除配置
-    db-config:
-      id-type: auto
-      # 删除前
-      logic-not-delete-value: 1
-      # 删除后
-      logic-delete-value: 0
-logging:
-  level:
-    root: info
-    com.example: debug
-
-edos:
-  baseURL: http://10.0.118.73:8011/ts
+  profiles:
+    active: hb
+#    active: jn

+ 1 - 1
realtime/failurestatistics-server-cph/src/main/resources/xxl-job-executor.properties

@@ -1,5 +1,5 @@
 ### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
-xxl.job.admin.addresses=http://192.168.56.1:8175/xxl-job-admin
+xxl.job.admin.addresses=http://192.168.2.216:8175/xxl-job-admin
 
 ### xxl-job, access token
 xxl.job.accessToken=