Commit 0d2c79c9 authored by caotao's avatar caotao

测试环境数据采集异常问题处理。

parent b51782cb
...@@ -4,12 +4,14 @@ import cn.hutool.core.date.DatePattern; ...@@ -4,12 +4,14 @@ import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import cn.hutool.log.Log;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.api.householdapi.constant.GoLangConstant; import com.yeejoin.amos.api.householdapi.constant.GoLangConstant;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.houseapi.HousepvapiRecords; import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.houseapi.HousepvapiRecords;
import com.yeejoin.amos.api.householdapi.face.orm.mapper.houseapi.HousepvapiRecordsMapper; import com.yeejoin.amos.api.householdapi.face.orm.mapper.houseapi.HousepvapiRecordsMapper;
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum; import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -17,7 +19,7 @@ import org.springframework.util.ObjectUtils; ...@@ -17,7 +19,7 @@ import org.springframework.util.ObjectUtils;
import java.util.*; import java.util.*;
@Component @Component
@Slf4j
public class GolangRequestUtil { public class GolangRequestUtil {
@Autowired @Autowired
...@@ -124,6 +126,7 @@ public class GolangRequestUtil { ...@@ -124,6 +126,7 @@ public class GolangRequestUtil {
} }
housepvapiRecords.setResponse(respone); housepvapiRecords.setResponse(respone);
housepvapiRecordsMapper.insert(housepvapiRecords); housepvapiRecordsMapper.insert(housepvapiRecords);
log.info("锦浪云数据请求详情:"+JSONObject.toJSONString(housepvapiRecords));
return respone; return respone;
} }
......
...@@ -12,6 +12,7 @@ import com.yeejoin.amos.api.householdapi.constant.ImasterConstant; ...@@ -12,6 +12,7 @@ import com.yeejoin.amos.api.householdapi.constant.ImasterConstant;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.houseapi.HousepvapiRecords; import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.houseapi.HousepvapiRecords;
import com.yeejoin.amos.api.householdapi.face.orm.mapper.houseapi.HousepvapiRecordsMapper; import com.yeejoin.amos.api.householdapi.face.orm.mapper.houseapi.HousepvapiRecordsMapper;
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum; import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -20,6 +21,7 @@ import org.springframework.util.ObjectUtils; ...@@ -20,6 +21,7 @@ import org.springframework.util.ObjectUtils;
import java.util.*; import java.util.*;
@Component @Component
@Slf4j
public class ImasterUtils { public class ImasterUtils {
private String redisKey = "XSRF-TOKEN"; private String redisKey = "XSRF-TOKEN";
...@@ -252,6 +254,7 @@ public class ImasterUtils { ...@@ -252,6 +254,7 @@ public class ImasterUtils {
} }
housepvapiRecords.setResponse(respone); housepvapiRecords.setResponse(respone);
housepvapiRecordsMapper.insert(housepvapiRecords); housepvapiRecordsMapper.insert(housepvapiRecords);
log.info("华为数据请求详情:"+JSONObject.toJSONString(housepvapiRecords));
return respone; return respone;
} }
......
...@@ -134,6 +134,7 @@ public class KsolarRequestUtil { ...@@ -134,6 +134,7 @@ public class KsolarRequestUtil {
} }
housepvapiRecords.setResponse(respone); housepvapiRecords.setResponse(respone);
housepvapiRecordsMapper.insert(housepvapiRecords); housepvapiRecordsMapper.insert(housepvapiRecords);
log.info("科士达数据请求详情:"+JSONObject.toJSONString(housepvapiRecords));
return respone; return respone;
} }
......
...@@ -103,6 +103,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -103,6 +103,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
private TdHYGFInverterTotalGenerateMapper tdHYGFInverterTotalGenerateMapper; private TdHYGFInverterTotalGenerateMapper tdHYGFInverterTotalGenerateMapper;
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async
@Override @Override
public void stationList() { public void stationList() {
...@@ -124,6 +125,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -124,6 +125,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} }
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async
@Override @Override
public void stationDetail() { public void stationDetail() {
List<String> stationIds = golangStationMapper.getStationIds(); List<String> stationIds = golangStationMapper.getStationIds();
...@@ -295,6 +297,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -295,6 +297,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async
@Override @Override
public void collectorList() { public void collectorList() {
// List<String> stationIds = golangStationMapper.getStationIds(); // List<String> stationIds = golangStationMapper.getStationIds();
...@@ -324,6 +327,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -324,6 +327,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} }
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async
@Override @Override
public void collectorDetail() { public void collectorDetail() {
List<Long> collectorIds = golangCollectorListMapper.getCollectIds(); List<Long> collectorIds = golangCollectorListMapper.getCollectIds();
...@@ -399,6 +403,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -399,6 +403,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} }
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async
@Override @Override
public void inverterList() { public void inverterList() {
// List<String> stationIds = golangStationMapper.getStationIds(); // List<String> stationIds = golangStationMapper.getStationIds();
...@@ -428,6 +433,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -428,6 +433,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} }
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async
@Override @Override
public void inverterDetail() { public void inverterDetail() {
List<String> inverterSns = golangInverterListMapper.getInverterSns(); List<String> inverterSns = golangInverterListMapper.getInverterSns();
...@@ -689,6 +695,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -689,6 +695,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} }
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async
@Override @Override
public void inverAlramInfo() { public void inverAlramInfo() {
List<String> inverterIds = golangInverterListMapper.getInverterSns(); List<String> inverterIds = golangInverterListMapper.getInverterSns();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment