|
@@ -4,6 +4,7 @@ package com.gyee.frame.util.golden;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.gyee.frame.common.conf.V2Config;
|
|
import com.gyee.frame.common.conf.V2Config;
|
|
|
|
+import com.gyee.frame.common.spring.InitialRunner;
|
|
import com.gyee.frame.model.auto.Windpowerstationpointnew;
|
|
import com.gyee.frame.model.auto.Windpowerstationpointnew;
|
|
import com.gyee.frame.model.auto.Windturbinetestingpointnew;
|
|
import com.gyee.frame.model.auto.Windturbinetestingpointnew;
|
|
import com.gyee.frame.model.custom.DNAStatVal;
|
|
import com.gyee.frame.model.custom.DNAStatVal;
|
|
@@ -29,11 +30,19 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
private RestTemplate restTemplate =new RestTemplate();
|
|
private RestTemplate restTemplate =new RestTemplate();
|
|
|
|
|
|
- static String baseURL = V2Config.getBaseurl();
|
|
|
|
|
|
+ private String baseURL = V2Config.getBaseurl();
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public PointData getRealData(Windpowerstationpointnew point) throws Exception {
|
|
public PointData getRealData(Windpowerstationpointnew point) throws Exception {
|
|
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(point.getCode()))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
|
|
+
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
{
|
|
{
|
|
try {
|
|
try {
|
|
@@ -85,7 +94,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<PointData> getHistoryDatasSnap(Windpowerstationpointnew point, Long beginDate, Long endDate, Long count, Long pried) throws Exception {
|
|
public List<PointData> getHistoryDatasSnap(Windpowerstationpointnew point, Long beginDate, Long endDate, Long count, Long pried) throws Exception {
|
|
-
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(point.getCode()))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
{
|
|
{
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
@@ -218,7 +233,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
private void getHistsnapSameTiem(String pointid, Long beginDate, Long pried,
|
|
private void getHistsnapSameTiem(String pointid, Long beginDate, Long pried,
|
|
List<PointData> resultList) {
|
|
List<PointData> resultList) {
|
|
|
|
|
|
-
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(pointid))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
long subTime =beginDate - pried;
|
|
long subTime =beginDate - pried;
|
|
String rawUrl = baseURL + "/history/section?null=0&tagNames=" + pointid + "&ts=" + beginDate + "000";
|
|
String rawUrl = baseURL + "/history/section?null=0&tagNames=" + pointid + "&ts=" + beginDate + "000";
|
|
ResponseEntity<JSONObject> sectionResp = restTemplate.getForEntity(rawUrl, JSONObject.class);
|
|
ResponseEntity<JSONObject> sectionResp = restTemplate.getForEntity(rawUrl, JSONObject.class);
|
|
@@ -261,7 +282,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<PointData> getHistoryDatasRaw(Windpowerstationpointnew point, Long beginDate, Long endDate) throws Exception {
|
|
public List<PointData> getHistoryDatasRaw(Windpowerstationpointnew point, Long beginDate, Long endDate) throws Exception {
|
|
-
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(point.getCode()))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
{
|
|
{
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
@@ -321,7 +348,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public PointData getRealData(Windturbinetestingpointnew point) throws Exception {
|
|
public PointData getRealData(Windturbinetestingpointnew point) throws Exception {
|
|
-
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(point.getCode()))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
{
|
|
{
|
|
Optional<String> keys = Optional.ofNullable(point.getCode());
|
|
Optional<String> keys = Optional.ofNullable(point.getCode());
|
|
@@ -375,7 +408,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<PointData> getHistoryDatasSnap(Windturbinetestingpointnew point, Long beginDate, Long endDate, Long count, Long pried) throws Exception {
|
|
public List<PointData> getHistoryDatasSnap(Windturbinetestingpointnew point, Long beginDate, Long endDate, Long count, Long pried) throws Exception {
|
|
-
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(point.getCode()))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
{
|
|
{
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
@@ -502,6 +541,15 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<PointData> getHistoryDatasRaw(Windturbinetestingpointnew point, Long beginDate, Long endDate) throws Exception {
|
|
public List<PointData> getHistoryDatasRaw(Windturbinetestingpointnew point, Long beginDate, Long endDate) throws Exception {
|
|
|
|
+
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(point.getCode()))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
|
|
+
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
{
|
|
{
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
@@ -560,6 +608,14 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
@Override
|
|
@Override
|
|
public PointData getRealData(String pointid) throws Exception {
|
|
public PointData getRealData(String pointid) throws Exception {
|
|
|
|
|
|
|
|
+
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(pointid))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
if(StringUtils.notEmp(pointid) && !V2Config.getInitialcode().equals(pointid))
|
|
if(StringUtils.notEmp(pointid) && !V2Config.getInitialcode().equals(pointid))
|
|
{
|
|
{
|
|
Optional<String> keys = Optional.ofNullable(pointid);
|
|
Optional<String> keys = Optional.ofNullable(pointid);
|
|
@@ -607,6 +663,14 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
if(StringUtils.notEmp(pointids) )
|
|
if(StringUtils.notEmp(pointids) )
|
|
{
|
|
{
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(pointids[0]))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
|
|
+
|
|
List<String> idls=new ArrayList<>();
|
|
List<String> idls=new ArrayList<>();
|
|
for(String str:pointids)
|
|
for(String str:pointids)
|
|
{
|
|
{
|
|
@@ -745,6 +809,14 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
if(StringUtils.notEmp(pointids) )
|
|
if(StringUtils.notEmp(pointids) )
|
|
{
|
|
{
|
|
|
|
+
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(pointids.get(0)))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
List<String> idls=new ArrayList<>();
|
|
List<String> idls=new ArrayList<>();
|
|
for(String str:pointids)
|
|
for(String str:pointids)
|
|
{
|
|
{
|
|
@@ -882,6 +954,15 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
if(StringUtils.notEmp(pointids) )
|
|
if(StringUtils.notEmp(pointids) )
|
|
{
|
|
{
|
|
|
|
+
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(pointids[0]))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
|
|
+
|
|
List<String> idls=new ArrayList<>();
|
|
List<String> idls=new ArrayList<>();
|
|
for(String str:pointids)
|
|
for(String str:pointids)
|
|
{
|
|
{
|
|
@@ -966,6 +1047,14 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
@Override
|
|
@Override
|
|
public List<PointData> getHistoryDatasSnap(String pointid, Long beginDate, Long endDate, Long count, Long pried) throws Exception {
|
|
public List<PointData> getHistoryDatasSnap(String pointid, Long beginDate, Long endDate, Long count, Long pried) throws Exception {
|
|
|
|
|
|
|
|
+
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(pointid))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
if(StringUtils.notEmp(pointid) && !V2Config.getInitialcode().equals(pointid))
|
|
if(StringUtils.notEmp(pointid) && !V2Config.getInitialcode().equals(pointid))
|
|
{
|
|
{
|
|
Optional<String> tagName = Optional.ofNullable(pointid);
|
|
Optional<String> tagName = Optional.ofNullable(pointid);
|
|
@@ -1085,7 +1174,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
@Override
|
|
@Override
|
|
public List<PointData> getHistoryDatasRaw(String pointid, Long beginDate, Long endDate) throws Exception {
|
|
public List<PointData> getHistoryDatasRaw(String pointid, Long beginDate, Long endDate) throws Exception {
|
|
|
|
|
|
-
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(pointid))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
if(StringUtils.notEmp(pointid) && !V2Config.getInitialcode().equals(pointid))
|
|
if(StringUtils.notEmp(pointid) && !V2Config.getInitialcode().equals(pointid))
|
|
{
|
|
{
|
|
Optional<String> tagName = Optional.ofNullable(pointid);
|
|
Optional<String> tagName = Optional.ofNullable(pointid);
|
|
@@ -1134,6 +1229,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
@Override
|
|
@Override
|
|
public List<PointData> getHistStat(Windturbinetestingpointnew point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception {
|
|
public List<PointData> getHistStat(Windturbinetestingpointnew point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception {
|
|
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(point.getCode()))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
{
|
|
{
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
@@ -1209,7 +1311,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<PointData> getHistStat(Windpowerstationpointnew point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception {
|
|
public List<PointData> getHistStat(Windpowerstationpointnew point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception {
|
|
-
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(point.getCode()))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
if(StringUtils.notEmp(point) && StringUtils.notEmp(point.getCode()) && !V2Config.getInitialcode().equals(point.getCode()))
|
|
{
|
|
{
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
Optional<String> tagName = Optional.ofNullable(point.getCode());
|
|
@@ -1279,7 +1387,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
@Override
|
|
@Override
|
|
public List<PointData> getHistStat(String pointid, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception {
|
|
public List<PointData> getHistStat(String pointid, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception {
|
|
|
|
|
|
-
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(pointid))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
if(StringUtils.notEmp(pointid) && !V2Config.getInitialcode().equals(pointid))
|
|
if(StringUtils.notEmp(pointid) && !V2Config.getInitialcode().equals(pointid))
|
|
{
|
|
{
|
|
Optional<String> tagName = Optional.ofNullable(pointid);
|
|
Optional<String> tagName = Optional.ofNullable(pointid);
|
|
@@ -1338,7 +1452,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
@Override
|
|
@Override
|
|
public DNAStatVal[] getHistStat(String point, Long beginDate, Long endDate, Integer pried) throws Exception {
|
|
public DNAStatVal[] getHistStat(String point, Long beginDate, Long endDate, Integer pried) throws Exception {
|
|
|
|
|
|
-
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(point))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
if(StringUtils.notEmp(point) && !V2Config.getInitialcode().equals(point))
|
|
if(StringUtils.notEmp(point) && !V2Config.getInitialcode().equals(point))
|
|
{
|
|
{
|
|
Optional<String> tagName = Optional.ofNullable(point);
|
|
Optional<String> tagName = Optional.ofNullable(point);
|
|
@@ -1435,6 +1555,14 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void updatePoint(PointData point) throws Exception {
|
|
public void updatePoint(PointData point) throws Exception {
|
|
|
|
+
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(point.getEdnaId()))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
String url = baseURL + "/history";
|
|
String url = baseURL + "/history";
|
|
try {
|
|
try {
|
|
String result = restTemplate.postForObject(url, convertPointData(point), String.class);
|
|
String result = restTemplate.postForObject(url, convertPointData(point), String.class);
|
|
@@ -1453,7 +1581,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
if (StringUtils.notEmp(tagNames) && tagNames.length > 0) {
|
|
if (StringUtils.notEmp(tagNames) && tagNames.length > 0) {
|
|
|
|
|
|
-
|
|
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(tagNames[0]))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
DNAVal[] result = new DNAVal[tagNames.length];
|
|
DNAVal[] result = new DNAVal[tagNames.length];
|
|
for (int i = 0; i < tagNames.length; i++) {
|
|
for (int i = 0; i < tagNames.length; i++) {
|
|
if (StringUtils.notEmp(tagNames[i]) && !V2Config.getInitialcode().equals(tagNames[i])) {
|
|
if (StringUtils.notEmp(tagNames[i]) && !V2Config.getInitialcode().equals(tagNames[i])) {
|
|
@@ -1493,21 +1627,34 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void updatePoint(List<PointData> pointls) throws Exception {
|
|
public void updatePoint(List<PointData> pointls) throws Exception {
|
|
- 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;
|
|
|
|
|
|
+ if(null!=pointls && !pointls.isEmpty())
|
|
|
|
+ {
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(pointls.get(0).getEdnaId()))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ 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;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
// @Override
|
|
// @Override
|
|
@@ -1581,6 +1728,13 @@ public class EdosUtil implements IRealTimeDataBaseUtil {
|
|
|
|
|
|
if(StringUtils.notEmp(nameList) )
|
|
if(StringUtils.notEmp(nameList) )
|
|
{
|
|
{
|
|
|
|
+ if(!InitialRunner.hpmap.containsKey(nameList[0]))
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getBaseurl();
|
|
|
|
+ }else
|
|
|
|
+ {
|
|
|
|
+ baseURL = V2Config.getHealthurl();
|
|
|
|
+ }
|
|
List<String> idls=new ArrayList<>();
|
|
List<String> idls=new ArrayList<>();
|
|
for(String str:nameList)
|
|
for(String str:nameList)
|
|
{
|
|
{
|