Преглед изворни кода

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

shilin пре 3 година
родитељ
комит
6a2b2beaaf
17 измењених фајлова са 1019 додато и 360 уклоњено
  1. 3 3
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/config/GeneratorCodeConfig.java
  2. 10 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/config/V2Config.java
  3. 5 2
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/init/CacheContext.java
  4. 16 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/mapper/auto/HealthpointMapper.java
  5. 2 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/mapper/auto/WindturbinewindyawMapper.java
  6. 78 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/model/auto/Healthpoint.java
  7. 37 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/HealthpointsService.java
  8. 16 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/IHealthpointService.java
  9. 2 1
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/IWindturbinewindyawService.java
  10. 20 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/impl/HealthpointServiceImpl.java
  11. 5 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/impl/WindturbinewindyawServiceImpl.java
  12. 367 229
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/util/realtimesource/EdosUtil.java
  13. 113 0
      realtime/healthmodel-server-cph/src/main/resources/application-hb.yml
  14. 112 0
      realtime/healthmodel-server-cph/src/main/resources/application-hf.yml
  15. 113 0
      realtime/healthmodel-server-cph/src/main/resources/application-hwy.yml
  16. 117 0
      realtime/healthmodel-server-cph/src/main/resources/application-jn.yml
  17. 3 125
      realtime/healthmodel-server-cph/src/main/resources/application.yml

+ 3 - 3
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/config/GeneratorCodeConfig.java

@@ -57,9 +57,9 @@ public class GeneratorCodeConfig {
 //        mpg.setDataSource(dsc);
 
         dsc.setDriverName("oracle.jdbc.driver.OracleDriver");
-        dsc.setUsername("nxfdprod");
-        dsc.setPassword("gdnxfd123");
-        dsc.setUrl("jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd");
+        dsc.setUsername("gdprod");
+        dsc.setPassword("gd123");
+        dsc.setUrl("jdbc:oracle:thin:@10.0.118.71:1521:gdsj");
         mpg.setDataSource(dsc);
 
 //        dsc.setDriverName("com.cloudera.impala.jdbc41.Driver");

+ 10 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/config/V2Config.java

@@ -19,6 +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;

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

@@ -2,6 +2,7 @@ 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;
@@ -47,8 +48,10 @@ 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<>();
 
@@ -79,7 +82,7 @@ public class CacheContext implements CommandLineRunner {
 
         log.info("-------------------------------缓存开始--------------------------------------");
 
-
+        hpmap=healthpointsService.findAllMap();
         alarmrulels=alertrule2Service.list();
         List<Mismap> misls=mismapService.list();
 

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

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

+ 2 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/mapper/auto/WindturbinewindyawMapper.java

@@ -21,4 +21,6 @@ public interface WindturbinewindyawMapper extends BaseMapper<Windturbinewindyaw>
     @Select("select windturbineid,speed,sum(qualified) qualified,sum(unqualified) unqualified from Windturbinewindyaw where recorddate>=#{beginDate} and recorddate<=#{endDate} \n" +
             " group by windturbineid,speed  order by windturbineid,speed ")
     List<Windturbinewindyaw> findWindturbinewindyaw(@Param("beginDate") Date beginDate, @Param("endDate")Date endDate);
+
+    List<Windturbinewindyaw> getdfpclwind(Date monthFirst, Date monthLast);
 }

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

@@ -0,0 +1,78 @@
+package com.gyee.healthmodel.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;
+
+
+}

+ 37 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/HealthpointsService.java

@@ -0,0 +1,37 @@
+package com.gyee.healthmodel.service;
+
+import com.gyee.healthmodel.model.auto.Healthpoint;
+import com.gyee.healthmodel.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;
+    }
+
+
+
+
+}

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

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

+ 2 - 1
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/IWindturbinewindyawService.java

@@ -17,5 +17,6 @@ import java.util.List;
  */
 public interface IWindturbinewindyawService extends IService<Windturbinewindyaw> {
 
-    List<Windturbinewindyaw> findWindturbinewindyaw(Date beginDate, Date endDate);
+    public List<Windturbinewindyaw> getdfpclwind(Date monthFirst, Date monthLast);
+    public List<Windturbinewindyaw> findWindturbinewindyaw(Date beginDate, Date endDate);
 }

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

@@ -0,0 +1,20 @@
+package com.gyee.healthmodel.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.healthmodel.mapper.auto.HealthpointMapper;
+import com.gyee.healthmodel.model.auto.Healthpoint;
+import com.gyee.healthmodel.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 {
+
+}

+ 5 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/impl/WindturbinewindyawServiceImpl.java

@@ -27,4 +27,9 @@ public class WindturbinewindyawServiceImpl extends ServiceImpl<Windturbinewindya
     public List<Windturbinewindyaw> getdfpclwind(Date monthFirst, Date monthLast) {
         return windturbinewindyawMapper.getdfpclwind(monthFirst,monthLast);
     }
+
+    @Override
+    public List<Windturbinewindyaw> findWindturbinewindyaw(Date beginDate, Date endDate) {
+        return null;
+    }
 }

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

@@ -23,18 +23,32 @@ 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 {
@@ -87,6 +101,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());
@@ -137,50 +158,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);
+//                            }
+//                        }
                     }
 
 
@@ -217,7 +240,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);
@@ -260,7 +289,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());
@@ -320,7 +355,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());
@@ -374,7 +415,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());
@@ -425,49 +472,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);
+//                            }
+//                        }
                     }
 
 
@@ -499,6 +548,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());
@@ -557,6 +615,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);
@@ -604,6 +670,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)
             {
@@ -635,8 +709,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);
@@ -644,7 +718,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]));
                             }
 
                         }
@@ -740,8 +814,16 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
     public List<PointData> getRealData(List<String> pointids) throws Exception {
 
 
-        if(StringUtils.notEmp(pointids) )
+        if(StringUtils.notEmp(pointids) && !pointids.isEmpty() )
         {
+
+            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)
             {
@@ -776,8 +858,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);
@@ -785,7 +867,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();
@@ -879,6 +961,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)
             {
@@ -963,6 +1054,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);
@@ -1004,49 +1103,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;
@@ -1080,7 +1181,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);
@@ -1129,6 +1236,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());
@@ -1204,7 +1318,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());
@@ -1274,7 +1394,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);
@@ -1333,7 +1459,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);
@@ -1430,16 +1562,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
@@ -1449,6 +1593,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])) {
@@ -1488,31 +1639,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;
+                }
             }
         }
 
@@ -1520,10 +1671,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) {
@@ -1540,72 +1700,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)
             {
@@ -1676,4 +1814,4 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
     }
 
 
-}
+}

+ 113 - 0
realtime/healthmodel-server-cph/src/main/resources/application-hb.yml

@@ -0,0 +1,113 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+  baseurl: http://192.168.2.198:8011/ts
+  healthurl: http://192.168.2.198:8012/ts
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+server:
+  port: 8162
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+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
+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
+    #    driverClassName: com.mysql.jdbc.Driver
+    #druid连接池配置
+    druid:
+      #主库数据源
+      master:
+
+        url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
+        username: gdprod
+        password: gd123
+        driver-class-name: oracle.jdbc.driver.OracleDriver
+      #备数据源 #关闭
+      slave:
+        enabled: false
+        url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+        username: root
+        password: 123456
+        #两票数据源
+      ticket:
+        url: jdbc:sqlserver://192.168.2.200:1434;DatabaseName=fdeamnew
+        username: sa
+        password: ibs
+        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        #配置初始化连接数大小
+      initial-size: 10
+      # 最大连接数
+      max-active: 50
+      #最小连接数
+      min-idle: 10
+      #获取连接等待超时时间
+      max-wait: 5000
+      pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。
+      max-pool-prepared-statement-per-connection-size: 20
+      validation-query: SELECT 1 FROM DUAL
+      validation-query-timeout: 20000
+      test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
+      time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      min-evictable-idle-time-millis: 300000  #一个连接在池中最小生存的时间,单位是毫秒
+      #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        #可以增加访问账号密码【去掉注释就可以】
+        #login-username: admin
+        #login-password: admin
+      filter:
+        stat:
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: false
+        wall:
+          config:
+            multi-statement-allow: true
+
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 112 - 0
realtime/healthmodel-server-cph/src/main/resources/application-hf.yml

@@ -0,0 +1,112 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+  baseurl: http://10.0.118.73:8011/ts
+  healthurl: http://10.0.118.73:8011/ts
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+server:
+  port: 8162
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+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
+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
+    #    driverClassName: com.mysql.jdbc.Driver
+    #druid连接池配置
+    druid:
+      #主库数据源
+      master:
+        url: jdbc:oracle:thin:@10.0.118.71:1521:gdsj
+        username: gdprod
+        password: gd123
+        driver-class-name: oracle.jdbc.driver.OracleDriver
+      #备数据源 #关闭
+      slave:
+        enabled: false
+        url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+        username: root
+        password: 123456
+        #两票数据源
+      ticket:
+        url: jdbc:sqlserver://10.0.118.71:1433;DatabaseName=fdeamnew
+        username: sa
+        password: Gd!123456
+        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        #配置初始化连接数大小
+      initial-size: 10
+      # 最大连接数
+      max-active: 50
+      #最小连接数
+      min-idle: 10
+      #获取连接等待超时时间
+      max-wait: 5000
+      pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。
+      max-pool-prepared-statement-per-connection-size: 20
+      validation-query: SELECT 1 FROM DUAL
+      validation-query-timeout: 20000
+      test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
+      time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      min-evictable-idle-time-millis: 300000  #一个连接在池中最小生存的时间,单位是毫秒
+      #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        #可以增加访问账号密码【去掉注释就可以】
+        #login-username: admin
+        #login-password: admin
+      filter:
+        stat:
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: false
+        wall:
+          config:
+            multi-statement-allow: true
+
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 113 - 0
realtime/healthmodel-server-cph/src/main/resources/application-hwy.yml

@@ -0,0 +1,113 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+
+  baseurl: http://123.60.213.70:8011/ts
+  healthurl: http://123.60.213.70:8011/ts
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+server:
+  port: 8162
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+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
+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
+    #    driverClassName: com.mysql.jdbc.Driver
+    #druid连接池配置
+    druid:
+      #主库数据源
+      master:
+        url: jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd
+        username: nxfdprod
+        password: gdnxfd123
+        driver-class-name: oracle.jdbc.driver.OracleDriver
+      #备数据源 #关闭
+      slave:
+        enabled: false
+        url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+        username: root
+        password: 123456
+        #两票数据源
+      ticket:
+        url: jdbc:sqlserver://123.60.213.70:1434;DatabaseName=fdeam
+        username: sa
+        password: Gyee@321#!
+        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        #配置初始化连接数大小
+      initial-size: 10
+      # 最大连接数
+      max-active: 50
+      #最小连接数
+      min-idle: 10
+      #获取连接等待超时时间
+      max-wait: 5000
+      pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。
+      max-pool-prepared-statement-per-connection-size: 20
+      validation-query: SELECT 1 FROM DUAL
+      validation-query-timeout: 20000
+      test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
+      time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      min-evictable-idle-time-millis: 300000  #一个连接在池中最小生存的时间,单位是毫秒
+      #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        #可以增加访问账号密码【去掉注释就可以】
+        #login-username: admin
+        #login-password: admin
+      filter:
+        stat:
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: false
+        wall:
+          config:
+            multi-statement-allow: true
+
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 117 - 0
realtime/healthmodel-server-cph/src/main/resources/application-jn.yml

@@ -0,0 +1,117 @@
+# 项目相关配置
+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: 8162
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+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
+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
+    #    driverClassName: com.mysql.jdbc.Driver
+    #druid连接池配置
+    druid:
+      #主库数据源
+      master:
+        url: jdbc:postgresql://10.81.3.151:5432/wisdom
+        username: gdprod
+        password: gd123
+        driver-class-name: org.postgresql.Driver
+      #备数据源 #关闭
+      slave:
+#        enabled: false
+#        url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+#        username: root
+#        password: 123456
+        #两票数据源
+      ticket:
+#        #url: jdbc:sqlserver://10.0.118.71:1433;DatabaseName=fdeamnew
+#        #url: jdbc:sqlserver://123.60.213.70:1434;DatabaseName=fdeam
+#        url: jdbc:sqlserver://192.168.2.200:1434;DatabaseName=fdeamnew
+#        username: sa
+#        password: ibs
+#        #password: Gd!123456
+#        #        password: Gyee@321#!
+#        #        password: ibs
+#        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        #配置初始化连接数大小
+      initial-size: 10
+      # 最大连接数
+      max-active: 50
+      #最小连接数
+      min-idle: 10
+      #获取连接等待超时时间
+      max-wait: 5000
+      pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。
+      max-pool-prepared-statement-per-connection-size: 20
+      validation-query: SELECT 1 FROM DUAL
+      validation-query-timeout: 20000
+      test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
+      time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      min-evictable-idle-time-millis: 300000  #一个连接在池中最小生存的时间,单位是毫秒
+      #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        #可以增加访问账号密码【去掉注释就可以】
+        #login-username: admin
+        #login-password: admin
+      filter:
+        stat:
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: false
+        wall:
+          config:
+            multi-statement-allow: true
+
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 3 - 125
realtime/healthmodel-server-cph/src/main/resources/application.yml

@@ -1,126 +1,4 @@
-# 项目相关配置
-gyee:
-  #实时数据库Url
-  #baseurl: http://10.0.118.73:8011/ts
-  #baseurl: http://123.60.213.70:8011/ts
-  #baseurl: http://192.168.2.205:8011/ts
-  baseurl: http://192.168.2.198:8011/ts
-  #实时数据库选择
-  realtimedataBase: mongodb #数据查询模式 golden、hwy
-  initialcode: INITIAL
-server:
-  port: 8162
-  servlet:
-    context-path: /
-
-management:
-  health:
-    redis:
-      enabled: false
-
-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
 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
-    #    driverClassName: com.mysql.jdbc.Driver
-    #druid连接池配置
-    druid:
-      #主库数据源
-      master:
-        #        url: jdbc:mysql://localhost:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
-        #        username: root
-        #        password: 123456
-
-        url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
-        #url: jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd
-        username: gdprod
-        password: gd123
-#        username: nxfdprod
-#        password: gdnxfd123
-        driver-class-name: oracle.jdbc.driver.OracleDriver
-      #备数据源 #关闭
-      slave:
-        enabled: false
-        url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
-        username: root
-        password: 123456
-        #两票数据源
-      ticket:
-        #url: jdbc:sqlserver://10.0.118.71:1433;DatabaseName=fdeamnew
-        #url: jdbc:sqlserver://123.60.213.70:1434;DatabaseName=fdeam
-        url: jdbc:sqlserver://192.168.2.200:1434;DatabaseName=fdeamnew
-        username: sa
-        password: ibs
-        #password: Gd!123456
-#        password: Gyee@321#!
-#        password: ibs
-        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-        #配置初始化连接数大小
-      initial-size: 10
-      # 最大连接数
-      max-active: 50
-      #最小连接数
-      min-idle: 10
-      #获取连接等待超时时间
-      max-wait: 5000
-      pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。
-      max-pool-prepared-statement-per-connection-size: 20
-      validation-query: SELECT 1 FROM DUAL
-      validation-query-timeout: 20000
-      test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
-      test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
-      test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
-      time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      min-evictable-idle-time-millis: 300000  #一个连接在池中最小生存的时间,单位是毫秒
-      #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        #可以增加访问账号密码【去掉注释就可以】
-        #login-username: admin
-        #login-password: admin
-      filter:
-        stat:
-          log-slow-sql: true
-          slow-sql-millis: 1000
-          merge-sql: false
-        wall:
-          config:
-            multi-statement-allow: true
-
-  servlet:
-    multipart:
-      # 开启 multipart 上传功能
-      enabled: true
-      # 文件写入磁盘的阈值
-      file-size-threshold: 2KB
-      # 最大文件大小
-      max-file-size: 200MB
-      # 最大请求大小
-      max-request-size: 215MB
-
-
-logging:
-  level:
-    root: info
-    com.example: debug
-
-edos:
-  baseURL: http://10.0.118.73:8011/ts
+  profiles:
+    active: hb
+#    active: jn