Commit 60f881c8 authored by chenzhao's avatar chenzhao

Merge remote-tracking branch 'origin/developer' into developer

parents 9aacd689 d9661f86
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<artifactId>tyboot-component-emq</artifactId> <artifactId>tyboot-component-emq</artifactId>
<version>${tyboot-version}</version> <version>${tyboot-version}</version>
</dependency> </dependency>
<!--
<dependency> <dependency>
<groupId>org.typroject</groupId> <groupId>org.typroject</groupId>
<artifactId>tyboot-component-event</artifactId> <artifactId>tyboot-component-event</artifactId>
...@@ -69,6 +70,7 @@ ...@@ -69,6 +70,7 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
-->
<dependency> <dependency>
<groupId>org.typroject</groupId> <groupId>org.typroject</groupId>
<artifactId>tyboot-component-opendata</artifactId> <artifactId>tyboot-component-opendata</artifactId>
......
...@@ -5,23 +5,21 @@ import java.net.InetAddress; ...@@ -5,23 +5,21 @@ import java.net.InetAddress;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler; import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
/** /**
* *
* <pre> * <pre>
...@@ -41,10 +39,13 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler; ...@@ -41,10 +39,13 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
@EnableScheduling @EnableScheduling
@MapperScan(value = { "org.typroject.tyboot.*.*.face.orm.dao", "com.yeejoin.amos.api.*.face.orm.dao", @MapperScan(value = { "org.typroject.tyboot.*.*.face.orm.dao", "com.yeejoin.amos.api.*.face.orm.dao",
"org.typroject.tyboot.face.*.orm.dao*", "com.yeejoin.amos.boot.biz.common.dao.mapper" }) "org.typroject.tyboot.face.*.orm.dao*", "com.yeejoin.amos.boot.biz.common.dao.mapper" })
@ComponentScan({ "org.typroject", "com.yeejoin.amos" }) @ComponentScan(value = { "org.typroject",
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class}) "com.yeejoin.amos" }, excludeFilters = @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.typroject.tyboot.component.event"))
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class,
DataSourceTransactionManagerAutoConfiguration.class })
public class HousevPVapiApplication { public class HousevPVapiApplication {
private static final Logger logger = LogManager.getLogger(HousevPVapiApplication.class); private static final Logger logger = LogManager.getLogger(HousevPVapiApplication.class);
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
// 服务启动 // 服务启动
ConfigurableApplicationContext context = SpringApplication.run(HousevPVapiApplication.class, args); ConfigurableApplicationContext context = SpringApplication.run(HousevPVapiApplication.class, args);
......
...@@ -126,7 +126,7 @@ public class GolangRequestUtil { ...@@ -126,7 +126,7 @@ public class GolangRequestUtil {
} }
housepvapiRecords.setResponse(respone); housepvapiRecords.setResponse(respone);
// housepvapiRecordsMapper.insert(housepvapiRecords); // housepvapiRecordsMapper.insert(housepvapiRecords);
log.info("锦浪云数据请求详情:"+JSONObject.toJSONString(housepvapiRecords)); //log.info("锦浪云数据请求详情:"+JSONObject.toJSONString(housepvapiRecords));
return respone; return respone;
} }
......
...@@ -11,13 +11,16 @@ import com.yeejoin.amos.api.householdapi.constant.ImasterConstant; ...@@ -11,13 +11,16 @@ 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.api.householdapi.face.service.impl.GoodWeDataAcquisitionServiceImpl;
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum; import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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;
import java.util.*; import java.util.*;
@Component @Component
...@@ -30,16 +33,20 @@ public class ImasterUtils { ...@@ -30,16 +33,20 @@ public class ImasterUtils {
HousepvapiRecordsMapper housepvapiRecordsMapper; HousepvapiRecordsMapper housepvapiRecordsMapper;
@Autowired @Autowired
RedisUtils redisUtils; RedisUtils redisUtils;
final static Logger logger = LoggerFactory.getLogger(ImasterUtils.class);
/** /**
* @return HashMap<String, Object> 发送请求前的准备 准备header信息 * @return HashMap<String, Object> 发送请求前的准备 准备header信息
* @deprecated 根据厂商编码获取厂商的hearer * @deprecated 根据厂商编码获取厂商的hearer
*/ */
public static HashMap<String, String> getHeader() { public static HashMap<String, String> getHeader() {
HashMap<String, String> hashMap = new HashMap<>(); HashMap<String, String> hashMap = new HashMap<>();
String requestParam=""; String requestParam = "";
HashMap<String, String> hashMaphead = new HashMap<>(); HashMap<String, String> hashMaphead = new HashMap<>();
try { try {
requestParam = "{ \"userName\": \""+ImasterConstant.account+"\", \"systemCode\": \""+ImasterConstant.password+"\"}"; requestParam = "{ \"userName\": \"" + ImasterConstant.account + "\", \"systemCode\": \""
+ ImasterConstant.password + "\"}";
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
...@@ -61,26 +68,27 @@ public class ImasterUtils { ...@@ -61,26 +68,27 @@ public class ImasterUtils {
* @return List<T> list<Result> * @return List<T> list<Result>
* @desc 根据请求参数发送http请求并且对于返回的数据进行处理 * @desc 根据请求参数发送http请求并且对于返回的数据进行处理
*/ */
public <T> List<T> getResPonse(String apiurl, String requestMethod, String requestParmInfo, String ResultResolveRule, Class<T> tClass) { public <T> List<T> getResPonse(String apiurl, String requestMethod, String requestParmInfo,
String ResultResolveRule, Class<T> tClass) {
String respone = ""; String respone = "";
String params = ""; String params = "";
JSONArray jsonArray = null; JSONArray jsonArray = null;
List<T> result = new ArrayList<>(); List<T> result = new ArrayList<>();
try { try {
Object o = redisUtils.get(redisKey); Object o = redisUtils.get(redisKey);
if(o != null) { if (o != null) {
HashMap<String, String> headMap = new HashMap<>(); HashMap<String, String> headMap = new HashMap<>();
headMap.put("XSRF-TOKEN", o.toString()); headMap.put("XSRF-TOKEN", o.toString());
String url = ImasterConstant.baseurl + apiurl; String url = ImasterConstant.baseurl + apiurl;
respone = sendRequest(requestMethod, url, requestParmInfo, headMap); respone = sendRequest(requestMethod, url, requestParmInfo, headMap);
JSONObject jsonObject = JSONObject.parseObject(respone); JSONObject jsonObject = JSONObject.parseObject(respone);
if(jsonObject.get("failCode").toString().equals("305")) { if (jsonObject.get("failCode").toString().equals("305")) {
headMap = getHeader(); headMap = getHeader();
respone = sendRequest(requestMethod, url, requestParmInfo, headMap); respone = sendRequest(requestMethod, url, requestParmInfo, headMap);
jsonArray = handlerResponseByResultResolverule(ResultResolveRule, respone); jsonArray = handlerResponseByResultResolverule(ResultResolveRule, respone);
if (!ObjectUtils.isEmpty(jsonArray)) { if (!ObjectUtils.isEmpty(jsonArray)) {
result = JSONArray.parseArray(jsonArray.toJSONString(), tClass); result = JSONArray.parseArray(jsonArray.toJSONString(), tClass);
redisUtils.set(redisKey,headMap.get("XSRF-TOKEN")); redisUtils.set(redisKey, headMap.get("XSRF-TOKEN"));
} }
} else { } else {
jsonArray = handlerResponseByResultResolverule(ResultResolveRule, respone); jsonArray = handlerResponseByResultResolverule(ResultResolveRule, respone);
...@@ -95,7 +103,7 @@ public class ImasterUtils { ...@@ -95,7 +103,7 @@ public class ImasterUtils {
jsonArray = handlerResponseByResultResolverule(ResultResolveRule, respone); jsonArray = handlerResponseByResultResolverule(ResultResolveRule, respone);
if (!ObjectUtils.isEmpty(jsonArray)) { if (!ObjectUtils.isEmpty(jsonArray)) {
result = JSONArray.parseArray(jsonArray.toJSONString(), tClass); result = JSONArray.parseArray(jsonArray.toJSONString(), tClass);
redisUtils.set(redisKey,headMap.get("XSRF-TOKEN")); redisUtils.set(redisKey, headMap.get("XSRF-TOKEN"));
} }
} }
} catch (Exception exception) { } catch (Exception exception) {
...@@ -114,31 +122,37 @@ public class ImasterUtils { ...@@ -114,31 +122,37 @@ public class ImasterUtils {
* @return List<T> list<Result> * @return List<T> list<Result>
* @desc 根据请求参数发送http请求并且对于返回的数据进行处理 * @desc 根据请求参数发送http请求并且对于返回的数据进行处理
*/ */
public <T> List<T> getResPonseOther(String apiurl, String requestMethod, String requestParmInfo, String ResultResolveRule, Class<T> tClass) { public <T> List<T> getResPonseOther(String apiurl, String requestMethod, String requestParmInfo,
String ResultResolveRule, Class<T> tClass) {
String respone = ""; String respone = "";
String params = ""; String params = "";
JSONArray jsonArray = null; JSONArray jsonArray = null;
List<T> result = new ArrayList<>(); List<T> result = new ArrayList<>();
try { try {
Object o = redisUtils.get(redisKey); Object o = redisUtils.get(redisKey);
if(o != null) { if (o != null) {
HashMap<String, String> headMap = new HashMap<>(); HashMap<String, String> headMap = new HashMap<>();
headMap.put("XSRF-TOKEN", o.toString()); headMap.put("XSRF-TOKEN", o.toString());
String url = ImasterConstant.baseurl + apiurl; String url = ImasterConstant.baseurl + apiurl;
respone = sendRequest(requestMethod, url, requestParmInfo, headMap); respone = sendRequest(requestMethod, url, requestParmInfo, headMap);
JSONObject jsonObject = JSONObject.parseObject(respone); JSONObject jsonObject = JSONObject.parseObject(respone);
if(jsonObject.get("failCode").toString().equals("305")) { if (jsonObject.get("failCode").toString().equals("305")) {
headMap = getHeader(); headMap = getHeader();
respone = sendRequest(requestMethod, url, requestParmInfo, headMap); respone = sendRequest(requestMethod, url, requestParmInfo, headMap);
jsonArray = handlerResponseByResultResolveruleOther(ResultResolveRule, respone); jsonArray = handlerResponseByResultResolveruleOther(ResultResolveRule, respone);
if (!ObjectUtils.isEmpty(jsonArray)) { if (!ObjectUtils.isEmpty(jsonArray)) {
result = JSONArray.parseArray(jsonArray.toJSONString(), tClass); result = JSONArray.parseArray(jsonArray.toJSONString(), tClass);
redisUtils.set(redisKey,headMap.get("XSRF-TOKEN")); redisUtils.set(redisKey, headMap.get("XSRF-TOKEN"));
} }
} else { } else {
jsonArray = handlerResponseByResultResolveruleOther(ResultResolveRule, respone); jsonArray = handlerResponseByResultResolveruleOther(ResultResolveRule, respone);
if (!ObjectUtils.isEmpty(jsonArray)) { if (!ObjectUtils.isEmpty(jsonArray)) {
try {
result = JSONArray.parseArray(jsonArray.toJSONString(), tClass); result = JSONArray.parseArray(jsonArray.toJSONString(), tClass);
} catch (Exception e) {
e.printStackTrace();
logger.error("华为数据解析错误(getResPonseOther):" + jsonArray.toJSONString());
}
} }
} }
} else { } else {
...@@ -148,7 +162,7 @@ public class ImasterUtils { ...@@ -148,7 +162,7 @@ public class ImasterUtils {
jsonArray = handlerResponseByResultResolveruleOther(ResultResolveRule, respone); jsonArray = handlerResponseByResultResolveruleOther(ResultResolveRule, respone);
if (!ObjectUtils.isEmpty(jsonArray)) { if (!ObjectUtils.isEmpty(jsonArray)) {
result = JSONArray.parseArray(jsonArray.toJSONString(), tClass); result = JSONArray.parseArray(jsonArray.toJSONString(), tClass);
redisUtils.set(redisKey,headMap.get("XSRF-TOKEN")); redisUtils.set(redisKey, headMap.get("XSRF-TOKEN"));
} }
} }
} catch (Exception exception) { } catch (Exception exception) {
...@@ -182,7 +196,7 @@ public class ImasterUtils { ...@@ -182,7 +196,7 @@ public class ImasterUtils {
} }
} }
if (jsonArray.size() == 0) { if (jsonArray.size() == 0) {
jsonArray.addAll((JSONArray)jsonObject.get("list")); jsonArray.addAll((JSONArray) jsonObject.get("list"));
} }
} }
return jsonArray; return jsonArray;
...@@ -202,28 +216,37 @@ public class ImasterUtils { ...@@ -202,28 +216,37 @@ public class ImasterUtils {
String[] rules = resultResovle.split(","); String[] rules = resultResovle.split(",");
if (rules.length > 0) { if (rules.length > 0) {
for (int i = 0; i < rules.length; i++) { for (int i = 0; i < rules.length; i++) {
if ("ACCESS_FREQUENCY_IS_TOO_HIGH".equals(jsonObject.get(rules[i]))) {
logger.error("华为数据解析错误(handlerResponseByResultResolveruleOther):请求系统次数太频繁,无法获取接口数据");
continue;
}
try { try {
jsonObject = (JSONObject) jsonObject.get(rules[i]); jsonObject = (JSONObject) jsonObject.get(rules[i]);
if (jsonObject == null) { if (jsonObject == null) {
jsonArray = (JSONArray) jsonObject.get(rules[i]); jsonArray = (JSONArray) jsonObject.get(rules[i]);
} }
} catch (Exception exception) { } catch (Exception exception) {
try {
jsonArray = (JSONArray) jsonObject.get(rules[i]); jsonArray = (JSONArray) jsonObject.get(rules[i]);
} catch (Exception e) {
e.printStackTrace();
logger.error("华为数据解析错误:" + jsonObject.get(rules[i]));
}
} }
} }
} }
if (jsonArray.size() != 0) { if (jsonArray.size() != 0) {
for( int i=0; i<jsonArray.size();i++ ) { for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject1 = (JSONObject) jsonArray.get(i); JSONObject jsonObject1 = (JSONObject) jsonArray.get(i);
if(jsonObject1.get("dataItemMap") != null) { if (jsonObject1.get("dataItemMap") != null) {
JSONObject jsonObject2 = (JSONObject)jsonObject1.get("dataItemMap"); JSONObject jsonObject2 = (JSONObject) jsonObject1.get("dataItemMap");
if(jsonObject1.get("sn") != null) { if (jsonObject1.get("sn") != null) {
jsonObject2.put("inverterId", jsonObject1.get("sn").toString()); jsonObject2.put("inverterId", jsonObject1.get("sn").toString());
} }
if(jsonObject1.get("stationCode") != null) { if (jsonObject1.get("stationCode") != null) {
jsonObject2.put("stationCode", jsonObject1.get("stationCode").toString()); jsonObject2.put("stationCode", jsonObject1.get("stationCode").toString());
} }
if(jsonObject1.get("collectTime") != null) { if (jsonObject1.get("collectTime") != null) {
jsonObject2.put("collectTime", jsonObject1.get("collectTime").toString()); jsonObject2.put("collectTime", jsonObject1.get("collectTime").toString());
} }
...@@ -245,16 +268,14 @@ public class ImasterUtils { ...@@ -245,16 +268,14 @@ public class ImasterUtils {
housepvapiRecords.setThridCode(PVProducerInfoEnum.HUAWEI.getCode()); housepvapiRecords.setThridCode(PVProducerInfoEnum.HUAWEI.getCode());
String respone = ""; String respone = "";
if (requestMethod.equals("POST")) { if (requestMethod.equals("POST")) {
respone = HttpUtil.createPost(url).headerMap(headMap, false). respone = HttpUtil.createPost(url).headerMap(headMap, false).body(params).execute().body();
body(params).execute().body();
} }
if (requestMethod.equals("GET")) { if (requestMethod.equals("GET")) {
respone = HttpUtil.createGet(url).headerMap(headMap, true). respone = HttpUtil.createGet(url).headerMap(headMap, true).body(params).execute().body();
body(params).execute().body();
} }
housepvapiRecords.setResponse(respone); housepvapiRecords.setResponse(respone);
// housepvapiRecordsMapper.insert(housepvapiRecords); // housepvapiRecordsMapper.insert(housepvapiRecords);
log.info("华为数据请求详情:"+JSONObject.toJSONString(housepvapiRecords)); // log.info("华为数据请求详情:"+JSONObject.toJSONString(housepvapiRecords));
return respone; return respone;
} }
...@@ -266,10 +287,12 @@ public class ImasterUtils { ...@@ -266,10 +287,12 @@ public class ImasterUtils {
* @param appsecret appsecret * @param appsecret appsecret
* @desc 锦浪云请求参数及head头处理 * @desc 锦浪云请求参数及head头处理
*/ */
public void JLYHeaderMapHandler(String params, HashMap<String, String> headMap, String orginalAuthorization, String appsecret, String apiurl) { public void JLYHeaderMapHandler(String params, HashMap<String, String> headMap, String orginalAuthorization,
String appsecret, String apiurl) {
String contentMD5 = GoLangHeaderUtils.getDigest(params); String contentMD5 = GoLangHeaderUtils.getDigest(params);
headMap.put("Date", GoLangHeaderUtils.getGMTTime()); headMap.put("Date", GoLangHeaderUtils.getGMTTime());
String param = "POST" + "\n" + contentMD5 + "\n" + "application/json" + "\n" + headMap.get("Date") + "\n" + apiurl; String param = "POST" + "\n" + contentMD5 + "\n" + "application/json" + "\n" + headMap.get("Date") + "\n"
+ apiurl;
String sign = ""; String sign = "";
try { try {
sign = GoLangHeaderUtils.HmacSHA1Encrypt(param, appsecret); sign = GoLangHeaderUtils.HmacSHA1Encrypt(param, appsecret);
......
...@@ -70,7 +70,7 @@ public class KsolarRequestUtil { ...@@ -70,7 +70,7 @@ public class KsolarRequestUtil {
String url = KSolarConstant.baseurl + apiurl; String url = KSolarConstant.baseurl + apiurl;
respone = sendRequest(requestMethod, url, requestParmInfo, headMap); respone = sendRequest(requestMethod, url, requestParmInfo, headMap);
jsonArray = handlerResponseByResultResolverule(ResultResolveRule, respone); jsonArray = handlerResponseByResultResolverule(ResultResolveRule, respone);
log.info("原始数据:{}", jsonArray); //log.info("原始数据:{}", jsonArray);
if (!ObjectUtils.isEmpty(jsonArray)) { if (!ObjectUtils.isEmpty(jsonArray)) {
result = JSONArray.parseArray(jsonArray.toJSONString(), tClass); result = JSONArray.parseArray(jsonArray.toJSONString(), tClass);
} }
...@@ -134,7 +134,7 @@ public class KsolarRequestUtil { ...@@ -134,7 +134,7 @@ public class KsolarRequestUtil {
} }
housepvapiRecords.setResponse(respone); housepvapiRecords.setResponse(respone);
// housepvapiRecordsMapper.insert(housepvapiRecords); // housepvapiRecordsMapper.insert(housepvapiRecords);
log.info("科士达数据请求详情:"+JSONObject.toJSONString(housepvapiRecords)); //log.info("科士达数据请求详情:"+JSONObject.toJSONString(housepvapiRecords));
return respone; return respone;
} }
......
...@@ -116,7 +116,14 @@ public class SunlightUtil { ...@@ -116,7 +116,14 @@ public class SunlightUtil {
{ {
put("1", "在线"); put("1", "在线");
put("0", "离线"); put("0", "离线");
put("2","报警" ); }
};
public static final HashMap<String, String> gzzt= new HashMap<String, String>() {
{
put("1", "故障");
put("2", "报警");
put("4", "正常" );
} }
}; };
......
...@@ -19,7 +19,7 @@ public class ImasterInverterListDetails { ...@@ -19,7 +19,7 @@ public class ImasterInverterListDetails {
Double mppt_total_cap ; Double mppt_total_cap ;
Double pv24_i ; Double pv24_i ;
Double pv8_u ; Double pv8_u ;
Double open_time ; String open_time ;
Double pv22_u ; Double pv22_u ;
Double a_i ; Double a_i ;
Double pv24_u ; Double pv24_u ;
...@@ -43,7 +43,7 @@ public class ImasterInverterListDetails { ...@@ -43,7 +43,7 @@ public class ImasterInverterListDetails {
Double mppt_power ; Double mppt_power ;
Double pv13_u ; Double pv13_u ;
int run_state ; int run_state ;
Double close_time ; String close_time ;
Double pv19_i ; Double pv19_i ;
Double mppt_7_cap ; Double mppt_7_cap ;
Double mppt_5_cap ; Double mppt_5_cap ;
......
...@@ -23,6 +23,9 @@ import com.yeejoin.amos.api.householdapi.face.service.GoLangDataAcquisitionServi ...@@ -23,6 +23,9 @@ import com.yeejoin.amos.api.householdapi.face.service.GoLangDataAcquisitionServi
import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpStationMapper; import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpStationMapper;
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum; import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import fastjson.JSON; import fastjson.JSON;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
...@@ -31,58 +34,58 @@ import org.springframework.stereotype.Service; ...@@ -31,58 +34,58 @@ import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@Async @Async
@Service @Service
public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionService { public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionService {
//定时任务执行频率 当前为10分钟一次 // 定时任务执行频率 当前为10分钟一次
//锦浪云请求工具封装 // 锦浪云请求工具封装
@Autowired @Autowired
private GolangRequestUtil golangRequestUtil; private GolangRequestUtil golangRequestUtil;
//锦浪云场站mapper // 锦浪云场站mapper
@Autowired @Autowired
private GolangStationMapper golangStationMapper; private GolangStationMapper golangStationMapper;
//监盘场站mapper // 监盘场站mapper
@Autowired @Autowired
private JpStationMapper jpStationMapper; private JpStationMapper jpStationMapper;
//监盘采集器mapper // 监盘采集器mapper
@Autowired @Autowired
private JpCollectorMapper jpCollectorMapper; private JpCollectorMapper jpCollectorMapper;
//监盘逆变器mapper // 监盘逆变器mapper
@Autowired @Autowired
private JpInverterMapper jpInverterMapper; private JpInverterMapper jpInverterMapper;
//监盘逆变器电量mapper // 监盘逆变器电量mapper
@Autowired @Autowired
private JpInverterElectricityMapper jpInverterElectricityMapper; private JpInverterElectricityMapper jpInverterElectricityMapper;
//锦浪云场站详情mapper // 锦浪云场站详情mapper
@Autowired @Autowired
private GolangStationDetailMapper golangStationDetailMapper; private GolangStationDetailMapper golangStationDetailMapper;
//锦浪云采集器列表mapper // 锦浪云采集器列表mapper
@Autowired @Autowired
private GolangCollectorListMapper golangCollectorListMapper; private GolangCollectorListMapper golangCollectorListMapper;
//锦浪云逆变器列表 // 锦浪云逆变器列表
@Autowired @Autowired
private GolangInverterListMapper golangInverterListMapper; private GolangInverterListMapper golangInverterListMapper;
//户用光伏场站历史mapper // 户用光伏场站历史mapper
@Autowired @Autowired
private HYGFJPStationPowerHistoryMapper hygfjpStationPowerHistoryMapper; private HYGFJPStationPowerHistoryMapper hygfjpStationPowerHistoryMapper;
//户用光伏逆变器历史mapper // 户用光伏逆变器历史mapper
@Autowired @Autowired
private HYGFJPInverterHistoryMapper hygfjpInverterHistoryMapper; private HYGFJPInverterHistoryMapper hygfjpInverterHistoryMapper;
//户用光伏采集器历史mapper // 户用光伏采集器历史mapper
@Autowired @Autowired
private HYGFJPCollectorHistoryMapper hygfjpCollectorHistoryMapper; private HYGFJPCollectorHistoryMapper hygfjpCollectorHistoryMapper;
//户用光伏逆变器告警 // 户用光伏逆变器告警
@Autowired @Autowired
private HYGFJPInverterWarnMapper hygfjpInverterWarnMapper; private HYGFJPInverterWarnMapper hygfjpInverterWarnMapper;
//户用光伏逆变器历史mapper // 户用光伏逆变器历史mapper
@Autowired @Autowired
private HYGFJPInverterElecHistoryMapper hygfjpInverterElecHistoryMapper; private HYGFJPInverterElecHistoryMapper hygfjpInverterElecHistoryMapper;
//户用光伏日发电量 // 户用光伏日发电量
@Autowired @Autowired
private HYGFJPDayPowerMapper hygfjpDayPowerMapper; private HYGFJPDayPowerMapper hygfjpDayPowerMapper;
...@@ -104,34 +107,37 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -104,34 +107,37 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
@Autowired @Autowired
TdJpStationMapper tdJpStationMapper; TdJpStationMapper tdJpStationMapper;
final static Logger logger = LoggerFactory.getLogger(GoLangDataAcquisitionServiceImpl.class);
final static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async @Async
@Override @Override
public void stationList() { public void stationList() {
long ts = System.currentTimeMillis();
logger.info("-------锦浪同步电站开始+" + ts + "------- " + sdf.format(new Date()));
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("pageNo", 1); requestInfo.put("pageNo", 1);
requestInfo.put("pageSize", 100); requestInfo.put("pageSize", 100);
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
List<GolangStationList> result = golangRequestUtil.getResPonse(GoLangConstant.stationListUrl, List<GolangStationList> result = golangRequestUtil.getResPonse(GoLangConstant.stationListUrl,
GoLangConstant.requestPost, GoLangConstant.requestPost, requestParaminfo, GoLangConstant.resovleRule_data_page_records,
requestParaminfo, GolangStationList.class);
GoLangConstant.resovleRule_data_page_records,
GolangStationList.class
);
for (int i = 0; i < result.size(); i++) { for (int i = 0; i < result.size(); i++) {
GolangStationList golangStationList = result.get(i); GolangStationList golangStationList = result.get(i);
golangStationList.setCreatedTime(System.currentTimeMillis()); golangStationList.setCreatedTime(System.currentTimeMillis());
golangStationMapper.insert(golangStationList); golangStationMapper.insert(golangStationList);
} }
logger.info("-------锦浪同步电站结束+" + ts + "------- " + sdf.format(new Date()));
} }
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async @Async
@Override @Override
public void stationDetail() { public void stationDetail() {
long ts = System.currentTimeMillis();
logger.info("-------锦浪同步电站详情开始+" + ts + "------- " + sdf.format(new Date()));
List<String> stationIds = golangStationMapper.getStationIds(); List<String> stationIds = golangStationMapper.getStationIds();
String today = DateUtil.today(); String today = DateUtil.today();
String hour = new Date().getHours() + ":00"; String hour = new Date().getHours() + ":00";
...@@ -140,21 +146,13 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -140,21 +146,13 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
TimeUnit.SECONDS.sleep(1); TimeUnit.SECONDS.sleep(1);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("id", Long.valueOf(stationIds.get(i))); requestInfo.put("id", Long.valueOf(stationIds.get(i)));
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
List<GolangStationDetail> result = golangRequestUtil.getResPonse(GoLangConstant.stationDetailUrl, List<GolangStationDetail> result = golangRequestUtil.getResPonse(GoLangConstant.stationDetailUrl,
GoLangConstant.requestPost, GoLangConstant.requestPost, requestParaminfo, GoLangConstant.resovleRule_data,
requestParaminfo, GolangStationDetail.class);
GoLangConstant.resovleRule_data,
GolangStationDetail.class
);
if (result.size() > 0) { if (result.size() > 0) {
} else { } else {
...@@ -163,10 +161,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -163,10 +161,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
for (int j = 0; j < result.size(); j++) { for (int j = 0; j < result.size(); j++) {
GolangStationDetail golangStationDetail = result.get(j); GolangStationDetail golangStationDetail = result.get(j);
golangStationDetail.setCreatedTime(System.currentTimeMillis()); golangStationDetail.setCreatedTime(System.currentTimeMillis());
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>(). JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>()
eq("third_code", PVProducerInfoEnum.JLY.getCode()). .eq("third_code", PVProducerInfoEnum.JLY.getCode()).eq("third_station_id", stationIds.get(i)));
eq("third_station_id", stationIds.get(i))); // 给户用光伏存储的数据赋值
//给户用光伏存储的数据赋值
if (ObjectUtils.isEmpty(jpStation)) { if (ObjectUtils.isEmpty(jpStation)) {
jpStation = new JpStation(); jpStation = new JpStation();
} }
...@@ -179,15 +176,18 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -179,15 +176,18 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
jpStation.setLatitude(golangStationDetail.getLatitude()); jpStation.setLatitude(golangStationDetail.getLatitude());
jpStation.setUserName(golangStationDetail.getUsername()); jpStation.setUserName(golangStationDetail.getUsername());
jpStation.setUserPhone(String.valueOf(golangStationDetail.getUsermobile())); jpStation.setUserPhone(String.valueOf(golangStationDetail.getUsermobile()));
jpStation.setStationContact(String.valueOf(golangStationDetail.getMobile()).toLowerCase().replace("null", "")); jpStation.setStationContact(
String.valueOf(golangStationDetail.getMobile()).toLowerCase().replace("null", ""));
if (!ObjectUtils.isEmpty(golangStationDetail.getModule())) { if (!ObjectUtils.isEmpty(golangStationDetail.getModule())) {
jpStation.setModuleCount(ObjectUtils.isEmpty(Math.toIntExact(golangStationDetail.getModule())) ? 0 : Math.toIntExact(golangStationDetail.getModule())); jpStation.setModuleCount(ObjectUtils.isEmpty(Math.toIntExact(golangStationDetail.getModule())) ? 0
}//并网类型 : Math.toIntExact(golangStationDetail.getModule()));
} // 并网类型
jpStation.setState(GoLangConstant.stationStaus.get(String.valueOf(golangStationDetail.getState()))); jpStation.setState(GoLangConstant.stationStaus.get(String.valueOf(golangStationDetail.getState())));
jpStation.setThirdStationId(String.valueOf(golangStationDetail.getId())); jpStation.setThirdStationId(String.valueOf(golangStationDetail.getId()));
jpStation.setThirdCode(PVProducerInfoEnum.JLY.getCode()); jpStation.setThirdCode(PVProducerInfoEnum.JLY.getCode());
jpStation.setRealTimePower(golangStationDetail.getPower()); jpStation.setRealTimePower(golangStationDetail.getPower());
jpStation.setOnGridType(GoLangConstant.intoNetWorkStatus.get(String.valueOf(golangStationDetail.getStationtypenew()))); jpStation.setOnGridType(
GoLangConstant.intoNetWorkStatus.get(String.valueOf(golangStationDetail.getStationtypenew())));
jpStation.setDayGenerate(golangStationDetail.getDayenergy()); jpStation.setDayGenerate(golangStationDetail.getDayenergy());
if (!golangStationDetail.getMonthenergystr().toLowerCase().equals("kwh")) { if (!golangStationDetail.getMonthenergystr().toLowerCase().equals("kwh")) {
jpStation.setMonthGenerate(golangStationDetail.getMonthenergy() * GoLangConstant.mwhTokwh); jpStation.setMonthGenerate(golangStationDetail.getMonthenergy() * GoLangConstant.mwhTokwh);
...@@ -202,10 +202,18 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -202,10 +202,18 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
jpStation.setCumulativeIncome(golangStationDetail.getAllincome()); jpStation.setCumulativeIncome(golangStationDetail.getAllincome());
jpStation.setArea(golangStationDetail.getRegionstr()); jpStation.setArea(golangStationDetail.getRegionstr());
jpStation.setEmail(golangStationDetail.getUseremail()); jpStation.setEmail(golangStationDetail.getUseremail());
jpStation.setOnGridTime(golangStationDetail.getFispowertime()!=null?new Date(golangStationDetail.getFispowertime()):null); jpStation.setOnGridTime(
jpStation.setAccessTime(golangStationDetail.getFisgeneratetime()!=null?new Date(golangStationDetail.getFisgeneratetime()):null); golangStationDetail.getFispowertime() != null ? new Date(golangStationDetail.getFispowertime())
jpStation.setCreateTime(golangStationDetail.getCreatedate()!=null?new Date(golangStationDetail.getCreatedate()):null); : null);
jpStation.setRatedPower(golangStationDetail.getInverterpower()!=null?Double.valueOf(golangStationDetail.getInverterpower()):null); jpStation.setAccessTime(golangStationDetail.getFisgeneratetime() != null
? new Date(golangStationDetail.getFisgeneratetime())
: null);
jpStation.setCreateTime(
golangStationDetail.getCreatedate() != null ? new Date(golangStationDetail.getCreatedate())
: null);
jpStation.setRatedPower(golangStationDetail.getInverterpower() != null
? Double.valueOf(golangStationDetail.getInverterpower())
: null);
jpStation.setType("家庭户用"); jpStation.setType("家庭户用");
jpStation.setRecDate(new Date()); jpStation.setRecDate(new Date());
if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) { if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) {
...@@ -235,7 +243,6 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -235,7 +243,6 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
// tdJpStationMapper.insert(tdJpStation); // tdJpStationMapper.insert(tdJpStation);
// } // }
HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory(); HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory();
hygfjpStationPowerHistory.setCreatedTime(System.currentTimeMillis()); hygfjpStationPowerHistory.setCreatedTime(System.currentTimeMillis());
hygfjpStationPowerHistory.setThirdStationId(jpStation.getThirdStationId()); hygfjpStationPowerHistory.setThirdStationId(jpStation.getThirdStationId());
...@@ -243,26 +250,16 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -243,26 +250,16 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode()); hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode());
hygfjpStationPowerHistory.setTime(System.currentTimeMillis()); hygfjpStationPowerHistory.setTime(System.currentTimeMillis());
// 新加
//新加
hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpStationPowerHistory.setStationName(jpStation.getName()); hygfjpStationPowerHistory.setStationName(jpStation.getName());
hygfjpStationPowerHistory.setStationState(jpStation.getState()); hygfjpStationPowerHistory.setStationState(jpStation.getState());
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory); hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(new QueryWrapper<HYGFJPDayPower>()
.eq("tation_id", stationIds.get(i)).eq("year_month_day", today).eq("hour", hour));
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(
new QueryWrapper<HYGFJPDayPower>().
eq("tation_id", stationIds.get(i)).
eq("year_month_day", today).
eq("hour", hour)
);
if (ObjectUtils.isEmpty(hygfjpDayPower)) { if (ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower(); hygfjpDayPower = new HYGFJPDayPower();
} }
...@@ -271,7 +268,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -271,7 +268,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpDayPower.setYearMonthDay(today); hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(golangStationDetail.getPower()); hygfjpDayPower.setPower(golangStationDetail.getPower());
//新加 // 新加
hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpDayPower.setStationName(jpStation.getName()); hygfjpDayPower.setStationName(jpStation.getName());
...@@ -284,9 +281,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -284,9 +281,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpDayPowerMapper.insert(hygfjpDayPower); hygfjpDayPowerMapper.insert(hygfjpDayPower);
} }
Date today1 = new Date(); Date today1 = new Date();
//户用场站日发电量 // 户用场站日发电量
TdHYGFStationDayGenerate tdHYGFStationDayGenerate = tdHYGFStationDayGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationDayGenerate>() TdHYGFStationDayGenerate tdHYGFStationDayGenerate = tdHYGFStationDayGenerateMapper.selectOne(
.eq("third_station_id", stationIds.get(i)) new QueryWrapper<TdHYGFStationDayGenerate>().eq("third_station_id", stationIds.get(i))
.eq("day_time", DateUtil.format(today1, "yyyy-MM-dd")) .eq("day_time", DateUtil.format(today1, "yyyy-MM-dd"))
.eq("year_month", DateUtil.format(today1, "yyyy-MM"))); .eq("year_month", DateUtil.format(today1, "yyyy-MM")));
if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate)) { if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate)) {
...@@ -299,23 +296,21 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -299,23 +296,21 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationDayGenerate.setFullhour(jpStation.getDayGenerate() / jpStation.getCapacity()); tdHYGFStationDayGenerate.setFullhour(jpStation.getDayGenerate() / jpStation.getCapacity());
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome()); tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
// 新加
//新加
tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationDayGenerate.setStationName(jpStation.getName()); tdHYGFStationDayGenerate.setStationName(jpStation.getName());
tdHYGFStationDayGenerate.setStationState(jpStation.getState()); tdHYGFStationDayGenerate.setStationState(jpStation.getState());
if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())) { if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())) {
tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate); tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
} else { } else {
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate); tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
} }
//户用场站月发电量 // 户用场站月发电量
TdHYGFStationMonthGenerate tdHYGFStationMonthGenerate = tdHYGFStationMonthGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationMonthGenerate>() TdHYGFStationMonthGenerate tdHYGFStationMonthGenerate = tdHYGFStationMonthGenerateMapper.selectOne(
.eq("third_station_id", stationIds.get(i)) new QueryWrapper<TdHYGFStationMonthGenerate>().eq("third_station_id", stationIds.get(i))
.eq("month_time", DateUtil.format(today1, "yyyy-MM")) .eq("month_time", DateUtil.format(today1, "yyyy-MM"))
.eq("year", DateUtil.format(today1, "yyyy"))); .eq("year", DateUtil.format(today1, "yyyy")));
if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate)) { if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate)) {
...@@ -327,7 +322,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -327,7 +322,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationMonthGenerate.setGenerate(jpStation.getMonthGenerate()); tdHYGFStationMonthGenerate.setGenerate(jpStation.getMonthGenerate());
tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity()); tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity());
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome()); tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
//新加 // 新加
tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationMonthGenerate.setStationName(jpStation.getName()); tdHYGFStationMonthGenerate.setStationName(jpStation.getName());
...@@ -339,9 +334,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -339,9 +334,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} else { } else {
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate); tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFStationYearGenerate tdHYGFStationYearGenerate = tdHYGFStationYearGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationYearGenerate>() TdHYGFStationYearGenerate tdHYGFStationYearGenerate = tdHYGFStationYearGenerateMapper.selectOne(
.eq("third_station_id", stationIds.get(i)) new QueryWrapper<TdHYGFStationYearGenerate>().eq("third_station_id", stationIds.get(i))
.eq("year_time", DateUtil.format(today1, "yyyy")) .eq("year_time", DateUtil.format(today1, "yyyy"))
.eq("year", DateUtil.format(today1, "yyyy"))); .eq("year", DateUtil.format(today1, "yyyy")));
if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate)) { if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate)) {
...@@ -354,7 +349,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -354,7 +349,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate() / jpStation.getCapacity()); tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate() / jpStation.getCapacity());
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome()); tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
//新加 // 新加
tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationYearGenerate.setStationName(jpStation.getName()); tdHYGFStationYearGenerate.setStationName(jpStation.getName());
...@@ -368,13 +363,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -368,13 +363,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} }
} }
} }
logger.info("-------锦浪同步电站详情结束+" + ts + "------- " + sdf.format(new Date()));
} }
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async @Async
@Override @Override
public void collectorList() { public void collectorList() {
long ts = System.currentTimeMillis();
logger.info("-------锦浪同步采集器开始+" + ts + "------- " + sdf.format(new Date()));
// List<String> stationIds = golangStationMapper.getStationIds(); // List<String> stationIds = golangStationMapper.getStationIds();
// for (int i = 0; i < stationIds.size(); i++) { // for (int i = 0; i < stationIds.size(); i++) {
try { try {
...@@ -388,23 +385,23 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -388,23 +385,23 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
requestInfo.put("pageSize", 100); requestInfo.put("pageSize", 100);
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
List<GolangCollectorList> result = golangRequestUtil.getResPonse(GoLangConstant.collectorListUrl, List<GolangCollectorList> result = golangRequestUtil.getResPonse(GoLangConstant.collectorListUrl,
GoLangConstant.requestPost, GoLangConstant.requestPost, requestParaminfo, GoLangConstant.resovleRule_data_page_records,
requestParaminfo, GolangCollectorList.class);
GoLangConstant.resovleRule_data_page_records,
GolangCollectorList.class
);
for (int j = 0; j < result.size(); j++) { for (int j = 0; j < result.size(); j++) {
GolangCollectorList golangCollectorList = result.get(j); GolangCollectorList golangCollectorList = result.get(j);
golangCollectorList.setCreatedTime(System.currentTimeMillis()); golangCollectorList.setCreatedTime(System.currentTimeMillis());
golangCollectorListMapper.insert(golangCollectorList); golangCollectorListMapper.insert(golangCollectorList);
} }
// } // }
logger.info("-------锦浪同步采集器结束+" + ts + "------- " + sdf.format(new Date()));
} }
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async @Async
@Override @Override
public void collectorDetail() { public void collectorDetail() {
long ts = System.currentTimeMillis();
logger.info("-------锦浪同步采集器详情开始+" + ts + "------- " + sdf.format(new Date()));
List<Long> collectorIds = golangCollectorListMapper.getCollectIds(); List<Long> collectorIds = golangCollectorListMapper.getCollectIds();
for (int i = 0; i < collectorIds.size(); i++) { for (int i = 0; i < collectorIds.size(); i++) {
try { try {
...@@ -416,47 +413,43 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -416,47 +413,43 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
requestInfo.put("id", Long.valueOf(collectorIds.get(i))); requestInfo.put("id", Long.valueOf(collectorIds.get(i)));
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
List<CollectorDetailDto> result = golangRequestUtil.getResPonse(GoLangConstant.collectorDetailUrl, List<CollectorDetailDto> result = golangRequestUtil.getResPonse(GoLangConstant.collectorDetailUrl,
GoLangConstant.requestPost, GoLangConstant.requestPost, requestParaminfo, GoLangConstant.resovleRule_data,
requestParaminfo, CollectorDetailDto.class);
GoLangConstant.resovleRule_data,
CollectorDetailDto.class
);
for (int j = 0; j < result.size(); j++) { for (int j = 0; j < result.size(); j++) {
CollectorDetailDto collectorDetailDto = result.get(j); CollectorDetailDto collectorDetailDto = result.get(j);
JpCollector jpCollector = jpCollectorMapper.selectOne(new QueryWrapper<JpCollector>(). JpCollector jpCollector = jpCollectorMapper.selectOne(new QueryWrapper<JpCollector>()
eq("third_station_id", collectorDetailDto.getStationId()). .eq("third_station_id", collectorDetailDto.getStationId())
eq("third_code", PVProducerInfoEnum.JLY.getCode()). .eq("third_code", PVProducerInfoEnum.JLY.getCode()).eq("sn_code", collectorDetailDto.getSn()));
eq("sn_code", collectorDetailDto.getSn()));
if (ObjectUtils.isEmpty(jpCollector)) { if (ObjectUtils.isEmpty(jpCollector)) {
jpCollector = new JpCollector(); jpCollector = new JpCollector();
} }
//sn编码 // sn编码
jpCollector.setSnCode(collectorDetailDto.getSn()); jpCollector.setSnCode(collectorDetailDto.getSn());
//类型 // 类型
jpCollector.setType(collectorDetailDto.getModel()); jpCollector.setType(collectorDetailDto.getModel());
//更新时间 // 更新时间
jpCollector.setUpdateTime(new Date()); jpCollector.setUpdateTime(new Date());
//出场日期 // 出场日期
jpCollector.setDischargeDate(new Date(collectorDetailDto.getFactoryTime())); jpCollector.setDischargeDate(new Date(collectorDetailDto.getFactoryTime()));
//生产日期 // 生产日期
jpCollector.setProductDate(new Date(collectorDetailDto.getFactoryTime())); jpCollector.setProductDate(new Date(collectorDetailDto.getFactoryTime()));
//数据上传间隔 // 数据上传间隔
jpCollector.setDataPeriod(collectorDetailDto.getDataUploadCycle()); jpCollector.setDataPeriod(collectorDetailDto.getDataUploadCycle());
//本次上电时间 // 本次上电时间
jpCollector.setThisWorkTime(new DateTime(collectorDetailDto.getCurrentWorkingTime())); jpCollector.setThisWorkTime(new DateTime(collectorDetailDto.getCurrentWorkingTime()));
//累计工作时间 // 累计工作时间
jpCollector.setTotalWorkTime(new DateTime(collectorDetailDto.getTotalWorkingTime())); jpCollector.setTotalWorkTime(new DateTime(collectorDetailDto.getTotalWorkingTime()));
//第三方电站id // 第三方电站id
jpCollector.setThirdStationId(collectorDetailDto.getStationId()); jpCollector.setThirdStationId(collectorDetailDto.getStationId());
//第三方厂商标识 // 第三方厂商标识
jpCollector.setThirdCode(PVProducerInfoEnum.JLY.getCode()); jpCollector.setThirdCode(PVProducerInfoEnum.JLY.getCode());
//第三方厂商标识 // 第三方厂商标识
jpCollector.setState(GoLangConstant.stationStaus.get(collectorDetailDto.getState())); jpCollector.setState(GoLangConstant.stationStaus.get(collectorDetailDto.getState()));
jpCollector.setStationName(collectorDetailDto.getStationName()); jpCollector.setStationName(collectorDetailDto.getStationName());
jpCollector.setAddr(collectorDetailDto.getAddr()); jpCollector.setAddr(collectorDetailDto.getAddr());
jpCollector.setName(collectorDetailDto.getName()); jpCollector.setName(collectorDetailDto.getName());
//信号强度 // 信号强度
jpCollector.setSignalStrength(collectorDetailDto.getRssiLevel()); jpCollector.setSignalStrength(collectorDetailDto.getRssiLevel());
jpCollector.setRecDate(new Date()); jpCollector.setRecDate(new Date());
if (ObjectUtils.isEmpty(jpCollector.getSequenceNbr())) { if (ObjectUtils.isEmpty(jpCollector.getSequenceNbr())) {
...@@ -475,12 +468,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -475,12 +468,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpCollectorHistoryMapper.insert(hygfjpCollectorHistory); hygfjpCollectorHistoryMapper.insert(hygfjpCollectorHistory);
} }
} }
logger.info("-------锦浪同步采集器详情结束+" + ts + "------- " + sdf.format(new Date()));
} }
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async @Async
@Override @Override
public void inverterList() { public void inverterList() {
long ts = System.currentTimeMillis();
logger.info("-------锦浪同步逆变器开始+" + ts + "------- " + sdf.format(new Date()));
// List<String> stationIds = golangStationMapper.getStationIds(); // List<String> stationIds = golangStationMapper.getStationIds();
// for (int i = 0; i < stationIds.size(); i++) { // for (int i = 0; i < stationIds.size(); i++) {
try { try {
...@@ -494,23 +490,23 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -494,23 +490,23 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
requestInfo.put("pageSize", 100); requestInfo.put("pageSize", 100);
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
List<GolangInverterList> result = golangRequestUtil.getResPonse(GoLangConstant.inverterListUrl, List<GolangInverterList> result = golangRequestUtil.getResPonse(GoLangConstant.inverterListUrl,
GoLangConstant.requestPost, GoLangConstant.requestPost, requestParaminfo, GoLangConstant.resovleRule_data_page_records,
requestParaminfo, GolangInverterList.class);
GoLangConstant.resovleRule_data_page_records,
GolangInverterList.class
);
for (int j = 0; j < result.size(); j++) { for (int j = 0; j < result.size(); j++) {
GolangInverterList golangInverterList = result.get(j); GolangInverterList golangInverterList = result.get(j);
golangInverterList.setCreatedTime(System.currentTimeMillis()); golangInverterList.setCreatedTime(System.currentTimeMillis());
golangInverterListMapper.insert(golangInverterList); golangInverterListMapper.insert(golangInverterList);
} }
// } // }
logger.info("-------锦浪同步逆变器结束+" + ts + "------- " + sdf.format(new Date()));
} }
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async @Async
@Override @Override
public void inverterDetail() { public void inverterDetail() {
long ts = System.currentTimeMillis();
logger.info("-------锦浪同步逆变器详情开始+" + ts + "------- " + sdf.format(new Date()));
List<String> inverterSns = golangInverterListMapper.getInverterSns(); List<String> inverterSns = golangInverterListMapper.getInverterSns();
for (int i = 0; i < inverterSns.size(); i++) { for (int i = 0; i < inverterSns.size(); i++) {
try { try {
...@@ -522,23 +518,21 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -522,23 +518,21 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
requestInfo.put("sn", inverterSns.get(i)); requestInfo.put("sn", inverterSns.get(i));
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
List<InverterDetailDto> result = golangRequestUtil.getResPonse(GoLangConstant.inverterDetailUrl, List<InverterDetailDto> result = golangRequestUtil.getResPonse(GoLangConstant.inverterDetailUrl,
GoLangConstant.requestPost, GoLangConstant.requestPost, requestParaminfo, GoLangConstant.resovleRule_data,
requestParaminfo, InverterDetailDto.class);
GoLangConstant.resovleRule_data,
InverterDetailDto.class
);
for (int j = 0; j < result.size(); j++) { for (int j = 0; j < result.size(); j++) {
InverterDetailDto inverterDetailDto = result.get(j); InverterDetailDto inverterDetailDto = result.get(j);
JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>(). JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>()
eq("third_station_id", inverterDetailDto.getStationId()). .eq("third_station_id", inverterDetailDto.getStationId())
eq("third_code", PVProducerInfoEnum.JLY.getCode()). .eq("third_code", PVProducerInfoEnum.JLY.getCode()).eq("sn_code", inverterDetailDto.getSn()));
eq("sn_code", inverterDetailDto.getSn()));
if (ObjectUtils.isEmpty(jpInverter)) { if (ObjectUtils.isEmpty(jpInverter)) {
jpInverter = new JpInverter(); jpInverter = new JpInverter();
} }
jpInverter.setName(null == inverterDetailDto.getStationName()?null: inverterDetailDto.getStationName()); jpInverter.setName(
null == inverterDetailDto.getStationName() ? null : inverterDetailDto.getStationName());
jpInverter.setSnCode(inverterDetailDto.getSn().trim()); jpInverter.setSnCode(inverterDetailDto.getSn().trim());
jpInverter.setState(golangRequestUtil.getInverterState(inverterDetailDto.getCurrentState(), inverterDetailDto.getDataTimestamp())); jpInverter.setState(golangRequestUtil.getInverterState(inverterDetailDto.getCurrentState(),
inverterDetailDto.getDataTimestamp()));
jpInverter.setCollectorId(String.valueOf(inverterDetailDto.getCollectorId())); jpInverter.setCollectorId(String.valueOf(inverterDetailDto.getCollectorId()));
jpInverter.setCollectorSnCode(inverterDetailDto.getCollectorsn()); jpInverter.setCollectorSnCode(inverterDetailDto.getCollectorsn());
jpInverter.setUpdateTime(new Date()); jpInverter.setUpdateTime(new Date());
...@@ -575,11 +569,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -575,11 +569,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
String jsonString = JSON.toJSONString(inverterDetailDto); String jsonString = JSON.toJSONString(inverterDetailDto);
Map<String, Object> hanlderResult = JSON.parseObject(jsonString, Map.class); Map<String, Object> hanlderResult = JSON.parseObject(jsonString, Map.class);
for (int k = 1; k < 4; k++) { for (int k = 1; k < 4; k++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper
eq("sn_code", inverterDetailDto.getSn()). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("type", "交流"). .eq("sn_code", inverterDetailDto.getSn()).eq("type", "交流").eq("name", "AC" + k));
eq("name", "AC" + k)
);
if (ObjectUtils.isEmpty(jpInverterElectricity)) { if (ObjectUtils.isEmpty(jpInverterElectricity)) {
jpInverterElectricity = new JpInverterElectricity(); jpInverterElectricity = new JpInverterElectricity();
} }
...@@ -598,11 +590,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -598,11 +590,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} }
} }
for (int k1 = 1; k1 < 33; k1++) { for (int k1 = 1; k1 < 33; k1++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper
eq("sn_code", inverterDetailDto.getSn()). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("type", "直流"). .eq("sn_code", inverterDetailDto.getSn()).eq("type", "直流").eq("name", "PV" + k1));
eq("name", "PV" + k1)
);
if (ObjectUtils.isEmpty(jpInverterElectricity)) { if (ObjectUtils.isEmpty(jpInverterElectricity)) {
jpInverterElectricity = new JpInverterElectricity(); jpInverterElectricity = new JpInverterElectricity();
} }
...@@ -636,8 +626,8 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -636,8 +626,8 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpInverterElecHistoryMapper.insert(hygfjpInverterElecHistory); hygfjpInverterElecHistoryMapper.insert(hygfjpInverterElecHistory);
// 逆变器历史 // 逆变器历史
String today = DateUtil.today(); String today = DateUtil.today();
HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper.selectOne(new QueryWrapper<HYGFJPInverterHistory>() HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper
.eq("sn_code", inverterDetailDto.getSn()) .selectOne(new QueryWrapper<HYGFJPInverterHistory>().eq("sn_code", inverterDetailDto.getSn())
.eq("date", today)); .eq("date", today));
if (ObjectUtils.isEmpty(hygfjpInverterHistory)) { if (ObjectUtils.isEmpty(hygfjpInverterHistory)) {
hygfjpInverterHistory = new HYGFJPInverterHistory(); hygfjpInverterHistory = new HYGFJPInverterHistory();
...@@ -655,34 +645,34 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -655,34 +645,34 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} else { } else {
hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory); hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory);
} }
//-----------------------户用光伏日报表---------------------- // -----------------------户用光伏日报表----------------------
TdHYGFInverterDayGenerate tdHYGFInverterDayGenerate = new TdHYGFInverterDayGenerate(); TdHYGFInverterDayGenerate tdHYGFInverterDayGenerate = new TdHYGFInverterDayGenerate();
tdHYGFInverterDayGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFInverterDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterDayGenerate.setName(jpInverter.getName()); tdHYGFInverterDayGenerate.setName(jpInverter.getName());
tdHYGFInverterDayGenerate.setThirdStationId(String.valueOf(jpInverter.getThirdStationId())); tdHYGFInverterDayGenerate.setThirdStationId(String.valueOf(jpInverter.getThirdStationId()));
tdHYGFInverterDayGenerate.setSnCode(jpInverter.getSnCode().trim()); tdHYGFInverterDayGenerate.setSnCode(jpInverter.getSnCode().trim());
tdHYGFInverterDayGenerate.setWorkStatus(jpInverter.getState()); tdHYGFInverterDayGenerate.setWorkStatus(jpInverter.getState());
//交流电压 // 交流电压
tdHYGFInverterDayGenerate.setDcv1(inverterDetailDto.getUAc1()); tdHYGFInverterDayGenerate.setDcv1(inverterDetailDto.getUAc1());
tdHYGFInverterDayGenerate.setDcv2(inverterDetailDto.getUAc2()); tdHYGFInverterDayGenerate.setDcv2(inverterDetailDto.getUAc2());
tdHYGFInverterDayGenerate.setDcv3(inverterDetailDto.getUAc3()); tdHYGFInverterDayGenerate.setDcv3(inverterDetailDto.getUAc3());
//交流电流 // 交流电流
// tdHYGFInverterDayGenerate.setDcv4(inverterDetailDto.getUAc4()); // tdHYGFInverterDayGenerate.setDcv4(inverterDetailDto.getUAc4());
tdHYGFInverterDayGenerate.setDcc1(inverterDetailDto.getIAc1()); tdHYGFInverterDayGenerate.setDcc1(inverterDetailDto.getIAc1());
tdHYGFInverterDayGenerate.setDcc2(inverterDetailDto.getIAc2()); tdHYGFInverterDayGenerate.setDcc2(inverterDetailDto.getIAc2());
tdHYGFInverterDayGenerate.setDcc3(inverterDetailDto.getIAc3()); tdHYGFInverterDayGenerate.setDcc3(inverterDetailDto.getIAc3());
// tdHYGFInverterDayGenerate.setDcc4(inverterDetailDto.getIAc4()); // tdHYGFInverterDayGenerate.setDcc4(inverterDetailDto.getIAc4());
//直流电压 // 直流电压
tdHYGFInverterDayGenerate.setAcv1(inverterDetailDto.getUPv1()); tdHYGFInverterDayGenerate.setAcv1(inverterDetailDto.getUPv1());
tdHYGFInverterDayGenerate.setAcv2(inverterDetailDto.getUPv2()); tdHYGFInverterDayGenerate.setAcv2(inverterDetailDto.getUPv2());
tdHYGFInverterDayGenerate.setAcv3(inverterDetailDto.getUPv3()); tdHYGFInverterDayGenerate.setAcv3(inverterDetailDto.getUPv3());
tdHYGFInverterDayGenerate.setAcv4(inverterDetailDto.getUPv4()); tdHYGFInverterDayGenerate.setAcv4(inverterDetailDto.getUPv4());
//直流电流 // 直流电流
tdHYGFInverterDayGenerate.setAcc1(inverterDetailDto.getIPv1()); tdHYGFInverterDayGenerate.setAcc1(inverterDetailDto.getIPv1());
tdHYGFInverterDayGenerate.setAcc2(inverterDetailDto.getIPv2()); tdHYGFInverterDayGenerate.setAcc2(inverterDetailDto.getIPv2());
tdHYGFInverterDayGenerate.setAcc3(inverterDetailDto.getIPv3()); tdHYGFInverterDayGenerate.setAcc3(inverterDetailDto.getIPv3());
tdHYGFInverterDayGenerate.setAcc4(inverterDetailDto.getIPv4()); tdHYGFInverterDayGenerate.setAcc4(inverterDetailDto.getIPv4());
//功率 // 功率
tdHYGFInverterDayGenerate.setPv1(inverterDetailDto.getPow1()); tdHYGFInverterDayGenerate.setPv1(inverterDetailDto.getPow1());
tdHYGFInverterDayGenerate.setPv2(inverterDetailDto.getPow2()); tdHYGFInverterDayGenerate.setPv2(inverterDetailDto.getPow2());
tdHYGFInverterDayGenerate.setPv3(inverterDetailDto.getPow3()); tdHYGFInverterDayGenerate.setPv3(inverterDetailDto.getPow3());
...@@ -700,14 +690,12 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -700,14 +690,12 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFInverterDayGenerate.setIncome(null); tdHYGFInverterDayGenerate.setIncome(null);
tdHYGFInverterDayGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity()); tdHYGFInverterDayGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
// 电站区域经销商,
JpStation jpStation = jpStationMapper
.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.JLY.getCode())
.eq("third_station_id", String.valueOf(inverterDetailDto.getStationId())));
if (jpStation != null) {
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code",PVProducerInfoEnum.JLY.getCode()).
eq("third_station_id", String.valueOf(inverterDetailDto.getStationId())));
if(jpStation!=null){
tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterDayGenerate.setStationName(jpStation.getName()); tdHYGFInverterDayGenerate.setStationName(jpStation.getName());
...@@ -715,13 +703,11 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -715,13 +703,11 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} }
tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate); tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate);
//户用场站月发电量 // 户用场站月发电量
Date today1 = new Date(); Date today1 = new Date();
TdHYGFInverterMonthGenerate tdHYGFInverterMonthGenerate = tdHYGFInverterMonthGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterMonthGenerate>() TdHYGFInverterMonthGenerate tdHYGFInverterMonthGenerate = tdHYGFInverterMonthGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterMonthGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode())
.eq("day_time", DateUtil.format(today1, "yyyy-MM-dd")) .eq("day_time", DateUtil.format(today1, "yyyy-MM-dd"))
...@@ -736,8 +722,8 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -736,8 +722,8 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFInverterMonthGenerate.setYearMonth(DateUtil.format(today1, "yyyy-MM")); tdHYGFInverterMonthGenerate.setYearMonth(DateUtil.format(today1, "yyyy-MM"));
tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration()); tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration());
tdHYGFInverterMonthGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity()); tdHYGFInverterMonthGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
//新加 // 新加
if(jpStation!=null){ if (jpStation != null) {
tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterMonthGenerate.setStationName(jpStation.getName()); tdHYGFInverterMonthGenerate.setStationName(jpStation.getName());
...@@ -750,8 +736,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -750,8 +736,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} else { } else {
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate); tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFInverterYearGenerate tdHYGFInverterYearGenerate = tdHYGFInverterYearGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterYearGenerate>() TdHYGFInverterYearGenerate tdHYGFInverterYearGenerate = tdHYGFInverterYearGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterYearGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode())
.eq("month_time", DateUtil.format(today1, "yyyy-MM")) .eq("month_time", DateUtil.format(today1, "yyyy-MM"))
...@@ -767,8 +754,8 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -767,8 +754,8 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFInverterYearGenerate.setFullhour(jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity()); tdHYGFInverterYearGenerate.setFullhour(jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity());
tdHYGFInverterYearGenerate.setName(jpInverter.getName()); tdHYGFInverterYearGenerate.setName(jpInverter.getName());
//新加 // 新加
if(jpStation!=null){ if (jpStation != null) {
tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterYearGenerate.setStationName(jpStation.getName()); tdHYGFInverterYearGenerate.setStationName(jpStation.getName());
...@@ -776,33 +763,30 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -776,33 +763,30 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} }
if (ObjectUtils.isEmpty(tdHYGFInverterYearGenerate.getCreatedTime())) { if (ObjectUtils.isEmpty(tdHYGFInverterYearGenerate.getCreatedTime())) {
tdHYGFInverterYearGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFInverterYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate); tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
} else { } else {
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate); tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFInverterTotalGenerate tdHYGFInverterTotalGenerate = tdHYGFInverterTotalGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterTotalGenerate>() TdHYGFInverterTotalGenerate tdHYGFInverterTotalGenerate = tdHYGFInverterTotalGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterTotalGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode()).eq("year_time", DateUtil.format(today1, "yyyy"))
.eq("year_time", DateUtil.format(today1, "yyyy"))
.eq("year", DateUtil.format(today1, "yyyy"))); .eq("year", DateUtil.format(today1, "yyyy")));
if (ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate)) { if (ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate)) {
tdHYGFInverterTotalGenerate = new TdHYGFInverterTotalGenerate(); tdHYGFInverterTotalGenerate = new TdHYGFInverterTotalGenerate();
} }
tdHYGFInverterTotalGenerate.setThirdStationId(jpInverter.getThirdStationId()); tdHYGFInverterTotalGenerate.setThirdStationId(jpInverter.getThirdStationId());
tdHYGFInverterTotalGenerate.setName(null == jpInverter.getName()? null :jpInverter.getName()); tdHYGFInverterTotalGenerate.setName(null == jpInverter.getName() ? null : jpInverter.getName());
tdHYGFInverterTotalGenerate.setSnCode(jpInverter.getSnCode().trim()); tdHYGFInverterTotalGenerate.setSnCode(jpInverter.getSnCode().trim());
tdHYGFInverterTotalGenerate.setYearTime(DateUtil.format(today1, "yyyy")); tdHYGFInverterTotalGenerate.setYearTime(DateUtil.format(today1, "yyyy"));
tdHYGFInverterTotalGenerate.setYear(DateUtil.format(today1, "yyyy")); tdHYGFInverterTotalGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration()); tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration());
tdHYGFInverterTotalGenerate.setFullhour(jpInverter.getYearPowerGeneration() / jpInverter.getCapacity()); tdHYGFInverterTotalGenerate.setFullhour(jpInverter.getYearPowerGeneration() / jpInverter.getCapacity());
//新加 // 新加
if(jpStation!=null){ if (jpStation != null) {
tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterTotalGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterTotalGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterTotalGenerate.setStationName(jpStation.getName()); tdHYGFInverterTotalGenerate.setStationName(jpStation.getName());
...@@ -817,12 +801,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -817,12 +801,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} }
} }
} }
logger.info("-------锦浪同步逆变器详情结束+" + ts + "------- " + sdf.format(new Date()));
} }
@Scheduled(cron = "${dataRequstScheduled.jinlangyun}") @Scheduled(cron = "${dataRequstScheduled.jinlangyun}")
@Async @Async
@Override @Override
public void inverAlramInfo() { public void inverAlramInfo() {
long ts = System.currentTimeMillis();
logger.info("-------锦浪同步告警开始+" + ts + "------- " + sdf.format(new Date()));
List<String> inverterIds = golangInverterListMapper.getInverterSns(); List<String> inverterIds = golangInverterListMapper.getInverterSns();
for (int i = 0; i < inverterIds.size(); i++) { for (int i = 0; i < inverterIds.size(); i++) {
try { try {
...@@ -838,19 +825,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -838,19 +825,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
requestInfo.put("alarmEndTime", DateUtil.today()); requestInfo.put("alarmEndTime", DateUtil.today());
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
List<AlarmDto> result = golangRequestUtil.getResPonse(GoLangConstant.alarmListUrl, List<AlarmDto> result = golangRequestUtil.getResPonse(GoLangConstant.alarmListUrl,
GoLangConstant.requestPost, GoLangConstant.requestPost, requestParaminfo, GoLangConstant.resovleRule_data_records,
requestParaminfo, AlarmDto.class);
GoLangConstant.resovleRule_data_records,
AlarmDto.class
);
for (int j = 0; j < result.size(); j++) { for (int j = 0; j < result.size(); j++) {
AlarmDto alarmDto = result.get(j); AlarmDto alarmDto = result.get(j);
if (!ObjectUtils.isEmpty(alarmDto.getAlarmDeviceSn())) { if (!ObjectUtils.isEmpty(alarmDto.getAlarmDeviceSn())) {
HYGFJPInverterWarn hygfjpInverterWarn = hygfjpInverterWarnMapper.selectOne(new QueryWrapper<HYGFJPInverterWarn>() HYGFJPInverterWarn hygfjpInverterWarn = hygfjpInverterWarnMapper
.eq("sn_code", alarmDto.getAlarmDeviceSn()) .selectOne(new QueryWrapper<HYGFJPInverterWarn>().eq("sn_code", alarmDto.getAlarmDeviceSn())
.eq("start_time", alarmDto.getAlarmBeginTime()) .eq("start_time", alarmDto.getAlarmBeginTime())
.eq("third_station_id", String.valueOf(alarmDto.getStationId())) .eq("third_station_id", String.valueOf(alarmDto.getStationId())));
);
if (ObjectUtils.isEmpty(hygfjpInverterWarn)) { if (ObjectUtils.isEmpty(hygfjpInverterWarn)) {
hygfjpInverterWarn = new HYGFJPInverterWarn(); hygfjpInverterWarn = new HYGFJPInverterWarn();
} }
...@@ -863,28 +846,27 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -863,28 +846,27 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpInverterWarn.setTreatment(alarmDto.getAdvice()); hygfjpInverterWarn.setTreatment(alarmDto.getAdvice());
hygfjpInverterWarn.setStartTime(alarmDto.getAlarmBeginTime()); hygfjpInverterWarn.setStartTime(alarmDto.getAlarmBeginTime());
// 电站区域经销商,
JpStation jpStation = jpStationMapper
.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.JLY.getCode())
.eq("third_station_id", String.valueOf(String.valueOf(alarmDto.getStationId()))));
if (jpStation != null) {
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code", PVProducerInfoEnum.JLY.getCode()).
eq("third_station_id", String.valueOf(String.valueOf(alarmDto.getStationId()))));
if(jpStation!=null){
hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpInverterWarn.setStationName(jpStation.getName()); hygfjpInverterWarn.setStationName(jpStation.getName());
hygfjpInverterWarn.setStationState(jpStation.getState()); } hygfjpInverterWarn.setStationState(jpStation.getState());
}
hygfjpInverterWarn.setRecoverTime(null); hygfjpInverterWarn.setRecoverTime(null);
if (!ObjectUtils.isEmpty(alarmDto.getAlarmEndTime())) { if (!ObjectUtils.isEmpty(alarmDto.getAlarmEndTime())) {
hygfjpInverterWarn.setRecoverTime(alarmDto.getAlarmEndTime()); hygfjpInverterWarn.setRecoverTime(alarmDto.getAlarmEndTime());
} }
hygfjpInverterWarn.setTimeLong(null); hygfjpInverterWarn.setTimeLong(null);
if ((!ObjectUtils.isEmpty(alarmDto.getAlarmBeginTime())) && (!ObjectUtils.isEmpty(alarmDto.getAlarmEndTime()))) { if ((!ObjectUtils.isEmpty(alarmDto.getAlarmBeginTime()))
hygfjpInverterWarn.setTimeLong(golangRequestUtil.convertDate(alarmDto.getAlarmEndTime()) - golangRequestUtil.convertDate(alarmDto.getAlarmBeginTime())); && (!ObjectUtils.isEmpty(alarmDto.getAlarmEndTime()))) {
hygfjpInverterWarn.setTimeLong(golangRequestUtil.convertDate(alarmDto.getAlarmEndTime())
- golangRequestUtil.convertDate(alarmDto.getAlarmBeginTime()));
} }
hygfjpInverterWarn.setState(GoLangConstant.alarmstatus.get(alarmDto.getState())); hygfjpInverterWarn.setState(GoLangConstant.alarmstatus.get(alarmDto.getState()));
if (ObjectUtils.isEmpty(hygfjpInverterWarn.getCreatedTime())) { if (ObjectUtils.isEmpty(hygfjpInverterWarn.getCreatedTime())) {
...@@ -896,6 +878,6 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe ...@@ -896,6 +878,6 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} }
} }
} }
logger.info("-------锦浪同步告警结束+" + ts + "------- " + sdf.format(new Date()));
} }
} }
...@@ -25,17 +25,26 @@ import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpStationMapper; ...@@ -25,17 +25,26 @@ import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpStationMapper;
import com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.*; import com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.*;
import com.yeejoin.amos.api.householdapi.face.service.GoodWeDataAcquisitionService; import com.yeejoin.amos.api.householdapi.face.service.GoodWeDataAcquisitionService;
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum; import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import org.apache.ibatis.javassist.bytecode.stackmap.BasicBlock.Catch;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.server.Jsp; import org.springframework.boot.web.servlet.server.Jsp;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Service @Service
public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionService { public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionService {
@Autowired @Autowired
...@@ -51,19 +60,19 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -51,19 +60,19 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
private JpInverterMapper jpInverterMapper; private JpInverterMapper jpInverterMapper;
@Autowired @Autowired
private HYGFJPStationPowerHistoryMapper hygfjpStationPowerHistoryMapper; private HYGFJPStationPowerHistoryMapper hygfjpStationPowerHistoryMapper;
//户用光伏逆变器历史mapper // 户用光伏逆变器历史mapper
@Autowired @Autowired
private HYGFJPInverterHistoryMapper hygfjpInverterHistoryMapper; private HYGFJPInverterHistoryMapper hygfjpInverterHistoryMapper;
//户用光伏采集器历史mapper // 户用光伏采集器历史mapper
@Autowired @Autowired
private HYGFJPCollectorHistoryMapper hygfjpCollectorHistoryMapper; private HYGFJPCollectorHistoryMapper hygfjpCollectorHistoryMapper;
//户用光伏逆变器告警 // 户用光伏逆变器告警
@Autowired @Autowired
private HYGFJPInverterWarnMapper hygfjpInverterWarnMapper; private HYGFJPInverterWarnMapper hygfjpInverterWarnMapper;
//户用光伏逆变器历史mapper // 户用光伏逆变器历史mapper
@Autowired @Autowired
private HYGFJPInverterElecHistoryMapper hygfjpInverterElecHistoryMapper; private HYGFJPInverterElecHistoryMapper hygfjpInverterElecHistoryMapper;
//户用光伏日发电量 // 户用光伏日发电量
@Autowired @Autowired
private JpInverterElectricityMapper jpInverterElectricityMapper; private JpInverterElectricityMapper jpInverterElectricityMapper;
@Autowired @Autowired
...@@ -85,23 +94,36 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -85,23 +94,36 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
private TdHYGFInverterTotalGenerateMapper tdHYGFInverterTotalGenerateMapper; private TdHYGFInverterTotalGenerateMapper tdHYGFInverterTotalGenerateMapper;
@Autowired @Autowired
TdJpStationMapper tdJpStationMapper; TdJpStationMapper tdJpStationMapper;
final static Logger logger = LoggerFactory.getLogger(GoodWeDataAcquisitionServiceImpl.class);
final static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Override @Override
@Scheduled(cron = "${dataRequstScheduled.GoodWe}") @Scheduled(cron = "${dataRequstScheduled.GoodWe}")
@Async
public void stationList() { public void stationList() {
long ts = System.currentTimeMillis();
logger.info("-------固德威同步场站和告警开始" + ts + "------- " + sdf.format(new Date()));
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("page_index", 1); requestInfo.put("page_index", 1);
requestInfo.put("page_size", 200); requestInfo.put("page_size", 200);
// requestInfo.put("key", "龙虎山北区");
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
String today = DateUtil.today(); String today = DateUtil.today();
String hour = new Date().getHours() + ":00"; String hour = new Date().getHours() + ":00";
List<GoodWeStationMonitorDto> goodWeStationLists = goodWeRequestUtil.getResPonse(GoodWeConstant.stationListStatusUrl, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data_list, GoodWeStationMonitorDto.class); List<GoodWeStationMonitorDto> goodWeStationLists = goodWeRequestUtil.getResPonse(
GoodWeConstant.stationListStatusUrl, GoodWeConstant.requestPost, requstParam,
GoodWeConstant.resovleRule_data_list, GoodWeStationMonitorDto.class);
if (goodWeStationLists.size() > 0) { if (goodWeStationLists.size() > 0) {
goodWeStationLists.forEach(goodWeStationMonitorDto -> { goodWeStationLists.forEach(goodWeStationMonitorDto -> {
GoodWeStationMonitorList goodWeStationList = new GoodWeStationMonitorList(); GoodWeStationMonitorList goodWeStationList = new GoodWeStationMonitorList();
BeanUtil.copyProperties(goodWeStationMonitorDto, goodWeStationList); BeanUtil.copyProperties(goodWeStationMonitorDto, goodWeStationList);
goodWeStationList.setCreatedTime(System.currentTimeMillis()); goodWeStationList.setCreatedTime(System.currentTimeMillis());
goodWeStationMonitorListMapper.insert(goodWeStationList); goodWeStationMonitorListMapper.insert(goodWeStationList);
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id", goodWeStationList.getPowerstation_id())); JpStation jpStation = jpStationMapper
.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode())
.eq("third_station_id", goodWeStationList.getPowerstation_id()));
if (ObjectUtils.isEmpty(jpStation)) { if (ObjectUtils.isEmpty(jpStation)) {
jpStation = new JpStation(); jpStation = new JpStation();
} }
...@@ -114,19 +136,22 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -114,19 +136,22 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpStation.setAddress(goodWeStationList.getLocation()); jpStation.setAddress(goodWeStationList.getLocation());
jpStation.setLatitude(goodWeStationList.getLatitude()); jpStation.setLatitude(goodWeStationList.getLatitude());
jpStation.setLongitude(goodWeStationList.getLongitude()); jpStation.setLongitude(goodWeStationList.getLongitude());
jpStation.setUserName(goodWeStationList.getOwner_name()==null?goodWeStationList.getStationname():goodWeStationList.getOwner_name()); jpStation.setUserName(goodWeStationList.getOwner_name() == null ? goodWeStationList.getStationname()
: goodWeStationList.getOwner_name());
jpStation.setUserPhone(goodWeStationList.getOwner_phone()); jpStation.setUserPhone(goodWeStationList.getOwner_phone());
jpStation.setStationContact(goodWeStationList.getOwner_name()); jpStation.setStationContact(goodWeStationList.getOwner_name());
jpStation.setModuleCount(0); jpStation.setModuleCount(0);
jpStation.setRealTimePower(goodWeStationList.getPac()!=null?goodWeStationList.getPac() * GoodWeConstant.wToKw:null); jpStation.setRealTimePower(
jpStation.setState(goodWeStationList.getStatus()!=null?GoodWeConstant.stationStaus.get(goodWeStationList.getStatus()+""):null); goodWeStationList.getPac() != null ? goodWeStationList.getPac() * GoodWeConstant.wToKw : null);
jpStation.setState(goodWeStationList.getStatus() != null
? GoodWeConstant.stationStaus.get(goodWeStationList.getStatus() + "")
: null);
jpStation.setDayGenerate(goodWeStationList.getEday()); jpStation.setDayGenerate(goodWeStationList.getEday());
jpStation.setDayIncome(goodWeStationList.getEday_income()); jpStation.setDayIncome(goodWeStationList.getEday_income());
jpStation.setAccumulatedPower(goodWeStationList.getEtotal()); jpStation.setAccumulatedPower(goodWeStationList.getEtotal());
jpStation.setCumulativeIncome(goodWeStationList.getEtotal_income()); jpStation.setCumulativeIncome(goodWeStationList.getEtotal_income());
jpStation.setType(goodWeStationList.getPowerstation_type()); jpStation.setType(goodWeStationList.getPowerstation_type());
jpStation.setRecDate(new Date()); jpStation.setRecDate(new Date());
if (ObjectUtils.isEmpty(jpStation.getSequenceNbr())) { if (ObjectUtils.isEmpty(jpStation.getSequenceNbr())) {
jpStation.setCreateTime(new Date(goodWeStationList.getCreatedTime())); jpStation.setCreateTime(new Date(goodWeStationList.getCreatedTime()));
if (ObjectUtils.isNotEmpty(goodWeStationList.getTurnon_time())) { if (ObjectUtils.isNotEmpty(goodWeStationList.getTurnon_time())) {
...@@ -138,8 +163,13 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -138,8 +163,13 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpStationMapper.updateById(jpStation); jpStationMapper.updateById(jpStation);
} }
try {
this.inverAlramInfo(goodWeStationList.getPowerstation_id()); this.inverAlramInfo(goodWeStationList.getPowerstation_id());
//增加td 电站区域公司,经销商绑定表 } catch (Exception e) {
e.printStackTrace();
}
// 增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>(). // TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code",PVProducerInfoEnum.GDW.getCode()). // eq("third_code",PVProducerInfoEnum.GDW.getCode()).
// eq("third_station_id", jpStation.getThirdStationId())); // eq("third_station_id", jpStation.getThirdStationId()));
...@@ -160,10 +190,6 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -160,10 +190,6 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
// tdJpStationMapper.insert(tdJpStation); // tdJpStationMapper.insert(tdJpStation);
// } // }
HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory(); HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory();
hygfjpStationPowerHistory.setCreatedTime(System.currentTimeMillis()); hygfjpStationPowerHistory.setCreatedTime(System.currentTimeMillis());
hygfjpStationPowerHistory.setThirdStationId(jpStation.getThirdStationId()); hygfjpStationPowerHistory.setThirdStationId(jpStation.getThirdStationId());
...@@ -171,20 +197,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -171,20 +197,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode()); hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode());
hygfjpStationPowerHistory.setTime(System.currentTimeMillis()); hygfjpStationPowerHistory.setTime(System.currentTimeMillis());
//新加 // 新加
hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpStationPowerHistory.setStationName(jpStation.getName()); hygfjpStationPowerHistory.setStationName(jpStation.getName());
hygfjpStationPowerHistory.setStationState(jpStation.getState()); hygfjpStationPowerHistory.setStationState(jpStation.getState());
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory); hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne( HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(new QueryWrapper<HYGFJPDayPower>()
new QueryWrapper<HYGFJPDayPower>(). .eq("tation_id", jpStation.getThirdStationId()).eq("year_month_day", today).eq("hour", hour));
eq("tation_id", jpStation.getThirdStationId()).
eq("year_month_day", today).
eq("hour", hour)
);
if (org.springframework.util.ObjectUtils.isEmpty(hygfjpDayPower)) { if (org.springframework.util.ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower(); hygfjpDayPower = new HYGFJPDayPower();
} }
...@@ -193,7 +214,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -193,7 +214,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpDayPower.setYearMonthDay(today); hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(jpStation.getRealTimePower()); hygfjpDayPower.setPower(jpStation.getRealTimePower());
//新加 // 新加
hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpDayPower.setStationName(jpStation.getName()); hygfjpDayPower.setStationName(jpStation.getName());
...@@ -206,8 +227,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -206,8 +227,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpDayPowerMapper.insert(hygfjpDayPower); hygfjpDayPowerMapper.insert(hygfjpDayPower);
} }
Date today1 = new Date(); Date today1 = new Date();
//户用场站日发电量 // 户用场站日发电量
TdHYGFStationDayGenerate tdHYGFStationDayGenerate = tdHYGFStationDayGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationDayGenerate>() TdHYGFStationDayGenerate tdHYGFStationDayGenerate = tdHYGFStationDayGenerateMapper
.selectOne(new QueryWrapper<TdHYGFStationDayGenerate>()
.eq("third_station_id", jpStation.getThirdStationId()) .eq("third_station_id", jpStation.getThirdStationId())
.eq("day_time", DateUtil.format(today1, "yyyy-MM-dd")) .eq("day_time", DateUtil.format(today1, "yyyy-MM-dd"))
.eq("year_month", DateUtil.format(today1, "yyyy-MM"))); .eq("year_month", DateUtil.format(today1, "yyyy-MM")));
...@@ -220,7 +242,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -220,7 +242,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate()); tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate());
tdHYGFStationDayGenerate.setFullhour(goodWeStationList.getTo_hour()); tdHYGFStationDayGenerate.setFullhour(goodWeStationList.getTo_hour());
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome()); tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
//新加 // 新加
tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationDayGenerate.setStationName(jpStation.getName()); tdHYGFStationDayGenerate.setStationName(jpStation.getName());
...@@ -232,8 +254,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -232,8 +254,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} else { } else {
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate); tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
} }
//户用场站月发电量 // 户用场站月发电量
TdHYGFStationMonthGenerate tdHYGFStationMonthGenerate = tdHYGFStationMonthGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationMonthGenerate>() TdHYGFStationMonthGenerate tdHYGFStationMonthGenerate = tdHYGFStationMonthGenerateMapper
.selectOne(new QueryWrapper<TdHYGFStationMonthGenerate>()
.eq("third_station_id", jpStation.getThirdStationId()) .eq("third_station_id", jpStation.getThirdStationId())
.eq("month_time", DateUtil.format(today1, "yyyy-MM")) .eq("month_time", DateUtil.format(today1, "yyyy-MM"))
.eq("year", DateUtil.format(today1, "yyyy"))); .eq("year", DateUtil.format(today1, "yyyy")));
...@@ -248,7 +271,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -248,7 +271,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity()); tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity());
} }
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome()); tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
//新加 // 新加
tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationMonthGenerate.setStationName(jpStation.getName()); tdHYGFStationMonthGenerate.setStationName(jpStation.getName());
...@@ -260,8 +283,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -260,8 +283,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} else { } else {
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate); tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFStationYearGenerate tdHYGFStationYearGenerate = tdHYGFStationYearGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationYearGenerate>() TdHYGFStationYearGenerate tdHYGFStationYearGenerate = tdHYGFStationYearGenerateMapper
.selectOne(new QueryWrapper<TdHYGFStationYearGenerate>()
.eq("third_station_id", jpStation.getThirdStationId()) .eq("third_station_id", jpStation.getThirdStationId())
.eq("year_time", DateUtil.format(today1, "yyyy")) .eq("year_time", DateUtil.format(today1, "yyyy"))
.eq("year", DateUtil.format(today1, "yyyy"))); .eq("year", DateUtil.format(today1, "yyyy")));
...@@ -274,7 +298,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -274,7 +298,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate()); tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate());
tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate() / jpStation.getCapacity()); tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate() / jpStation.getCapacity());
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome()); tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
//新加 // 新加
tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationYearGenerate.setStationName(jpStation.getName()); tdHYGFStationYearGenerate.setStationName(jpStation.getName());
...@@ -288,41 +312,52 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -288,41 +312,52 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} }
}); });
} }
logger.info("-------固德威同步场站和告警结束" + ts + "------- " + sdf.format(new Date()));
} }
@Override @Override
@Scheduled(cron = "${dataRequstScheduled.GoodWe}") @Scheduled(cron = "${dataRequstScheduled.GoodWe}")
@Async
public void stationDetail() { public void stationDetail() {
long ts = System.currentTimeMillis();
logger.info("-------固德威同步场站详情开始" + ts + "------- " + sdf.format(new Date()));
List<String> stationIds = goodWeStationMonitorListMapper.getStationIds(); List<String> stationIds = goodWeStationMonitorListMapper.getStationIds();
stationIds.forEach(stationId -> { stationIds.forEach(stationId -> {
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
String apiurl = GoodWeConstant.stationDetailUrl + "?id=" + stationId; String apiurl = GoodWeConstant.stationDetailUrl + "?id=" + stationId;
List<GoodWeStationDetail> goodWeStationDetails = goodWeRequestUtil.getResPonse(apiurl, GoodWeConstant.requestGet, requstParam, GoodWeConstant.resovleRule_data, GoodWeStationDetail.class); List<GoodWeStationDetail> goodWeStationDetails = goodWeRequestUtil.getResPonse(apiurl,
GoodWeConstant.requestGet, requstParam, GoodWeConstant.resovleRule_data, GoodWeStationDetail.class);
if (goodWeStationDetails.size() > 0) { if (goodWeStationDetails.size() > 0) {
goodWeStationDetails.forEach(goodWeStationDetail -> { goodWeStationDetails.forEach(goodWeStationDetail -> {
goodWeStationDetail.setCreatedTime(System.currentTimeMillis()); goodWeStationDetail.setCreatedTime(System.currentTimeMillis());
goodWeStationDetailMapper.insert(goodWeStationDetail); goodWeStationDetailMapper.insert(goodWeStationDetail);
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id", goodWeStationDetail.getPowerstation_id())); JpStation jpStation = jpStationMapper
.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode())
.eq("third_station_id", goodWeStationDetail.getPowerstation_id()));
if (ObjectUtils.isEmpty(jpStation)) { if (ObjectUtils.isEmpty(jpStation)) {
jpStation = new JpStation(); jpStation = new JpStation();
} }
jpStation.setUserName(goodWeStationDetail.getOwner_name()); jpStation.setUserName(goodWeStationDetail.getOwner_name());
jpStation.setUserPhone(goodWeStationDetail.getOwner_phone()); jpStation.setUserPhone(goodWeStationDetail.getOwner_phone());
jpStation.setStationContact(goodWeStationDetail.getOwner_name()); jpStation.setStationContact(goodWeStationDetail.getOwner_name());
jpStation.setAccessTime(DateUtil.parse(goodWeStationDetail.getTurnon_time(), DatePattern.NORM_DATETIME_PATTERN)); jpStation.setAccessTime(
DateUtil.parse(goodWeStationDetail.getTurnon_time(), DatePattern.NORM_DATETIME_PATTERN));
if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) { if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) {
jpStationMapper.updateById(jpStation); jpStationMapper.updateById(jpStation);
} }
}); });
} }
}); });
logger.info("-------固德威同步场站详情结束" + ts + "------- " + sdf.format(new Date()));
} }
@Override @Override
@Scheduled(cron = "${dataRequstScheduled.GoodWe}") @Scheduled(cron = "${dataRequstScheduled.GoodWe}")
@Async
public void stationMonthGen() { public void stationMonthGen() {
long ts = System.currentTimeMillis();
logger.info("-------固德威同步场站月发电量开始" + ts + "------- " + sdf.format(new Date()));
List<String> stationIds = goodWeStationMonitorListMapper.getStationIds(); List<String> stationIds = goodWeStationMonitorListMapper.getStationIds();
stationIds.forEach(stationId -> { stationIds.forEach(stationId -> {
String currentMonth = DateUtil.format(new Date(), "yyyyMM"); String currentMonth = DateUtil.format(new Date(), "yyyyMM");
...@@ -332,22 +367,34 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -332,22 +367,34 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo.put("count", 0); requestInfo.put("count", 0);
requestInfo.put("type", 1); requestInfo.put("type", 1);
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(GoodWeConstant.stationGenUrl, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class); List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(GoodWeConstant.stationGenUrl,
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream().filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentMonth)).collect(Collectors.toList()); GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class);
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream()
.filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentMonth))
.collect(Collectors.toList());
currentMonthGenStations.forEach(goodWEGenStation -> { currentMonthGenStations.forEach(goodWEGenStation -> {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id", stationId)); JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>()
.eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id", stationId));
if (ObjectUtils.isNotEmpty(jpStation)) { if (ObjectUtils.isNotEmpty(jpStation)) {
jpStation.setMonthGenerate(Double.parseDouble(goodWEGenStation.getPower())); jpStation.setMonthGenerate(Double.parseDouble(goodWEGenStation.getPower()));
jpStation.setMonthIncome(jpStation.getMonthGenerate() * 0.42); jpStation.setMonthIncome(jpStation.getMonthGenerate() * 0.42);
jpStationMapper.updateById(jpStation); jpStationMapper.updateById(jpStation);
// if(jpStation.getName().contains("刘国荣"))
// {
// System.out.println(jpStation);
// }
} }
}); });
}); });
logger.info("-------固德威同步场站月发电量结束" + ts + "------- " + sdf.format(new Date()));
} }
@Override @Override
@Scheduled(cron = "${dataRequstScheduled.GoodWe}") @Scheduled(cron = "${dataRequstScheduled.GoodWe}")
@Async
public void stationYearGen() { public void stationYearGen() {
long ts = System.currentTimeMillis();
logger.info("-------固德威同步场站年发电量开始" + ts + "------- " + sdf.format(new Date()));
List<String> stationIds = goodWeStationMonitorListMapper.getStationIds(); List<String> stationIds = goodWeStationMonitorListMapper.getStationIds();
stationIds.forEach(stationId -> { stationIds.forEach(stationId -> {
String currentYear = DateUtil.format(new Date(), "yyyy"); String currentYear = DateUtil.format(new Date(), "yyyy");
...@@ -357,10 +404,14 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -357,10 +404,14 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo.put("count", 0); requestInfo.put("count", 0);
requestInfo.put("type", 2); requestInfo.put("type", 2);
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(GoodWeConstant.stationGenUrl, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class); List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(GoodWeConstant.stationGenUrl,
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream().filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentYear)).collect(Collectors.toList()); GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class);
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream()
.filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentYear))
.collect(Collectors.toList());
currentMonthGenStations.forEach(goodWEGenStation -> { currentMonthGenStations.forEach(goodWEGenStation -> {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id", stationId)); JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>()
.eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("third_station_id", stationId));
if (ObjectUtils.isNotEmpty(jpStation)) { if (ObjectUtils.isNotEmpty(jpStation)) {
jpStation.setYearGenerate(Double.parseDouble(goodWEGenStation.getPower())); jpStation.setYearGenerate(Double.parseDouble(goodWEGenStation.getPower()));
jpStation.setYearIncome(jpStation.getYearGenerate() * 0.42); jpStation.setYearIncome(jpStation.getYearGenerate() * 0.42);
...@@ -368,9 +419,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -368,9 +419,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} }
}); });
}); });
logger.info("-------固德威同步场站年发电量开始" + ts + "------- " + sdf.format(new Date()));
} }
@Override @Override
public void collectorList() { public void collectorList() {
...@@ -383,23 +434,28 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -383,23 +434,28 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
@Override @Override
@Scheduled(cron = "${dataRequstScheduled.GoodWe}") @Scheduled(cron = "${dataRequstScheduled.GoodWe}")
@Async
public void inverterList() { public void inverterList() {
long ts = System.currentTimeMillis();
logger.info("-------固德威同步逆变器开始" + ts + "------- " + sdf.format(new Date()));
List<String> stationIds = goodWeStationMonitorListMapper.getStationIds(); List<String> stationIds = goodWeStationMonitorListMapper.getStationIds();
stationIds.stream().forEach(stationId -> { stationIds.stream().forEach(stationId -> {
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("page_index", 1); requestInfo.put("page_index", 1);
requestInfo.put("page_size", 100); requestInfo.put("page_size", 100);
requestInfo.put("pw_id", stationId); requestInfo.put("pw_id", stationId);
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_station_id", stationId).orderByDesc("create_time")); JpStation jpStation = jpStationMapper.selectOne(
new QueryWrapper<JpStation>().eq("third_station_id", stationId).orderByDesc("create_time"));
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
List<GoodWeINverterDetailDto> inverterDetailDtoList = goodWeRequestUtil.getResPonse(GoodWeConstant.queryInventerUrl List<GoodWeINverterDetailDto> inverterDetailDtoList = goodWeRequestUtil.getResPonse(
, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data_list, GoodWeINverterDetailDto.class); GoodWeConstant.queryInventerUrl, GoodWeConstant.requestPost, requstParam,
GoodWeConstant.resovleRule_data_list, GoodWeINverterDetailDto.class);
inverterDetailDtoList.forEach(goodWeINverterDetailDto -> { inverterDetailDtoList.forEach(goodWeINverterDetailDto -> {
// System.out.println(goodWeINverterDetailDto.getIt_sn()); // System.out.println(goodWeINverterDetailDto.getIt_sn());
JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>(). JpInverter jpInverter = jpInverterMapper.selectOne(
eq("third_station_id", goodWeINverterDetailDto.getPw_id()). new QueryWrapper<JpInverter>().eq("third_station_id", goodWeINverterDetailDto.getPw_id())
eq("third_code", PVProducerInfoEnum.GDW.getCode()). .eq("third_code", PVProducerInfoEnum.GDW.getCode())
eq("sn_code", goodWeINverterDetailDto.getIt_sn())); .eq("sn_code", goodWeINverterDetailDto.getIt_sn()));
if (org.springframework.util.ObjectUtils.isEmpty(jpInverter)) { if (org.springframework.util.ObjectUtils.isEmpty(jpInverter)) {
jpInverter = new JpInverter(); jpInverter = new JpInverter();
} }
...@@ -410,7 +466,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -410,7 +466,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpInverter.setCapacity(goodWeINverterDetailDto.getIt_capacity()); jpInverter.setCapacity(goodWeINverterDetailDto.getIt_capacity());
jpInverter.setThirdStationId(goodWeINverterDetailDto.getPw_id()); jpInverter.setThirdStationId(goodWeINverterDetailDto.getPw_id());
jpInverter.setThirdCode(PVProducerInfoEnum.GDW.getCode()); jpInverter.setThirdCode(PVProducerInfoEnum.GDW.getCode());
if(ObjectUtil.isNotEmpty(jpStation) && StringUtils.isNotEmpty(jpStation.getName())){ if (ObjectUtil.isNotEmpty(jpStation) && StringUtils.isNotEmpty(jpStation.getName())) {
jpInverter.setStationName(jpStation.getName()); jpInverter.setStationName(jpStation.getName());
} }
jpInverter.setRecDate(new Date()); jpInverter.setRecDate(new Date());
...@@ -421,11 +477,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -421,11 +477,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} }
}); });
}); });
logger.info("-------固德威同步逆变器结束" + ts + "------- " + sdf.format(new Date()));
} }
@Override @Override
@Scheduled(cron = "${dataRequstScheduled.GoodWe}") @Scheduled(cron = "${dataRequstScheduled.GoodWe}")
@Async
public void inverterDetail() { public void inverterDetail() {
long ts = System.currentTimeMillis();
logger.info("-------固德威同步逆变器详情开始" + ts + "------- " + sdf.format(new Date()));
List<String> goodweSnList = jpInverterMapper.getGoodWeSnCodes(); List<String> goodweSnList = jpInverterMapper.getGoodWeSnCodes();
List<List<String>> splitList = Lists.partition(goodweSnList, 50); List<List<String>> splitList = Lists.partition(goodweSnList, 50);
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
...@@ -433,22 +493,23 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -433,22 +493,23 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
for (int i = 0; i < splitList.size(); i++) { for (int i = 0; i < splitList.size(); i++) {
String requestSns = splitList.get(i).stream().map(s -> "sns=" + s).collect(Collectors.joining("&")); String requestSns = splitList.get(i).stream().map(s -> "sns=" + s).collect(Collectors.joining("&"));
String apiUrl = GoodWeConstant.getInventersDatas + "?" + requestSns; String apiUrl = GoodWeConstant.getInventersDatas + "?" + requestSns;
List<GoodWeInverterCurrentDataDto> list = goodWeRequestUtil.getResPonse(apiUrl, GoodWeConstant.requestGet, requstParam, GoodWeConstant.resovleRule_data_list, GoodWeInverterCurrentDataDto.class); List<GoodWeInverterCurrentDataDto> list = goodWeRequestUtil.getResPonse(apiUrl, GoodWeConstant.requestGet,
requstParam, GoodWeConstant.resovleRule_data_list, GoodWeInverterCurrentDataDto.class);
list.forEach(goodWeInverterCurrentDataDto -> { list.forEach(goodWeInverterCurrentDataDto -> {
JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>(). JpInverter jpInverter = jpInverterMapper
eq("third_code", PVProducerInfoEnum.GDW.getCode()). .selectOne(new QueryWrapper<JpInverter>().eq("third_code", PVProducerInfoEnum.GDW.getCode())
eq("sn_code", goodWeInverterCurrentDataDto.getSn())); .eq("sn_code", goodWeInverterCurrentDataDto.getSn()));
jpInverter.setIgbtTemperature(String.valueOf(goodWeInverterCurrentDataDto.getTempperature())); jpInverter.setIgbtTemperature(String.valueOf(goodWeInverterCurrentDataDto.getTempperature()));
jpInverter.setDayPowerGeneration(goodWeInverterCurrentDataDto.getEday()); jpInverter.setDayPowerGeneration(goodWeInverterCurrentDataDto.getEday());
jpInverter.setCapacity(goodWeInverterCurrentDataDto.getCapacity()); jpInverter.setCapacity(goodWeInverterCurrentDataDto.getCapacity());
jpInverterMapper.updateById(jpInverter); jpInverterMapper.updateById(jpInverter);
JSONObject hanlderResult = JSONObject.parseObject(JSON.toJSONString(goodWeInverterCurrentDataDto.getD())); JSONObject hanlderResult = JSONObject
.parseObject(JSON.toJSONString(goodWeInverterCurrentDataDto.getD()));
for (int k = 1; k < 3; k++) { for (int k = 1; k < 3; k++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper
eq("sn_code", goodWeInverterCurrentDataDto.getSn()). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("type", "交流"). .eq("sn_code", goodWeInverterCurrentDataDto.getSn()).eq("type", "交流")
eq("name", "AC" + k) .eq("name", "AC" + k));
);
if (org.springframework.util.ObjectUtils.isEmpty(jpInverterElectricity)) { if (org.springframework.util.ObjectUtils.isEmpty(jpInverterElectricity)) {
jpInverterElectricity = new JpInverterElectricity(); jpInverterElectricity = new JpInverterElectricity();
} }
...@@ -467,11 +528,10 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -467,11 +528,10 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} }
} }
for (int k1 = 1; k1 < 4; k1++) { for (int k1 = 1; k1 < 4; k1++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper
eq("sn_code", goodWeInverterCurrentDataDto.getSn()). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("type", "直流"). .eq("sn_code", goodWeInverterCurrentDataDto.getSn()).eq("type", "直流")
eq("name", "PV" + k1) .eq("name", "PV" + k1));
);
if (org.springframework.util.ObjectUtils.isEmpty(jpInverterElectricity)) { if (org.springframework.util.ObjectUtils.isEmpty(jpInverterElectricity)) {
jpInverterElectricity = new JpInverterElectricity(); jpInverterElectricity = new JpInverterElectricity();
} }
...@@ -505,9 +565,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -505,9 +565,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpInverterElecHistoryMapper.insert(hygfjpInverterElecHistory); hygfjpInverterElecHistoryMapper.insert(hygfjpInverterElecHistory);
// 逆变器历史 // 逆变器历史
String today = DateUtil.today(); String today = DateUtil.today();
HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper.selectOne(new QueryWrapper<HYGFJPInverterHistory>() HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper
.eq("sn_code", goodWeInverterCurrentDataDto.getSn()) .selectOne(new QueryWrapper<HYGFJPInverterHistory>()
.eq("date", today)); .eq("sn_code", goodWeInverterCurrentDataDto.getSn()).eq("date", today));
if (org.springframework.util.ObjectUtils.isEmpty(hygfjpInverterHistory)) { if (org.springframework.util.ObjectUtils.isEmpty(hygfjpInverterHistory)) {
hygfjpInverterHistory = new HYGFJPInverterHistory(); hygfjpInverterHistory = new HYGFJPInverterHistory();
} }
...@@ -516,8 +576,10 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -516,8 +576,10 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpInverterHistory.setInverterId(jpInverter.getId()); hygfjpInverterHistory.setInverterId(jpInverter.getId());
hygfjpInverterHistory.setSnCode(goodWeInverterCurrentDataDto.getSn()); hygfjpInverterHistory.setSnCode(goodWeInverterCurrentDataDto.getSn());
hygfjpInverterHistory.setThirdCode(PVProducerInfoEnum.GDW.getCode()); hygfjpInverterHistory.setThirdCode(PVProducerInfoEnum.GDW.getCode());
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getDayPowerGeneration())){ if (ObjectUtils.isNotEmpty(jpInverter.getCapacity())
hygfjpInverterHistory.setGenerationHours(jpInverter.getDayPowerGeneration()/jpInverter.getCapacity()); && ObjectUtils.isNotEmpty(jpInverter.getDayPowerGeneration())) {
hygfjpInverterHistory
.setGenerationHours(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
} }
hygfjpInverterHistory.setPowerGeneration(goodWeInverterCurrentDataDto.getEday()); hygfjpInverterHistory.setPowerGeneration(goodWeInverterCurrentDataDto.getEday());
...@@ -527,7 +589,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -527,7 +589,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} else { } else {
hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory); hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory);
} }
//-----------------------户用光伏日报表---------------------- // -----------------------户用光伏日报表----------------------
TdHYGFInverterDayGenerate tdHYGFInverterDayGenerate = new TdHYGFInverterDayGenerate(); TdHYGFInverterDayGenerate tdHYGFInverterDayGenerate = new TdHYGFInverterDayGenerate();
tdHYGFInverterDayGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFInverterDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterDayGenerate.setName(jpInverter.getName()); tdHYGFInverterDayGenerate.setName(jpInverter.getName());
...@@ -535,27 +597,27 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -535,27 +597,27 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterDayGenerate.setSnCode(jpInverter.getSnCode().trim()); tdHYGFInverterDayGenerate.setSnCode(jpInverter.getSnCode().trim());
tdHYGFInverterDayGenerate.setWorkStatus(jpInverter.getState()); tdHYGFInverterDayGenerate.setWorkStatus(jpInverter.getState());
D d = goodWeInverterCurrentDataDto.getD(); D d = goodWeInverterCurrentDataDto.getD();
//交流电压 // 交流电压
tdHYGFInverterDayGenerate.setDcv1(d.getVac1()); tdHYGFInverterDayGenerate.setDcv1(d.getVac1());
tdHYGFInverterDayGenerate.setDcv2(d.getVac2()); tdHYGFInverterDayGenerate.setDcv2(d.getVac2());
tdHYGFInverterDayGenerate.setDcv3(d.getVac3()); tdHYGFInverterDayGenerate.setDcv3(d.getVac3());
//交流电流 // 交流电流
// tdHYGFInverterDayGenerate.setDcv4(inverterDetailDto.getUAc4()); // tdHYGFInverterDayGenerate.setDcv4(inverterDetailDto.getUAc4());
tdHYGFInverterDayGenerate.setDcc1(d.getIac1()); tdHYGFInverterDayGenerate.setDcc1(d.getIac1());
tdHYGFInverterDayGenerate.setDcc2(d.getIac2()); tdHYGFInverterDayGenerate.setDcc2(d.getIac2());
tdHYGFInverterDayGenerate.setDcc3(d.getIac3()); tdHYGFInverterDayGenerate.setDcc3(d.getIac3());
// tdHYGFInverterDayGenerate.setDcc4(inverterDetailDto.getIAc4()); // tdHYGFInverterDayGenerate.setDcc4(inverterDetailDto.getIAc4());
//直流电压 // 直流电压
tdHYGFInverterDayGenerate.setAcv1(d.getVpv1()); tdHYGFInverterDayGenerate.setAcv1(d.getVpv1());
tdHYGFInverterDayGenerate.setAcv2(d.getVpv2()); tdHYGFInverterDayGenerate.setAcv2(d.getVpv2());
tdHYGFInverterDayGenerate.setAcv3(d.getVpv3()); tdHYGFInverterDayGenerate.setAcv3(d.getVpv3());
tdHYGFInverterDayGenerate.setAcv4(d.getVpv4()); tdHYGFInverterDayGenerate.setAcv4(d.getVpv4());
//直流电流 // 直流电流
tdHYGFInverterDayGenerate.setAcc1(d.getIpv1()); tdHYGFInverterDayGenerate.setAcc1(d.getIpv1());
tdHYGFInverterDayGenerate.setAcc2(d.getIpv2()); tdHYGFInverterDayGenerate.setAcc2(d.getIpv2());
tdHYGFInverterDayGenerate.setAcc3(d.getIpv3()); tdHYGFInverterDayGenerate.setAcc3(d.getIpv3());
tdHYGFInverterDayGenerate.setAcc4(d.getIpv4()); tdHYGFInverterDayGenerate.setAcc4(d.getIpv4());
//功率 // 功率
// tdHYGFInverterDayGenerate.setPv1(inverterDetailDto.getPow1()); // tdHYGFInverterDayGenerate.setPv1(inverterDetailDto.getPow1());
// tdHYGFInverterDayGenerate.setPv2(inverterDetailDto.getPow2()); // tdHYGFInverterDayGenerate.setPv2(inverterDetailDto.getPow2());
// tdHYGFInverterDayGenerate.setPv3(inverterDetailDto.getPow3()); // tdHYGFInverterDayGenerate.setPv3(inverterDetailDto.getPow3());
...@@ -571,17 +633,18 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -571,17 +633,18 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterDayGenerate.setTotalGen(jpInverter.getTotalPowerGeneration()); tdHYGFInverterDayGenerate.setTotalGen(jpInverter.getTotalPowerGeneration());
tdHYGFInverterDayGenerate.setIgbtTemp(goodWeInverterCurrentDataDto.getTempperature()); tdHYGFInverterDayGenerate.setIgbtTemp(goodWeInverterCurrentDataDto.getTempperature());
tdHYGFInverterDayGenerate.setIncome(null); tdHYGFInverterDayGenerate.setIncome(null);
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getDayPowerGeneration())){ if (ObjectUtils.isNotEmpty(jpInverter.getCapacity())
tdHYGFInverterDayGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());} && ObjectUtils.isNotEmpty(jpInverter.getDayPowerGeneration())) {
tdHYGFInverterDayGenerate
.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
}
//电站区域经销商, // 电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>(). JpStation jpStation = jpStationMapper
eq("third_code",PVProducerInfoEnum.GDW.getCode()). .selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode())
eq("third_station_id", String.valueOf(jpInverter.getThirdStationId()))); .eq("third_station_id", String.valueOf(jpInverter.getThirdStationId())));
if(jpStation!=null){ if (jpStation != null) {
tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterDayGenerate.setStationName(jpStation.getName()); tdHYGFInverterDayGenerate.setStationName(jpStation.getName());
...@@ -589,11 +652,11 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -589,11 +652,11 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} }
tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate); tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate);
//户用场站月发电量 // 户用场站月发电量
Date today1 = new Date(); Date today1 = new Date();
TdHYGFInverterMonthGenerate tdHYGFInverterMonthGenerate = tdHYGFInverterMonthGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterMonthGenerate>() TdHYGFInverterMonthGenerate tdHYGFInverterMonthGenerate = tdHYGFInverterMonthGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterMonthGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode())
.eq("day_time", DateUtil.format(today1, "yyyy-MM-dd")) .eq("day_time", DateUtil.format(today1, "yyyy-MM-dd"))
...@@ -608,8 +671,8 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -608,8 +671,8 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterMonthGenerate.setYearMonth(DateUtil.format(today1, "yyyy-MM")); tdHYGFInverterMonthGenerate.setYearMonth(DateUtil.format(today1, "yyyy-MM"));
tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration()); tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration());
//新加 // 新加
if(jpStation!=null){ if (jpStation != null) {
tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterMonthGenerate.setStationName(jpStation.getName()); tdHYGFInverterMonthGenerate.setStationName(jpStation.getName());
...@@ -617,8 +680,11 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -617,8 +680,11 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} }
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getDayPowerGeneration())){ if (ObjectUtils.isNotEmpty(jpInverter.getCapacity())
tdHYGFInverterMonthGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());} && ObjectUtils.isNotEmpty(jpInverter.getDayPowerGeneration())) {
tdHYGFInverterMonthGenerate
.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
}
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterMonthGenerate.getCreatedTime())) { if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterMonthGenerate.getCreatedTime())) {
tdHYGFInverterMonthGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFInverterMonthGenerate.setCreatedTime(System.currentTimeMillis());
...@@ -626,8 +692,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -626,8 +692,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} else { } else {
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate); tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFInverterYearGenerate tdHYGFInverterYearGenerate = tdHYGFInverterYearGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterYearGenerate>() TdHYGFInverterYearGenerate tdHYGFInverterYearGenerate = tdHYGFInverterYearGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterYearGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode())
.eq("month_time", DateUtil.format(today1, "yyyy-MM")) .eq("month_time", DateUtil.format(today1, "yyyy-MM"))
...@@ -640,13 +707,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -640,13 +707,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterYearGenerate.setMonthTime(DateUtil.format(today1, "yyyy-MM")); tdHYGFInverterYearGenerate.setMonthTime(DateUtil.format(today1, "yyyy-MM"));
tdHYGFInverterYearGenerate.setYear(DateUtil.format(today1, "yyyy")); tdHYGFInverterYearGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFInverterYearGenerate.setGenerate(jpInverter.getMonthPowerGeneration()); tdHYGFInverterYearGenerate.setGenerate(jpInverter.getMonthPowerGeneration());
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getMonthPowerGeneration())){ if (ObjectUtils.isNotEmpty(jpInverter.getCapacity())
tdHYGFInverterYearGenerate.setFullhour(jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity()); && ObjectUtils.isNotEmpty(jpInverter.getMonthPowerGeneration())) {
tdHYGFInverterYearGenerate
.setFullhour(jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity());
} }
tdHYGFInverterYearGenerate.setName(jpInverter.getName()); tdHYGFInverterYearGenerate.setName(jpInverter.getName());
//新加 // 新加
if(jpStation!=null){ if (jpStation != null) {
tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterYearGenerate.setStationName(jpStation.getName()); tdHYGFInverterYearGenerate.setStationName(jpStation.getName());
...@@ -660,11 +729,11 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -660,11 +729,11 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} else { } else {
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate); tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFInverterTotalGenerate tdHYGFInverterTotalGenerate = tdHYGFInverterTotalGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterTotalGenerate>() TdHYGFInverterTotalGenerate tdHYGFInverterTotalGenerate = tdHYGFInverterTotalGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterTotalGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode()).eq("year_time", DateUtil.format(today1, "yyyy"))
.eq("year_time", DateUtil.format(today1, "yyyy"))
.eq("year", DateUtil.format(today1, "yyyy"))); .eq("year", DateUtil.format(today1, "yyyy")));
if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate)) { if (org.springframework.util.ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate)) {
tdHYGFInverterTotalGenerate = new TdHYGFInverterTotalGenerate(); tdHYGFInverterTotalGenerate = new TdHYGFInverterTotalGenerate();
...@@ -675,11 +744,13 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -675,11 +744,13 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterTotalGenerate.setYearTime(DateUtil.format(today1, "yyyy")); tdHYGFInverterTotalGenerate.setYearTime(DateUtil.format(today1, "yyyy"));
tdHYGFInverterTotalGenerate.setYear(DateUtil.format(today1, "yyyy")); tdHYGFInverterTotalGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration()); tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration());
if(ObjectUtils.isNotEmpty(jpInverter.getCapacity())&&ObjectUtils.isNotEmpty(jpInverter.getYearPowerGeneration())) { if (ObjectUtils.isNotEmpty(jpInverter.getCapacity())
tdHYGFInverterTotalGenerate.setFullhour(jpInverter.getYearPowerGeneration() / jpInverter.getCapacity()); && ObjectUtils.isNotEmpty(jpInverter.getYearPowerGeneration())) {
tdHYGFInverterTotalGenerate
.setFullhour(jpInverter.getYearPowerGeneration() / jpInverter.getCapacity());
} }
//新加 // 新加
if(jpStation!=null){ if (jpStation != null) {
tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterTotalGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterTotalGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterTotalGenerate.setStationName(jpStation.getName()); tdHYGFInverterTotalGenerate.setStationName(jpStation.getName());
...@@ -695,12 +766,16 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -695,12 +766,16 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}); });
} }
logger.info("-------固德威同步逆变器详情结束" + ts + "------- " + sdf.format(new Date()));
} }
@Override @Override
@Scheduled(cron = "${dataRequstScheduled.GoodWe}") @Scheduled(cron = "${dataRequstScheduled.GoodWe}")
@Async
public void inverterMonthGen() { public void inverterMonthGen() {
List<String> sns =jpInverterMapper.getGoodWeSnCodes() ; long ts = System.currentTimeMillis();
logger.info("-------固德威同步逆变器月发电量开始" + ts + "------- " + sdf.format(new Date()));
List<String> sns = jpInverterMapper.getGoodWeSnCodes();
String currentMonth = DateUtil.format(new Date(), "yyyyMM"); String currentMonth = DateUtil.format(new Date(), "yyyyMM");
sns.forEach(sn -> { sns.forEach(sn -> {
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
...@@ -709,24 +784,33 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -709,24 +784,33 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo.put("count", 0); requestInfo.put("count", 0);
requestInfo.put("type", 1); requestInfo.put("type", 1);
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
String apiUrl = GoodWeConstant.getinverterGenURl+"?sn="+sn+"&date="+DateUtil.today()+"&count=0&type=1"; String apiUrl = GoodWeConstant.getinverterGenURl + "?sn=" + sn + "&date=" + DateUtil.today()
List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(apiUrl, GoodWeConstant.requestGet, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class); + "&count=0&type=1";
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream().filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentMonth)).collect(Collectors.toList()); List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(apiUrl, GoodWeConstant.requestGet,
requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class);
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream()
.filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentMonth))
.collect(Collectors.toList());
currentMonthGenStations.forEach(goodWEGenStation -> { currentMonthGenStations.forEach(goodWEGenStation -> {
JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("sn_code", sn)); JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>()
.eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("sn_code", sn));
if (ObjectUtils.isNotEmpty(jpInverter)) { if (ObjectUtils.isNotEmpty(jpInverter)) {
jpInverter.setMonthPowerGeneration(Double.parseDouble(goodWEGenStation.getPower())); jpInverter.setMonthPowerGeneration(Double.parseDouble(goodWEGenStation.getPower()));
jpInverterMapper.updateById(jpInverter); jpInverterMapper.updateById(jpInverter);
} }
}); });
}); });
logger.info("-------固德威同步逆变器月发电量结束" + ts + "------- " + sdf.format(new Date()));
} }
@Override @Override
@Scheduled(cron = "${dataRequstScheduled.GoodWe}") @Scheduled(cron = "${dataRequstScheduled.GoodWe}")
@Async
public void inverterYearGen() { public void inverterYearGen() {
long ts = System.currentTimeMillis();
logger.info("-------固德威同步逆变器年发电量开始" + ts + "------- " + sdf.format(new Date()));
String currentYear = DateUtil.format(new Date(), "yyyy"); String currentYear = DateUtil.format(new Date(), "yyyy");
List<String> sns =jpInverterMapper.getGoodWeSnCodes() ; List<String> sns = jpInverterMapper.getGoodWeSnCodes();
sns.forEach(sn -> { sns.forEach(sn -> {
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("sn", sn); requestInfo.put("sn", sn);
...@@ -734,17 +818,23 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -734,17 +818,23 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo.put("count", 0); requestInfo.put("count", 0);
requestInfo.put("type", 2); requestInfo.put("type", 2);
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
String apiUrl = GoodWeConstant.getinverterGenURl+"?sn="+sn+"&date="+DateUtil.today()+"&count=0&type=2"; String apiUrl = GoodWeConstant.getinverterGenURl + "?sn=" + sn + "&date=" + DateUtil.today()
List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(apiUrl, GoodWeConstant.requestGet, requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class); + "&count=0&type=2";
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream().filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentYear)).collect(Collectors.toList()); List<GoodWEGenStation> goodWEGenStations = goodWeRequestUtil.getResPonse(apiUrl, GoodWeConstant.requestGet,
requstParam, GoodWeConstant.resovleRule_data, GoodWEGenStation.class);
List<GoodWEGenStation> currentMonthGenStations = goodWEGenStations.stream()
.filter(goodWEGenStation -> goodWEGenStation.getDate().equals(currentYear))
.collect(Collectors.toList());
currentMonthGenStations.forEach(goodWEGenStation -> { currentMonthGenStations.forEach(goodWEGenStation -> {
JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>().eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("sn_code", sn)); JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>()
.eq("third_code", PVProducerInfoEnum.GDW.getCode()).eq("sn_code", sn));
if (ObjectUtils.isNotEmpty(jpInverter)) { if (ObjectUtils.isNotEmpty(jpInverter)) {
jpInverter.setYearPowerGeneration(Double.parseDouble(goodWEGenStation.getPower())); jpInverter.setYearPowerGeneration(Double.parseDouble(goodWEGenStation.getPower()));
jpInverterMapper.updateById(jpInverter); jpInverterMapper.updateById(jpInverter);
} }
}); });
}); });
logger.info("-------固德威同步逆变器年发电量结束" + ts + "------- " + sdf.format(new Date()));
} }
@Override @Override
...@@ -758,14 +848,14 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -758,14 +848,14 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo.put("stationid", stationid); requestInfo.put("stationid", stationid);
// requestInfo.put("status", 2); // requestInfo.put("status", 2);
String requstParam = JSON.toJSONString(requestInfo); String requstParam = JSON.toJSONString(requestInfo);
List<GoodWeAlarmDto> alarmList = goodWeRequestUtil.getResPonse(GoodWeConstant.alarmListUrl, GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data_list, GoodWeAlarmDto.class); List<GoodWeAlarmDto> alarmList = goodWeRequestUtil.getResPonse(GoodWeConstant.alarmListUrl,
GoodWeConstant.requestPost, requstParam, GoodWeConstant.resovleRule_data_list, GoodWeAlarmDto.class);
alarmList.forEach(goodWeAlarmDto -> { alarmList.forEach(goodWeAlarmDto -> {
if (!ObjectUtils.isEmpty(goodWeAlarmDto.getDevicesn())) { if (!ObjectUtils.isEmpty(goodWeAlarmDto.getDevicesn())) {
HYGFJPInverterWarn hygfjpInverterWarn = hygfjpInverterWarnMapper.selectOne(new QueryWrapper<HYGFJPInverterWarn>() HYGFJPInverterWarn hygfjpInverterWarn = hygfjpInverterWarnMapper
.eq("sn_code", goodWeAlarmDto.getDevicesn()) .selectOne(new QueryWrapper<HYGFJPInverterWarn>().eq("sn_code", goodWeAlarmDto.getDevicesn())
.eq("start_time", goodWeAlarmDto.getHappentime().getMillis()) .eq("start_time", goodWeAlarmDto.getHappentime().getMillis())
.eq("third_station_id", String.valueOf(goodWeAlarmDto.getStationId())) .eq("third_station_id", String.valueOf(goodWeAlarmDto.getStationId())));
);
if (ObjectUtils.isEmpty(hygfjpInverterWarn)) { if (ObjectUtils.isEmpty(hygfjpInverterWarn)) {
hygfjpInverterWarn = new HYGFJPInverterWarn(); hygfjpInverterWarn = new HYGFJPInverterWarn();
} }
...@@ -775,17 +865,18 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -775,17 +865,18 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
// hygfjpInverterWarn.setLevel(GoLangConstant.alarmLevel.get(alarmDto.getAlarmLevel())); // hygfjpInverterWarn.setLevel(GoLangConstant.alarmLevel.get(alarmDto.getAlarmLevel()));
hygfjpInverterWarn.setContent(goodWeAlarmDto.getWarningname()); hygfjpInverterWarn.setContent(goodWeAlarmDto.getWarningname());
hygfjpInverterWarn.setThirdCode(PVProducerInfoEnum.GDW.getCode()); hygfjpInverterWarn.setThirdCode(PVProducerInfoEnum.GDW.getCode());
hygfjpInverterWarn.setTreatment(GoodWeConstant.errorCodeMap.get(goodWeAlarmDto.getError_code()).get(2)); if (GoodWeConstant.errorCodeMap.get(goodWeAlarmDto.getError_code()) != null) {
hygfjpInverterWarn
.setTreatment(GoodWeConstant.errorCodeMap.get(goodWeAlarmDto.getError_code()).get(2));
}
hygfjpInverterWarn.setStartTime(goodWeAlarmDto.getHappentime().getMillis()); hygfjpInverterWarn.setStartTime(goodWeAlarmDto.getHappentime().getMillis());
// 电站区域经销商,
JpStation jpStation = jpStationMapper
.selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.GDW.getCode())
.eq("third_station_id", String.valueOf(goodWeAlarmDto.getStationId())));
if (jpStation != null) {
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code", PVProducerInfoEnum.GDW.getCode()).
eq("third_station_id", String.valueOf(goodWeAlarmDto.getStationId())));
if(jpStation!=null){
hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpInverterWarn.setStationName(jpStation.getName()); hygfjpInverterWarn.setStationName(jpStation.getName());
...@@ -793,15 +884,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe ...@@ -793,15 +884,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
} }
hygfjpInverterWarn.setRecoverTime(null); hygfjpInverterWarn.setRecoverTime(null);
if (!ObjectUtils.isEmpty(goodWeAlarmDto.getRecoverytime())) { if (!ObjectUtils.isEmpty(goodWeAlarmDto.getRecoverytime())) {
hygfjpInverterWarn.setRecoverTime(goodWeAlarmDto.getRecoverytime().getMillis()); hygfjpInverterWarn.setRecoverTime(goodWeAlarmDto.getRecoverytime().getMillis());
} }
hygfjpInverterWarn.setTimeLong(null); hygfjpInverterWarn.setTimeLong(null);
if ((!ObjectUtils.isEmpty(goodWeAlarmDto.getHappentime())) && (!ObjectUtils.isEmpty(goodWeAlarmDto.getRecoverytime()))) { if ((!ObjectUtils.isEmpty(goodWeAlarmDto.getHappentime()))
hygfjpInverterWarn.setTimeLong(goodWeAlarmDto.getRecoverytime().getMillis() - goodWeAlarmDto.getHappentime().getMillis()); && (!ObjectUtils.isEmpty(goodWeAlarmDto.getRecoverytime()))) {
hygfjpInverterWarn.setTimeLong(
goodWeAlarmDto.getRecoverytime().getMillis() - goodWeAlarmDto.getHappentime().getMillis());
} }
hygfjpInverterWarn.setState(GoodWeConstant.warningStaus.get(goodWeAlarmDto.getStatus().toString())); hygfjpInverterWarn.setState(GoodWeConstant.warningStaus.get(goodWeAlarmDto.getStatus().toString()));
if (org.springframework.util.ObjectUtils.isEmpty(hygfjpInverterWarn.getCreatedTime())) { if (org.springframework.util.ObjectUtils.isEmpty(hygfjpInverterWarn.getCreatedTime())) {
......
...@@ -22,13 +22,17 @@ import com.yeejoin.amos.api.householdapi.face.service.ImasterDataService; ...@@ -22,13 +22,17 @@ import com.yeejoin.amos.api.householdapi.face.service.ImasterDataService;
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum; import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import fastjson.JSON; import fastjson.JSON;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -117,9 +121,16 @@ public class ImasterDataServiceImpl implements ImasterDataService { ...@@ -117,9 +121,16 @@ public class ImasterDataServiceImpl implements ImasterDataService {
@Autowired @Autowired
TdJpStationMapper tdJpStationMapper; TdJpStationMapper tdJpStationMapper;
final static Logger logger = LoggerFactory.getLogger(GoLangDataAcquisitionServiceImpl.class);
final static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Scheduled(cron = "${dataRequstScheduled.huawei}") @Scheduled(cron = "${dataRequstScheduled.huawei}")
@Override @Override
@Async
public void stationList() { public void stationList() {
long ts = System.currentTimeMillis();
logger.info("-------华为同步电站开始" + ts + "------- " + sdf.format(new Date()));
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("pageNo", 1); requestInfo.put("pageNo", 1);
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
...@@ -134,13 +145,16 @@ public class ImasterDataServiceImpl implements ImasterDataService { ...@@ -134,13 +145,16 @@ public class ImasterDataServiceImpl implements ImasterDataService {
imasterStationList.setCreatedTime(System.currentTimeMillis()); imasterStationList.setCreatedTime(System.currentTimeMillis());
imasterStationMapper.insert(imasterStationList); imasterStationMapper.insert(imasterStationList);
} }
logger.info("-------华为同步电站结束" + ts + "------- " + sdf.format(new Date()));
} }
@Scheduled(cron = "${dataRequstScheduled.huawei}") @Scheduled(cron = "${dataRequstScheduled.huawei}")
@Override @Override
@Async
public void stationDetail() { public void stationDetail() {
long ts = System.currentTimeMillis();
logger.info("-------华为同步电站详情开始" + ts + "------- " + sdf.format(new Date()));
List<String> stationList = imasterStationMapper.getStationIds(); List<String> stationList = imasterStationMapper.getStationIds();
String today = DateUtil.today(); String today = DateUtil.today();
String hour = new Date().getHours() + ":00"; String hour = new Date().getHours() + ":00";
...@@ -456,12 +470,16 @@ public class ImasterDataServiceImpl implements ImasterDataService { ...@@ -456,12 +470,16 @@ public class ImasterDataServiceImpl implements ImasterDataService {
} }
} }
this.inverterDetail(result4); this.inverterDetail(result4);
logger.info("-------华为同步电站详情结束" + ts + "------- " + sdf.format(new Date()));
} }
@Scheduled(cron = "${dataRequstScheduled.huawei}") @Scheduled(cron = "${dataRequstScheduled.huawei}")
@Override @Override
@Async
public void collectorList() { public void collectorList() {
long ts = System.currentTimeMillis();
logger.info("-------华为同步采集器/逆变器开始" + ts + "------- " + sdf.format(new Date()));
List<String> stationIds = imasterStationMapper.getStationIds(); List<String> stationIds = imasterStationMapper.getStationIds();
// try { // try {
// TimeUnit.SECONDS.sleep(1); // TimeUnit.SECONDS.sleep(1);
...@@ -547,6 +565,7 @@ public class ImasterDataServiceImpl implements ImasterDataService { ...@@ -547,6 +565,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
this.inverterList(result); this.inverterList(result);
logger.info("-------华为同步采集器/逆变器结束" + ts + "------- " + sdf.format(new Date()));
} }
@Override @Override
...@@ -1017,8 +1036,10 @@ public class ImasterDataServiceImpl implements ImasterDataService { ...@@ -1017,8 +1036,10 @@ public class ImasterDataServiceImpl implements ImasterDataService {
@Scheduled(cron = "${dataRequstScheduled.huawei}") @Scheduled(cron = "${dataRequstScheduled.huawei}")
@Override @Override
@Async
public void inverAlramInfo() { public void inverAlramInfo() {
long ts = System.currentTimeMillis();
logger.info("-------华为同步告警开始" + ts + "------- " + sdf.format(new Date()));
List<String> inverterSns = imasterInverterListMapper.getCollectIds(); List<String> inverterSns = imasterInverterListMapper.getCollectIds();
// for (int i = 0; i < inverterSns.size(); i++) { // for (int i = 0; i < inverterSns.size(); i++) {
// try { // try {
...@@ -1087,5 +1108,6 @@ public class ImasterDataServiceImpl implements ImasterDataService { ...@@ -1087,5 +1108,6 @@ public class ImasterDataServiceImpl implements ImasterDataService {
} }
} }
// } // }
logger.info("-------华为同步告警结束" + ts + "------- " + sdf.format(new Date()));
} }
} }
...@@ -26,8 +26,11 @@ import com.yeejoin.amos.api.householdapi.face.service.KSolarDataAcquisitionServi ...@@ -26,8 +26,11 @@ import com.yeejoin.amos.api.householdapi.face.service.KSolarDataAcquisitionServi
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum; import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import fastjson.JSON; import fastjson.JSON;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -49,7 +52,6 @@ import java.util.stream.Collectors; ...@@ -49,7 +52,6 @@ import java.util.stream.Collectors;
@Service @Service
public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionService { public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionService {
@Autowired @Autowired
KsolarRequestUtil kSolarRequestUtil; KsolarRequestUtil kSolarRequestUtil;
...@@ -91,7 +93,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -91,7 +93,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
@Autowired @Autowired
private JpInverterMapper jpInverterMapper; private JpInverterMapper jpInverterMapper;
//监盘逆变器电量mapper // 监盘逆变器电量mapper
@Autowired @Autowired
private JpInverterElectricityMapper jpInverterElectricityMapper; private JpInverterElectricityMapper jpInverterElectricityMapper;
@Autowired @Autowired
...@@ -111,26 +113,33 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -111,26 +113,33 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
@Autowired @Autowired
TdJpStationMapper tdJpStationMapper; TdJpStationMapper tdJpStationMapper;
final static Logger logger = LoggerFactory.getLogger(SofarDataAcquisitionServiceImpl.class);
final static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Scheduled(cron = "${dataRequstScheduled.keshida}") @Scheduled(cron = "${dataRequstScheduled.keshida}")
@Override @Override
@Async
public void stationList() { public void stationList() {
long ts = System.currentTimeMillis();
logger.info("-------科士达同步场站开始" + ts + "------- " + sdf.format(new Date()));
HashMap<String, Object> requestInfo = new HashMap<>(); HashMap<String, Object> requestInfo = new HashMap<>();
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
List<KsolarStationList> kSolarStationListList = kSolarRequestUtil.getResPonse( List<KsolarStationList> kSolarStationListList = kSolarRequestUtil.getResPonse(KSolarConstant.stationListUrl,
KSolarConstant.stationListUrl, KSolarConstant.requestGET, requestParaminfo, KSolarConstant.resovle_rows, KsolarStationList.class);
KSolarConstant.requestGET,
requestParaminfo,
KSolarConstant.resovle_rows,
KsolarStationList.class);
for (KsolarStationList kSolarStation : kSolarStationListList) { for (KsolarStationList kSolarStation : kSolarStationListList) {
kSolarStation.setCreatedTime(System.currentTimeMillis()); kSolarStation.setCreatedTime(System.currentTimeMillis());
kSolarStationMapper.insert(kSolarStation); kSolarStationMapper.insert(kSolarStation);
} }
logger.info("-------科士达同步场站结束" + ts + "------- " + sdf.format(new Date()));
} }
@Scheduled(cron = "${dataRequstScheduled.keshida}") @Scheduled(cron = "${dataRequstScheduled.keshida}")
@Override @Override
@Async
public void stationDetail() { public void stationDetail() {
long ts = System.currentTimeMillis();
logger.info("-------科士达同步场站详情开始" + ts + "------- " + sdf.format(new Date()));
List<String> stationIds = kSolarStationMapper.getStationIds(); List<String> stationIds = kSolarStationMapper.getStationIds();
String today = DateUtil.today(); String today = DateUtil.today();
String hour = new Date().getHours() + ":00"; String hour = new Date().getHours() + ":00";
...@@ -151,11 +160,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -151,11 +160,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
String url = KSolarConstant.stationInfoByIdUrl + "?stationId=" + ksolarStation.getStationId(); String url = KSolarConstant.stationInfoByIdUrl + "?stationId=" + ksolarStation.getStationId();
// 获取电站详情 // 获取电站详情
List<KsolarStationDetails> ksolarStationDetailsList = kSolarRequestUtil.getResPonse( List<KsolarStationDetails> ksolarStationDetailsList = kSolarRequestUtil.getResPonse(url,
url, KSolarConstant.requestPOST, requestParaminfo, KSolarConstant.resovle_data,
KSolarConstant.requestPOST,
requestParaminfo,
KSolarConstant.resovle_data,
KsolarStationDetails.class); KsolarStationDetails.class);
// 获取单个电站的发电量和收益 // 获取单个电站的发电量和收益
KsolarStationEarn stationEarn = getStationEarn(ksolarStation.getStationId()); KsolarStationEarn stationEarn = getStationEarn(ksolarStation.getStationId());
...@@ -169,9 +175,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -169,9 +175,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
for (KsolarStationDetails ksolarStationDetail : ksolarStationDetailsList) { for (KsolarStationDetails ksolarStationDetail : ksolarStationDetailsList) {
ksolarStationDetail.setCreatedTime(System.currentTimeMillis()); ksolarStationDetail.setCreatedTime(System.currentTimeMillis());
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>(). JpStation jpStation = jpStationMapper.selectOne(
eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()). new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.KSOLAR.getCode())
eq("third_station_id", ksolarStation.getStationId())); .eq("third_station_id", ksolarStation.getStationId()));
// 给户用光伏存储的数据赋值 // 给户用光伏存储的数据赋值
if (ObjectUtils.isEmpty(jpStation)) { if (ObjectUtils.isEmpty(jpStation)) {
jpStation = new JpStation(); jpStation = new JpStation();
...@@ -182,14 +188,15 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -182,14 +188,15 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpStation.setPrice(ksolarStationDetail.getElecPrice()); jpStation.setPrice(ksolarStationDetail.getElecPrice());
jpStation.setAddress(ksolarStationDetail.getStationAddressDetail()); jpStation.setAddress(ksolarStationDetail.getStationAddressDetail());
jpStation.setLongitude(ksolarStationDetail.getLongitude()); jpStation.setLongitude(ksolarStationDetail.getLongitude());
jpStation.setOnGridType("自发自用");//客户确认 jpStation.setOnGridType("自发自用");// 客户确认
jpStation.setRatedPower(4360.4);//客户确认 jpStation.setRatedPower(4360.4);// 客户确认
jpStation.setLatitude(ksolarStationDetail.getLatitude()); jpStation.setLatitude(ksolarStationDetail.getLatitude());
jpStation.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode()); jpStation.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
// 业主姓名 // 业主姓名
jpStation.setUserName(ksolarStation.getUserName()); jpStation.setUserName(ksolarStation.getUserName());
jpStation.setState(KSolarConstant.collectStaus.get(String.valueOf(ksolarStation.getStatus()))); jpStation.setState(KSolarConstant.collectStaus.get(String.valueOf(ksolarStation.getStatus())));
jpStation.setRealTimePower(ksolarStation.getPowerInter() != null ? ksolarStation.getPowerInter() / 1000 : 0.0); jpStation.setRealTimePower(
ksolarStation.getPowerInter() != null ? ksolarStation.getPowerInter() / 1000 : 0.0);
jpStation.setDayGenerate(ksolarStation.getDayGeneration()); jpStation.setDayGenerate(ksolarStation.getDayGeneration());
jpStation.setAccumulatedPower(ksolarStation.getTotalGeneration()); jpStation.setAccumulatedPower(ksolarStation.getTotalGeneration());
...@@ -229,7 +236,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -229,7 +236,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// 业主电话 // 业主电话
// jpStation.setUserPhone(String.valueOf(golangStationDetail.getUsermobile())); // jpStation.setUserPhone(String.valueOf(golangStationDetail.getUsermobile()));
// 电站联系人 // 电站联系人
// jpStation.setStationContact(String.valueOf(golangStationDetail.getMobile()).toLowerCase().replace("null", "")); // jpStation.setStationContact(String.valueOf(golangStationDetail.getMobile()).toLowerCase().replace("null",
// ""));
// 组件数量 // 组件数量
// jpStation.setModuleCount(ObjectUtils.isEmpty(Math.toIntExact(golangStationDetail.getModule()))?0:Math.toIntExact(golangStationDetail.getModule())); // jpStation.setModuleCount(ObjectUtils.isEmpty(Math.toIntExact(golangStationDetail.getModule()))?0:Math.toIntExact(golangStationDetail.getModule()));
jpStation.setRecDate(new Date()); jpStation.setRecDate(new Date());
...@@ -239,10 +247,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -239,10 +247,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpStationMapper.insert(jpStation); jpStationMapper.insert(jpStation);
} }
// 增加td 电站区域公司,经销商绑定表
//增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>(). // TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code",PVProducerInfoEnum.KSOLAR.getCode()). // eq("third_code",PVProducerInfoEnum.KSOLAR.getCode()).
// eq("third_station_id", ksolarStation.getStationId())); // eq("third_station_id", ksolarStation.getStationId()));
...@@ -271,21 +276,16 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -271,21 +276,16 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode()); hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode());
hygfjpStationPowerHistory.setTime(System.currentTimeMillis()); hygfjpStationPowerHistory.setTime(System.currentTimeMillis());
//新加 // 新加
hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpStationPowerHistory.setStationName(jpStation.getName()); hygfjpStationPowerHistory.setStationName(jpStation.getName());
hygfjpStationPowerHistory.setStationState(jpStation.getState()); hygfjpStationPowerHistory.setStationState(jpStation.getState());
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory); hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne( HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper
new QueryWrapper<HYGFJPDayPower>(). .selectOne(new QueryWrapper<HYGFJPDayPower>().eq("tation_id", ksolarStation.getStationId())
eq("tation_id", ksolarStation.getStationId()). .eq("year_month_day", today).eq("hour", hour));
eq("year_month_day", today).
eq("hour", hour)
);
if (ObjectUtils.isEmpty(hygfjpDayPower)) { if (ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower(); hygfjpDayPower = new HYGFJPDayPower();
} }
...@@ -294,7 +294,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -294,7 +294,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpDayPower.setYearMonthDay(today); hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(ksolarStation.getPowerInter()); hygfjpDayPower.setPower(ksolarStation.getPowerInter());
//新加 // 新加
hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpDayPower.setStationName(jpStation.getName()); hygfjpDayPower.setStationName(jpStation.getName());
...@@ -310,9 +310,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -310,9 +310,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
ksolarStationDetailsMapper.insert(ksolarStationDetail); ksolarStationDetailsMapper.insert(ksolarStationDetail);
Date today1 = new Date(); Date today1 = new Date();
//户用场站日发电量 // 户用场站日发电量
TdHYGFStationDayGenerate tdHYGFStationDayGenerate = tdHYGFStationDayGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationDayGenerate>() TdHYGFStationDayGenerate tdHYGFStationDayGenerate = tdHYGFStationDayGenerateMapper
.eq("third_station_id", stationId) .selectOne(new QueryWrapper<TdHYGFStationDayGenerate>().eq("third_station_id", stationId)
.eq("day_time", DateUtil.format(today1, "yyyy-MM-dd")) .eq("day_time", DateUtil.format(today1, "yyyy-MM-dd"))
.eq("year_month", DateUtil.format(today1, "yyyy-MM"))); .eq("year_month", DateUtil.format(today1, "yyyy-MM")));
if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate)) { if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate)) {
...@@ -325,7 +325,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -325,7 +325,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationDayGenerate.setFullhour(jpStation.getDayGenerate() / jpStation.getCapacity()); tdHYGFStationDayGenerate.setFullhour(jpStation.getDayGenerate() / jpStation.getCapacity());
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome()); tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
//新加 // 新加
tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationDayGenerate.setStationName(jpStation.getName()); tdHYGFStationDayGenerate.setStationName(jpStation.getName());
...@@ -337,9 +337,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -337,9 +337,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} else { } else {
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate); tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
} }
//户用场站月发电量 // 户用场站月发电量
TdHYGFStationMonthGenerate tdHYGFStationMonthGenerate = tdHYGFStationMonthGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationMonthGenerate>() TdHYGFStationMonthGenerate tdHYGFStationMonthGenerate = tdHYGFStationMonthGenerateMapper
.eq("third_station_id", stationId) .selectOne(new QueryWrapper<TdHYGFStationMonthGenerate>().eq("third_station_id", stationId)
.eq("month_time", DateUtil.format(today1, "yyyy-MM")) .eq("month_time", DateUtil.format(today1, "yyyy-MM"))
.eq("year", DateUtil.format(today1, "yyyy"))); .eq("year", DateUtil.format(today1, "yyyy")));
if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate)) { if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate)) {
...@@ -352,7 +352,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -352,7 +352,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity()); tdHYGFStationMonthGenerate.setFullhour(jpStation.getMonthGenerate() / jpStation.getCapacity());
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome()); tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
//新加 // 新加
tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationMonthGenerate.setStationName(jpStation.getName()); tdHYGFStationMonthGenerate.setStationName(jpStation.getName());
...@@ -364,9 +364,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -364,9 +364,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} else { } else {
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate); tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFStationYearGenerate tdHYGFStationYearGenerate = tdHYGFStationYearGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationYearGenerate>() TdHYGFStationYearGenerate tdHYGFStationYearGenerate = tdHYGFStationYearGenerateMapper
.eq("third_station_id", stationId) .selectOne(new QueryWrapper<TdHYGFStationYearGenerate>().eq("third_station_id", stationId)
.eq("year_time", DateUtil.format(today1, "yyyy")) .eq("year_time", DateUtil.format(today1, "yyyy"))
.eq("year", DateUtil.format(today1, "yyyy"))); .eq("year", DateUtil.format(today1, "yyyy")));
if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate)) { if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate)) {
...@@ -378,7 +378,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -378,7 +378,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate()); tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate());
tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate() / jpStation.getCapacity()); tdHYGFStationYearGenerate.setFullhour(jpStation.getYearGenerate() / jpStation.getCapacity());
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome()); tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
//新加 // 新加
tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationYearGenerate.setStationName(jpStation.getName()); tdHYGFStationYearGenerate.setStationName(jpStation.getName());
...@@ -393,6 +393,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -393,6 +393,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
} }
} }
logger.info("-------科士达同步场站详情结束" + ts + "------- " + sdf.format(new Date()));
} }
/** /**
...@@ -412,12 +413,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -412,12 +413,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
HashMap<String, Object> requestInfo = new HashMap<>(1); HashMap<String, Object> requestInfo = new HashMap<>(1);
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
String url = KSolarConstant.stationEarnUrl + "?stationId=" + stationId; String url = KSolarConstant.stationEarnUrl + "?stationId=" + stationId;
List<KsolarStationEarn> ksolarStationEarns = kSolarRequestUtil.getResPonse( List<KsolarStationEarn> ksolarStationEarns = kSolarRequestUtil.getResPonse(url, KSolarConstant.requestGET,
url, requestParaminfo, KSolarConstant.resovle_data, KsolarStationEarn.class);
KSolarConstant.requestGET,
requestParaminfo,
KSolarConstant.resovle_data,
KsolarStationEarn.class);
if (!CollectionUtils.isEmpty(ksolarStationEarns)) { if (!CollectionUtils.isEmpty(ksolarStationEarns)) {
ksolarStationEarn = ksolarStationEarns.get(0); ksolarStationEarn = ksolarStationEarns.get(0);
...@@ -427,7 +424,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -427,7 +424,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
return ksolarStationEarn; return ksolarStationEarn;
} }
Map<String, Double> getStationMonthEarn(String stationId, String type) { private Map<String, Double> getStationMonthEarn(String stationId, String type) {
Map<String, Double> map = new HashMap<>(1); Map<String, Double> map = new HashMap<>(1);
try { try {
TimeUnit.SECONDS.sleep(1); TimeUnit.SECONDS.sleep(1);
...@@ -451,16 +448,15 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -451,16 +448,15 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
attribId = "202"; attribId = "202";
stime = year; stime = year;
} }
String url = KSolarConstant.stationEarnChartUrl + "?stationId=" + stationId + "&attribId=" + attribId + "&stime=" + stime; String url = KSolarConstant.stationEarnChartUrl + "?stationId=" + stationId + "&attribId=" + attribId
List<KsolarStationEarnChart> ksolarStationEarnCharts = kSolarRequestUtil.getResPonse( + "&stime=" + stime;
url, List<KsolarStationEarnChart> ksolarStationEarnCharts = kSolarRequestUtil.getResPonse(url,
KSolarConstant.requestGET, KSolarConstant.requestGET, requestParaminfo, KSolarConstant.resovle_arr, KsolarStationEarnChart.class);
requestParaminfo,
KSolarConstant.resovle_arr,
KsolarStationEarnChart.class);
double earnValues = 0; double earnValues = 0;
if (!CollectionUtils.isEmpty(ksolarStationEarnCharts)) { if (!CollectionUtils.isEmpty(ksolarStationEarnCharts)) {
earnValues += ksolarStationEarnCharts.stream().mapToDouble(ksolarStationEarnChart -> Double.parseDouble(ksolarStationEarnChart.getEarnValue())).sum(); earnValues += ksolarStationEarnCharts.stream()
.mapToDouble(ksolarStationEarnChart -> Double.parseDouble(ksolarStationEarnChart.getEarnValue()))
.sum();
} }
if ("year".equals(type)) { if ("year".equals(type)) {
map.put("yearEarn", earnValues); map.put("yearEarn", earnValues);
...@@ -472,7 +468,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -472,7 +468,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
@Scheduled(cron = "${dataRequstScheduled.keshida}") @Scheduled(cron = "${dataRequstScheduled.keshida}")
@Override @Override
@Async
public void collectorList() { public void collectorList() {
long ts = System.currentTimeMillis();
logger.info("-------科士达同步采集器开始" + ts + "------- " + sdf.format(new Date()));
List<String> stationIds = kSolarStationMapper.getStationIds(); List<String> stationIds = kSolarStationMapper.getStationIds();
for (String stationId : stationIds) { for (String stationId : stationIds) {
LambdaQueryWrapper<KsolarStationList> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<KsolarStationList> wrapper = new LambdaQueryWrapper<>();
...@@ -488,24 +487,20 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -488,24 +487,20 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
HashMap<String, Object> requestInfo = new HashMap<>(1); HashMap<String, Object> requestInfo = new HashMap<>(1);
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
String url = KSolarConstant.stationCollectListUrl + "?stationId=" + ksolarStationList.getStationId() + "&pageNumber=1&pageSize=200"; String url = KSolarConstant.stationCollectListUrl + "?stationId=" + ksolarStationList.getStationId()
List<KsolarStationCollectList> result = kSolarRequestUtil.getResPonse( + "&pageNumber=1&pageSize=200";
url, List<KsolarStationCollectList> result = kSolarRequestUtil.getResPonse(url, KSolarConstant.requestGET,
KSolarConstant.requestGET, requestParaminfo, KSolarConstant.resovle_rows, KsolarStationCollectList.class);
requestParaminfo,
KSolarConstant.resovle_rows,
KsolarStationCollectList.class
);
for (KsolarStationCollectList ksolarStationCollectList : result) { for (KsolarStationCollectList ksolarStationCollectList : result) {
ksolarStationCollectList.setCreatedTime(System.currentTimeMillis()); ksolarStationCollectList.setCreatedTime(System.currentTimeMillis());
ksolarStationCollectList.setThirdStationId(ksolarStationList.getStationId()); ksolarStationCollectList.setThirdStationId(ksolarStationList.getStationId());
ksolarStationCollectListMapper.insert(ksolarStationCollectList); ksolarStationCollectListMapper.insert(ksolarStationCollectList);
JpCollector jpCollector = jpCollectorMapper.selectOne(new QueryWrapper<JpCollector>(). JpCollector jpCollector = jpCollectorMapper.selectOne(new QueryWrapper<JpCollector>()
eq("third_station_id", ksolarStationCollectList.getThirdStationId()). .eq("third_station_id", ksolarStationCollectList.getThirdStationId())
eq("sn_code", ksolarStationCollectList.getCollectId().trim()). .eq("sn_code", ksolarStationCollectList.getCollectId().trim())
eq("third_code", PVProducerInfoEnum.KSOLAR.getCode())); .eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()));
if (ObjectUtils.isEmpty(jpCollector)) { if (ObjectUtils.isEmpty(jpCollector)) {
jpCollector = new JpCollector(); jpCollector = new JpCollector();
} }
...@@ -528,14 +523,14 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -528,14 +523,14 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpCollector.setThirdStationId(ksolarStationCollectList.getThirdStationId()); jpCollector.setThirdStationId(ksolarStationCollectList.getThirdStationId());
// 第三方厂商标识 // 第三方厂商标识
jpCollector.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode()); jpCollector.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
//第三方厂商标识 // 第三方厂商标识
jpCollector.setState(KSolarConstant.collectStaus.get(ksolarStationCollectList.getStatus())); jpCollector.setState(KSolarConstant.collectStaus.get(ksolarStationCollectList.getStatus()));
jpCollector.setStationName(ksolarStationCollectList.getStationName()); jpCollector.setStationName(ksolarStationCollectList.getStationName());
jpCollector.setAddr(ksolarStationCollectList.getAddress()); jpCollector.setAddr(ksolarStationCollectList.getAddress());
jpCollector.setName(ksolarStationCollectList.getCollectName()); jpCollector.setName(ksolarStationCollectList.getCollectName());
jpCollector.setVersion(ksolarStationCollectList.getCollectVersion()); jpCollector.setVersion(ksolarStationCollectList.getCollectVersion());
jpCollector.setType(ksolarStationCollectList.getDeviceModel()); jpCollector.setType(ksolarStationCollectList.getDeviceModel());
//信号强度 // 信号强度
jpCollector.setSignalStrength(String.valueOf(ksolarStationCollectList.getSignal())); jpCollector.setSignalStrength(String.valueOf(ksolarStationCollectList.getSignal()));
jpCollector.setRecDate(new Date()); jpCollector.setRecDate(new Date());
if (ObjectUtils.isEmpty(jpCollector.getSequenceNbr())) { if (ObjectUtils.isEmpty(jpCollector.getSequenceNbr())) {
...@@ -554,21 +549,25 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -554,21 +549,25 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
} }
} }
logger.info("-------科士达同步采集器开始" + ts + "------- " + sdf.format(new Date()));
} }
@Scheduled(cron = "${dataRequstScheduled.keshida}") @Scheduled(cron = "${dataRequstScheduled.keshida}")
@Override @Override
@Async
public void collectorDetail() { public void collectorDetail() {
long ts = System.currentTimeMillis();
List<JpCollector> jpCollectorlist = jpCollectorMapper.selectList(new QueryWrapper<JpCollector>(). logger.info("-------科士达同步采集器详情/逆变器开始" + ts + "------- " + sdf.format(new Date()));
eq("third_code", PVProducerInfoEnum.KSOLAR.getCode())); List<JpCollector> jpCollectorlist = jpCollectorMapper
.selectList(new QueryWrapper<JpCollector>().eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()));
List<String> collectIds = ksolarStationCollectListMapper.getCollectIds(); List<String> collectIds = ksolarStationCollectListMapper.getCollectIds();
if (!CollectionUtils.isEmpty(collectIds)) { if (!CollectionUtils.isEmpty(collectIds)) {
collectIds.forEach(collectId -> { collectIds.forEach(collectId -> {
LambdaQueryWrapper<KsolarStationCollectList> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<KsolarStationCollectList> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(KsolarStationCollectList::getCollectId, collectId); wrapper.eq(KsolarStationCollectList::getCollectId, collectId);
wrapper.orderByDesc(KsolarStationCollectList::getCreatedTime); wrapper.orderByDesc(KsolarStationCollectList::getCreatedTime);
List<KsolarStationCollectList> ksolarStationCollectLists = ksolarStationCollectListMapper.selectList(wrapper); List<KsolarStationCollectList> ksolarStationCollectLists = ksolarStationCollectListMapper
.selectList(wrapper);
if (!CollectionUtils.isEmpty(ksolarStationCollectLists)) { if (!CollectionUtils.isEmpty(ksolarStationCollectLists)) {
KsolarStationCollectList ksolarStationCollectList = ksolarStationCollectLists.get(0); KsolarStationCollectList ksolarStationCollectList = ksolarStationCollectLists.get(0);
try { try {
...@@ -579,31 +578,29 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -579,31 +578,29 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
HashMap<String, Object> requestInfo = new HashMap<>(1); HashMap<String, Object> requestInfo = new HashMap<>(1);
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
String url = KSolarConstant.stationCollectDataUrl + "?collectId=" + collectId; String url = KSolarConstant.stationCollectDataUrl + "?collectId=" + collectId;
List<KsolarStationCollectData> result = kSolarRequestUtil.getResPonse( List<KsolarStationCollectData> result = kSolarRequestUtil.getResPonse(url,
url, KSolarConstant.requestGET, requestParaminfo, KSolarConstant.resovle_data,
KSolarConstant.requestGET, KsolarStationCollectData.class);
requestParaminfo,
KSolarConstant.resovle_data,
KsolarStationCollectData.class
);
if (jpCollectorlist != null && jpCollectorlist.size() > 0) { if (jpCollectorlist != null && jpCollectorlist.size() > 0) {
JpCollector jpCollectorflag = null; JpCollector jpCollectorflag = null;
for (JpCollector jpCollector : jpCollectorlist) { for (JpCollector jpCollector : jpCollectorlist) {
if (jpCollector.getSnCode().equals(ksolarStationCollectList.getCollectId().trim()) && KSolarConstant.collectStaus.get("1").equals(jpCollector.getState())) { if (jpCollector.getSnCode().equals(ksolarStationCollectList.getCollectId().trim())
&& KSolarConstant.collectStaus.get("1").equals(jpCollector.getState())) {
jpCollectorflag = jpCollector; jpCollectorflag = jpCollector;
break; break;
} }
} }
if (jpCollectorflag != null) { if (jpCollectorflag != null) {
//离线状态 // 离线状态
JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>(). JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>()
eq("collector_sn_code", jpCollectorflag.getSnCode().trim()) ); .eq("collector_sn_code", jpCollectorflag.getSnCode().trim()));
if (ObjectUtils.isEmpty(jpInverter)) { if (ObjectUtils.isEmpty(jpInverter)) {
jpInverter = new JpInverter(); jpInverter = new JpInverter();
} }
jpInverter.setCapacity(KSolarConstant.Capacity.get(StringUtils.lowerCase(jpCollectorflag.getName()))); jpInverter.setCapacity(
KSolarConstant.Capacity.get(StringUtils.lowerCase(jpCollectorflag.getName())));
jpInverter.setSnCode(jpInverter.getSnCode()); jpInverter.setSnCode(jpInverter.getSnCode());
jpInverter.setId(jpInverter.getId()); jpInverter.setId(jpInverter.getId());
jpInverter.setState(jpCollectorflag.getState()); jpInverter.setState(jpCollectorflag.getState());
...@@ -626,19 +623,17 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -626,19 +623,17 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
if (!ObjectUtils.isEmpty(jpInverter.getSequenceNbr())) { if (!ObjectUtils.isEmpty(jpInverter.getSequenceNbr())) {
jpInverterMapper.updateById(jpInverter); jpInverterMapper.updateById(jpInverter);
} else { } else {
if(StringUtils.isNotEmpty(jpInverter.getSnCode())){ if (StringUtils.isNotEmpty(jpInverter.getSnCode())) {
jpInverterMapper.insert(jpInverter); jpInverterMapper.insert(jpInverter);
} }
} }
for (int k1 = 1; k1 < 13; k1++) { for (int k1 = 1; k1 < 13; k1++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper
eq("sn_code", jpInverter.getSnCode().trim()). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("type", "直流"). .eq("sn_code", jpInverter.getSnCode().trim()).eq("type", "直流")
eq("name", "PV" + k1) .eq("name", "PV" + k1));
);
if (ObjectUtils.isEmpty(jpInverterElectricity)) { if (ObjectUtils.isEmpty(jpInverterElectricity)) {
jpInverterElectricity = new JpInverterElectricity(); jpInverterElectricity = new JpInverterElectricity();
} }
...@@ -658,11 +653,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -658,11 +653,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
} }
JpInverterElectricity jpInverterElectricityR = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricityR = jpInverterElectricityMapper
eq("sn_code", jpInverter.getSnCode().trim()). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("type", "交流"). .eq("sn_code", jpInverter.getSnCode().trim()).eq("type", "交流")
eq("name", "RS") .eq("name", "RS"));
);
if (ObjectUtils.isEmpty(jpInverterElectricityR)) { if (ObjectUtils.isEmpty(jpInverterElectricityR)) {
jpInverterElectricityR = new JpInverterElectricity(); jpInverterElectricityR = new JpInverterElectricity();
} }
...@@ -681,11 +675,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -681,11 +675,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpInverterElectricityMapper.updateById(jpInverterElectricityR); jpInverterElectricityMapper.updateById(jpInverterElectricityR);
} }
JpInverterElectricity jpInverterElectricityS = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricityS = jpInverterElectricityMapper
eq("sn_code", jpInverter.getSnCode().trim()). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("type", "交流"). .eq("sn_code", jpInverter.getSnCode().trim()).eq("type", "交流")
eq("name", "ST") .eq("name", "ST"));
);
if (ObjectUtils.isEmpty(jpInverterElectricityS)) { if (ObjectUtils.isEmpty(jpInverterElectricityS)) {
jpInverterElectricityS = new JpInverterElectricity(); jpInverterElectricityS = new JpInverterElectricity();
} }
...@@ -703,12 +696,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -703,12 +696,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpInverterElectricityMapper.updateById(jpInverterElectricityS); jpInverterElectricityMapper.updateById(jpInverterElectricityS);
} }
JpInverterElectricity jpInverterElectricityT = jpInverterElectricityMapper
JpInverterElectricity jpInverterElectricityT = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("sn_code", jpInverter.getSnCode().trim()). .eq("sn_code", jpInverter.getSnCode().trim()).eq("type", "交流")
eq("type", "交流"). .eq("name", "TR"));
eq("name", "TR")
);
if (ObjectUtils.isEmpty(jpInverterElectricityT)) { if (ObjectUtils.isEmpty(jpInverterElectricityT)) {
jpInverterElectricityT = new JpInverterElectricity(); jpInverterElectricityT = new JpInverterElectricity();
} }
...@@ -744,8 +735,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -744,8 +735,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// 逆变器历史 // 逆变器历史
String today = DateUtil.today(); String today = DateUtil.today();
HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper.selectOne( HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper
new QueryWrapper<HYGFJPInverterHistory>().eq("sn_code", jpInverter.getSnCode().trim()).eq("date", today)); .selectOne(new QueryWrapper<HYGFJPInverterHistory>()
.eq("sn_code", jpInverter.getSnCode().trim()).eq("date", today));
if (ObjectUtils.isEmpty(hygfjpInverterHistory)) { if (ObjectUtils.isEmpty(hygfjpInverterHistory)) {
hygfjpInverterHistory = new HYGFJPInverterHistory(); hygfjpInverterHistory = new HYGFJPInverterHistory();
} }
...@@ -764,23 +756,20 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -764,23 +756,20 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} else { } else {
hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory); hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory);
} }
} else { } else {
if (!CollectionUtils.isEmpty(result)) { if (!CollectionUtils.isEmpty(result)) {
result.forEach(ksolarStationCollectData -> { result.forEach(ksolarStationCollectData -> {
List<JpInverter> jpInverterList = jpInverterMapper.selectList(new QueryWrapper<JpInverter>(). List<JpInverter> jpInverterList = jpInverterMapper
eq("third_station_id", ksolarStationCollectList.getThirdStationId()). .selectList(new QueryWrapper<JpInverter>()
eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()). .eq("third_station_id",
like("sn_code", ksolarStationCollectData.getInverterId().trim()) ksolarStationCollectList.getThirdStationId())
.isNotNull("sn_code") .eq("third_code", PVProducerInfoEnum.KSOLAR.getCode())
.orderByDesc("update_time")); .like("sn_code", ksolarStationCollectData.getInverterId().trim())
JpInverter jpInverter =jpInverterList.get(0); .isNotNull("sn_code").orderByDesc("update_time"));
if (ObjectUtils.isEmpty(jpInverter)) { JpInverter jpInverter = new JpInverter();
jpInverter = new JpInverter(); if (jpInverterList.size() > 0) {
jpInverter = jpInverterList.get(0);
} }
// 品牌 // 品牌
// jpInverter.setBrand(inverterDetailDto.getName()); // jpInverter.setBrand(inverterDetailDto.getName());
// 国标 // 国标
...@@ -791,19 +780,24 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -791,19 +780,24 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// jpInverter.setCapacity(); // jpInverter.setCapacity();
if (jpCollectorlist != null && jpCollectorlist.size() > 0) { if (jpCollectorlist != null && jpCollectorlist.size() > 0) {
for (JpCollector jpCollector : jpCollectorlist) { for (JpCollector jpCollector : jpCollectorlist) {
if (jpCollector.getSnCode().equals(ksolarStationCollectList.getCollectId().trim())) { if (jpCollector.getSnCode()
jpInverter.setCapacity(KSolarConstant.Capacity.get(StringUtils.lowerCase(jpCollector.getName()))); .equals(ksolarStationCollectList.getCollectId().trim())) {
jpInverter.setCapacity(KSolarConstant.Capacity
.get(StringUtils.lowerCase(jpCollector.getName())));
} }
} }
} }
jpInverter.setSnCode(ksolarStationCollectData.getInverterId().trim()); jpInverter.setSnCode(ksolarStationCollectData.getInverterId().trim());
jpInverter.setId(ksolarStationCollectData.getInverterId().trim()); jpInverter.setId(ksolarStationCollectData.getInverterId().trim());
jpInverter.setState(KSolarConstant.collectStaus.get(ksolarStationCollectData.getStatus())); jpInverter.setState(
KSolarConstant.collectStaus.get(ksolarStationCollectData.getStatus()));
jpInverter.setCollectorId(ksolarStationCollectList.getCollectId().trim()); jpInverter.setCollectorId(ksolarStationCollectList.getCollectId().trim());
jpInverter.setCollectorSnCode(ksolarStationCollectList.getCollectId().trim()); jpInverter.setCollectorSnCode(ksolarStationCollectList.getCollectId().trim());
jpInverter.setUpdateTime(new Date()); jpInverter.setUpdateTime(new Date());
jpInverter.setCurrentPower(ksolarStationCollectData.getPowerApparent() != null ? ksolarStationCollectData.getPowerApparent() / 1000 : null); jpInverter.setCurrentPower(ksolarStationCollectData.getPowerApparent() != null
? ksolarStationCollectData.getPowerApparent() / 1000
: null);
jpInverter.setDayPowerGeneration(ksolarStationCollectData.getDayGeneration()); jpInverter.setDayPowerGeneration(ksolarStationCollectData.getDayGeneration());
jpInverter.setMonthPowerGeneration(ksolarStationCollectData.getMonthGeneration()); jpInverter.setMonthPowerGeneration(ksolarStationCollectData.getMonthGeneration());
jpInverter.setYearPowerGeneration(ksolarStationCollectData.getYearGeneration()); jpInverter.setYearPowerGeneration(ksolarStationCollectData.getYearGeneration());
...@@ -818,33 +812,37 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -818,33 +812,37 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
if (!ObjectUtils.isEmpty(jpInverter.getSequenceNbr())) { if (!ObjectUtils.isEmpty(jpInverter.getSequenceNbr())) {
jpInverterMapper.updateById(jpInverter); jpInverterMapper.updateById(jpInverter);
} else { } else {
if(StringUtils.isNotEmpty(jpInverter.getSnCode())){ if (StringUtils.isNotEmpty(jpInverter.getSnCode())) {
jpInverterMapper.insert(jpInverter); jpInverterMapper.insert(jpInverter);
} }
} }
String jsonString = JSON.toJSONString(ksolarStationCollectData); String jsonString = JSON.toJSONString(ksolarStationCollectData);
Map<String, Object> hanlderResult = JSON.parseObject(jsonString, Map.class); Map<String, Object> hanlderResult = JSON.parseObject(jsonString, Map.class);
for (int k1 = 1; k1 < 13; k1++) { for (int k1 = 1; k1 < 13; k1++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper
eq("sn_code", ksolarStationCollectData.getInverterId().trim()). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("type", "直流"). .eq("sn_code", ksolarStationCollectData.getInverterId().trim())
eq("name", "PV" + k1) .eq("type", "直流").eq("name", "PV" + k1));
);
if (ObjectUtils.isEmpty(jpInverterElectricity)) { if (ObjectUtils.isEmpty(jpInverterElectricity)) {
jpInverterElectricity = new JpInverterElectricity(); jpInverterElectricity = new JpInverterElectricity();
} }
jpInverterElectricity.setInverterId(ksolarStationCollectData.getInverterId().trim()); jpInverterElectricity
jpInverterElectricity.setSnCode(ksolarStationCollectData.getInverterId().trim()); .setInverterId(ksolarStationCollectData.getInverterId().trim());
jpInverterElectricity
.setSnCode(ksolarStationCollectData.getInverterId().trim());
jpInverterElectricity.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode()); jpInverterElectricity.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
jpInverterElectricity.setThirdStationId(ksolarStationCollectList.getThirdStationId()); jpInverterElectricity
.setThirdStationId(ksolarStationCollectList.getThirdStationId());
jpInverterElectricity.setType("直流"); jpInverterElectricity.setType("直流");
jpInverterElectricity.setName("PV" + k1); jpInverterElectricity.setName("PV" + k1);
jpInverterElectricity.setVoltage(Double.valueOf(hanlderResult.get("voltagePv" + k1).toString())); jpInverterElectricity.setVoltage(
jpInverterElectricity.setCurrent(Double.valueOf(hanlderResult.get("currentPv" + k1).toString())); Double.valueOf(hanlderResult.get("voltagePv" + k1).toString()));
jpInverterElectricity.setPower(Double.valueOf(hanlderResult.get("powerPv" + k1).toString())); jpInverterElectricity.setCurrent(
Double.valueOf(hanlderResult.get("currentPv" + k1).toString()));
jpInverterElectricity
.setPower(Double.valueOf(hanlderResult.get("powerPv" + k1).toString()));
if (ObjectUtils.isEmpty(jpInverterElectricity.getSequenceNbr())) { if (ObjectUtils.isEmpty(jpInverterElectricity.getSequenceNbr())) {
jpInverterElectricityMapper.insert(jpInverterElectricity); jpInverterElectricityMapper.insert(jpInverterElectricity);
} else { } else {
...@@ -852,18 +850,19 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -852,18 +850,19 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
} }
JpInverterElectricity jpInverterElectricityR = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricityR = jpInverterElectricityMapper
eq("sn_code", ksolarStationCollectData.getInverterId().trim()). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("type", "交流"). .eq("sn_code", ksolarStationCollectData.getInverterId().trim())
eq("name", "RS") .eq("type", "交流").eq("name", "RS"));
);
if (ObjectUtils.isEmpty(jpInverterElectricityR)) { if (ObjectUtils.isEmpty(jpInverterElectricityR)) {
jpInverterElectricityR = new JpInverterElectricity(); jpInverterElectricityR = new JpInverterElectricity();
} }
jpInverterElectricityR.setInverterId(ksolarStationCollectData.getInverterId().trim()); jpInverterElectricityR
.setInverterId(ksolarStationCollectData.getInverterId().trim());
jpInverterElectricityR.setSnCode(ksolarStationCollectData.getInverterId().trim()); jpInverterElectricityR.setSnCode(ksolarStationCollectData.getInverterId().trim());
jpInverterElectricityR.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode()); jpInverterElectricityR.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
jpInverterElectricityR.setThirdStationId(ksolarStationCollectList.getThirdStationId()); jpInverterElectricityR
.setThirdStationId(ksolarStationCollectList.getThirdStationId());
jpInverterElectricityR.setFrequency(ksolarStationCollectData.getFrequencyRs()); jpInverterElectricityR.setFrequency(ksolarStationCollectData.getFrequencyRs());
jpInverterElectricityR.setType("交流"); jpInverterElectricityR.setType("交流");
jpInverterElectricityR.setName("RS"); jpInverterElectricityR.setName("RS");
...@@ -875,18 +874,19 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -875,18 +874,19 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpInverterElectricityMapper.updateById(jpInverterElectricityR); jpInverterElectricityMapper.updateById(jpInverterElectricityR);
} }
JpInverterElectricity jpInverterElectricityS = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricityS = jpInverterElectricityMapper
eq("sn_code", ksolarStationCollectData.getInverterId().trim()). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("type", "交流"). .eq("sn_code", ksolarStationCollectData.getInverterId().trim())
eq("name", "ST") .eq("type", "交流").eq("name", "ST"));
);
if (ObjectUtils.isEmpty(jpInverterElectricityS)) { if (ObjectUtils.isEmpty(jpInverterElectricityS)) {
jpInverterElectricityS = new JpInverterElectricity(); jpInverterElectricityS = new JpInverterElectricity();
} }
jpInverterElectricityS.setInverterId(ksolarStationCollectData.getInverterId().trim()); jpInverterElectricityS
.setInverterId(ksolarStationCollectData.getInverterId().trim());
jpInverterElectricityS.setSnCode(ksolarStationCollectData.getInverterId().trim()); jpInverterElectricityS.setSnCode(ksolarStationCollectData.getInverterId().trim());
jpInverterElectricityS.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode()); jpInverterElectricityS.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
jpInverterElectricityS.setThirdStationId(ksolarStationCollectList.getThirdStationId()); jpInverterElectricityS
.setThirdStationId(ksolarStationCollectList.getThirdStationId());
jpInverterElectricityS.setType("交流"); jpInverterElectricityS.setType("交流");
jpInverterElectricityS.setName("ST"); jpInverterElectricityS.setName("ST");
jpInverterElectricityS.setVoltage(ksolarStationCollectData.getVoltageSt()); jpInverterElectricityS.setVoltage(ksolarStationCollectData.getVoltageSt());
...@@ -897,19 +897,19 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -897,19 +897,19 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpInverterElectricityMapper.updateById(jpInverterElectricityS); jpInverterElectricityMapper.updateById(jpInverterElectricityS);
} }
JpInverterElectricity jpInverterElectricityT = jpInverterElectricityMapper
JpInverterElectricity jpInverterElectricityT = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("sn_code", ksolarStationCollectData.getInverterId().trim()). .eq("sn_code", ksolarStationCollectData.getInverterId().trim())
eq("type", "交流"). .eq("type", "交流").eq("name", "TR"));
eq("name", "TR")
);
if (ObjectUtils.isEmpty(jpInverterElectricityT)) { if (ObjectUtils.isEmpty(jpInverterElectricityT)) {
jpInverterElectricityT = new JpInverterElectricity(); jpInverterElectricityT = new JpInverterElectricity();
} }
jpInverterElectricityT.setInverterId(ksolarStationCollectData.getInverterId().trim()); jpInverterElectricityT
.setInverterId(ksolarStationCollectData.getInverterId().trim());
jpInverterElectricityT.setSnCode(ksolarStationCollectData.getInverterId().trim()); jpInverterElectricityT.setSnCode(ksolarStationCollectData.getInverterId().trim());
jpInverterElectricityT.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode()); jpInverterElectricityT.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
jpInverterElectricityT.setThirdStationId(ksolarStationCollectList.getThirdStationId()); jpInverterElectricityT
.setThirdStationId(ksolarStationCollectList.getThirdStationId());
jpInverterElectricityT.setType("交流"); jpInverterElectricityT.setType("交流");
jpInverterElectricityT.setName("TR"); jpInverterElectricityT.setName("TR");
jpInverterElectricityT.setVoltage(ksolarStationCollectData.getVoltageTr()); jpInverterElectricityT.setVoltage(ksolarStationCollectData.getVoltageTr());
...@@ -922,9 +922,11 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -922,9 +922,11 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// //
HYGFJPInverterElecHistory hygfjpInverterElecHistory = new HYGFJPInverterElecHistory(); HYGFJPInverterElecHistory hygfjpInverterElecHistory = new HYGFJPInverterElecHistory();
hygfjpInverterElecHistory.setThirdStationId(ksolarStationCollectList.getThirdStationId()); hygfjpInverterElecHistory
.setThirdStationId(ksolarStationCollectList.getThirdStationId());
hygfjpInverterElecHistory.setCreatedTime(System.currentTimeMillis()); hygfjpInverterElecHistory.setCreatedTime(System.currentTimeMillis());
hygfjpInverterElecHistory.setSnCode(ksolarStationCollectData.getInverterId().trim()); hygfjpInverterElecHistory
.setSnCode(ksolarStationCollectData.getInverterId().trim());
hygfjpInverterElecHistory.setUAcCurrent(ksolarStationCollectData.getCurrentR()); hygfjpInverterElecHistory.setUAcCurrent(ksolarStationCollectData.getCurrentR());
hygfjpInverterElecHistory.setVAcCurrent(ksolarStationCollectData.getCurrents()); hygfjpInverterElecHistory.setVAcCurrent(ksolarStationCollectData.getCurrents());
...@@ -938,8 +940,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -938,8 +940,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// 逆变器历史 // 逆变器历史
String today = DateUtil.today(); String today = DateUtil.today();
HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper.selectOne( HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper
new QueryWrapper<HYGFJPInverterHistory>().eq("sn_code", ksolarStationCollectData.getInverterId()).eq("date", today)); .selectOne(new QueryWrapper<HYGFJPInverterHistory>()
.eq("sn_code", ksolarStationCollectData.getInverterId())
.eq("date", today));
if (ObjectUtils.isEmpty(hygfjpInverterHistory)) { if (ObjectUtils.isEmpty(hygfjpInverterHistory)) {
hygfjpInverterHistory = new HYGFJPInverterHistory(); hygfjpInverterHistory = new HYGFJPInverterHistory();
} }
...@@ -947,11 +951,13 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -947,11 +951,13 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// 满发小时数 // 满发小时数
// hygfjpInverterHistory.setGenerationHours(inverterDetailDto.getFullHour()); // hygfjpInverterHistory.setGenerationHours(inverterDetailDto.getFullHour());
hygfjpInverterHistory.setDate(today); hygfjpInverterHistory.setDate(today);
hygfjpInverterHistory.setThirdStationId(ksolarStationCollectList.getThirdStationId()); hygfjpInverterHistory
.setThirdStationId(ksolarStationCollectList.getThirdStationId());
hygfjpInverterHistory.setInverterId(ksolarStationCollectData.getInverterId()); hygfjpInverterHistory.setInverterId(ksolarStationCollectData.getInverterId());
hygfjpInverterHistory.setSnCode(jpInverter.getSnCode().trim()); hygfjpInverterHistory.setSnCode(jpInverter.getSnCode().trim());
hygfjpInverterHistory.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode()); hygfjpInverterHistory.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
hygfjpInverterHistory.setPowerGeneration(ksolarStationCollectData.getTotalGeneration()); hygfjpInverterHistory
.setPowerGeneration(ksolarStationCollectData.getTotalGeneration());
if (ObjectUtils.isEmpty(hygfjpInverterHistory.getCreatedTime())) { if (ObjectUtils.isEmpty(hygfjpInverterHistory.getCreatedTime())) {
hygfjpInverterHistory.setCreatedTime(System.currentTimeMillis()); hygfjpInverterHistory.setCreatedTime(System.currentTimeMillis());
hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory); hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory);
...@@ -959,74 +965,89 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -959,74 +965,89 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory); hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory);
} }
//-----------------------户用光伏日报表---------------------- // -----------------------户用光伏日报表----------------------
TdHYGFInverterDayGenerate tdHYGFInverterDayGenerate = new TdHYGFInverterDayGenerate(); TdHYGFInverterDayGenerate tdHYGFInverterDayGenerate = new TdHYGFInverterDayGenerate();
tdHYGFInverterDayGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFInverterDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterDayGenerate.setThirdStationId(jpInverter.getThirdStationId()); tdHYGFInverterDayGenerate.setThirdStationId(jpInverter.getThirdStationId());
tdHYGFInverterDayGenerate.setSnCode(jpInverter.getSnCode()); tdHYGFInverterDayGenerate.setSnCode(jpInverter.getSnCode());
tdHYGFInverterDayGenerate.setName(jpInverter.getName()); tdHYGFInverterDayGenerate.setName(jpInverter.getName());
tdHYGFInverterDayGenerate.setWorkStatus(jpInverter.getState()); tdHYGFInverterDayGenerate.setWorkStatus(jpInverter.getState());
//交流电压 // 交流电压
tdHYGFInverterDayGenerate.setDcv1(jpInverterElectricityR.getVoltage()); tdHYGFInverterDayGenerate.setDcv1(jpInverterElectricityR.getVoltage());
tdHYGFInverterDayGenerate.setDcv2(jpInverterElectricityS.getVoltage()); tdHYGFInverterDayGenerate.setDcv2(jpInverterElectricityS.getVoltage());
tdHYGFInverterDayGenerate.setDcv3(jpInverterElectricityT.getVoltage()); tdHYGFInverterDayGenerate.setDcv3(jpInverterElectricityT.getVoltage());
//交流电流 // 交流电流
// tdHYGFInverterDayGenerate.setDcv4(inverterDetailDto.getUAc4()); // tdHYGFInverterDayGenerate.setDcv4(inverterDetailDto.getUAc4());
tdHYGFInverterDayGenerate.setDcc1(jpInverterElectricityR.getCurrent()); tdHYGFInverterDayGenerate.setDcc1(jpInverterElectricityR.getCurrent());
tdHYGFInverterDayGenerate.setDcc2(jpInverterElectricityS.getCurrent()); tdHYGFInverterDayGenerate.setDcc2(jpInverterElectricityS.getCurrent());
tdHYGFInverterDayGenerate.setDcc3(jpInverterElectricityT.getCurrent()); tdHYGFInverterDayGenerate.setDcc3(jpInverterElectricityT.getCurrent());
// tdHYGFInverterDayGenerate.setDcc4(inverterDetailDto.getIAc4()); // tdHYGFInverterDayGenerate.setDcc4(inverterDetailDto.getIAc4());
//直流电压 // 直流电压
tdHYGFInverterDayGenerate.setAcv1(Double.valueOf(hanlderResult.get("voltagePv1").toString())); tdHYGFInverterDayGenerate
tdHYGFInverterDayGenerate.setAcv2(Double.valueOf(hanlderResult.get("voltagePv2").toString())); .setAcv1(Double.valueOf(hanlderResult.get("voltagePv1").toString()));
tdHYGFInverterDayGenerate.setAcv3(Double.valueOf(hanlderResult.get("voltagePv3").toString())); tdHYGFInverterDayGenerate
tdHYGFInverterDayGenerate.setAcv4(Double.valueOf(hanlderResult.get("voltagePv4").toString())); .setAcv2(Double.valueOf(hanlderResult.get("voltagePv2").toString()));
//直流电流 tdHYGFInverterDayGenerate
tdHYGFInverterDayGenerate.setAcc1(Double.valueOf(hanlderResult.get("currentPv1").toString())); .setAcv3(Double.valueOf(hanlderResult.get("voltagePv3").toString()));
tdHYGFInverterDayGenerate.setAcc2(Double.valueOf(hanlderResult.get("currentPv2").toString())); tdHYGFInverterDayGenerate
tdHYGFInverterDayGenerate.setAcc3(Double.valueOf(hanlderResult.get("currentPv3").toString())); .setAcv4(Double.valueOf(hanlderResult.get("voltagePv4").toString()));
tdHYGFInverterDayGenerate.setAcc4(Double.valueOf(hanlderResult.get("currentPv4").toString())); // 直流电流
tdHYGFInverterDayGenerate
tdHYGFInverterDayGenerate.setPv1(Double.valueOf(hanlderResult.get("powerPv1").toString())); .setAcc1(Double.valueOf(hanlderResult.get("currentPv1").toString()));
tdHYGFInverterDayGenerate.setPv2(Double.valueOf(hanlderResult.get("powerPv2").toString())); tdHYGFInverterDayGenerate
tdHYGFInverterDayGenerate.setPv3(Double.valueOf(hanlderResult.get("powerPv3").toString())); .setAcc2(Double.valueOf(hanlderResult.get("currentPv2").toString()));
tdHYGFInverterDayGenerate.setPv4(Double.valueOf(hanlderResult.get("powerPv4").toString())); tdHYGFInverterDayGenerate
//功率 .setAcc3(Double.valueOf(hanlderResult.get("currentPv3").toString()));
tdHYGFInverterDayGenerate
.setAcc4(Double.valueOf(hanlderResult.get("currentPv4").toString()));
tdHYGFInverterDayGenerate
.setPv1(Double.valueOf(hanlderResult.get("powerPv1").toString()));
tdHYGFInverterDayGenerate
.setPv2(Double.valueOf(hanlderResult.get("powerPv2").toString()));
tdHYGFInverterDayGenerate
.setPv3(Double.valueOf(hanlderResult.get("powerPv3").toString()));
tdHYGFInverterDayGenerate
.setPv4(Double.valueOf(hanlderResult.get("powerPv4").toString()));
// 功率
tdHYGFInverterDayGenerate.setTotalPower(jpInverter.getCurrentPower()); tdHYGFInverterDayGenerate.setTotalPower(jpInverter.getCurrentPower());
// //频率 // //频率
tdHYGFInverterDayGenerate.setFrequency(String.valueOf(jpInverterElectricityR.getFrequency())); tdHYGFInverterDayGenerate
.setFrequency(String.valueOf(jpInverterElectricityR.getFrequency()));
// //功率因数 // //功率因数
tdHYGFInverterDayGenerate.setPowerFactor(1.0); tdHYGFInverterDayGenerate.setPowerFactor(1.0);
tdHYGFInverterDayGenerate.setDayGen(jpInverter.getDayPowerGeneration()); tdHYGFInverterDayGenerate.setDayGen(jpInverter.getDayPowerGeneration());
tdHYGFInverterDayGenerate.setMonthGen(jpInverter.getMonthPowerGeneration()); tdHYGFInverterDayGenerate.setMonthGen(jpInverter.getMonthPowerGeneration());
tdHYGFInverterDayGenerate.setYearGen(jpInverter.getYearPowerGeneration()); tdHYGFInverterDayGenerate.setYearGen(jpInverter.getYearPowerGeneration());
tdHYGFInverterDayGenerate.setTotalGen(jpInverter.getTotalPowerGeneration()); tdHYGFInverterDayGenerate.setTotalGen(jpInverter.getTotalPowerGeneration());
tdHYGFInverterDayGenerate.setIgbtTemp(ObjectUtils.isEmpty(jpInverter.getIgbtTemperature()) ? null : Double.valueOf(jpInverter.getIgbtTemperature())); tdHYGFInverterDayGenerate
.setIgbtTemp(ObjectUtils.isEmpty(jpInverter.getIgbtTemperature()) ? null
: Double.valueOf(jpInverter.getIgbtTemperature()));
tdHYGFInverterDayGenerate.setIncome(null); tdHYGFInverterDayGenerate.setIncome(null);
tdHYGFInverterDayGenerate.setFullhour(0.0d); tdHYGFInverterDayGenerate.setFullhour(0.0d);
tdHYGFInverterDayGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity()); tdHYGFInverterDayGenerate
.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
// 电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>()
.eq("third_code", PVProducerInfoEnum.KSOLAR.getCode())
.eq("third_station_id", String.valueOf(jpInverter.getThirdStationId())));
//电站区域经销商, if (jpStation != null) {
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code",PVProducerInfoEnum.KSOLAR.getCode()).
eq("third_station_id", String.valueOf(jpInverter.getThirdStationId())));
if(jpStation!=null){
tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterDayGenerate
.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterDayGenerate.setStationName(jpStation.getName()); tdHYGFInverterDayGenerate.setStationName(jpStation.getName());
tdHYGFInverterDayGenerate.setStationState(jpStation.getState()); tdHYGFInverterDayGenerate.setStationState(jpStation.getState());
} }
tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate); tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate);
//户用场站月发电量 // 户用场站月发电量
Date today1 = new Date(); Date today1 = new Date();
TdHYGFInverterMonthGenerate tdHYGFInverterMonthGenerate = tdHYGFInverterMonthGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterMonthGenerate>() TdHYGFInverterMonthGenerate tdHYGFInverterMonthGenerate = tdHYGFInverterMonthGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterMonthGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode())
.eq("day_time", DateUtil.format(today1, "yyyy-MM-dd")) .eq("day_time", DateUtil.format(today1, "yyyy-MM-dd"))
...@@ -1041,11 +1062,13 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1041,11 +1062,13 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration()); tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration());
tdHYGFInverterMonthGenerate.setName(jpInverter.getName()); tdHYGFInverterMonthGenerate.setName(jpInverter.getName());
tdHYGFInverterMonthGenerate.setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity()); tdHYGFInverterMonthGenerate
//新加 .setFullhour(jpInverter.getDayPowerGeneration() / jpInverter.getCapacity());
if(jpStation!=null){ // 新加
if (jpStation != null) {
tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterMonthGenerate
.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterMonthGenerate.setStationName(jpStation.getName()); tdHYGFInverterMonthGenerate.setStationName(jpStation.getName());
tdHYGFInverterMonthGenerate.setStationState(jpStation.getState()); tdHYGFInverterMonthGenerate.setStationState(jpStation.getState());
...@@ -1057,8 +1080,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1057,8 +1080,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} else { } else {
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate); tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFInverterYearGenerate tdHYGFInverterYearGenerate = tdHYGFInverterYearGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterYearGenerate>() TdHYGFInverterYearGenerate tdHYGFInverterYearGenerate = tdHYGFInverterYearGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterYearGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode())
.eq("month_time", DateUtil.format(today1, "yyyy-MM")) .eq("month_time", DateUtil.format(today1, "yyyy-MM"))
...@@ -1073,26 +1097,28 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1073,26 +1097,28 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFInverterYearGenerate.setGenerate(jpInverter.getMonthPowerGeneration()); tdHYGFInverterYearGenerate.setGenerate(jpInverter.getMonthPowerGeneration());
tdHYGFInverterYearGenerate.setName(jpInverter.getName()); tdHYGFInverterYearGenerate.setName(jpInverter.getName());
tdHYGFInverterYearGenerate.setFullhour(jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity()); tdHYGFInverterYearGenerate.setFullhour(
jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity());
//新加 // 新加
if(jpStation!=null){ if (jpStation != null) {
tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterYearGenerate
.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterYearGenerate.setStationName(jpStation.getName()); tdHYGFInverterYearGenerate.setStationName(jpStation.getName());
tdHYGFInverterYearGenerate.setStationState(jpStation.getState()); tdHYGFInverterYearGenerate.setStationState(jpStation.getState());
} }
if (ObjectUtils.isEmpty(tdHYGFInverterYearGenerate.getCreatedTime())) { if (ObjectUtils.isEmpty(tdHYGFInverterYearGenerate.getCreatedTime())) {
tdHYGFInverterYearGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFInverterYearGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate); tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
} else { } else {
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate); tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFInverterTotalGenerate tdHYGFInverterTotalGenerate = tdHYGFInverterTotalGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterTotalGenerate>() TdHYGFInverterTotalGenerate tdHYGFInverterTotalGenerate = tdHYGFInverterTotalGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterTotalGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode())
.eq("year_time", DateUtil.format(today1, "yyyy")) .eq("year_time", DateUtil.format(today1, "yyyy"))
...@@ -1107,15 +1133,17 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1107,15 +1133,17 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration()); tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration());
tdHYGFInverterTotalGenerate.setFullhour(0.0d); tdHYGFInverterTotalGenerate.setFullhour(0.0d);
tdHYGFInverterTotalGenerate.setName(jpInverter.getName()); tdHYGFInverterTotalGenerate.setName(jpInverter.getName());
//新加 // 新加
if(jpStation!=null){ if (jpStation != null) {
tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterTotalGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterTotalGenerate
.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterTotalGenerate.setStationName(jpStation.getName()); tdHYGFInverterTotalGenerate.setStationName(jpStation.getName());
tdHYGFInverterTotalGenerate.setStationState(jpStation.getState()); tdHYGFInverterTotalGenerate.setStationState(jpStation.getState());
} }
tdHYGFInverterTotalGenerate.setFullhour(jpInverter.getYearPowerGeneration() / jpInverter.getCapacity()); tdHYGFInverterTotalGenerate.setFullhour(
jpInverter.getYearPowerGeneration() / jpInverter.getCapacity());
if (ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate.getCreatedTime())) { if (ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate.getCreatedTime())) {
tdHYGFInverterTotalGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFInverterTotalGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate); tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate);
...@@ -1125,13 +1153,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1125,13 +1153,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
}); });
} }
} }
} }
// if (!CollectionUtils.isEmpty(result)) { // if (!CollectionUtils.isEmpty(result)) {
// result.forEach(ksolarStationCollectData -> { // result.forEach(ksolarStationCollectData -> {
// JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>(). // JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>().
...@@ -1327,6 +1352,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1327,6 +1352,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// } catch (ParseException e) { // } catch (ParseException e) {
// e.printStackTrace(); // e.printStackTrace();
// } // }
logger.info("-------科士达同步采集器详情/逆变器结束" + ts + "------- " + sdf.format(new Date()));
} }
@Override @Override
...@@ -1338,20 +1364,21 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1338,20 +1364,21 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
public void inverterDetail() { public void inverterDetail() {
} }
@Scheduled(cron = "${dataRequstScheduled.keshida}") @Scheduled(cron = "${dataRequstScheduled.keshida}")
@Override @Override
@Async
public void inverAlramInfo() { public void inverAlramInfo() {
long ts = System.currentTimeMillis();
logger.info("-------科士达同步告警开始" + ts + "------- " + sdf.format(new Date()));
try { try {
TimeUnit.SECONDS.sleep(1); TimeUnit.SECONDS.sleep(1);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
List<JpInverter> ksdInverterList = jpInverterMapper
.selectList(new QueryWrapper<JpInverter>().eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()));
List<JpInverter> ksdInverterList = jpInverterMapper.selectList(new QueryWrapper<JpInverter>(). ksdInverterList = ksdInverterList.stream().filter(jpInverter -> !ObjectUtils.isEmpty(jpInverter.getSnCode()))
eq("third_code", PVProducerInfoEnum.KSOLAR.getCode())); .collect(Collectors.toList());
ksdInverterList = ksdInverterList.stream().filter(jpInverter -> !ObjectUtils.isEmpty(jpInverter.getSnCode())).collect(Collectors.toList());
Map<String, String> ksdInverterListMap = new HashMap<>(); Map<String, String> ksdInverterListMap = new HashMap<>();
ksdInverterList.forEach(jpInverter -> { ksdInverterList.forEach(jpInverter -> {
...@@ -1362,13 +1389,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1362,13 +1389,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
HashMap<String, Object> requestInfo = new HashMap<>(1); HashMap<String, Object> requestInfo = new HashMap<>(1);
String requestParaminfo = JSON.toJSONString(requestInfo); String requestParaminfo = JSON.toJSONString(requestInfo);
String url = KSolarConstant.stationCollectAlarmUrl + "?pageNumber=1&pageSize=200"; String url = KSolarConstant.stationCollectAlarmUrl + "?pageNumber=1&pageSize=200";
List<KsolarAlarmDto> result = kSolarRequestUtil.getResPonse( List<KsolarAlarmDto> result = kSolarRequestUtil.getResPonse(url, KSolarConstant.requestGET, requestParaminfo,
url, KSolarConstant.resovle_rows, KsolarAlarmDto.class);
KSolarConstant.requestGET,
requestParaminfo,
KSolarConstant.resovle_rows,
KsolarAlarmDto.class
);
if (!CollectionUtils.isEmpty(result)) { if (!CollectionUtils.isEmpty(result)) {
for (KsolarAlarmDto ksolarAlarmDto : result) { for (KsolarAlarmDto ksolarAlarmDto : result) {
if (!ObjectUtils.isEmpty(ksolarAlarmDto.getInverterId())) { if (!ObjectUtils.isEmpty(ksolarAlarmDto.getInverterId())) {
...@@ -1383,12 +1405,12 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1383,12 +1405,12 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
if (ObjectUtils.isEmpty(snCode)) { if (ObjectUtils.isEmpty(snCode)) {
continue; continue;
} }
List<HYGFJPInverterWarn> list = hygfjpInverterWarnMapper.selectList(new QueryWrapper<HYGFJPInverterWarn>() List<HYGFJPInverterWarn> list = hygfjpInverterWarnMapper
.eq("sn_code", snCode) .selectList(new QueryWrapper<HYGFJPInverterWarn>().eq("sn_code", snCode).eq("start_time",
.eq("start_time", DateUtil.parse(ksolarAlarmDto.getSaveTime(), DatePattern.NORM_DATETIME_PATTERN).getTime()) DateUtil.parse(ksolarAlarmDto.getSaveTime(), DatePattern.NORM_DATETIME_PATTERN)
.getTime())
.eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()) .eq("third_code", PVProducerInfoEnum.KSOLAR.getCode())
.eq("third_station_id", ksolarAlarmDto.getStationId()) .eq("third_station_id", ksolarAlarmDto.getStationId()));
);
HYGFJPInverterWarn hygfjpInverterWarn = new HYGFJPInverterWarn(); HYGFJPInverterWarn hygfjpInverterWarn = new HYGFJPInverterWarn();
if (!ObjectUtils.isEmpty(list)) { if (!ObjectUtils.isEmpty(list)) {
hygfjpInverterWarn = list.get(0); hygfjpInverterWarn = list.get(0);
...@@ -1401,19 +1423,18 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1401,19 +1423,18 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpInverterWarn.setContent(ksolarAlarmDto.getMessage()); hygfjpInverterWarn.setContent(ksolarAlarmDto.getMessage());
hygfjpInverterWarn.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode()); hygfjpInverterWarn.setThirdCode(PVProducerInfoEnum.KSOLAR.getCode());
hygfjpInverterWarn.setTreatment(ksolarAlarmDto.getSolution()); hygfjpInverterWarn.setTreatment(ksolarAlarmDto.getSolution());
hygfjpInverterWarn.setStartTime(DateUtil.parse(ksolarAlarmDto.getSaveTime(), DatePattern.NORM_DATETIME_PATTERN).getTime()); hygfjpInverterWarn.setStartTime(
DateUtil.parse(ksolarAlarmDto.getSaveTime(), DatePattern.NORM_DATETIME_PATTERN).getTime());
hygfjpInverterWarn.setState(KSolarConstant.alarmstatus.get(ksolarAlarmDto.getStatus())); hygfjpInverterWarn.setState(KSolarConstant.alarmstatus.get(ksolarAlarmDto.getStatus()));
hygfjpInverterWarn.setTimeLong(null); hygfjpInverterWarn.setTimeLong(null);
hygfjpInverterWarn.setRecoverTime(null); hygfjpInverterWarn.setRecoverTime(null);
// 电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(
new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.KSOLAR.getCode())
.eq("third_station_id", ksolarAlarmDto.getStationId()));
if (jpStation != null) {
//电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()).
eq("third_station_id", ksolarAlarmDto.getStationId()));
if(jpStation!=null){
hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpInverterWarn.setStationName(jpStation.getName()); hygfjpInverterWarn.setStationName(jpStation.getName());
...@@ -1421,13 +1442,14 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1421,13 +1442,14 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
if (StringUtils.isNotBlank(ksolarAlarmDto.getRemoveTime())) { if (StringUtils.isNotBlank(ksolarAlarmDto.getRemoveTime())) {
hygfjpInverterWarn.setRecoverTime(DateUtil.parse(ksolarAlarmDto.getRemoveTime(), DatePattern.NORM_DATETIME_PATTERN).getTime()); hygfjpInverterWarn.setRecoverTime(DateUtil
.parse(ksolarAlarmDto.getRemoveTime(), DatePattern.NORM_DATETIME_PATTERN).getTime());
} }
if (!ObjectUtils.isEmpty(ksolarAlarmDto.getSaveTime()) && !ObjectUtils.isEmpty(ksolarAlarmDto.getRemoveTime())) { if (!ObjectUtils.isEmpty(ksolarAlarmDto.getSaveTime())
hygfjpInverterWarn.setTimeLong(hygfjpInverterWarn.getRecoverTime() - hygfjpInverterWarn.getStartTime()); && !ObjectUtils.isEmpty(ksolarAlarmDto.getRemoveTime())) {
hygfjpInverterWarn
.setTimeLong(hygfjpInverterWarn.getRecoverTime() - hygfjpInverterWarn.getStartTime());
} }
if (ObjectUtils.isEmpty(hygfjpInverterWarn.getCreatedTime())) { if (ObjectUtils.isEmpty(hygfjpInverterWarn.getCreatedTime())) {
hygfjpInverterWarn.setCreatedTime(System.currentTimeMillis()); hygfjpInverterWarn.setCreatedTime(System.currentTimeMillis());
...@@ -1439,5 +1461,6 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1439,5 +1461,6 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
} }
logger.info("-------科士达同步告警结束" + ts + "------- " + sdf.format(new Date()));
} }
} }
...@@ -112,7 +112,6 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ ...@@ -112,7 +112,6 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
@Override @Override
@Scheduled(cron = "${dataRequstScheduled.Sofar}") @Scheduled(cron = "${dataRequstScheduled.Sofar}")
@PostConstruct
public void stationList() { public void stationList() {
Map<String, Object> requestInfo = new HashMap<>(); Map<String, Object> requestInfo = new HashMap<>();
requestInfo.put("page", 1); requestInfo.put("page", 1);
...@@ -1199,15 +1198,15 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ ...@@ -1199,15 +1198,15 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
requestInfo.put("stationId", jpStation.getThirdStationId()); requestInfo.put("stationId", jpStation.getThirdStationId());
if (jpStation.getThirdStationId().equals("517021808701218816")){ // if (jpStation.getThirdStationId().equals("517021808701218816")){
System.out.println("6666666666666666666666666"); // System.out.println("6666666666666666666666666");
} // }
String param = JSON.toJSONString(requestInfo); String param = JSON.toJSONString(requestInfo);
List<SofarWarm> jsonObject2 = requestUtil.getResPonse(SoFarConstant.alert, SoFarConstant.requestPost, param, List<SofarWarm> jsonObject2 = requestUtil.getResPonse(SoFarConstant.alert, SoFarConstant.requestPost, param,
SoFarConstant.stationAlertItems, SofarWarm.class); SoFarConstant.stationAlertItems, SofarWarm.class);
if (jsonObject2 != null && jsonObject2.size() > 0) { // if (jsonObject2 != null && jsonObject2.size() > 0) {
System.out.println("88888888888888888888888"); // System.out.println("88888888888888888888888");
} // }
for (SofarWarm sofarWarm : jsonObject2) { for (SofarWarm sofarWarm : jsonObject2) {
if (sofarWarm.getDeviceType().equals("INVERTER") || sofarWarm.getDeviceType().equals("COLLECTOR")) { if (sofarWarm.getDeviceType().equals("INVERTER") || sofarWarm.getDeviceType().equals("COLLECTOR")) {
HYGFJPInverterWarn hygfjpInverterWarn = new HYGFJPInverterWarn(); HYGFJPInverterWarn hygfjpInverterWarn = new HYGFJPInverterWarn();
......
package com.yeejoin.amos.api.householdapi.face.service.impl; package com.yeejoin.amos.api.householdapi.face.service.impl;
import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.gson.JsonObject;
import com.qiniu.util.Json;
import com.yeejoin.amos.api.householdapi.Utils.SunlightUtil; import com.yeejoin.amos.api.householdapi.Utils.SunlightUtil;
import com.yeejoin.amos.api.householdapi.constant.ImasterConstant; import com.yeejoin.amos.api.householdapi.constant.ImasterConstant;
import com.yeejoin.amos.api.householdapi.constant.KSolarConstant; import com.yeejoin.amos.api.householdapi.constant.KSolarConstant;
...@@ -28,6 +29,8 @@ import com.yeejoin.amos.api.householdapi.face.service.SunlightService; ...@@ -28,6 +29,8 @@ import com.yeejoin.amos.api.householdapi.face.service.SunlightService;
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum; import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import fastjson.JSON; import fastjson.JSON;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
...@@ -50,7 +53,6 @@ import java.util.stream.Collectors; ...@@ -50,7 +53,6 @@ import java.util.stream.Collectors;
@Service @Service
public class SunlightServiceImpl implements SunlightService { public class SunlightServiceImpl implements SunlightService {
@Autowired @Autowired
SunlightMapper sunlightMapper; SunlightMapper sunlightMapper;
...@@ -62,7 +64,7 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -62,7 +64,7 @@ public class SunlightServiceImpl implements SunlightService {
@Autowired @Autowired
private JpInverterMapper jpInverterMapper; private JpInverterMapper jpInverterMapper;
//监盘逆变器电量mapper // 监盘逆变器电量mapper
@Autowired @Autowired
private JpInverterElectricityMapper jpInverterElectricityMapper; private JpInverterElectricityMapper jpInverterElectricityMapper;
@Autowired @Autowired
...@@ -81,7 +83,7 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -81,7 +83,7 @@ public class SunlightServiceImpl implements SunlightService {
private TdHYGFInverterTotalGenerateMapper tdHYGFInverterTotalGenerateMapper; private TdHYGFInverterTotalGenerateMapper tdHYGFInverterTotalGenerateMapper;
@Autowired @Autowired
ApplicationContext applicationContext; ApplicationContext applicationContext;
//户用光伏逆变器告警 // 户用光伏逆变器告警
@Autowired @Autowired
private HYGFJPInverterWarnMapper hygfjpInverterWarnMapper; private HYGFJPInverterWarnMapper hygfjpInverterWarnMapper;
@Autowired @Autowired
...@@ -92,212 +94,229 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -92,212 +94,229 @@ public class SunlightServiceImpl implements SunlightService {
TdJpStationMapper tdJpStationMapper; TdJpStationMapper tdJpStationMapper;
@Autowired @Autowired
private HYGFJPDayPowerMapper hygfjpDayPowerMapper; private HYGFJPDayPowerMapper hygfjpDayPowerMapper;
//td电站信息存储
final static Logger logger = LoggerFactory.getLogger(SofarDataAcquisitionServiceImpl.class);
final static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// td电站信息存储
@Override @Override
@Scheduled(cron = "${dataRequstScheduled.Sunlight}") @Scheduled(cron = "${dataRequstScheduled.Sunlight}")
@Async
public void stationList() { public void stationList() {
Map<String, Object> bodyparam=new HashMap<>(); long ts = System.currentTimeMillis();
logger.info("-------阳光同步电站/逆变器/采集器开始" + ts + "------- " + sdf.format(new Date()));
Map<String, Object> bodyparam = new HashMap<>();
bodyparam.put("ps_type", "1,3,4,5,6,7,8"); bodyparam.put("ps_type", "1,3,4,5,6,7,8");
bodyparam.put("size", 3000); bodyparam.put("size", 3000);
bodyparam.put("curPage", 1); bodyparam.put("curPage", 1);
JSONObject data = SunlightUtil.getdata( JSONObject data = SunlightUtil.getdata(SunlightUtil.getPowerStationList, bodyparam);
SunlightUtil.getPowerStationList,
bodyparam
);
List<Sunlight> list = JSONArray.parseArray(JSON.toJSONString(data.get("pageList")), Sunlight.class); List<Sunlight> list = JSONArray.parseArray(JSON.toJSONString(data.get("pageList")), Sunlight.class);
this.stationDetail(data); this.stationDetail(data);
for (Sunlight sunlight : list) { for (Sunlight sunlight : list) {
sunlight.setCreatedTime(System.currentTimeMillis()); sunlight.setCreatedTime(System.currentTimeMillis());
sunlightMapper.insert(sunlight); sunlightMapper.insert(sunlight);
} }
logger.info("-------阳光同步电站/逆变器/采集器结束" + ts + "------- " + sdf.format(new Date()));
} }
// 电站数据如库,电站统计数据入库
public void stationDetail(JSONObject data) {
// 所有场站信息
//电站数据如库,电站统计数据入库
public void stationDetail(JSONObject data){
//所有场站信息
List<SunlightDto> list = JSONArray.parseArray(JSON.toJSONString(data.get("pageList")), SunlightDto.class); List<SunlightDto> list = JSONArray.parseArray(JSON.toJSONString(data.get("pageList")), SunlightDto.class);
//业务表场站 // 业务表场站
List<JpStation> jpStations = jpStationMapper.selectList(new QueryWrapper<JpStation>(). List<JpStation> jpStations = jpStationMapper
eq("third_code", PVProducerInfoEnum.YG.getCode())); .selectList(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.YG.getCode()));
Map<String, JpStation> bodyparam=new HashMap<>(); Map<String, JpStation> bodyparam = new HashMap<>();
if(jpStations!=null&&jpStations.size()>0){ if (jpStations != null && jpStations.size() > 0) {
for (JpStation jpStation : jpStations) { for (JpStation jpStation : jpStations) {
bodyparam.put(jpStation.getThirdStationId(),jpStation); bodyparam.put(jpStation.getThirdStationId(), jpStation);
} }
} }
// 封装电站数据
//封装电站数据
// for (SunlightDto sunlightDto : list) { // for (SunlightDto sunlightDto : list) {
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
SunlightDto sunlightDto=list.get(i); SunlightDto sunlightDto = list.get(i);
// if(i==160){ // if(i==160){
// System.out.println("22222"); // System.out.println("22222");
// } // }
// System.out.println(i+"===================================================="); // System.out.println(i+"====================================================");
JpStation jpStation=null; JpStation jpStation = null;
if (bodyparam.containsKey(sunlightDto.getPs_id().toString())) {
if(bodyparam.containsKey(sunlightDto.getPs_id().toString())){ jpStation = bodyparam.get(sunlightDto.getPs_id().toString());
jpStation=bodyparam.get(sunlightDto.getPs_id().toString()); } else {
}else{ jpStation = new JpStation();
jpStation=new JpStation();
} }
jpStation.setThirdStationId(sunlightDto.getPs_id().toString()); jpStation.setThirdStationId(sunlightDto.getPs_id().toString());
jpStation.setName(sunlightDto.getPs_name()); jpStation.setName(sunlightDto.getPs_name());
jpStation.setAddress(sunlightDto.getPs_location()); jpStation.setAddress(sunlightDto.getPs_location());
jpStation.setLongitude(("null".equals(sunlightDto.getLongitude())||(sunlightDto.getLongitude()==null)||"0.0".equals(sunlightDto.getLongitude()))?null:sunlightDto.getLongitude().toString()); jpStation.setLongitude(("null".equals(sunlightDto.getLongitude()) || (sunlightDto.getLongitude() == null)
jpStation.setLatitude(("null".equals(sunlightDto.getLatitude())||(sunlightDto.getLatitude()==null)||"0.0".equals(sunlightDto.getLatitude()))?null:sunlightDto.getLatitude().toString()); || "0.0".equals(sunlightDto.getLongitude())) ? null : sunlightDto.getLongitude().toString());
jpStation.setLatitude(("null".equals(sunlightDto.getLatitude()) || (sunlightDto.getLatitude() == null)
|| "0.0".equals(sunlightDto.getLatitude())) ? null : sunlightDto.getLatitude().toString());
jpStation.setThirdCode(PVProducerInfoEnum.YG.getCode()); jpStation.setThirdCode(PVProducerInfoEnum.YG.getCode());
// 并网类型 // 并网类型
jpStation.setOnGridType(SunlightUtil.intoNetWorkStatus.get(String.valueOf(sunlightDto.getConnect_type()))); jpStation.setOnGridType(SunlightUtil.intoNetWorkStatus.get(String.valueOf(sunlightDto.getConnect_type())));
//第三方厂商标识 // 第三方厂商标识
jpStation.setThirdCode(PVProducerInfoEnum.YG.getCode()); jpStation.setThirdCode(PVProducerInfoEnum.YG.getCode());
jpStation.setRecDate(new Date()); jpStation.setRecDate(new Date());
//获取单个电站详情 // 获取单个电站详情
Map<String, Object> bodyparamf=new HashMap<>(); Map<String, Object> bodyparamf = new HashMap<>();
bodyparamf.put("ps_id", sunlightDto.getPs_id().toString()); bodyparamf.put("ps_id", sunlightDto.getPs_id().toString());
JSONObject jsonObject = SunlightUtil.getdata( JSONObject jsonObject = SunlightUtil.getdata(SunlightUtil.getPowerStationDetail, bodyparamf);
SunlightUtil.getPowerStationDetail,
bodyparamf jpStation.setRatedPower(jsonObject.get("design_capacity") != null
); ? Double.valueOf(jsonObject.get("design_capacity").toString()) / 1000
: null);// 额定功率
jpStation.setRatedPower(jsonObject.get("design_capacity")!=null?Double.valueOf(jsonObject.get("design_capacity").toString())/1000:null);//额定功率 jpStation.setUserName(jsonObject.get("ps_name") != null ? jsonObject.get("ps_name").toString() : null);// 业主姓名
jpStation.setUserName(jsonObject.get("ps_name")!=null?jsonObject.get("ps_name").toString():null);// 业主姓名 jpStation.setEmail(jsonObject.get("email") != null ? jsonObject.get("email").toString() : null);// 邮箱
jpStation.setEmail(jsonObject.get("email")!=null?jsonObject.get("email").toString():null);// 邮箱 jpStation.setUserPhone(
jpStation.setUserPhone(jsonObject.get("user_moble_tel")!=null?jsonObject.get("user_moble_tel").toString():null);//业主电话 jsonObject.get("user_moble_tel") != null ? jsonObject.get("user_moble_tel").toString() : null);// 业主电话
jpStation.setCreateTime(jsonObject.get("install_date")!=null? jpStation.setCreateTime(jsonObject.get("install_date") != null
DateUtil.parse(jsonObject.get("install_date")+"", "yyyy-MM-dd HH:mm:ss") :null); // 创建时间 ? DateUtil.parse(jsonObject.get("install_date") + "", "yyyy-MM-dd HH:mm:ss")
: null); // 创建时间
jpStation.setType("家庭户用");//电站类型
jpStation.setType("家庭户用");// 电站类型
// jpStation.setArea();//地区 // jpStation.setArea();//地区
jpStation.setPrice(1.0);//上网电价 jpStation.setPrice(1.0);// 上网电价
// jpStation.setOnGridTime(); // 并网时间 // jpStation.setOnGridTime(); // 并网时间
// jpStation.setAccessTime();// 接入平台时间 // jpStation.setAccessTime();// 接入平台时间
// jpStation.setStationContact();// 电站联系人 // jpStation.setStationContact();// 电站联系人
// jpStation.setModuleCount(); // 组件数量 // jpStation.setModuleCount(); // 组件数量
jpStation.setSnCode(sunlightDto.getPs_id().toString());//sncode jpStation.setSnCode(sunlightDto.getPs_id().toString());// sncode
try {
Map<String, String> map = sunlightDto.getTotal_capcity();
if (map != null && map.get("unit") != null && !map.get("unit").isEmpty()
&& !"--".equals(map.get("value"))) {
jpStation.setCapacity(SunlightUtil.zj.get(String.valueOf(map.get("unit")))
* Double.valueOf(String.valueOf(map.get("value"))));// 装机容量
}
Map<String,String> map= sunlightDto.getTotal_capcity(); Map<String, String> map1 = sunlightDto.getCurr_power();
jpStation.setCapacity( map!=null&&map.get("unit")!=null? if (map1 != null && map1.get("unit") != null && !map1.get("unit").isEmpty()
SunlightUtil.zj.get(String.valueOf(map.get("unit")))*Double.valueOf(String.valueOf(map.get("value"))):null);//装机容量 && !"--".equals(map1.get("value"))) {
jpStation.setRealTimePower(SunlightUtil.GL.get(String.valueOf(map1.get("unit")))
* Double.valueOf(String.valueOf(map1.get("value"))));// 实时功率
}
Map<String, String> map2 = sunlightDto.getToday_energy();
if (map2 != null && map2.get("unit") != null && !map2.get("unit").isEmpty()
&& !"--".equals(map2.get("value"))) {
jpStation.setDayGenerate(SunlightUtil.fd.get(String.valueOf(map2.get("unit")))
* Double.valueOf(String.valueOf(map2.get("value"))));// 日发电量
}
Map<String,String> map1= sunlightDto.getCurr_power(); Map<String, String> map3 = sunlightDto.getTotal_energy();
jpStation.setRealTimePower( map1!=null&&map1.get("unit")!=null? if (map3 != null && map3.get("unit") != null && !map3.get("unit").isEmpty()
SunlightUtil.GL.get(String.valueOf(map1.get("unit")))*Double.valueOf(String.valueOf(map1.get("value"))):null);//实时功率 && !"--".equals(map3.get("value"))) {
jpStation.setAccumulatedPower(SunlightUtil.fd.get(String.valueOf(map3.get("unit")))
* Double.valueOf(String.valueOf(map3.get("value"))));// 累计发电量
}
Map<String,String> map2= sunlightDto.getToday_energy(); Map<String, String> map4 = sunlightDto.getToday_income();
jpStation.setDayGenerate( map2!=null&&map2.get("unit")!=null? if (map4 != null && map4.get("unit") != null && !map4.get("unit").isEmpty()
SunlightUtil.fd.get(String.valueOf(map2.get("unit")))*Double.valueOf(String.valueOf(map2.get("value"))):null);//日发电量 && !"--".equals(map4.get("value"))) {
Map<String,String> map3= sunlightDto.getTotal_energy(); jpStation.setDayIncome(SunlightUtil.sy.get(String.valueOf(map4.get("unit")))
jpStation.setAccumulatedPower(map3!=null&&map3.get("unit")!=null? * Double.valueOf(String.valueOf(map4.get("value"))));// 日收益
SunlightUtil.fd.get(String.valueOf(map3.get("unit")))*Double.valueOf(String.valueOf(map3.get("value"))):null);//累计发电量
Map<String,String> map4= sunlightDto.getToday_income();
jpStation.setDayIncome(map4!=null&&map4.get("unit")!=null?
SunlightUtil.sy.get(String.valueOf(map4.get("unit")))*Double.valueOf(String.valueOf(map4.get("value"))):null);// 日收益
Map<String,String> map5= sunlightDto.getTotal_income();
jpStation.setCumulativeIncome(map5!=null&&map5.get("unit")!=null?
SunlightUtil.sy.get(String.valueOf(map5.get("unit")))*Double.valueOf(String.valueOf(map5.get("value"))):null);// 累计收益
if(sunlightDto.getPs_fault_status()>2) {
jpStation.setState(SunlightUtil.zt.get(sunlightDto.getPs_status()+""));//电站状态
}else{
jpStation.setState("报警");//电站状态
} }
Map<String, String> map5 = sunlightDto.getTotal_income();
if (map5 != null && map5.get("unit") != null && !map5.get("unit").isEmpty()
&& !"--".equals(map5.get("value"))) {
jpStation.setCumulativeIncome(SunlightUtil.sy.get(String.valueOf(map5.get("unit")))
* Double.valueOf(String.valueOf(map5.get("value"))));// 累计收益
}
} catch (Exception e) {
e.printStackTrace();
logger.error("阳光数据错误:" + com.alibaba.fastjson.JSONObject.toJSONString(sunlightDto));
}
// 0离线 1在线
// 1故障 2告警 4正常
if ("0".equals(sunlightDto.getPs_status().toString())) {
jpStation.setState("离线");
} else if ("1".equals(sunlightDto.getPs_status().toString())) {
if ("1".equals(sunlightDto.getPs_fault_status().toString()) || "2".equals(sunlightDto.getPs_fault_status().toString())) {
jpStation.setState("报警");
} else if ("4".equals(sunlightDto.getPs_fault_status().toString())) {
jpStation.setState("在线");
} else {
jpStation.setState("在线");
}
} else {
jpStation.setState("在线");
}
//获取电站下通讯模块 // 获取电站下通讯模块
Map<String, Object> bodyparamjp11=new HashMap<>(); Map<String, Object> bodyparamjp11 = new HashMap<>();
List<String> lif11=new ArrayList<>(); List<String> lif11 = new ArrayList<>();
lif11.add("22"); lif11.add("22");
bodyparamjp11.put("ps_id", sunlightDto.getPs_id().toString()); bodyparamjp11.put("ps_id", sunlightDto.getPs_id().toString());
bodyparamjp11.put("size", 3000); bodyparamjp11.put("size", 3000);
bodyparamjp11.put("curPage", 1); bodyparamjp11.put("curPage", 1);
bodyparamjp11.put("device_type_list",lif11); bodyparamjp11.put("device_type_list", lif11);
JSONObject jsonObject1data11 = SunlightUtil.getdata( JSONObject jsonObject1data11 = SunlightUtil.getdata(SunlightUtil.getDeviceList, bodyparamjp11);
SunlightUtil.getDeviceList, List<Device> listdtx = JSONArray.parseArray(JSON.toJSONString(jsonObject1data11.get("pageList")),
bodyparamjp11 Device.class);
); // 获取电站下逆变器
List<Device> listdtx = JSONArray.parseArray(JSON.toJSONString(jsonObject1data11.get("pageList")), Device.class ); Map<String, Object> bodyparamjp = new HashMap<>();
//获取电站下逆变器 List<String> lif = new ArrayList<>();
Map<String, Object> bodyparamjp=new HashMap<>();
List<String> lif=new ArrayList<>();
lif.add("1"); lif.add("1");
bodyparamjp.put("ps_id", sunlightDto.getPs_id().toString()); bodyparamjp.put("ps_id", sunlightDto.getPs_id().toString());
bodyparamjp.put("size", 3000); bodyparamjp.put("size", 3000);
bodyparamjp.put("curPage", 1); bodyparamjp.put("curPage", 1);
bodyparamjp.put("device_type_list",lif); bodyparamjp.put("device_type_list", lif);
JSONObject jsonObject1data = SunlightUtil.getdata( JSONObject jsonObject1data = SunlightUtil.getdata(SunlightUtil.getDeviceList, bodyparamjp);
SunlightUtil.getDeviceList, List<Device> listd = JSONArray.parseArray(JSON.toJSONString(jsonObject1data.get("pageList")), Device.class);
bodyparamjp
);
List<Device> listd = JSONArray.parseArray(JSON.toJSONString(jsonObject1data.get("pageList")), Device.class );
// 获取电站,月发电量
if (listd != null && listd.size() > 0) {
Map<String, Object> bodyparamnb = new HashMap<>();
List<String> li = new ArrayList<>();
//获取电站,月发电量
if(listd!=null&&listd.size()>0){
Map<String, Object> bodyparamnb=new HashMap<>();
List<String> li=new ArrayList<>();
li.add(listd.get(0).getPs_key()); li.add(listd.get(0).getPs_key());
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR); int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH) + 1; int month = calendar.get(Calendar.MONTH) + 1;
bodyparamnb.put("ps_key_list", li); bodyparamnb.put("ps_key_list", li);
bodyparamnb.put("start_time",year + "" + ( month<10 ? "0" + month : month) ); bodyparamnb.put("start_time", year + "" + (month < 10 ? "0" + month : month));
bodyparamnb.put("end_time", year + "" + ( month<10 ? "0" + month : month)); bodyparamnb.put("end_time", year + "" + (month < 10 ? "0" + month : month));
bodyparamnb.put("data_type", "4"); bodyparamnb.put("data_type", "4");
bodyparamnb.put("order", "0"); bodyparamnb.put("order", "0");
bodyparamnb.put("query_type", "2"); bodyparamnb.put("query_type", "2");
bodyparamnb.put("data_point", "p1"); bodyparamnb.put("data_point", "p1");
JSONObject jsonObject1nb = SunlightUtil.getdata( JSONObject jsonObject1nb = SunlightUtil.getdata(SunlightUtil.getDevicePointsDayMonthYearDataList,
SunlightUtil.getDevicePointsDayMonthYearDataList, bodyparamnb);
bodyparamnb
);
JSONObject jsonObject22 = JSONUtil.parseObj(jsonObject1nb.get(listd.get(0).getPs_key()), true); JSONObject jsonObject22 = JSONUtil.parseObj(jsonObject1nb.get(listd.get(0).getPs_key()), true);
List<Map> js= JSONArray.parseArray(JSON.toJSONString(jsonObject22.get("p1")),Map.class); List<Map> js = JSONArray.parseArray(JSON.toJSONString(jsonObject22.get("p1")), Map.class);
// 月发电量 // 月发电量
jpStation.setMonthGenerate(js!=null&&js.get(0).get("4")!=null?Double.valueOf(js.get(0).get("4")+"")/1000:null); jpStation.setMonthGenerate(
js != null && js.get(0).get("4") != null ? Double.valueOf(js.get(0).get("4") + "") / 1000
: null);
// 月收益 // 月收益
jpStation.setMonthIncome(js!=null&&js.get(0).get("4")!=null?Double.valueOf(js.get(0).get("4")+"")/1000:null); jpStation.setMonthIncome(
js != null && js.get(0).get("4") != null ? Double.valueOf(js.get(0).get("4") + "") / 1000
: null);
} }
// 获取电站,年发电量
if (listd != null && listd.size() > 0) {
//获取电站,年发电量 Map<String, Object> bodyparamnb = new HashMap<>();
if(listd!=null&&listd.size()>0){ List<String> li = new ArrayList<>();
Map<String, Object> bodyparamnb=new HashMap<>();
List<String> li=new ArrayList<>();
li.add(listd.get(0).getPs_key()); li.add(listd.get(0).getPs_key());
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
...@@ -305,38 +324,28 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -305,38 +324,28 @@ public class SunlightServiceImpl implements SunlightService {
int month = calendar.get(Calendar.MONTH) + 1; int month = calendar.get(Calendar.MONTH) + 1;
bodyparamnb.put("ps_key_list", li); bodyparamnb.put("ps_key_list", li);
bodyparamnb.put("start_time",year + "" ); bodyparamnb.put("start_time", year + "");
bodyparamnb.put("end_time", year + ""); bodyparamnb.put("end_time", year + "");
bodyparamnb.put("data_type", "4"); bodyparamnb.put("data_type", "4");
bodyparamnb.put("order", "0"); bodyparamnb.put("order", "0");
bodyparamnb.put("query_type", "3"); bodyparamnb.put("query_type", "3");
bodyparamnb.put("data_point", "p1"); bodyparamnb.put("data_point", "p1");
JSONObject jsonObject1nb = SunlightUtil.getdata( JSONObject jsonObject1nb = SunlightUtil.getdata(SunlightUtil.getDevicePointsDayMonthYearDataList,
SunlightUtil.getDevicePointsDayMonthYearDataList, bodyparamnb);
bodyparamnb
);
JSONObject jsonObject23 = JSONUtil.parseObj(jsonObject1nb.get(listd.get(0).getPs_key()), true); JSONObject jsonObject23 = JSONUtil.parseObj(jsonObject1nb.get(listd.get(0).getPs_key()), true);
List<Map> js= JSONArray.parseArray(JSON.toJSONString(jsonObject23.get("p1")),Map.class); List<Map> js = JSONArray.parseArray(JSON.toJSONString(jsonObject23.get("p1")), Map.class);
// 年发电量 // 年发电量
jpStation.setYearGenerate(js!=null?Double.valueOf(js.get(0).get("4")+"")/1000:null); jpStation.setYearGenerate(js != null ? Double.valueOf(js.get(0).get("4") + "") / 1000 : null);
// 年收益 // 年收益
jpStation.setYearIncome(js!=null?Double.valueOf(js.get(0).get("4")+"")/1000:null); jpStation.setYearIncome(js != null ? Double.valueOf(js.get(0).get("4") + "") / 1000 : null);
if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) {
jpStationMapper.updateById(jpStation);
} else {
jpStationMapper.insert(jpStation);
}
String today = DateUtil.today(); String today = DateUtil.today();
String hour = new Date().getHours() + ":00"; String hour = new Date().getHours() + ":00";
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne( HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper
new QueryWrapper<HYGFJPDayPower>(). .selectOne(new QueryWrapper<HYGFJPDayPower>().eq("tation_id", sunlightDto.getPs_id().toString())
eq("tation_id",sunlightDto.getPs_id().toString()). .eq("year_month_day", today).eq("hour", hour));
eq("year_month_day", today).
eq("hour", hour)
);
if (ObjectUtils.isEmpty(hygfjpDayPower)) { if (ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower(); hygfjpDayPower = new HYGFJPDayPower();
} }
...@@ -344,7 +353,7 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -344,7 +353,7 @@ public class SunlightServiceImpl implements SunlightService {
hygfjpDayPower.setHour(hour); hygfjpDayPower.setHour(hour);
hygfjpDayPower.setYearMonthDay(today); hygfjpDayPower.setYearMonthDay(today);
hygfjpDayPower.setPower(jpStation.getRealTimePower()); hygfjpDayPower.setPower(jpStation.getRealTimePower());
//新加 // 新加
hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpDayPower.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpDayPower.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpDayPower.setStationName(jpStation.getName()); hygfjpDayPower.setStationName(jpStation.getName());
...@@ -357,7 +366,6 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -357,7 +366,6 @@ public class SunlightServiceImpl implements SunlightService {
hygfjpDayPowerMapper.insert(hygfjpDayPower); hygfjpDayPowerMapper.insert(hygfjpDayPower);
} }
HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory(); HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory();
hygfjpStationPowerHistory.setCreatedTime(System.currentTimeMillis()); hygfjpStationPowerHistory.setCreatedTime(System.currentTimeMillis());
hygfjpStationPowerHistory.setThirdStationId(jpStation.getThirdStationId()); hygfjpStationPowerHistory.setThirdStationId(jpStation.getThirdStationId());
...@@ -365,20 +373,15 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -365,20 +373,15 @@ public class SunlightServiceImpl implements SunlightService {
hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode()); hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode());
hygfjpStationPowerHistory.setTime(System.currentTimeMillis()); hygfjpStationPowerHistory.setTime(System.currentTimeMillis());
// 新加
//新加
hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpStationPowerHistory.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpStationPowerHistory.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpStationPowerHistory.setStationName(jpStation.getName()); hygfjpStationPowerHistory.setStationName(jpStation.getName());
hygfjpStationPowerHistory.setStationState(jpStation.getState()); hygfjpStationPowerHistory.setStationState(jpStation.getState());
hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory); hygfjpStationPowerHistoryMapper.insert(hygfjpStationPowerHistory);
// 增加td 电站区域公司,经销商绑定表
//增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>(). // TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code", PVProducerInfoEnum.YG.getCode()). // eq("third_code", PVProducerInfoEnum.YG.getCode()).
// eq("third_station_id", jpStation.getThirdStationId())); // eq("third_station_id", jpStation.getThirdStationId()));
...@@ -398,19 +401,23 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -398,19 +401,23 @@ public class SunlightServiceImpl implements SunlightService {
// tdJpStation.setCreatedTime(System.currentTimeMillis()); // tdJpStation.setCreatedTime(System.currentTimeMillis());
// tdJpStationMapper.insert(tdJpStation); // tdJpStationMapper.insert(tdJpStation);
// } // }
}
if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) {
jpStationMapper.updateById(jpStation);
this.setJpInverte(listd,jpStation,listdtx); } else {
this.collectorDetail(listd,jpStation); jpStationMapper.insert(jpStation);
} }
this.setJpInverte(listd, jpStation, listdtx);
this.collectorDetail(listd, jpStation);
//电站报表 // 电站报表
//户用场站日发电量 // 户用场站日发电量
Date today1 = new Date(); Date today1 = new Date();
TdHYGFStationDayGenerate tdHYGFStationDayGenerate = tdHYGFStationDayGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationDayGenerate>() TdHYGFStationDayGenerate tdHYGFStationDayGenerate = tdHYGFStationDayGenerateMapper.selectOne(
.eq("third_station_id",jpStation.getThirdStationId() ) new QueryWrapper<TdHYGFStationDayGenerate>().eq("third_station_id", jpStation.getThirdStationId())
.eq("day_time", DateUtil.format(today1, "yyyy-MM-dd")) .eq("day_time", DateUtil.format(today1, "yyyy-MM-dd"))
.eq("year_month", DateUtil.format(today1, "yyyy-MM"))); .eq("year_month", DateUtil.format(today1, "yyyy-MM")));
if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate)) { if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate)) {
...@@ -422,29 +429,29 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -422,29 +429,29 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate()); tdHYGFStationDayGenerate.setGenerate(jpStation.getDayGenerate());
tdHYGFStationDayGenerate.setFullhour( tdHYGFStationDayGenerate.setFullhour(
(jpStation.getDayGenerate()==null || jpStation.getCapacity()==null)?null: (jpStation.getDayGenerate() == null || jpStation.getCapacity() == null) ? null :
(jpStation.getCapacity()<=0.0?null:jpStation.getDayGenerate()/jpStation.getCapacity()) (jpStation.getCapacity() <= 0.0 ? null
: jpStation.getDayGenerate() / jpStation.getCapacity())
); );
tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome()); tdHYGFStationDayGenerate.setIncome(jpStation.getDayIncome());
//新加 // 新加
tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationDayGenerate.setStationName(jpStation.getName()); tdHYGFStationDayGenerate.setStationName(jpStation.getName());
tdHYGFStationDayGenerate.setStationState(jpStation.getState()); tdHYGFStationDayGenerate.setStationState(jpStation.getState());
if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())) { if (ObjectUtils.isEmpty(tdHYGFStationDayGenerate.getCreatedTime())) {
tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFStationDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate); tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
} else { } else {
tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate); tdHYGFStationDayGenerateMapper.insert(tdHYGFStationDayGenerate);
} }
//户用场站月发电量 // 户用场站月发电量
TdHYGFStationMonthGenerate tdHYGFStationMonthGenerate = tdHYGFStationMonthGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationMonthGenerate>() TdHYGFStationMonthGenerate tdHYGFStationMonthGenerate = tdHYGFStationMonthGenerateMapper.selectOne(
.eq("third_station_id", jpStation.getThirdStationId()) new QueryWrapper<TdHYGFStationMonthGenerate>().eq("third_station_id", jpStation.getThirdStationId())
.eq("month_time", DateUtil.format(today1, "yyyy-MM")) .eq("month_time", DateUtil.format(today1, "yyyy-MM"))
.eq("year", DateUtil.format(today1, "yyyy"))); .eq("year", DateUtil.format(today1, "yyyy")));
if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate)) { if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate)) {
...@@ -458,33 +465,29 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -458,33 +465,29 @@ public class SunlightServiceImpl implements SunlightService {
// jpStation.getMonthGenerate() / jpStation.getCapacity() // jpStation.getMonthGenerate() / jpStation.getCapacity()
(jpStation.getMonthGenerate()==null || jpStation.getCapacity()==null)?null: (jpStation.getMonthGenerate() == null || jpStation.getCapacity() == null) ? null :
(jpStation.getCapacity()<=0.0?null:jpStation.getMonthGenerate()/jpStation.getCapacity())
(jpStation.getCapacity() <= 0.0 ? null
: jpStation.getMonthGenerate() / jpStation.getCapacity())
); );
tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome()); tdHYGFStationMonthGenerate.setIncome(jpStation.getMonthIncome());
// 新加
//新加
tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationMonthGenerate.setStationName(jpStation.getName()); tdHYGFStationMonthGenerate.setStationName(jpStation.getName());
tdHYGFStationMonthGenerate.setStationState(jpStation.getState()); tdHYGFStationMonthGenerate.setStationState(jpStation.getState());
if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate.getCreatedTime())) { if (ObjectUtils.isEmpty(tdHYGFStationMonthGenerate.getCreatedTime())) {
tdHYGFStationMonthGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFStationMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate); tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
} else { } else {
tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate); tdHYGFStationMonthGenerateMapper.insert(tdHYGFStationMonthGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFStationYearGenerate tdHYGFStationYearGenerate = tdHYGFStationYearGenerateMapper.selectOne(new QueryWrapper<TdHYGFStationYearGenerate>() TdHYGFStationYearGenerate tdHYGFStationYearGenerate = tdHYGFStationYearGenerateMapper.selectOne(
.eq("third_station_id", jpStation.getThirdStationId()) new QueryWrapper<TdHYGFStationYearGenerate>().eq("third_station_id", jpStation.getThirdStationId())
.eq("year_time", DateUtil.format(today1, "yyyy")) .eq("year_time", DateUtil.format(today1, "yyyy"))
.eq("year", DateUtil.format(today1, "yyyy"))); .eq("year", DateUtil.format(today1, "yyyy")));
if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate)) { if (ObjectUtils.isEmpty(tdHYGFStationYearGenerate)) {
...@@ -496,11 +499,11 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -496,11 +499,11 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate()); tdHYGFStationYearGenerate.setGenerate(jpStation.getYearGenerate());
tdHYGFStationYearGenerate.setFullhour( tdHYGFStationYearGenerate.setFullhour(
// jpStation.getYearGenerate() / jpStation.getCapacity() // jpStation.getYearGenerate() / jpStation.getCapacity()
(jpStation.getYearGenerate()==null || jpStation.getCapacity()==null)?null: (jpStation.getYearGenerate() == null || jpStation.getCapacity() == null) ? null
(jpStation.getCapacity()<=0.0?null:jpStation.getYearGenerate()/jpStation.getCapacity()) : (jpStation.getCapacity() <= 0.0 ? null
); : jpStation.getYearGenerate() / jpStation.getCapacity()));
tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome()); tdHYGFStationYearGenerate.setIncome(jpStation.getYearIncome());
//新加 // 新加
tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFStationYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFStationYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFStationYearGenerate.setStationName(jpStation.getName()); tdHYGFStationYearGenerate.setStationName(jpStation.getName());
...@@ -516,22 +519,18 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -516,22 +519,18 @@ public class SunlightServiceImpl implements SunlightService {
} }
// 逆变器数据入库,逆变器参数入库
//逆变器数据入库,逆变器参数入库 public void setJpInverte(List<Device> devices, JpStation jpStation, List<Device> devicestx) {
public void setJpInverte(List<Device> devices,JpStation jpStation,List<Device> devicestx){ new Thread(new Runnable() {
new Thread(new Runnable(){
@Override @Override
public void run(){ public void run() {
try{ try {
for (Device device : devices) { for (Device device : devices) {
if (device != null) { if (device != null) {
//获取逆变器信息存库 // 获取逆变器信息存库
JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>(). JpInverter jpInverter = jpInverterMapper.selectOne(
eq("third_station_id", device.getPs_id().toString()). new QueryWrapper<JpInverter>().eq("sn_code", device.getDevice_sn().toString())
eq("third_code", PVProducerInfoEnum.YG.getCode()). .eq("third_code", PVProducerInfoEnum.YG.getCode()));
eq("ID", device.getUuid().toString()));
if (ObjectUtils.isEmpty(jpInverter)) { if (ObjectUtils.isEmpty(jpInverter)) {
jpInverter = new JpInverter(); jpInverter = new JpInverter();
} }
...@@ -540,12 +539,24 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -540,12 +539,24 @@ public class SunlightServiceImpl implements SunlightService {
jpInverter.setSnCode(device.getDevice_sn()); jpInverter.setSnCode(device.getDevice_sn());
jpInverter.setId(device.getUuid().toString()); jpInverter.setId(device.getUuid().toString());
if(device.getGetPs_fault_status()>2) { // 0离线 1在线
jpInverter.setState(SunlightUtil.zt.get(device.getDev_status()+"")); // 1故障 2告警 4正常
}else{ if ("0".equals(device.getDev_status())) {
jpInverter.setState("报警");//电站状态 jpInverter.setState("离线");
} else if ("1".equals(device.getDev_status())) {
if ("1".equals(device.getDev_fault_status())
|| "2".equals(device.getDev_fault_status())) {
jpInverter.setState("报警");
} else if ("4".equals(device.getDev_fault_status())) {
jpInverter.setState("在线");
} else {
jpInverter.setState("在线");
} }
} else {
jpInverter.setState("在线");
}
// logger.error("阳光数据解析(逆变器),无法获取状态:" +
// com.alibaba.fastjson.JSONObject.toJSONString(device));
jpInverter.setUpdateTime(new Date()); jpInverter.setUpdateTime(new Date());
jpInverter.setDayPowerGeneration(jpStation.getDayGenerate()); jpInverter.setDayPowerGeneration(jpStation.getDayGenerate());
jpInverter.setMonthPowerGeneration(jpStation.getMonthGenerate()); jpInverter.setMonthPowerGeneration(jpStation.getMonthGenerate());
...@@ -560,13 +571,13 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -560,13 +571,13 @@ public class SunlightServiceImpl implements SunlightService {
jpInverter.setCapacity(jpStation.getCapacity()); jpInverter.setCapacity(jpStation.getCapacity());
jpInverter.setCurrentPower(jpStation.getRealTimePower()); jpInverter.setCurrentPower(jpStation.getRealTimePower());
if(devicestx!=null){ if (devicestx != null) {
for (Device devicestx1 : devicestx) { for (Device devicestx1 : devicestx) {
if(devicestx1.getDevice_code().equals(device.getCommunication_dev_sn())){ if (devicestx1.getDevice_code().equals(device.getCommunication_dev_sn())) {
//采集器id // 采集器id
jpInverter.setCollectorId(devicestx1.getUuid().toString()); jpInverter.setCollectorId(devicestx1.getUuid().toString());
//采集器sn编码 // 采集器sn编码
jpInverter.setCollectorSnCode(device.getCommunication_dev_sn()); jpInverter.setCollectorSnCode(device.getCommunication_dev_sn());
break; break;
} }
...@@ -585,43 +596,41 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -585,43 +596,41 @@ public class SunlightServiceImpl implements SunlightService {
jpInverterMapper.insert(jpInverter); jpInverterMapper.insert(jpInverter);
} }
} }
//逆变器指标信息 // 逆变器指标信息
Map<String, Object> bodyparamnb = new HashMap<>(); Map<String, Object> bodyparamnb = new HashMap<>();
List<String> li = new ArrayList<>(); List<String> li = new ArrayList<>();
li.add(device.getPs_key()); li.add(device.getPs_key());
bodyparamnb.put("ps_key_list", li); bodyparamnb.put("ps_key_list", li);
JSONObject jsonObject1nb = SunlightUtil.getdata( JSONObject jsonObject1nb = SunlightUtil.getdata(SunlightUtil.getPVInverterRealTimeData,
SunlightUtil.getPVInverterRealTimeData, bodyparamnb);
bodyparamnb
);
List<Map> js = JSONArray.parseArray(JSON.toJSONString(jsonObject1nb.get("device_point_list")), Map.class); List<Map> js = JSONArray
.parseArray(JSON.toJSONString(jsonObject1nb.get("device_point_list")), Map.class);
if (js != null && js.size() > 0) { if (js != null && js.size() > 0) {
Map jsd = JSONUtil.parseObj(js.get(0).get("device_point")); Map jsd = JSONUtil.parseObj(js.get(0).get("device_point"));
List<String> liname = new ArrayList<>(); List<String> liname = new ArrayList<>();
liname.add("AC1");//A 相电压 liname.add("AC1");// A 相电压
liname.add("AC2");//B 相电压 liname.add("AC2");// B 相电压
liname.add("AC3");//C 相电压 liname.add("AC3");// C 相电压
liname.add("PV1");//直流电压 1 liname.add("PV1");// 直流电压 1
liname.add("PV2");//直流电压 2 liname.add("PV2");// 直流电压 2
liname.add("PV3");//直流电压 3 liname.add("PV3");// 直流电压 3
liname.add("PV4");//直流电压 4 liname.add("PV4");// 直流电压 4
liname.add("PV5");//直流电压 5 liname.add("PV5");// 直流电压 5
liname.add("PV6");//直流电压 6 liname.add("PV6");// 直流电压 6
liname.add("PV7");//直流电压 7 liname.add("PV7");// 直流电压 7
liname.add("PV8");//直流电压 8 liname.add("PV8");// 直流电压 8
liname.add("PV9");//直流电压 9 liname.add("PV9");// 直流电压 9
liname.add("PV10");//直流电压 10 liname.add("PV10");// 直流电压 10
for (int i = 0; i < liname.size(); i++) { for (int i = 0; i < liname.size(); i++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>(). JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper
eq("sn_code", jpInverter.getSnCode()). .selectOne(new QueryWrapper<JpInverterElectricity>()
eq("third_code", PVProducerInfoEnum.YG.getCode()). .eq("sn_code", jpInverter.getSnCode())
eq("name", liname.get(i)) .eq("third_code", PVProducerInfoEnum.YG.getCode())
); .eq("name", liname.get(i)));
if (ObjectUtils.isEmpty(jpInverterElectricity)) { if (ObjectUtils.isEmpty(jpInverterElectricity)) {
jpInverterElectricity = new JpInverterElectricity(); jpInverterElectricity = new JpInverterElectricity();
} }
...@@ -705,38 +714,52 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -705,38 +714,52 @@ public class SunlightServiceImpl implements SunlightService {
jpInverterElectricityMapper.updateById(jpInverterElectricity); jpInverterElectricityMapper.updateById(jpInverterElectricity);
} }
} }
//逆变器报表 // 逆变器报表
//-----------------------户用光伏日报表---------------------- // -----------------------户用光伏日报表----------------------
TdHYGFInverterDayGenerate tdHYGFInverterDayGenerate = new TdHYGFInverterDayGenerate(); TdHYGFInverterDayGenerate tdHYGFInverterDayGenerate = new TdHYGFInverterDayGenerate();
tdHYGFInverterDayGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFInverterDayGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterDayGenerate.setThirdStationId(jpInverter.getThirdStationId()); tdHYGFInverterDayGenerate.setThirdStationId(jpInverter.getThirdStationId());
tdHYGFInverterDayGenerate.setSnCode(jpInverter.getSnCode()); tdHYGFInverterDayGenerate.setSnCode(jpInverter.getSnCode());
tdHYGFInverterDayGenerate.setName(jpInverter.getName()); tdHYGFInverterDayGenerate.setName(jpInverter.getName());
tdHYGFInverterDayGenerate.setWorkStatus(jpInverter.getState()); tdHYGFInverterDayGenerate.setWorkStatus(jpInverter.getState());
//交流电压 // 交流电压
tdHYGFInverterDayGenerate.setDcv1(jsd.get("p18") != null ? Double.valueOf(jsd.get("p18").toString()) : null); tdHYGFInverterDayGenerate.setDcv1(
tdHYGFInverterDayGenerate.setDcv2(jsd.get("p19") != null ? Double.valueOf(jsd.get("p19").toString()) : null); jsd.get("p18") != null ? Double.valueOf(jsd.get("p18").toString()) : null);
tdHYGFInverterDayGenerate.setDcv3(jsd.get("p20") != null ? Double.valueOf(jsd.get("p20").toString()) : null); tdHYGFInverterDayGenerate.setDcv2(
//交流电流 jsd.get("p19") != null ? Double.valueOf(jsd.get("p19").toString()) : null);
tdHYGFInverterDayGenerate.setDcc1(jsd.get("p21") != null ? Double.valueOf(jsd.get("p21").toString()) : null); tdHYGFInverterDayGenerate.setDcv3(
tdHYGFInverterDayGenerate.setDcc2(jsd.get("p22") != null ? Double.valueOf(jsd.get("p22").toString()) : null); jsd.get("p20") != null ? Double.valueOf(jsd.get("p20").toString()) : null);
tdHYGFInverterDayGenerate.setDcc3(jsd.get("p23") != null ? Double.valueOf(jsd.get("p23").toString()) : null); // 交流电流
//直流电压 tdHYGFInverterDayGenerate.setDcc1(
tdHYGFInverterDayGenerate.setAcv1(jsd.get("p5") != null ? Double.valueOf(jsd.get("p5").toString()) : null); jsd.get("p21") != null ? Double.valueOf(jsd.get("p21").toString()) : null);
tdHYGFInverterDayGenerate.setAcv2(jsd.get("p7") != null ? Double.valueOf(jsd.get("p7").toString()) : null); tdHYGFInverterDayGenerate.setDcc2(
tdHYGFInverterDayGenerate.setAcv3(jsd.get("p9") != null ? Double.valueOf(jsd.get("p9").toString()) : null); jsd.get("p22") != null ? Double.valueOf(jsd.get("p22").toString()) : null);
tdHYGFInverterDayGenerate.setAcv4(jsd.get("p45") != null ? Double.valueOf(jsd.get("p45").toString()) : null); tdHYGFInverterDayGenerate.setDcc3(
//直流电流 jsd.get("p23") != null ? Double.valueOf(jsd.get("p23").toString()) : null);
tdHYGFInverterDayGenerate.setAcc1(jsd.get("p6") != null ? Double.valueOf(jsd.get("p6").toString()) : null); // 直流电压
tdHYGFInverterDayGenerate.setAcc2(jsd.get("p8") != null ? Double.valueOf(jsd.get("p8").toString()) : null); tdHYGFInverterDayGenerate.setAcv1(
tdHYGFInverterDayGenerate.setAcc3(jsd.get("p10") != null ? Double.valueOf(jsd.get("p10").toString()) : null); jsd.get("p5") != null ? Double.valueOf(jsd.get("p5").toString()) : null);
tdHYGFInverterDayGenerate.setAcc4(jsd.get("p46") != null ? Double.valueOf(jsd.get("p46").toString()) : null); tdHYGFInverterDayGenerate.setAcv2(
jsd.get("p7") != null ? Double.valueOf(jsd.get("p7").toString()) : null);
tdHYGFInverterDayGenerate.setAcv3(
jsd.get("p9") != null ? Double.valueOf(jsd.get("p9").toString()) : null);
tdHYGFInverterDayGenerate.setAcv4(
jsd.get("p45") != null ? Double.valueOf(jsd.get("p45").toString()) : null);
// 直流电流
tdHYGFInverterDayGenerate.setAcc1(
jsd.get("p6") != null ? Double.valueOf(jsd.get("p6").toString()) : null);
tdHYGFInverterDayGenerate.setAcc2(
jsd.get("p8") != null ? Double.valueOf(jsd.get("p8").toString()) : null);
tdHYGFInverterDayGenerate.setAcc3(
jsd.get("p10") != null ? Double.valueOf(jsd.get("p10").toString()) : null);
tdHYGFInverterDayGenerate.setAcc4(
jsd.get("p46") != null ? Double.valueOf(jsd.get("p46").toString()) : null);
tdHYGFInverterDayGenerate.setPv1(null); tdHYGFInverterDayGenerate.setPv1(null);
tdHYGFInverterDayGenerate.setPv2(null); tdHYGFInverterDayGenerate.setPv2(null);
tdHYGFInverterDayGenerate.setPv3(null); tdHYGFInverterDayGenerate.setPv3(null);
tdHYGFInverterDayGenerate.setPv4(null); tdHYGFInverterDayGenerate.setPv4(null);
//功率 // 功率
tdHYGFInverterDayGenerate.setTotalPower(jpInverter.getCurrentPower()); tdHYGFInverterDayGenerate.setTotalPower(jpInverter.getCurrentPower());
// //频率 // //频率
tdHYGFInverterDayGenerate.setFrequency(String.valueOf(jsd.get("p27"))); tdHYGFInverterDayGenerate.setFrequency(String.valueOf(jsd.get("p27")));
...@@ -746,30 +769,36 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -746,30 +769,36 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFInverterDayGenerate.setMonthGen(jpInverter.getMonthPowerGeneration()); tdHYGFInverterDayGenerate.setMonthGen(jpInverter.getMonthPowerGeneration());
tdHYGFInverterDayGenerate.setYearGen(jpInverter.getYearPowerGeneration()); tdHYGFInverterDayGenerate.setYearGen(jpInverter.getYearPowerGeneration());
tdHYGFInverterDayGenerate.setTotalGen(jpInverter.getTotalPowerGeneration()); tdHYGFInverterDayGenerate.setTotalGen(jpInverter.getTotalPowerGeneration());
tdHYGFInverterDayGenerate.setIgbtTemp(ObjectUtils.isEmpty(jpInverter.getIgbtTemperature()) ? null : Double.valueOf(jpInverter.getIgbtTemperature())); tdHYGFInverterDayGenerate
.setIgbtTemp(ObjectUtils.isEmpty(jpInverter.getIgbtTemperature()) ? null
: Double.valueOf(jpInverter.getIgbtTemperature()));
tdHYGFInverterDayGenerate.setIncome(null); tdHYGFInverterDayGenerate.setIncome(null);
tdHYGFInverterDayGenerate.setFullhour( tdHYGFInverterDayGenerate.setFullhour(
(jpInverter.getDayPowerGeneration() == null || jpInverter.getCapacity() == null) ? null : (jpInverter.getDayPowerGeneration() == null || jpInverter.getCapacity() == null)
(jpInverter.getCapacity() <= 0.0 ? null : jpInverter.getDayPowerGeneration() / jpInverter.getCapacity()) ? null
); : (jpInverter.getCapacity() <= 0.0 ? null
: jpInverter.getDayPowerGeneration()
//电站区域经销商, / jpInverter.getCapacity()));
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code", PVProducerInfoEnum.YG.getCode()). // 电站区域经销商,
eq("third_station_id", String.valueOf(jpInverter.getThirdStationId()))); JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>()
.eq("third_code", PVProducerInfoEnum.YG.getCode())
.eq("third_station_id", String.valueOf(jpInverter.getThirdStationId())));
if (jpStation != null) { if (jpStation != null) {
tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterDayGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterDayGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterDayGenerate
.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterDayGenerate.setStationName(jpStation.getName()); tdHYGFInverterDayGenerate.setStationName(jpStation.getName());
tdHYGFInverterDayGenerate.setStationState(jpStation.getState()); tdHYGFInverterDayGenerate.setStationState(jpStation.getState());
} }
tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate); tdHYGFInverterDayGenerateMapper.insert(tdHYGFInverterDayGenerate);
//户用场站月发电量 // 户用场站月发电量
Date today1 = new Date(); Date today1 = new Date();
TdHYGFInverterMonthGenerate tdHYGFInverterMonthGenerate = tdHYGFInverterMonthGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterMonthGenerate>() TdHYGFInverterMonthGenerate tdHYGFInverterMonthGenerate = tdHYGFInverterMonthGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterMonthGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode())
.eq("day_time", DateUtil.format(today1, "yyyy-MM-dd")) .eq("day_time", DateUtil.format(today1, "yyyy-MM-dd"))
...@@ -784,28 +813,31 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -784,28 +813,31 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration()); tdHYGFInverterMonthGenerate.setGenerate(jpInverter.getDayPowerGeneration());
tdHYGFInverterMonthGenerate.setName(jpInverter.getName()); tdHYGFInverterMonthGenerate.setName(jpInverter.getName());
tdHYGFInverterMonthGenerate.setFullhour( tdHYGFInverterMonthGenerate.setFullhour(
(jpInverter.getDayPowerGeneration() == null || jpInverter.getCapacity() == null) ? null : (jpInverter.getDayPowerGeneration() == null || jpInverter.getCapacity() == null)
(jpInverter.getCapacity() <= 0.0 ? null : jpInverter.getDayPowerGeneration() / jpInverter.getCapacity()) ? null
); : (jpInverter.getCapacity() <= 0.0 ? null
: jpInverter.getDayPowerGeneration()
/ jpInverter.getCapacity()));
//新加 // 新加
if (jpStation != null) { if (jpStation != null) {
tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterMonthGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterMonthGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterMonthGenerate
.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterMonthGenerate.setStationName(jpStation.getName()); tdHYGFInverterMonthGenerate.setStationName(jpStation.getName());
tdHYGFInverterMonthGenerate.setStationState(jpStation.getState()); tdHYGFInverterMonthGenerate.setStationState(jpStation.getState());
} }
if (ObjectUtils.isEmpty(tdHYGFInverterMonthGenerate.getCreatedTime())) { if (ObjectUtils.isEmpty(tdHYGFInverterMonthGenerate.getCreatedTime())) {
tdHYGFInverterMonthGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFInverterMonthGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate); tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
} else { } else {
tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate); tdHYGFInverterMonthGenerateMapper.insert(tdHYGFInverterMonthGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFInverterYearGenerate tdHYGFInverterYearGenerate = tdHYGFInverterYearGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterYearGenerate>() TdHYGFInverterYearGenerate tdHYGFInverterYearGenerate = tdHYGFInverterYearGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterYearGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode())
.eq("month_time", DateUtil.format(today1, "yyyy-MM")) .eq("month_time", DateUtil.format(today1, "yyyy-MM"))
...@@ -819,14 +851,17 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -819,14 +851,17 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFInverterYearGenerate.setYear(DateUtil.format(today1, "yyyy")); tdHYGFInverterYearGenerate.setYear(DateUtil.format(today1, "yyyy"));
tdHYGFInverterYearGenerate.setGenerate(jpInverter.getMonthPowerGeneration()); tdHYGFInverterYearGenerate.setGenerate(jpInverter.getMonthPowerGeneration());
tdHYGFInverterYearGenerate.setName(jpInverter.getName()); tdHYGFInverterYearGenerate.setName(jpInverter.getName());
tdHYGFInverterYearGenerate.setFullhour( tdHYGFInverterYearGenerate.setFullhour((jpInverter.getMonthPowerGeneration() == null
(jpInverter.getMonthPowerGeneration() == null || jpInverter.getCapacity() == null) ? null : || jpInverter.getCapacity() == null)
(jpInverter.getCapacity() <= 0.0 ? null : jpInverter.getMonthPowerGeneration() / jpInverter.getCapacity()) ? null
); : (jpInverter.getCapacity() <= 0.0 ? null
//新加 : jpInverter.getMonthPowerGeneration()
/ jpInverter.getCapacity()));
// 新加
if (jpStation != null) { if (jpStation != null) {
tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterYearGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterYearGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterYearGenerate
.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterYearGenerate.setStationName(jpStation.getName()); tdHYGFInverterYearGenerate.setStationName(jpStation.getName());
tdHYGFInverterYearGenerate.setStationState(jpStation.getState()); tdHYGFInverterYearGenerate.setStationState(jpStation.getState());
...@@ -837,8 +872,9 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -837,8 +872,9 @@ public class SunlightServiceImpl implements SunlightService {
} else { } else {
tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate); tdHYGFInverterYearGenerateMapper.insert(tdHYGFInverterYearGenerate);
} }
//户用场站年发电量 // 户用场站年发电量
TdHYGFInverterTotalGenerate tdHYGFInverterTotalGenerate = tdHYGFInverterTotalGenerateMapper.selectOne(new QueryWrapper<TdHYGFInverterTotalGenerate>() TdHYGFInverterTotalGenerate tdHYGFInverterTotalGenerate = tdHYGFInverterTotalGenerateMapper
.selectOne(new QueryWrapper<TdHYGFInverterTotalGenerate>()
.eq("third_station_id", jpInverter.getThirdStationId()) .eq("third_station_id", jpInverter.getThirdStationId())
.eq("sn_code", jpInverter.getSnCode()) .eq("sn_code", jpInverter.getSnCode())
.eq("year_time", DateUtil.format(today1, "yyyy")) .eq("year_time", DateUtil.format(today1, "yyyy"))
...@@ -853,20 +889,22 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -853,20 +889,22 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration()); tdHYGFInverterTotalGenerate.setGenerate(jpInverter.getYearPowerGeneration());
tdHYGFInverterTotalGenerate.setFullhour(0.0d); tdHYGFInverterTotalGenerate.setFullhour(0.0d);
tdHYGFInverterTotalGenerate.setName(jpInverter.getName()); tdHYGFInverterTotalGenerate.setName(jpInverter.getName());
tdHYGFInverterTotalGenerate.setFullhour( tdHYGFInverterTotalGenerate.setFullhour((jpInverter.getYearPowerGeneration() == null
(jpInverter.getYearPowerGeneration() == null || jpInverter.getCapacity() == null) ? null : || jpInverter.getCapacity() == null)
(jpInverter.getCapacity() <= 0.0 ? null : jpInverter.getYearPowerGeneration() / jpInverter.getCapacity()) ? null
); : (jpInverter.getCapacity() <= 0.0 ? null
: jpInverter.getYearPowerGeneration()
//新加 / jpInverter.getCapacity()));
// 新加
if (jpStation != null) { if (jpStation != null) {
tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode()); tdHYGFInverterTotalGenerate.setAmosCompanyCode(jpStation.getAmosCompanyCode());
tdHYGFInverterTotalGenerate.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); tdHYGFInverterTotalGenerate
.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
tdHYGFInverterTotalGenerate.setStationName(jpStation.getName()); tdHYGFInverterTotalGenerate.setStationName(jpStation.getName());
tdHYGFInverterTotalGenerate.setStationState(jpStation.getState()); tdHYGFInverterTotalGenerate.setStationState(jpStation.getState());
} }
if (ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate.getCreatedTime())) { if (ObjectUtils.isEmpty(tdHYGFInverterTotalGenerate.getCreatedTime())) {
tdHYGFInverterTotalGenerate.setCreatedTime(System.currentTimeMillis()); tdHYGFInverterTotalGenerate.setCreatedTime(System.currentTimeMillis());
tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate); tdHYGFInverterTotalGenerateMapper.insert(tdHYGFInverterTotalGenerate);
...@@ -876,37 +914,34 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -876,37 +914,34 @@ public class SunlightServiceImpl implements SunlightService {
} }
} }
} }
}catch(Exception e){ } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
}).start(); }).start();
} }
@Async @Async
public void collectorDetail(List<Device> devices,JpStation jpStation){ public void collectorDetail(List<Device> devices, JpStation jpStation) {
for (Device device : devices) { for (Device device : devices) {
JpCollector jpCollector = jpCollectorMapper.selectOne(new QueryWrapper<JpCollector>(). JpCollector jpCollector = jpCollectorMapper
eq("third_station_id", jpStation.getThirdStationId()). .selectOne(new QueryWrapper<JpCollector>().eq("third_station_id", jpStation.getThirdStationId())
eq("third_code", PVProducerInfoEnum.YG.getCode()). .eq("third_code", PVProducerInfoEnum.YG.getCode()).eq("sn_code", device.getDevice_sn()));
eq("sn_code", device.getDevice_sn()));
if (ObjectUtils.isEmpty(jpCollector)) { if (ObjectUtils.isEmpty(jpCollector)) {
jpCollector = new JpCollector(); jpCollector = new JpCollector();
} }
//sn编码 // sn编码
jpCollector.setSnCode(device.getDevice_sn()); jpCollector.setSnCode(device.getDevice_sn());
jpCollector.setAddr(jpStation.getAddress()); jpCollector.setAddr(jpStation.getAddress());
jpCollector.setName(device.getDevice_name()); jpCollector.setName(device.getDevice_name());
//类型 // 类型
jpCollector.setType("通信模块"); jpCollector.setType("通信模块");
//更新时间 // 更新时间
jpCollector.setUpdateTime(new Date()); jpCollector.setUpdateTime(new Date());
//出场日期 // 出场日期
// jpCollector.setDischargeDate(new Date(collectorDetailDto.getFactoryTime())); // jpCollector.setDischargeDate(new Date(collectorDetailDto.getFactoryTime()));
// //生产日期 // //生产日期
// jpCollector.setProductDate(new Date(collectorDetailDto.getFactoryTime())); // jpCollector.setProductDate(new Date(collectorDetailDto.getFactoryTime()));
...@@ -916,14 +951,21 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -916,14 +951,21 @@ public class SunlightServiceImpl implements SunlightService {
// jpCollector.setThisWorkTime(new DateTime(collectorDetailDto.getCurrentWorkingTime())); // jpCollector.setThisWorkTime(new DateTime(collectorDetailDto.getCurrentWorkingTime()));
// //累计工作时间 // //累计工作时间
// jpCollector.setTotalWorkTime(new DateTime(collectorDetailDto.getTotalWorkingTime())); // jpCollector.setTotalWorkTime(new DateTime(collectorDetailDto.getTotalWorkingTime()));
//第三方电站id // 第三方电站id
jpCollector.setThirdStationId(jpStation.getThirdStationId()); jpCollector.setThirdStationId(jpStation.getThirdStationId());
//第三方厂商标识 // 第三方厂商标识
jpCollector.setThirdCode(PVProducerInfoEnum.YG.getCode()); jpCollector.setThirdCode(PVProducerInfoEnum.YG.getCode());
if(device.getGetPs_fault_status()>2) { if (device.getGetPs_fault_status() != null) {
jpCollector.setState(SunlightUtil.zt.get(device.getDev_status()+"")); if (device.getGetPs_fault_status() > 2) {
}else{ jpCollector.setState(SunlightUtil.zt.get(device.getDev_status() + ""));
jpCollector.setState("报警");//电站状态 } else {
jpCollector.setState("报警");// 电站状态
}
} else {
// 如果获取不了逆变器状态 并且逆变器没状态就默认离线
if (jpCollector.getState() == null) {
jpCollector.setState("离线");
}
} }
jpCollector.setStationName(jpStation.getName()); jpCollector.setStationName(jpStation.getName());
// jpCollector.setVersion(imasterCollectorList.getSoftwareVersion()); // jpCollector.setVersion(imasterCollectorList.getSoftwareVersion());
...@@ -936,67 +978,71 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -936,67 +978,71 @@ public class SunlightServiceImpl implements SunlightService {
} }
} }
@Scheduled(cron = "${dataRequstScheduled.Sunlight}") @Scheduled(cron = "${dataRequstScheduled.Sunlight}")
@Override @Override
@Async
public void inverAlramInfo() { public void inverAlramInfo() {
long ts = System.currentTimeMillis();
//获取所有未处理告警 logger.info("-------阳光同步告警开始" + ts + "------- " + sdf.format(new Date()));
Map<String, Object> bodyparamf=new HashMap<>(); // 获取所有未处理告警
Map<String, Object> bodyparamf = new HashMap<>();
bodyparamf.put("size", 1000); bodyparamf.put("size", 1000);
bodyparamf.put("curPage",1); bodyparamf.put("curPage", 1);
JSONObject jsonObject = SunlightUtil.getdata( JSONObject jsonObject = SunlightUtil.getdata(SunlightUtil.getFaultAlarmInfo, bodyparamf);
SunlightUtil.getFaultAlarmInfo, List<SunlightWarm> listd = jsonObject.get("pageList") != null
bodyparamf ? JSONArray.parseArray(JSON.toJSONString(jsonObject.get("pageList")), SunlightWarm.class)
); : null;
List<SunlightWarm> listd = jsonObject.get("pageList")!=null?JSONArray.parseArray(JSON.toJSONString(jsonObject.get("pageList")), SunlightWarm.class ):null; // 获取系统未处理的告警
//获取系统未处理的告警 List<String> li = new ArrayList<>();
List<String> li=new ArrayList<>();
li.add(SunlightUtil.alarmstatus.get("4")); li.add(SunlightUtil.alarmstatus.get("4"));
li.add(SunlightUtil.alarmstatus.get("5")); li.add(SunlightUtil.alarmstatus.get("5"));
List<HYGFJPInverterWarn> hygfjpInverterWarnlist = hygfjpInverterWarnMapper.selectList(new QueryWrapper<HYGFJPInverterWarn>() List<HYGFJPInverterWarn> hygfjpInverterWarnlist = hygfjpInverterWarnMapper
.notIn("`state`", li) .selectList(new QueryWrapper<HYGFJPInverterWarn>().notIn("`state`", li).eq("third_code",
.eq("third_code", PVProducerInfoEnum.YG.getCode()) PVProducerInfoEnum.YG.getCode()));
); Map<String, HYGFJPInverterWarn> bodyparam = new HashMap<>();
Map<String, HYGFJPInverterWarn> bodyparam=new HashMap<>(); if (hygfjpInverterWarnlist != null && hygfjpInverterWarnlist.size() > 0) {
if(hygfjpInverterWarnlist!=null&&hygfjpInverterWarnlist.size()>0){ bodyparam = hygfjpInverterWarnlist.stream()
bodyparam = hygfjpInverterWarnlist.stream().collect(Collectors.toMap(HYGFJPInverterWarn::getWarnId,Function.identity())); .collect(Collectors.toMap(HYGFJPInverterWarn::getWarnId, Function.identity()));
} }
//获取所有逆变器 // 获取所有逆变器
List<JpInverter> jpInverter = jpInverterMapper.selectList(new QueryWrapper<JpInverter>(). List<JpInverter> jpInverter = jpInverterMapper
eq("third_code", PVProducerInfoEnum.YG.getCode())); .selectList(new QueryWrapper<JpInverter>().eq("third_code", PVProducerInfoEnum.YG.getCode()));
Map<String, String> jpInverterbodyparam=new HashMap<>(); Map<String, String> jpInverterbodyparam = new HashMap<>();
if(jpInverter!=null&&jpInverter.size()>0){ if (jpInverter != null && jpInverter.size() > 0) {
jpInverterbodyparam = jpInverter.stream().collect(Collectors.toMap(JpInverter::getId,JpInverter::getSnCode)); jpInverterbodyparam = jpInverter.stream()
} .collect(Collectors.toMap(JpInverter::getId, JpInverter::getSnCode));
if(listd!=null&&!listd.isEmpty()){ }
if (listd != null && !listd.isEmpty()) {
for (SunlightWarm sunlightWarm : listd) { for (SunlightWarm sunlightWarm : listd) {
//告警已存在 // 告警已存在
if(!bodyparam.isEmpty()&&bodyparam.containsKey(sunlightWarm.getFault_code())) { if (!bodyparam.isEmpty() && bodyparam.containsKey(sunlightWarm.getFault_code())) {
bodyparam.remove(sunlightWarm.getFault_code()); bodyparam.remove(sunlightWarm.getFault_code());
}else{ } else {
//告警不存在,新增 // 告警不存在,新增
HYGFJPInverterWarn hygfjpInverterWarn = new HYGFJPInverterWarn(); HYGFJPInverterWarn hygfjpInverterWarn = new HYGFJPInverterWarn();
hygfjpInverterWarn.setTime(System.currentTimeMillis()); hygfjpInverterWarn.setTime(System.currentTimeMillis());
hygfjpInverterWarn.setSnCode(!jpInverterbodyparam.isEmpty()&&jpInverterbodyparam.containsKey(sunlightWarm.getUuid().toString())?jpInverterbodyparam.get(sunlightWarm.getUuid().toString()):null); hygfjpInverterWarn.setSnCode(!jpInverterbodyparam.isEmpty()
&& jpInverterbodyparam.containsKey(sunlightWarm.getUuid().toString())
? jpInverterbodyparam.get(sunlightWarm.getUuid().toString())
: null);
hygfjpInverterWarn.setThirdStationId(sunlightWarm.getPs_id().toString()); hygfjpInverterWarn.setThirdStationId(sunlightWarm.getPs_id().toString());
hygfjpInverterWarn.setLevel(SunlightUtil.alarmLevel.get(sunlightWarm.getFault_level().toString())); hygfjpInverterWarn.setLevel(SunlightUtil.alarmLevel.get(sunlightWarm.getFault_level().toString()));
hygfjpInverterWarn.setContent(sunlightWarm.getFault_name()); hygfjpInverterWarn.setContent(sunlightWarm.getFault_name());
hygfjpInverterWarn.setThirdCode(PVProducerInfoEnum.YG.getCode()); hygfjpInverterWarn.setThirdCode(PVProducerInfoEnum.YG.getCode());
hygfjpInverterWarn.setTreatment(sunlightWarm.getFault_desc()); hygfjpInverterWarn.setTreatment(sunlightWarm.getFault_desc());
hygfjpInverterWarn.setStartTime(DateUtil.parse(sunlightWarm.getCreate_time(), DatePattern.NORM_DATETIME_PATTERN).getTime()); hygfjpInverterWarn.setStartTime(
hygfjpInverterWarn.setState(SunlightUtil.alarmstatus.get(sunlightWarm.getProcess_status().toString())); DateUtil.parse(sunlightWarm.getCreate_time(), DatePattern.NORM_DATETIME_PATTERN).getTime());
hygfjpInverterWarn
.setState(SunlightUtil.alarmstatus.get(sunlightWarm.getProcess_status().toString()));
hygfjpInverterWarn.setTimeLong(null); hygfjpInverterWarn.setTimeLong(null);
hygfjpInverterWarn.setRecoverTime(null); hygfjpInverterWarn.setRecoverTime(null);
hygfjpInverterWarn.setTimeLong(null); hygfjpInverterWarn.setTimeLong(null);
hygfjpInverterWarn.setWarnId(sunlightWarm.getFault_code()); hygfjpInverterWarn.setWarnId(sunlightWarm.getFault_code());
//电站区域经销商, // 电站区域经销商,
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>(). JpStation jpStation = jpStationMapper
eq("third_code", PVProducerInfoEnum.YG.getCode()). .selectOne(new QueryWrapper<JpStation>().eq("third_code", PVProducerInfoEnum.YG.getCode())
eq("third_station_id", sunlightWarm.getPs_id().toString())); .eq("third_station_id", sunlightWarm.getPs_id().toString()));
if(jpStation!=null){ if (jpStation != null) {
hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode()); hygfjpInverterWarn.setAmosCompanyCode(jpStation.getAmosCompanyCode());
hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode()); hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpInverterWarn.setStationName(jpStation.getName()); hygfjpInverterWarn.setStationName(jpStation.getName());
...@@ -1005,7 +1051,7 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -1005,7 +1051,7 @@ public class SunlightServiceImpl implements SunlightService {
try { try {
TimeUnit.MINUTES.sleep(1); TimeUnit.MINUTES.sleep(1);
hygfjpInverterWarn.setCreatedTime(System.currentTimeMillis()); hygfjpInverterWarn.setCreatedTime(System.currentTimeMillis());
}catch (Exception e){ } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
hygfjpInverterWarnMapper.insert(hygfjpInverterWarn); hygfjpInverterWarnMapper.insert(hygfjpInverterWarn);
...@@ -1013,11 +1059,10 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -1013,11 +1059,10 @@ public class SunlightServiceImpl implements SunlightService {
} }
} }
// 更新td已消除告警,由于第三方获取会出现请求次数超限,状态只能手动修改,没有消除时间,
//更新td已消除告警,由于第三方获取会出现请求次数超限,状态只能手动修改,没有消除时间, if (!bodyparam.isEmpty()) {
Object[] ids = bodyparam.keySet().toArray();
if(!bodyparam.isEmpty()){
Object[] ids= bodyparam.keySet().toArray();
for (Object id : ids) { for (Object id : ids) {
// Map<String, Object> bodyparamfx=new HashMap<>(); // Map<String, Object> bodyparamfx=new HashMap<>();
// bodyparamfx.put("size", 1000); // bodyparamfx.put("size", 1000);
...@@ -1032,7 +1077,7 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -1032,7 +1077,7 @@ public class SunlightServiceImpl implements SunlightService {
// if(listx!=null&&!listx.isEmpty()){ // if(listx!=null&&!listx.isEmpty()){
// SunlightWarm sunlightWarm=listx.get(0); // SunlightWarm sunlightWarm=listx.get(0);
HYGFJPInverterWarn hygfjpInverterWarn= bodyparam.get(id); HYGFJPInverterWarn hygfjpInverterWarn = bodyparam.get(id);
// //
// if (StringUtils.isNotBlank(sunlightWarm.getOver_time())) { // if (StringUtils.isNotBlank(sunlightWarm.getOver_time())) {
// hygfjpInverterWarn.setRecoverTime(DateUtil.parse(sunlightWarm.getOver_time(), DatePattern.NORM_DATETIME_PATTERN).getTime()); // hygfjpInverterWarn.setRecoverTime(DateUtil.parse(sunlightWarm.getOver_time(), DatePattern.NORM_DATETIME_PATTERN).getTime());
...@@ -1041,20 +1086,13 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -1041,20 +1086,13 @@ public class SunlightServiceImpl implements SunlightService {
// hygfjpInverterWarn.setTimeLong(hygfjpInverterWarn.getRecoverTime() - hygfjpInverterWarn.getStartTime()); // hygfjpInverterWarn.setTimeLong(hygfjpInverterWarn.getRecoverTime() - hygfjpInverterWarn.getStartTime());
// } // }
//hygfjpInverterWarn.setState(SunlightUtil.alarmstatus.get(sunlightWarm.getProcess_status())); // hygfjpInverterWarn.setState(SunlightUtil.alarmstatus.get(sunlightWarm.getProcess_status()));
hygfjpInverterWarn.setState(SunlightUtil.alarmstatus.get("5")); hygfjpInverterWarn.setState(SunlightUtil.alarmstatus.get("5"));
hygfjpInverterWarnMapper.insert(hygfjpInverterWarn); hygfjpInverterWarnMapper.insert(hygfjpInverterWarn);
// } // }
} }
} }
logger.info("-------阳光同步告警结束" + ts + "------- " + sdf.format(new Date()));
} }
} }
package com.yeejoin.amos.config;
import java.lang.reflect.Method;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import com.yeejoin.amos.HousevPVapiApplication;
@EnableAsync
@Configuration
@Primary
public class ListenerAsyncConfiguration implements AsyncConfigurer {
private static final Logger logger = LogManager.getLogger(ListenerAsyncConfiguration.class);
/**
* 用于@Async注解获取默认线程连接池
*
* @return
*/
@Override
public Executor getAsyncExecutor() {
// 此类由Spring提供,org.springframework.scheduling.concurrent包下,是线程池的封装类
ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
// 线程池中线程的名字前缀
taskExecutor.setThreadNamePrefix("taskThreadPool-async-");
// 线程池核心线程数量
taskExecutor.setCorePoolSize(20);
// 线程池最大线程数量
taskExecutor.setMaxPoolSize(50);
// 线程池空闲线程存活时间,单位秒
taskExecutor.setKeepAliveSeconds(100);
// 线程池拒绝策略
taskExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.DiscardOldestPolicy());
// 线程池任务队容量,如果不设置则默认 Integer.MAX_VALUE,
// 队列默认使用LinkedBlockingQueue 若queueCapacity的值 <= 0,则使用SynchronousQueue
taskExecutor.setQueueCapacity(1000);
// 线程池中核心线程是否允许超时,默认为false
taskExecutor.setAllowCoreThreadTimeOut(true);
// 线程池中的超时处理时间,单位秒,有一个对应方法为毫秒,默认为不超时
taskExecutor.setAwaitTerminationSeconds(60);
// 初始化线程池,不可以少,否者会抛出 线程池没有初始化
taskExecutor.initialize();
return taskExecutor;
}
/**
* 线程未处理异常的统一处理机制,即线程池异常处理器,简单示例
*
* @return
*/
@Override
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
// 异常处理器函数接口类
return new AsyncUncaughtExceptionHandler() {
@Override
public void handleUncaughtException(Throwable throwable, Method method, Object... objects) {
logger.error("============ " + throwable.getMessage() + " ===========", throwable);
logger.error("============ " + method.getName() + " ===========", objects);
}
};
}
}
spring.application.name=AMOS-API-HOUSEPVAPI spring.application.name=AMOS-API-HOUSEPVAPI-WJ
server.servlet.context-path=/housepvapi server.servlet.context-path=/housepvapi
server.port=11006 server.port=11006
......
...@@ -15,4 +15,10 @@ public interface TdHYGFInverterDayGenerateMapper extends BaseMapper<TdHYGFInvert ...@@ -15,4 +15,10 @@ public interface TdHYGFInverterDayGenerateMapper extends BaseMapper<TdHYGFInvert
@UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and") @UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<TdHYGFInverterDayGenerate> selectList(@Param(Constants.WRAPPER) Wrapper<TdHYGFInverterDayGenerate> queryWrapper); List<TdHYGFInverterDayGenerate> selectList(@Param(Constants.WRAPPER) Wrapper<TdHYGFInverterDayGenerate> queryWrapper);
// @UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<Map<String,Object>> selectSnCodeList(String startTime, String endTime, List<String> sncodes);
@UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<TdHYGFInverterDayGenerate> selectListPage(List<String> snCodeList, List<String> maxCreatedTimeList);
} }
...@@ -301,8 +301,6 @@ ...@@ -301,8 +301,6 @@
<select id="getCountJpStationdata" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"> <select id="getCountJpStationdata" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto">
select select
ROUND(sum(real_time_power),3) realTimePower, ROUND(sum(real_time_power),3) realTimePower,
ROUND(sum(capacity)/1000,3) capacity, ROUND(sum(capacity)/1000,3) capacity,
......
...@@ -23,4 +23,59 @@ ...@@ -23,4 +23,59 @@
</select> </select>
<!-- <select id="selectListPage" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.TdHYGFInverterDayGenerate">-->
<!-- SELECT-->
<!-- *-->
<!-- from-->
<!-- house_pv_data.td_hygf_inverter_day_generate-->
<!-- <where>-->
<!-- created_time >= #{startTime} and created_time &lt;= #{endTime}-->
<!-- <if test="sncodes != null and sncodes.size>0">-->
<!-- sn_code in-->
<!-- <foreach collection="sncodes" item="sncode" open="(" close=")" separator=",">-->
<!-- #{sncode}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- </where>-->
<!-- </select>-->
<select id="selectSnCodeList" resultType="map">
SELECT
sn_code, max(TO_UNIXTIMESTAMP(TO_ISO8601(created_time))) max_created_time
from
house_pv_data.td_hygf_inverter_day_generate
<where>
created_time >= #{startTime} and created_time &lt;= #{endTime}
<if test="sncodes != null and sncodes.size>0">
sn_code in
<foreach collection="sncodes" item="sncode" open="(" close=")" separator=",">
#{sncode}
</foreach>
</if>
</where>
GROUP BY sn_code
</select>
<select id="selectListPage" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.TdHYGFInverterDayGenerate">
SELECT
*
from
house_pv_data.td_hygf_inverter_day_generate
<where>
<if test="snCodeList != null and snCodeList.size>0">
sn_code in
<foreach collection="snCodeList" item="sncode" open="(" close=")" separator=",">
#{sncode}
</foreach>
</if>
<if test="maxCreatedTimeList != null and maxCreatedTimeList.size>0">
and created_time in
<foreach collection="maxCreatedTimeList" item="maxCreatedTime" open="(" close=")" separator=",">
#{maxCreatedTime}
</foreach>
</if>
</where>
order by created_time desc
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -40,10 +40,25 @@ import java.util.stream.Collectors; ...@@ -40,10 +40,25 @@ import java.util.stream.Collectors;
@RequestMapping(value = "/jp-station") @RequestMapping(value = "/jp-station")
public class JpStationController extends BaseController { public class JpStationController extends BaseController {
private static Double CARBON = 0.997 * 0.001; // //炭
private static Double SULFUR = 0.03 * 0.001; // private static Double CARBON = 0.997 * 0.001;
private static Double DUST = 0.272 * 0.001; // //硫
private static Double COAL = 0.4 * 0.001; // private static Double SULFUR = 0.03 * 0.001;
// //粉尘
// private static Double DUST = 0.272 * 0.001;
// //煤
// private static Double COAL = 0.4 * 0.001;
//炭
private static Double CARBON = 832 * 0.001 * 0.001;
//硫
private static Double SULFUR = 0.16 * 0.001 * 0.001;
//粉尘
private static Double DUST = 0.032 * 0.001 * 0.001;
//煤
private static Double COAL = 304.9 * 0.001 * 0.001;
private static String ZX = "在线"; private static String ZX = "在线";
private static String LX = "离线"; private static String LX = "离线";
private static String BJ = "报警"; private static String BJ = "报警";
...@@ -485,7 +500,7 @@ public class JpStationController extends BaseController { ...@@ -485,7 +500,7 @@ public class JpStationController extends BaseController {
if(jpStation==null){ if(jpStation==null){
jpStation = new JpStationDto(); jpStation = new JpStationDto();
} }
if (jpStation != null && jpStation.getRealTimePower() != null && jpStation.getRatedPower() != null && jpStation.getRatedPower() > 0) { if (jpStation != null && jpStation.getRealTimePower() != null && jpStation.getCapacity() != null && jpStation.getCapacity() > 0) {
map.put("value", String.format("%.4f", jpStation.getRealTimePower() / (jpStation.getCapacity() * FDXSS))); map.put("value", String.format("%.4f", jpStation.getRealTimePower() / (jpStation.getCapacity() * FDXSS)));
} else { } else {
map.put("value", 0); map.put("value", 0);
...@@ -543,6 +558,8 @@ public class JpStationController extends BaseController { ...@@ -543,6 +558,8 @@ public class JpStationController extends BaseController {
map.put("dust", format2.format(accumulatedPower * FDXSS * DUST)); map.put("dust", format2.format(accumulatedPower * FDXSS * DUST));
//煤 //煤
map.put("coal", format2.format(accumulatedPower * FDXSS * COAL)); map.put("coal", format2.format(accumulatedPower * FDXSS * COAL));
itemList.add(map); itemList.add(map);
result.setCurrent(1); result.setCurrent(1);
result.setTotal(1); result.setTotal(1);
......
...@@ -26,6 +26,9 @@ import org.typroject.tyboot.core.foundation.utils.Bean; ...@@ -26,6 +26,9 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -118,7 +121,8 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter ...@@ -118,7 +121,8 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
String key1 = treeParam.get("key").toString(); String key1 = treeParam.get("key").toString();
if (treeParam.get("key").toString().startsWith("acc")||treeParam.get("key").toString().startsWith("acv")||treeParam.get("key").toString().startsWith("pv")){ if (treeParam.get("key").toString().startsWith("acc")||treeParam.get("key").toString().startsWith("acv")||treeParam.get("key").toString().startsWith("pv")){
key1 =treeParam.get("key").toString().replace("_",""); key1 =treeParam.get("key").toString().replace("_","");
} value.add(obj.get(key1).toString()); }
value.add(obj.get(key1).toString());
} }
treeParam.put("data",value); treeParam.put("data",value);
} }
...@@ -132,23 +136,51 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter ...@@ -132,23 +136,51 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
@UserLimits @UserLimits
public Page<TdHYGFInverterDayGenerate> jpInverterDayReport(int current, int size, String time, List<String> sncodes, List<String> stationIds) { public Page<TdHYGFInverterDayGenerate> jpInverterDayReport(int current, int size, String time, List<String> sncodes, List<String> stationIds) {
Page<TdHYGFInverterDayGenerate> tdHYGFInverterDayGeneratePage = new Page<>(); Page<TdHYGFInverterDayGenerate> tdHYGFInverterDayGeneratePage = new Page<>();
Date date = DateUtil.parse(time, "yyyy-MM-dd"); // Date date = DateUtil.parse(time, "yyyy-MM-dd");
Date timeStart = DateUtils.dateAddHours(date, -8); // Date timeStart = DateUtils.dateAddHours(date, -8);
Date tiemEnd = DateUtils.dateAddHours(date, 16); // Date tiemEnd = DateUtils.dateAddHours(date, 16);
String startTime = DateUtil.format(timeStart, "yyyy-MM-dd HH:mm:ss"); // String startTime = DateUtil.format(timeStart, "yyyy-MM-dd HH:mm:ss");
String endTime = DateUtil.format(tiemEnd, "yyyy-MM-dd HH:mm:ss"); // String endTime = DateUtil.format(tiemEnd, "yyyy-MM-dd HH:mm:ss");
QueryWrapper queryWrapper = new QueryWrapper<TdHYGFInverterDayGenerate>()
.ge("created_time", startTime) CharSequence time1 = time + " 00:00:00";
.le("created_time", endTime); CharSequence time2 = time + " 23:59:59";
// .in("third_station_id", stationIds); DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
; String startTime = DateUtil.format(LocalDateTime.parse(time1,df), "yyyy-MM-dd HH:mm:ss");
if (CollectionUtil.isNotEmpty(sncodes)) { String endTime = DateUtil.format(LocalDateTime.parse(time2,df), "yyyy-MM-dd HH:mm:ss");
queryWrapper.in("sn_code", sncodes);
// QueryWrapper queryWrapper = new QueryWrapper<TdHYGFInverterDayGenerate>()
// .ge("created_time", startTime)
// .le("created_time", endTime);
//// .in("third_station_id", stationIds);
// ;
// if (CollectionUtil.isNotEmpty(sncodes)) {
// queryWrapper.in("sn_code", sncodes);
// }
// queryWrapper.orderByDesc("created_time");
//
// PageHelper.startPage(current, size);
// List<TdHYGFInverterDayGenerate> tdHYGFInverterDayGenerates = tdHYGFInverterDayGenerateMapper.selectList(queryWrapper);
List<Map<String, Object>> listData = tdHYGFInverterDayGenerateMapper.selectSnCodeList(startTime, endTime, sncodes);
List<String> snCodeList = new ArrayList<>();
List<String> maxCreatedTimeList = new ArrayList<>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
listData.stream().forEach(item -> {
if(item.get("sn_code") != null) {
snCodeList.add(item.get("sn_code").toString());
} }
queryWrapper.orderByDesc("created_time"); if(item.get("max_created_time") != null) {
maxCreatedTimeList.add(sdf.format(item.get("max_created_time")));
}
});
PageHelper.startPage(current, size); PageHelper.startPage(current, size);
List<TdHYGFInverterDayGenerate> tdHYGFInverterDayGenerates = tdHYGFInverterDayGenerateMapper.selectList(queryWrapper); List<TdHYGFInverterDayGenerate> tdHYGFInverterDayGenerates = tdHYGFInverterDayGenerateMapper.selectListPage(snCodeList, maxCreatedTimeList);
tdHYGFInverterDayGenerates.forEach(tdHYGFInverterDayGenerate -> { tdHYGFInverterDayGenerates.forEach(tdHYGFInverterDayGenerate -> {
Date date1 = new Date(tdHYGFInverterDayGenerate.getCreatedTime()); Date date1 = new Date(tdHYGFInverterDayGenerate.getCreatedTime());
tdHYGFInverterDayGenerate.setCreatedTimeStr(DateUtil.format(date1, DatePattern.NORM_DATETIME_PATTERN)); tdHYGFInverterDayGenerate.setCreatedTimeStr(DateUtil.format(date1, DatePattern.NORM_DATETIME_PATTERN));
......
<factorypath> <factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-biz/1.0.0/amos-boot-module-common-biz-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-api/1.0.0/amos-boot-module-common-api-1.0.0.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-api/1.0.0/amos-boot-module-common-api-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-elasticsearch/2.3.11.RELEASE/spring-boot-starter-data-elasticsearch-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-elasticsearch/2.3.11.RELEASE/spring-boot-starter-data-elasticsearch-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-elasticsearch/4.0.9.RELEASE/spring-data-elasticsearch-4.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-elasticsearch/4.0.9.RELEASE/spring-data-elasticsearch-4.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
......
<factorypath> <factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-biz/1.0.0/amos-boot-module-common-biz-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-api/1.0.0/amos-boot-module-common-api-1.0.0.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-api/1.0.0/amos-boot-module-common-api-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-elasticsearch/2.3.11.RELEASE/spring-boot-starter-data-elasticsearch-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-elasticsearch/2.3.11.RELEASE/spring-boot-starter-data-elasticsearch-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-elasticsearch/4.0.9.RELEASE/spring-data-elasticsearch-4.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-elasticsearch/4.0.9.RELEASE/spring-data-elasticsearch-4.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
......
...@@ -38,6 +38,8 @@ import java.util.*; ...@@ -38,6 +38,8 @@ import java.util.*;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
/** /**
* @description: * @description:
* @author: tw * @author: tw
...@@ -72,16 +74,17 @@ public class LargeScreenImpl { ...@@ -72,16 +74,17 @@ public class LargeScreenImpl {
* 全国 * 全国
*/ */
@Scheduled(cron = "0/10 * * * * ?") @Scheduled(cron = "0/10 * * * * ?")
@PostConstruct
public Map<String, Double> getqg() { public Map<String, Double> getqg() {
Map<String, Double> mapdta = new HashMap<>(); Map<String, Double> mapdta = new HashMap<>();
mapdta.put("SS", 0d); mapdta.put("SS", 0d);
mapdta.put("ZFS", 0d); mapdta.put("ZFS", 0d);
mapdta.put("ZFSLJ", 0d); mapdta.put("ZFSLJ", 0d);
mapdta.put("RSD", 0d); // mapdta.put("RSD", 0d);
mapdta.put("YFD", 0d); // mapdta.put("YFD", 0d);
mapdta.put("NFD", 0d); // mapdta.put("NFD", 0d);
mapdta.put("YJHWC", 0d); // mapdta.put("YJHWC", 0d);
mapdta.put("NJHWC", 0d); // mapdta.put("NJHWC", 0d);
//平均数 //平均数
List<String> value = new ArrayList<>(); List<String> value = new ArrayList<>();
value.add(SS); value.add(SS);
...@@ -113,37 +116,37 @@ public class LargeScreenImpl { ...@@ -113,37 +116,37 @@ public class LargeScreenImpl {
} }
} }
} }
//日发电量 // //日发电量
AtomicReference<Double> dailyPower = new AtomicReference<>(0.0); // AtomicReference<Double> dailyPower = new AtomicReference<>(0.0);
//月发电量 // //月发电量
AtomicReference<Double> monthlyPower = new AtomicReference<>(0.0); // AtomicReference<Double> monthlyPower = new AtomicReference<>(0.0);
//年发电量 // //年发电量
AtomicReference<Double> annualPower = new AtomicReference<>(0.0); // AtomicReference<Double> annualPower = new AtomicReference<>(0.0);
for (StationCacheInfoDto stationCacheInfoDto : stationCacheInfoDtos) { // for (StationCacheInfoDto stationCacheInfoDto : stationCacheInfoDtos) {
//
if ("FDZ".equals(stationCacheInfoDto.getStationType())) { // if ("FDZ".equals(stationCacheInfoDto.getStationType())) {
Map<String, List<String>> queryCondtion = new HashMap<>(); // Map<String, List<String>> queryCondtion = new HashMap<>();
queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("日发电量", "月发电量", "年发电量")); // queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("日发电量", "月发电量", "年发电量"));
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationCacheInfoDto.getFanGatewayId())); // queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationCacheInfoDto.getFanGatewayId()));
List<ESEquipments> result = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class); // List<ESEquipments> result = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class);
dailyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "日发电量"))); // dailyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "日发电量")));
monthlyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "月发电量"))); // monthlyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "月发电量")));
annualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "年发电量"))); // annualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "年发电量")));
} else { // } else {
Map<String, List<String>> queryCondtion = new HashMap<>(); // Map<String, List<String>> queryCondtion = new HashMap<>();
queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, CommonConstans.taiHeGenIndicator); // queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, CommonConstans.taiHeGenIndicator);
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationCacheInfoDto.getBoosterGatewayId())); // queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationCacheInfoDto.getBoosterGatewayId()));
List<ESEquipments> result = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class); // List<ESEquipments> result = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class);
dailyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, CommonConstans.taiHeGenIndicatorDay))); // dailyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, CommonConstans.taiHeGenIndicatorDay)));
monthlyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, CommonConstans.taiHeGenIndicatorMonth))); // monthlyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, CommonConstans.taiHeGenIndicatorMonth)));
annualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, CommonConstans.taiHeGenIndicatorYear))); // annualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, CommonConstans.taiHeGenIndicatorYear)));
} // }
//
} // }
//
mapdta.put("RSD", keepFourdecimalPlaces(dailyPower.get())); // mapdta.put("RSD", keepFourdecimalPlaces(dailyPower.get()));
mapdta.put("YFD", keepFourdecimalPlaces(monthlyPower.get())); // mapdta.put("YFD", keepFourdecimalPlaces(monthlyPower.get()));
mapdta.put("NFD", keepFourdecimalPlaces(annualPower.get())); // mapdta.put("NFD", keepFourdecimalPlaces(annualPower.get()));
//总和 //总和
// value.clear(); // value.clear();
...@@ -172,28 +175,28 @@ public class LargeScreenImpl { ...@@ -172,28 +175,28 @@ public class LargeScreenImpl {
// } // }
// } // }
// } // }
//计算月完成百分比 // //计算月完成百分比
//当前月份 获取 // //当前月份 获取
LocalDate currentDate = LocalDate.now(); // LocalDate currentDate = LocalDate.now();
int month = currentDate.getMonthValue(); // int month = currentDate.getMonthValue();
//
QueryWrapper<StationPlan> wrapper = new QueryWrapper<>(); // QueryWrapper<StationPlan> wrapper = new QueryWrapper<>();
wrapper.select("ifnull(sum(value), 0) as sum_value"); // wrapper.select("ifnull(sum(value), 0) as sum_value");
wrapper.eq("monthly", month); // wrapper.eq("monthly", month);
List<Map<String, Object>> list = StationPlanMapper.selectMaps(wrapper); // List<Map<String, Object>> list = StationPlanMapper.selectMaps(wrapper);
Double sumValue = list != null && !list.isEmpty() ? (Double) list.get(0).get("sum_value") : 0; // Double sumValue = list != null && !list.isEmpty() ? (Double) list.get(0).get("sum_value") : 0;
//计算年完成百分比 // //计算年完成百分比
Double ybfb = sumValue > 0 ? mapdta.get("YFD") / sumValue * 100 : 0; // Double ybfb = sumValue > 0 ? mapdta.get("YFD") / sumValue * 100 : 0;
ybfb = new BigDecimal(ybfb).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue(); // ybfb = new BigDecimal(ybfb).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
//
mapdta.put("YJHWC", ybfb); // mapdta.put("YJHWC", ybfb);
QueryWrapper<StationPlan> wrapper1 = new QueryWrapper<>(); // QueryWrapper<StationPlan> wrapper1 = new QueryWrapper<>();
wrapper1.select("ifnull(sum(value), 0) as sum_value"); // wrapper1.select("ifnull(sum(value), 0) as sum_value");
List<Map<String, Object>> list1 = StationPlanMapper.selectMaps(wrapper1); // List<Map<String, Object>> list1 = StationPlanMapper.selectMaps(wrapper1);
Double sumValuen = list1 != null && !list1.isEmpty() ? (Double) list1.get(0).get("sum_value") : 0; // Double sumValuen = list1 != null && !list1.isEmpty() ? (Double) list1.get(0).get("sum_value") : 0;
Double ybfbn = sumValuen > 0 ? mapdta.get("NFD") / sumValue * 100 : 0; // Double ybfbn = sumValuen > 0 ? mapdta.get("NFD") / sumValue * 100 : 0;
ybfbn = new BigDecimal(ybfbn).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue(); // ybfbn = new BigDecimal(ybfbn).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
mapdta.put("NJHWC", ybfbn); // mapdta.put("NJHWC", ybfbn);
try { try {
emqKeeper.getMqttClient().publish("qg/yxzb", JSON.toJSONString(mapdta).getBytes(),0,true); emqKeeper.getMqttClient().publish("qg/yxzb", JSON.toJSONString(mapdta).getBytes(),0,true);
} catch (MqttException e) { } catch (MqttException e) {
......
...@@ -570,46 +570,45 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -570,46 +570,45 @@ public class MonitorServiceImpl implements MonitorService {
* *
* @return 返回一个包含各种指标数据的map,其中键为指标名称,值为指标数值。 * @return 返回一个包含各种指标数据的map,其中键为指标名称,值为指标数值。
*/ */
public Map<String, Double> getqg() { // public Map<String, Double> getqg() {
//
// 初始化存储数据的map,设置默认值为0 // // 初始化存储数据的map,设置默认值为0
Map<String, Double> mapdta = new HashMap<>(); // Map<String, Double> mapdta = new HashMap<>();
mapdta.put("SS", 0d); // mapdta.put("SS", 0d);
mapdta.put("ZFS", 0d); // mapdta.put("ZFS", 0d);
mapdta.put("ZFSLJ", 0d); // mapdta.put("ZFSLJ", 0d);
mapdta.put("RSD", 0d); // mapdta.put("RSD", 0d);
mapdta.put("YFD", 0d); // mapdta.put("YFD", 0d);
mapdta.put("NFD", 0d); // mapdta.put("NFD", 0d);
mapdta.put("YJHWC", 0d); // mapdta.put("YJHWC", 0d);
mapdta.put("NJHWC", 0d); // mapdta.put("NJHWC", 0d);
// 获取核心数值数据 // // 获取核心数值数据
List<CoreValuesDto> coreValuesDtos = new ArrayList<>(); // List<CoreValuesDto> coreValuesDtos = new ArrayList<>();
coreValuesDtos = coreCommonService.getValuesByStationNamesAndPointsNames(null, null); // coreValuesDtos = coreCommonService.getValuesByStationNamesAndPointsNames(null, null);
// 构建请求URL并发起HTTP GET请求,获取相关数据 // // 构建请求URL并发起HTTP GET请求,获取相关数据
String requestUrl = Constants.BASE_URL + "?" + Constants.get_area_item_url; // String requestUrl = Constants.BASE_URL + "?" + Constants.get_area_item_url;
List<BuDunGenDto> buDunGenDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class); // List<BuDunGenDto> buDunGenDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class);
// 如果有获取到数据,则更新map中的相应数据 // // 如果有获取到数据,则更新map中的相应数据
if (buDunGenDtos.size() > 0) { // if (buDunGenDtos.size() > 0) {
BuDunGenDto buDunGenDto = buDunGenDtos.get(0); // BuDunGenDto buDunGenDto = buDunGenDtos.get(0);
mapdta.put("RSD", keepFourdecimalPlaces(buDunGenDto.getDay())); // mapdta.put("RSD", keepFourdecimalPlaces(buDunGenDto.getDay()));
mapdta.put("YFD", keepFourdecimalPlaces(buDunGenDto.getMonth())); // mapdta.put("YFD", keepFourdecimalPlaces(buDunGenDto.getMonth()));
mapdta.put("NFD", keepFourdecimalPlaces(buDunGenDto.getYear())); // mapdta.put("NFD", keepFourdecimalPlaces(buDunGenDto.getYear()));
mapdta.put("YJHWC", keepTwodecimalPlaces(buDunGenDto.getMonth_complete())); // mapdta.put("YJHWC", keepTwodecimalPlaces(buDunGenDto.getMonth_complete()));
mapdta.put("NJHWC", keepTwodecimalPlaces(buDunGenDto.getYear_complete())); // mapdta.put("NJHWC", keepTwodecimalPlaces(buDunGenDto.getYear_complete()));
} // }
// 更新map中剩余的数据项 // // 更新map中剩余的数据项
mapdta.put("SS", keepTwodecimalPlaces(coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.WIND_SPEED_THIRTY_SECONDS))); // mapdta.put("SS", keepTwodecimalPlaces(coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.WIND_SPEED_THIRTY_SECONDS)));
mapdta.put("ZFS", keepTwodecimalPlaces(coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.TOTAL_RADIATION))); // mapdta.put("ZFS", keepTwodecimalPlaces(coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.TOTAL_RADIATION)));
mapdta.put("ZFSLJ", keepTwodecimalPlaces(coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.TOTAL_RADIATION_SUM))); // mapdta.put("ZFSLJ", keepTwodecimalPlaces(coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.TOTAL_RADIATION_SUM)));
// 将数据发布到MQTT主题 // // 将数据发布到MQTT主题
try { // try {
emqKeeper.getMqttClient().publish("qg/yxzb", JSON.toJSONString(mapdta).getBytes(), 0, true); // emqKeeper.getMqttClient().publish("qg/yxzb", JSON.toJSONString(mapdta).getBytes(), 0, true);
} catch (MqttException e) { // } catch (MqttException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
return mapdta; // return mapdta;
// }
}
@Scheduled(cron = "0/10 * * * * ?") @Scheduled(cron = "0/10 * * * * ?")
private void sendQYYXZBMqtt() { private void sendQYYXZBMqtt() {
......
...@@ -23,7 +23,7 @@ spring.db4.datasource.password=taosdata ...@@ -23,7 +23,7 @@ spring.db4.datasource.password=taosdata
spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
## eureka properties: ## eureka properties:
eureka.instance.hostname=172.16.10.220 eureka.instance.hostname=10.20.1.160
eureka.client.serviceUrl.defaultZone=http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties: ## redis properties:
spring.redis.database=1 spring.redis.database=1
...@@ -63,10 +63,10 @@ lettuce.timeout=10000 ...@@ -63,10 +63,10 @@ lettuce.timeout=10000
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.220:1883 emqx.broker=tcp://10.20.1.210:2883
emqx.user-name=admin emqx.user-name=admin
emqx.password=public emqx.password=public
mqtt.scene.host=mqtt://172.16.10.220:8083/mqtt mqtt.scene.host=mqtt://10.20.1.210:8083/mqtt
mqtt.client.product.id=mqtt mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000 spring.mqtt.completionTimeout=3000
......
spring.application.name=AMOS-JXIOP-BIGSCREEN spring.application.name=AMOS-JXIOP-BIGSCREEN-WJ
server.servlet.context-path=/jxiop-bigscreen server.servlet.context-path=/jxiop-bigscreen
server.port=33300 server.port=33300
server.uri-encoding=UTF-8 server.uri-encoding=UTF-8
......
<factorypath> <factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-biz/1.0.0/amos-boot-module-common-biz-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-api/1.0.0/amos-boot-module-common-api-1.0.0.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-api/1.0.0/amos-boot-module-common-api-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-elasticsearch/2.3.11.RELEASE/spring-boot-starter-data-elasticsearch-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-elasticsearch/2.3.11.RELEASE/spring-boot-starter-data-elasticsearch-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-elasticsearch/4.0.9.RELEASE/spring-data-elasticsearch-4.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-elasticsearch/4.0.9.RELEASE/spring-data-elasticsearch-4.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
......
<factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/druid-spring-boot-starter/1.1.10/druid-spring-boot-starter-1.1.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/druid/1.1.10/druid-1.1.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-autoconfigure/2.3.11.RELEASE/spring-boot-autoconfigure-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot/2.3.11.RELEASE/spring-boot-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-jdbc/2.1.6.RELEASE/spring-boot-starter-jdbc-2.1.6.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter/2.3.11.RELEASE/spring-boot-starter-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/5.2.15.RELEASE/spring-core-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jcl/5.2.15.RELEASE/spring-jcl-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/zaxxer/HikariCP/3.4.5/HikariCP-3.4.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/5.2.15.RELEASE/spring-jdbc-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/5.2.15.RELEASE/spring-beans-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-tx/5.2.15.RELEASE/spring-tx-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-configuration-processor/2.3.11.RELEASE/spring-boot-configuration-processor-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-component-emq/1.1.23-SNAPSHOT/tyboot-component-emq-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-foundation/1.1.23-SNAPSHOT/tyboot-core-foundation-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/belerweb/pinyin4j/2.5.0/pinyin4j-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-beanutils/commons-beanutils/1.9.2/commons-beanutils-1.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/esotericsoftware/reflectasm/reflectasm/1.09/reflectasm-1.09.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/axet/kaptcha/0.0.9/kaptcha-0.0.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/jhlabs/filters/2.0.235/filters-2.0.235.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/paho/org.eclipse.paho.client.mqttv3/1.2.2/org.eclipse.paho.client.mqttv3-1.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.11.4/jackson-databind-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.11.4/jackson-annotations-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.11.4/jackson-core-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-logging/2.3.11.RELEASE/spring-boot-starter-logging-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-to-slf4j/2.13.3/log4j-to-slf4j-2.13.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-boot-starter/3.2.0/mybatis-plus-boot-starter-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus/3.2.0/mybatis-plus-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-extension/3.2.0/mybatis-plus-extension-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-core/3.2.0/mybatis-plus-core-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-annotation/3.2.0/mybatis-plus-annotation-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/mybatis/3.5.2/mybatis-3.5.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/taosdata/jdbc/taos-jdbcdriver/3.2.4/taos-jdbcdriver-3.2.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.14/httpcore-4.4.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.14/commons-codec-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/29.0-jre/guava-29.0-jre.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/java-websocket/Java-WebSocket/1.5.2/Java-WebSocket-1.5.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/fastjson/1.2.47/fastjson-1.2.47.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cn/hutool/hutool-all/5.8.16/hutool-all-5.8.16.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-component-security/1.7.13-SNAPSHOT/amos-component-security-1.7.13-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-security/2.3.11.RELEASE/spring-boot-starter-security-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-config/5.3.9.RELEASE/spring-security-config-5.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-core/5.3.9.RELEASE/spring-security-core-5.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-web/5.3.9.RELEASE/spring-security-web-5.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/de/codecentric/spring-boot-admin-starter-client/2.4.1/spring-boot-admin-starter-client-2.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/de/codecentric/spring-boot-admin-client/2.4.1/spring-boot-admin-client-2.4.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-component-cache/1.1.23-SNAPSHOT/tyboot-component-cache-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-redis/2.3.11.RELEASE/spring-boot-starter-data-redis-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/lettuce/lettuce-core/5.3.7.RELEASE/lettuce-core-5.3.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-common/4.1.65.Final/netty-common-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-handler/4.1.65.Final/netty-handler-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-resolver/4.1.65.Final/netty-resolver-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-buffer/4.1.65.Final/netty-buffer-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-codec/4.1.65.Final/netty-codec-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/netty/netty-transport/4.1.65.Final/netty-transport-4.1.65.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-rdbms/1.1.23-SNAPSHOT/tyboot-core-rdbms-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/8.0.25/mysql-connector-java-8.0.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-restful/1.1.23-SNAPSHOT/tyboot-core-restful-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-auth/1.1.23-SNAPSHOT/tyboot-core-auth-1.1.23-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-generator/3.2.0/mybatis-plus-generator-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/spring/boot/mybatis-spring-boot-starter/2.1.2/mybatis-spring-boot-starter-2.1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/spring/boot/mybatis-spring-boot-autoconfigure/2.1.2/mybatis-spring-boot-autoconfigure-2.1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/mybatis-spring/2.0.4/mybatis-spring-2.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/itextpdf/itextpdf/5.5.13/itextpdf-5.5.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/itextpdf/itext-asian/5.2.0/itext-asian-5.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/zxing/core/3.3.0/core-3.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/pagehelper/pagehelper/5.1.10/pagehelper-5.1.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jsqlparser/jsqlparser/2.0/jsqlparser-2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-text/1.9/commons-text-1.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-feign-privilege/1.9.0-SNAPSHOT/amos-feign-privilege-1.9.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-component-feign/1.9.0-SNAPSHOT/amos-component-feign-1.9.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-openfeign/2.2.5.RELEASE/spring-cloud-starter-openfeign-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-openfeign-core/2.2.5.RELEASE/spring-cloud-openfeign-core-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/form/feign-form-spring/3.8.0/feign-form-spring-3.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/form/feign-form/3.8.0/feign-form-3.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/2.2/commons-io-2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/feign-core/10.10.1/feign-core-10.10.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/feign-slf4j/10.10.1/feign-slf4j-10.10.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/feign-hystrix/10.10.1/feign-hystrix-10.10.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/servlet/javax.servlet-api/4.0.1/javax.servlet-api-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-redis/1.4.5.RELEASE/spring-boot-starter-redis-1.4.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-redis/2.3.9.RELEASE/spring-data-redis-2.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-keyvalue/2.3.9.RELEASE/spring-data-keyvalue-2.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-commons/2.3.9.RELEASE/spring-data-commons-2.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-oxm/5.2.15.RELEASE/spring-oxm-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/redis/clients/jedis/3.3.0/jedis-3.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/brave/brave/5.12.3/brave-5.12.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/reporter2/zipkin-reporter-brave/2.15.0/zipkin-reporter-brave-2.15.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/reporter2/zipkin-reporter/2.15.0/zipkin-reporter-2.15.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/zipkin2/zipkin/2.21.1/zipkin-2.21.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/swagger-annotations/1.5.13/swagger-annotations-1.5.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cn/com/vastdata/vastbase/1.0.0.2/vastbase-1.0.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/logstash/logback/logstash-logback-encoder/6.3/logstash-logback-encoder-6.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/kingbase8/kingbase8/8.6.0/kingbase8-8.6.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ongres/scram/client/2.1/client-2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ongres/scram/common/2.1/common-2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ongres/stringprep/saslprep/1.1/saslprep-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ongres/stringprep/stringprep/1.1/stringprep-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/messaginghub/pooled-jms/1.0.5/pooled-jms-1.0.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/geronimo/specs/geronimo-jms_2.0_spec/1.0-alpha-2/geronimo-jms_2.0_spec-1.0-alpha-2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-pool2/2.8.1/commons-pool2-2.8.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-netflix-eureka-server/2.2.5.RELEASE/spring-cloud-starter-netflix-eureka-server-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter/2.2.5.RELEASE/spring-cloud-starter-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-context/2.2.5.RELEASE/spring-cloud-context-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-crypto/5.3.9.RELEASE/spring-security-crypto-5.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-commons/2.2.5.RELEASE/spring-cloud-commons-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-rsa/1.0.9.RELEASE/spring-security-rsa-1.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcpkix-jdk15on/1.64/bcpkix-jdk15on-1.64.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.64/bcprov-jdk15on-1.64.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-eureka-server/2.2.5.RELEASE/spring-cloud-netflix-eureka-server-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-actuator/2.3.11.RELEASE/spring-boot-starter-actuator-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-actuator-autoconfigure/2.3.11.RELEASE/spring-boot-actuator-autoconfigure-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-actuator/2.3.11.RELEASE/spring-boot-actuator-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/micrometer/micrometer-core/1.5.14/micrometer-core-1.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-freemarker/2.3.11.RELEASE/spring-boot-starter-freemarker-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context-support/5.2.15.RELEASE/spring-context-support-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-hystrix/2.2.5.RELEASE/spring-cloud-netflix-hystrix-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-aop/2.3.11.RELEASE/spring-boot-starter-aop-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-eureka-client/2.2.5.RELEASE/spring-cloud-netflix-eureka-client-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/eureka/eureka-client/1.9.25/eureka-client-1.9.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jettison/jettison/1.3.7/jettison-1.3.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-eventbus/0.3.0/netflix-eventbus-0.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-infix/0.3.0/netflix-infix-0.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/antlr-runtime/3.4/antlr-runtime-3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-math/2.2/commons-math-2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/servo/servo-core/0.12.21/servo-core-0.12.21.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-core/1.19.1/jersey-core-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/contribs/jersey-apache-client4/1.19.1/jersey-apache-client4-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/inject/guice/4.1.0/guice-4.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-servlet/1.19.1/jersey-servlet-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-server/1.19.1/jersey-server-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-client/1.19.1/jersey-client-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/eureka/eureka-core/1.9.25/eureka-core-1.9.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/woodstox/woodstox-core/5.3.0/woodstox-core-5.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/archaius/archaius-core/0.7.6/archaius-core-0.7.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/inject/javax.inject/1/javax.inject-1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.11.4/jackson-dataformat-xml-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.11.4/jackson-module-jaxb-annotations-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/thoughtworks/xstream/xstream/1.4.11.1/xstream-1.4.11.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-netflix-archaius/2.2.5.RELEASE/spring-cloud-starter-netflix-archaius-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-ribbon/2.2.5.RELEASE/spring-cloud-netflix-ribbon-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-archaius/2.2.5.RELEASE/spring-cloud-netflix-archaius-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-configuration/commons-configuration/1.8/commons-configuration-1.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-netflix-ribbon/2.2.5.RELEASE/spring-cloud-starter-netflix-ribbon-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon/2.3.0/ribbon-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-transport/2.3.0/ribbon-transport-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxnetty-contexts/0.4.9/rxnetty-contexts-0.4.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxnetty-servo/0.4.9/rxnetty-servo-0.4.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxnetty/0.4.9/rxnetty-0.4.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-core/2.3.0/ribbon-core-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-httpclient/2.3.0/ribbon-httpclient-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-commons-util/0.3.0/netflix-commons-util-0.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-loadbalancer/2.3.0/ribbon-loadbalancer-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-statistics/0.1.1/netflix-statistics-0.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxjava/1.3.8/rxjava-1.3.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-loadbalancer/2.2.5.RELEASE/spring-cloud-starter-loadbalancer-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-loadbalancer/2.2.5.RELEASE/spring-cloud-loadbalancer-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-validation/2.3.11.RELEASE/spring-boot-starter-validation-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/validator/hibernate-validator/6.1.7.Final/hibernate-validator-6.1.7.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/projectreactor/addons/reactor-extra/3.3.6.RELEASE/reactor-extra-3.3.6.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-cache/2.3.11.RELEASE/spring-boot-starter-cache-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/stoyanr/evictor/1.0.0/evictor-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-eureka/2.3.0/ribbon-eureka-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/jaxb-runtime/2.3.4/jaxb-runtime-2.3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/txw2/2.3.4/txw2-2.3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/istack/istack-commons-runtime/3.0.12/istack-commons-runtime-3.0.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-web/2.3.11.RELEASE/spring-boot-starter-web-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-json/2.3.11.RELEASE/spring-boot-starter-json-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.11.4/jackson-datatype-jdk8-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.11.4/jackson-datatype-jsr310-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/module/jackson-module-parameter-names/2.11.4/jackson-module-parameter-names-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-tomcat/2.3.11.RELEASE/spring-boot-starter-tomcat-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-core/9.0.46/tomcat-embed-core-9.0.46.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jakarta.el/3.0.3/jakarta.el-3.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.46/tomcat-embed-websocket-9.0.46.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/5.2.15.RELEASE/spring-web-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/5.2.15.RELEASE/spring-webmvc-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/5.2.15.RELEASE/spring-aop-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/5.2.15.RELEASE/spring-context-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/5.2.15.RELEASE/spring-expression-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/hystrix/hystrix-javanica/1.5.18/hystrix-javanica-1.5.18.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/hystrix/hystrix-core/1.5.18/hystrix-core-1.5.18.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hdrhistogram/HdrHistogram/2.1.9/HdrHistogram-2.1.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjweaver/1.9.6/aspectjweaver-1.9.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/easyexcel/2.0.5/easyexcel-2.0.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cglib/cglib/3.1/cglib-3.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ehcache/ehcache/3.8.1/ehcache-3.8.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-compress/1.18/commons-compress-1.18.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-scratchpad/4.0.1/poi-scratchpad-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml/4.0.1/poi-ooxml-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/virtuald/curvesapi/1.05/curvesapi-1.05.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/fr/opensagres/xdocreport/xdocreport/1.0.6/xdocreport-1.0.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml-schemas/4.0.1/poi-ooxml-schemas-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlbeans/xmlbeans/3.0.2/xmlbeans-3.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/ooxml-schemas/1.3/ooxml-schemas-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jsoup/jsoup/1.11.3/jsoup-1.11.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/joda-time/joda-time/2.10.4/joda-time-2.10.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.10/commons-lang3-3.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/velocity/velocity-engine-core/2.1/velocity-engine-core-2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/freemarker/freemarker/2.3.31/freemarker-2.3.31.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-websocket/2.3.11.RELEASE/spring-boot-starter-websocket-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-messaging/5.2.15.RELEASE/spring-messaging-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-websocket/5.2.15.RELEASE/spring-websocket-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-jexl/2.1.1/commons-jexl-2.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/integration/spring-integration-stream/5.3.7.RELEASE/spring-integration-stream-5.3.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/integration/spring-integration-core/5.3.7.RELEASE/spring-integration-core-5.3.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/retry/spring-retry/1.2.5.RELEASE/spring-retry-1.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/projectreactor/reactor-core/3.3.17.RELEASE/reactor-core-3.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/integration/spring-integration-mqtt/5.3.7.RELEASE/spring-integration-mqtt-5.3.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.20/lombok-1.18.20.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring-boot-starter/2.0.7/knife4j-spring-boot-starter-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring-boot-autoconfigure/2.0.7/knife4j-spring-boot-autoconfigure-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring/2.0.7/knife4j-spring-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-annotations/2.0.7/knife4j-annotations-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-core/2.0.7/knife4j-core-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/swagger-models/1.5.22/swagger-models-1.5.22.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-swagger2/2.10.5/springfox-swagger2-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-spi/2.10.5/springfox-spi-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-core/2.10.5/springfox-core-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/bytebuddy/byte-buddy/1.10.22/byte-buddy-1.10.22.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-schema/2.10.5/springfox-schema-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-swagger-common/2.10.5/springfox-swagger-common-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-spring-web/2.10.5/springfox-spring-web-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/classgraph/classgraph/4.1.7/classgraph-4.1.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/plugin/spring-plugin-core/2.0.0.RELEASE/spring-plugin-core-2.0.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/plugin/spring-plugin-metadata/2.0.0.RELEASE/spring-plugin-metadata-2.0.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mapstruct/mapstruct/1.3.1.Final/mapstruct-1.3.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-bean-validators/2.10.5/springfox-bean-validators-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-spring-webmvc/2.10.5/springfox-spring-webmvc-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring-ui/2.0.7/knife4j-spring-ui-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-feign-systemctl/1.7.10-SNAPSHOT/amos-feign-systemctl-1.7.10-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
</factorypath>
<factorypath> <factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-biz/1.0.0/amos-boot-module-common-biz-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-api/1.0.0/amos-boot-module-common-api-1.0.0.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-api/1.0.0/amos-boot-module-common-api-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-elasticsearch/2.3.11.RELEASE/spring-boot-starter-data-elasticsearch-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-elasticsearch/2.3.11.RELEASE/spring-boot-starter-data-elasticsearch-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-elasticsearch/4.0.9.RELEASE/spring-data-elasticsearch-4.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-elasticsearch/4.0.9.RELEASE/spring-data-elasticsearch-4.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/luben/zstd-jni/1.4.4-7/zstd-jni-1.4.4-7.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/github/luben/zstd-jni/1.4.4-7/zstd-jni-1.4.4-7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/lz4/lz4-java/1.7.1/lz4-java-1.7.1.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/lz4/lz4-java/1.7.1/lz4-java-1.7.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/xerial/snappy/snappy-java/1.1.7.3/snappy-java-1.1.7.3.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/xerial/snappy/snappy-java/1.1.7.3/snappy-java-1.1.7.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-biz/1.0.0/amos-boot-module-common-biz-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-api/1.0.0/amos-boot-module-common-api-1.0.0.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/amosframework/boot/amos-boot-module-common-api/1.0.0/amos-boot-module-common-api-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-elasticsearch/2.3.11.RELEASE/spring-boot-starter-data-elasticsearch-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-data-elasticsearch/2.3.11.RELEASE/spring-boot-starter-data-elasticsearch-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-elasticsearch/4.0.9.RELEASE/spring-data-elasticsearch-4.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-elasticsearch/4.0.9.RELEASE/spring-data-elasticsearch-4.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
......
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