Forráskód Böngészése

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

shilin 3 éve
szülő
commit
ee9aa99a74

+ 9 - 0
realtime/datatraining-server-cph/src/main/java/com/gyee/datatraining/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/datatraining-server-cph/src/main/java/com/gyee/datatraining/init/CacheContext.java

@@ -2,6 +2,7 @@ package com.gyee.datatraining.init;
 
 
 import com.gyee.datatraining.model.auto.*;
+import com.gyee.datatraining.service.HealthpointsService;
 import com.gyee.datatraining.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集合
@@ -67,7 +70,7 @@ public class CacheContext implements CommandLineRunner {
     public void run(String... args) throws Exception {
 
         log.info("-------------------------------缓存开始--------------------------------------");
-
+        //hpmap=healthpointsService.findAllMap();
         List<Windpowerstation> wptempls = windpowerstationService.list();
         wptempls.stream().filter(i->i.getCompanyid().equals("1")).forEach(i->{
             wpls.add(i);

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

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

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

@@ -0,0 +1,78 @@
+package com.gyee.datatraining.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/datatraining-server-cph/src/main/java/com/gyee/datatraining/service/HealthpointsService.java

@@ -0,0 +1,38 @@
+package com.gyee.datatraining.service;
+
+
+import com.gyee.datatraining.model.auto.Healthpoint;
+import com.gyee.datatraining.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/datatraining-server-cph/src/main/java/com/gyee/datatraining/service/auto/IHealthpointService.java

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

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

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

+ 354 - 225
realtime/datatraining-server-cph/src/main/java/com/gyee/datatraining/util/realtimesource/EdosUtil.java

@@ -21,20 +21,27 @@ import org.springframework.web.client.RestTemplate;
 import java.util.*;
 
 
-/**
- */
 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 {
@@ -86,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());
@@ -137,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);
+//                            }
+//                        }
                     }
 
 
@@ -217,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);
@@ -260,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());
@@ -320,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());
@@ -374,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());
@@ -425,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);
+//                            }
+//                        }
                     }
 
 
@@ -499,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());
@@ -557,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);
@@ -604,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)
             {
@@ -742,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)
             {
@@ -879,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)
             {
@@ -963,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);
@@ -1004,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;
@@ -1080,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);
@@ -1129,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());
@@ -1204,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());
@@ -1274,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);
@@ -1333,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);
@@ -1430,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
@@ -1449,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])) {
@@ -1488,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;
+                }
             }
         }
 
@@ -1520,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) {
@@ -1540,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)
             {
@@ -1677,4 +1807,3 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
 
 
 }
-

+ 161 - 0
realtime/datatraining-server-cph/src/main/resources/application-hb.yml

@@ -0,0 +1,161 @@
+# 项目相关配置
+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: 8160
+  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
+
+
+
+up82_part_state_clx: JKZT002
+up82_part_state_fdj: JKZT003
+up82_part_state_kzys: JKZT004
+up82_part_state_jcxt: JKZT005
+up82_part_state_fj: JKZT001
+
+up82_part_state_clx_value: JKJL002
+up82_part_state_fdj_value: JKJL003
+up82_part_state_kzys_value: JKJL004
+up82_part_state_jcxt_value: JKJL005
+up82_part_state_fj_value: JKJL001
+
+up82_wp_wt_statenum: JKSLLH001,JKSLHG001,JKSLZY001,JKSLYZ001
+up82_wp_clx_statenum: JKSLLH002,JKSLHG002,JKSLZY002,JKSLYZ002
+up82_wp_fdj_statenum: JKSLLH003,JKSLHG003,JKSLZY003,JKSLYZ003
+up82_wp_kzys_statenum: JKSLLH004,JKSLHG004,JKSLZY004,JKSLYZ004
+up82_wp_jcxt_statenum: JKSLLH005,JKSLHG005,JKSLZY005,JKSLYZ005
+
+up82_part_clx: AI038,AI039,AI040,AI041
+up82_part_fdj: AI052,AI053,AI045,AI047,AI049,AI054
+up82_part_kzys: AI113,AI114,AI115,AI236,AI237,AI238,AI239,AI240,AI241,AI242,AI243,AI244,AI233,AI234,AI235
+up82_part_jcxt: AI069,AI070
+
+up82_type_clx: 0,0,0,1
+up82_type_fdj: 0,0,0,0,0,0
+up82_type_kzys: 0,0,0,1,1,1,0,0,0,0,0,0,0,0,0
+up82_type_jcxt: 0,0
+
+up82_weight_jzxn: 0.2462,0.1642,0.4403,0.1493
+
+up82_weight_clx: 0.0114,0.4537,0.0218,0.5131
+up82_weight_fdj: 0.0350,0.0350,0.0380,0.4270,0.4650,0
+up82_weight_kzys: 0.0069,0.0069,0.0069,0.2724,0.2724,0.2724,0.0128,0.0128,0.0128,0.0083,0.0083,0.0083,0.0033,0.0033,0.0033
+up82_weight_jcxt: 0.7500,0.2500
+
+up82_clx_rules: up82_range_clxsrzc,up82_range_clxsczc,up82_range_clxrkyw,up82_range_clxyw
+up82_fdj_rules: up82_range_fdjzca,up82_range_fdjzcb,up82_range_fdjrzu,up82_range_fdjrzv,up82_range_fdjrzw,up82_range_fdjlqf
+up82_kzys_rules: up82_range_bjdrqwd1,up82_range_bjdrqwd2,up82_range_bjdrqwd3,up82_range_bjdrqdy1,up82_range_bjdrqdy2,up82_range_bjdrqdy3,up82_range_bjblwd1,up82_range_bjblwd2,up82_range_bjblwd3,up82_range_bjdjwd1,up82_range_bjdjwd2,up82_range_bjdjwd3,up82_range_bjkzgwd1,up82_range_bjkzgwd2,up82_range_bjkzgwd3
+up82_jcxt_rules: up82_range_tdgwd,up82_range_tdkzgwd
+
+
+up82_range_clxsrzc: 95,0
+up82_range_clxsczc: 95,0
+up82_range_clxrkyw: 80,0
+up82_range_clxyw: 80,10,14,76
+
+up82_range_fdjzca: 95,0
+up82_range_fdjzcb: 95,0
+up82_range_fdjrzu: 150,0
+up82_range_fdjrzv: 150,0
+up82_range_fdjrzw: 150,0
+up82_range_fdjlqf: 70,0
+
+up82_range_bjdrqwd1: 65,0
+up82_range_bjdrqwd2: 65,0
+up82_range_bjdrqwd3: 65,0
+up82_range_bjdrqdy1: 63,53,56,60
+up82_range_bjdrqdy2: 63,53,56,60
+up82_range_bjdrqdy3: 63,53,56,60
+up82_range_bjblwd1: 75,0
+up82_range_bjblwd2: 75,0
+up82_range_bjblwd3: 75,0
+up82_range_bjdjwd1: 135,0
+up82_range_bjdjwd2: 135,0
+up82_range_bjdjwd3: 135,0
+up82_range_bjkzgwd1: 65,0
+up82_range_bjkzgwd2: 65,0
+up82_range_bjkzgwd3: 65,0
+
+up82_range_tdgwd: 50,0
+up82_range_tdkzgwd: 75,0
+
+up82_params_lsd1: 3.5,5.56
+up82_params_lsd2: 7.3,10,5.56,2.5
+up82_params_lsd3: 7.08,8.33,10,6.3
+up82_params_lsd4: 8.33,6.08
+
+up82_condition_lsd: 0.85,0.45,0.63,0.73

+ 159 - 0
realtime/datatraining-server-cph/src/main/resources/application-hwy.yml

@@ -0,0 +1,159 @@
+# 项目相关配置
+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: 8160
+  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
+
+
+
+up82_part_state_clx: JKZT002
+up82_part_state_fdj: JKZT003
+up82_part_state_kzys: JKZT004
+up82_part_state_jcxt: JKZT005
+up82_part_state_fj: JKZT001
+
+up82_part_state_clx_value: JKJL002
+up82_part_state_fdj_value: JKJL003
+up82_part_state_kzys_value: JKJL004
+up82_part_state_jcxt_value: JKJL005
+up82_part_state_fj_value: JKJL001
+
+up82_wp_wt_statenum: JKSLLH001,JKSLHG001,JKSLZY001,JKSLYZ001
+up82_wp_clx_statenum: JKSLLH002,JKSLHG002,JKSLZY002,JKSLYZ002
+up82_wp_fdj_statenum: JKSLLH003,JKSLHG003,JKSLZY003,JKSLYZ003
+up82_wp_kzys_statenum: JKSLLH004,JKSLHG004,JKSLZY004,JKSLYZ004
+up82_wp_jcxt_statenum: JKSLLH005,JKSLHG005,JKSLZY005,JKSLYZ005
+
+up82_part_clx: AI038,AI039,AI040,AI041
+up82_part_fdj: AI052,AI053,AI045,AI047,AI049,AI054
+up82_part_kzys: AI113,AI114,AI115,AI236,AI237,AI238,AI239,AI240,AI241,AI242,AI243,AI244,AI233,AI234,AI235
+up82_part_jcxt: AI069,AI070
+
+up82_type_clx: 0,0,0,1
+up82_type_fdj: 0,0,0,0,0,0
+up82_type_kzys: 0,0,0,1,1,1,0,0,0,0,0,0,0,0,0
+up82_type_jcxt: 0,0
+
+up82_weight_jzxn: 0.2462,0.1642,0.4403,0.1493
+
+up82_weight_clx: 0.0114,0.4537,0.0218,0.5131
+up82_weight_fdj: 0.0350,0.0350,0.0380,0.4270,0.4650,0
+up82_weight_kzys: 0.0069,0.0069,0.0069,0.2724,0.2724,0.2724,0.0128,0.0128,0.0128,0.0083,0.0083,0.0083,0.0033,0.0033,0.0033
+up82_weight_jcxt: 0.7500,0.2500
+
+up82_clx_rules: up82_range_clxsrzc,up82_range_clxsczc,up82_range_clxrkyw,up82_range_clxyw
+up82_fdj_rules: up82_range_fdjzca,up82_range_fdjzcb,up82_range_fdjrzu,up82_range_fdjrzv,up82_range_fdjrzw,up82_range_fdjlqf
+up82_kzys_rules: up82_range_bjdrqwd1,up82_range_bjdrqwd2,up82_range_bjdrqwd3,up82_range_bjdrqdy1,up82_range_bjdrqdy2,up82_range_bjdrqdy3,up82_range_bjblwd1,up82_range_bjblwd2,up82_range_bjblwd3,up82_range_bjdjwd1,up82_range_bjdjwd2,up82_range_bjdjwd3,up82_range_bjkzgwd1,up82_range_bjkzgwd2,up82_range_bjkzgwd3
+up82_jcxt_rules: up82_range_tdgwd,up82_range_tdkzgwd
+
+
+up82_range_clxsrzc: 95,0
+up82_range_clxsczc: 95,0
+up82_range_clxrkyw: 80,0
+up82_range_clxyw: 80,10,14,76
+
+up82_range_fdjzca: 95,0
+up82_range_fdjzcb: 95,0
+up82_range_fdjrzu: 150,0
+up82_range_fdjrzv: 150,0
+up82_range_fdjrzw: 150,0
+up82_range_fdjlqf: 70,0
+
+up82_range_bjdrqwd1: 65,0
+up82_range_bjdrqwd2: 65,0
+up82_range_bjdrqwd3: 65,0
+up82_range_bjdrqdy1: 63,53,56,60
+up82_range_bjdrqdy2: 63,53,56,60
+up82_range_bjdrqdy3: 63,53,56,60
+up82_range_bjblwd1: 75,0
+up82_range_bjblwd2: 75,0
+up82_range_bjblwd3: 75,0
+up82_range_bjdjwd1: 135,0
+up82_range_bjdjwd2: 135,0
+up82_range_bjdjwd3: 135,0
+up82_range_bjkzgwd1: 65,0
+up82_range_bjkzgwd2: 65,0
+up82_range_bjkzgwd3: 65,0
+
+up82_range_tdgwd: 50,0
+up82_range_tdkzgwd: 75,0
+
+up82_params_lsd1: 3.5,5.56
+up82_params_lsd2: 7.3,10,5.56,2.5
+up82_params_lsd3: 7.08,8.33,10,6.3
+up82_params_lsd4: 8.33,6.08
+
+up82_condition_lsd: 0.85,0.45,0.63,0.73

+ 159 - 0
realtime/datatraining-server-cph/src/main/resources/application-jn.yml

@@ -0,0 +1,159 @@
+# 项目相关配置
+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: 8160
+  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
+    #外网
+    url: jdbc:postgresql://10.81.3.151:5432/wisdom
+    username: gdprod
+    password: gd123
+    driver-class-name: org.postgresql.Driver
+    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
+
+
+
+up82_part_state_clx: JKZT002
+up82_part_state_fdj: JKZT003
+up82_part_state_kzys: JKZT004
+up82_part_state_jcxt: JKZT005
+up82_part_state_fj: JKZT001
+
+up82_part_state_clx_value: JKJL002
+up82_part_state_fdj_value: JKJL003
+up82_part_state_kzys_value: JKJL004
+up82_part_state_jcxt_value: JKJL005
+up82_part_state_fj_value: JKJL001
+
+up82_wp_wt_statenum: JKSLLH001,JKSLHG001,JKSLZY001,JKSLYZ001
+up82_wp_clx_statenum: JKSLLH002,JKSLHG002,JKSLZY002,JKSLYZ002
+up82_wp_fdj_statenum: JKSLLH003,JKSLHG003,JKSLZY003,JKSLYZ003
+up82_wp_kzys_statenum: JKSLLH004,JKSLHG004,JKSLZY004,JKSLYZ004
+up82_wp_jcxt_statenum: JKSLLH005,JKSLHG005,JKSLZY005,JKSLYZ005
+
+up82_part_clx: AI038,AI039,AI040,AI041
+up82_part_fdj: AI052,AI053,AI045,AI047,AI049,AI054
+up82_part_kzys: AI113,AI114,AI115,AI236,AI237,AI238,AI239,AI240,AI241,AI242,AI243,AI244,AI233,AI234,AI235
+up82_part_jcxt: AI069,AI070
+
+up82_type_clx: 0,0,0,1
+up82_type_fdj: 0,0,0,0,0,0
+up82_type_kzys: 0,0,0,1,1,1,0,0,0,0,0,0,0,0,0
+up82_type_jcxt: 0,0
+
+up82_weight_jzxn: 0.2462,0.1642,0.4403,0.1493
+
+up82_weight_clx: 0.0114,0.4537,0.0218,0.5131
+up82_weight_fdj: 0.0350,0.0350,0.0380,0.4270,0.4650,0
+up82_weight_kzys: 0.0069,0.0069,0.0069,0.2724,0.2724,0.2724,0.0128,0.0128,0.0128,0.0083,0.0083,0.0083,0.0033,0.0033,0.0033
+up82_weight_jcxt: 0.7500,0.2500
+
+up82_clx_rules: up82_range_clxsrzc,up82_range_clxsczc,up82_range_clxrkyw,up82_range_clxyw
+up82_fdj_rules: up82_range_fdjzca,up82_range_fdjzcb,up82_range_fdjrzu,up82_range_fdjrzv,up82_range_fdjrzw,up82_range_fdjlqf
+up82_kzys_rules: up82_range_bjdrqwd1,up82_range_bjdrqwd2,up82_range_bjdrqwd3,up82_range_bjdrqdy1,up82_range_bjdrqdy2,up82_range_bjdrqdy3,up82_range_bjblwd1,up82_range_bjblwd2,up82_range_bjblwd3,up82_range_bjdjwd1,up82_range_bjdjwd2,up82_range_bjdjwd3,up82_range_bjkzgwd1,up82_range_bjkzgwd2,up82_range_bjkzgwd3
+up82_jcxt_rules: up82_range_tdgwd,up82_range_tdkzgwd
+
+
+up82_range_clxsrzc: 95,0
+up82_range_clxsczc: 95,0
+up82_range_clxrkyw: 80,0
+up82_range_clxyw: 80,10,14,76
+
+up82_range_fdjzca: 95,0
+up82_range_fdjzcb: 95,0
+up82_range_fdjrzu: 150,0
+up82_range_fdjrzv: 150,0
+up82_range_fdjrzw: 150,0
+up82_range_fdjlqf: 70,0
+
+up82_range_bjdrqwd1: 65,0
+up82_range_bjdrqwd2: 65,0
+up82_range_bjdrqwd3: 65,0
+up82_range_bjdrqdy1: 63,53,56,60
+up82_range_bjdrqdy2: 63,53,56,60
+up82_range_bjdrqdy3: 63,53,56,60
+up82_range_bjblwd1: 75,0
+up82_range_bjblwd2: 75,0
+up82_range_bjblwd3: 75,0
+up82_range_bjdjwd1: 135,0
+up82_range_bjdjwd2: 135,0
+up82_range_bjdjwd3: 135,0
+up82_range_bjkzgwd1: 65,0
+up82_range_bjkzgwd2: 65,0
+up82_range_bjkzgwd3: 65,0
+
+up82_range_tdgwd: 50,0
+up82_range_tdkzgwd: 75,0
+
+up82_params_lsd1: 3.5,5.56
+up82_params_lsd2: 7.3,10,5.56,2.5
+up82_params_lsd3: 7.08,8.33,10,6.3
+up82_params_lsd4: 8.33,6.08
+
+up82_condition_lsd: 0.85,0.45,0.63,0.73

+ 3 - 167
realtime/datatraining-server-cph/src/main/resources/application.yml

@@ -1,168 +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: 8160
-  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:@192.168.2.215:1521:gdsj
-    #    url: jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd
-    #    url: jdbc:oracle:thin:@172.168.1.14:1521:gdnxfd
-    #url: jdbc:oracle:thin:@123.60.213.70: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
-
-
-
-up82_part_state_clx: JKZT002
-up82_part_state_fdj: JKZT003
-up82_part_state_kzys: JKZT004
-up82_part_state_jcxt: JKZT005
-up82_part_state_fj: JKZT001
-
-up82_part_state_clx_value: JKJL002
-up82_part_state_fdj_value: JKJL003
-up82_part_state_kzys_value: JKJL004
-up82_part_state_jcxt_value: JKJL005
-up82_part_state_fj_value: JKJL001
-
-up82_wp_wt_statenum: JKSLLH001,JKSLHG001,JKSLZY001,JKSLYZ001
-up82_wp_clx_statenum: JKSLLH002,JKSLHG002,JKSLZY002,JKSLYZ002
-up82_wp_fdj_statenum: JKSLLH003,JKSLHG003,JKSLZY003,JKSLYZ003
-up82_wp_kzys_statenum: JKSLLH004,JKSLHG004,JKSLZY004,JKSLYZ004
-up82_wp_jcxt_statenum: JKSLLH005,JKSLHG005,JKSLZY005,JKSLYZ005
-
-up82_part_clx: AI038,AI039,AI040,AI041
-up82_part_fdj: AI052,AI053,AI045,AI047,AI049,AI054
-up82_part_kzys: AI113,AI114,AI115,AI236,AI237,AI238,AI239,AI240,AI241,AI242,AI243,AI244,AI233,AI234,AI235
-up82_part_jcxt: AI069,AI070
-
-up82_type_clx: 0,0,0,1
-up82_type_fdj: 0,0,0,0,0,0
-up82_type_kzys: 0,0,0,1,1,1,0,0,0,0,0,0,0,0,0
-up82_type_jcxt: 0,0
-
-up82_weight_jzxn: 0.2462,0.1642,0.4403,0.1493
-
-up82_weight_clx: 0.0114,0.4537,0.0218,0.5131
-up82_weight_fdj: 0.0350,0.0350,0.0380,0.4270,0.4650,0
-up82_weight_kzys: 0.0069,0.0069,0.0069,0.2724,0.2724,0.2724,0.0128,0.0128,0.0128,0.0083,0.0083,0.0083,0.0033,0.0033,0.0033
-up82_weight_jcxt: 0.7500,0.2500
-
-up82_clx_rules: up82_range_clxsrzc,up82_range_clxsczc,up82_range_clxrkyw,up82_range_clxyw
-up82_fdj_rules: up82_range_fdjzca,up82_range_fdjzcb,up82_range_fdjrzu,up82_range_fdjrzv,up82_range_fdjrzw,up82_range_fdjlqf
-up82_kzys_rules: up82_range_bjdrqwd1,up82_range_bjdrqwd2,up82_range_bjdrqwd3,up82_range_bjdrqdy1,up82_range_bjdrqdy2,up82_range_bjdrqdy3,up82_range_bjblwd1,up82_range_bjblwd2,up82_range_bjblwd3,up82_range_bjdjwd1,up82_range_bjdjwd2,up82_range_bjdjwd3,up82_range_bjkzgwd1,up82_range_bjkzgwd2,up82_range_bjkzgwd3
-up82_jcxt_rules: up82_range_tdgwd,up82_range_tdkzgwd
-
-
-up82_range_clxsrzc: 95,0
-up82_range_clxsczc: 95,0
-up82_range_clxrkyw: 80,0
-up82_range_clxyw: 80,10,14,76
-
-up82_range_fdjzca: 95,0
-up82_range_fdjzcb: 95,0
-up82_range_fdjrzu: 150,0
-up82_range_fdjrzv: 150,0
-up82_range_fdjrzw: 150,0
-up82_range_fdjlqf: 70,0
-
-up82_range_bjdrqwd1: 65,0
-up82_range_bjdrqwd2: 65,0
-up82_range_bjdrqwd3: 65,0
-up82_range_bjdrqdy1: 63,53,56,60
-up82_range_bjdrqdy2: 63,53,56,60
-up82_range_bjdrqdy3: 63,53,56,60
-up82_range_bjblwd1: 75,0
-up82_range_bjblwd2: 75,0
-up82_range_bjblwd3: 75,0
-up82_range_bjdjwd1: 135,0
-up82_range_bjdjwd2: 135,0
-up82_range_bjdjwd3: 135,0
-up82_range_bjkzgwd1: 65,0
-up82_range_bjkzgwd2: 65,0
-up82_range_bjkzgwd3: 65,0
-
-up82_range_tdgwd: 50,0
-up82_range_tdkzgwd: 75,0
-
-up82_params_lsd1: 3.5,5.56
-up82_params_lsd2: 7.3,10,5.56,2.5
-up82_params_lsd3: 7.08,8.33,10,6.3
-up82_params_lsd4: 8.33,6.08
-
-up82_condition_lsd: 0.85,0.45,0.63,0.73
+  profiles:
+    active: hb
+#    active: jn