Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
60f881c8
Commit
60f881c8
authored
May 28, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
9aacd689
d9661f86
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
1766 additions
and
1115 deletions
+1766
-1115
pom.xml
amos-boot-data/amos-boot-data-housepvapi/pom.xml
+2
-0
HousevPVapiApplication.java
...rc/main/java/com/yeejoin/amos/HousevPVapiApplication.java
+7
-6
GolangRequestUtil.java
...eejoin/amos/api/householdapi/Utils/GolangRequestUtil.java
+1
-1
ImasterUtils.java
...com/yeejoin/amos/api/householdapi/Utils/ImasterUtils.java
+50
-27
KsolarRequestUtil.java
...eejoin/amos/api/householdapi/Utils/KsolarRequestUtil.java
+2
-2
SunlightUtil.java
...com/yeejoin/amos/api/householdapi/Utils/SunlightUtil.java
+8
-1
ImasterInverterListDetails.java
...houseapi/entity/tdeingine/ImasterInverterListDetails.java
+2
-2
GoLangDataAcquisitionServiceImpl.java
...i/face/service/impl/GoLangDataAcquisitionServiceImpl.java
+167
-185
GoodWeDataAcquisitionServiceImpl.java
...i/face/service/impl/GoodWeDataAcquisitionServiceImpl.java
+227
-136
ImasterDataServiceImpl.java
...ouseholdapi/face/service/impl/ImasterDataServiceImpl.java
+24
-2
KsolarDataAcquisitionServiceImpl.java
...i/face/service/impl/KsolarDataAcquisitionServiceImpl.java
+281
-258
SofarDataAcquisitionServiceImpl.java
...pi/face/service/impl/SofarDataAcquisitionServiceImpl.java
+6
-7
SunlightServiceImpl.java
...i/householdapi/face/service/impl/SunlightServiceImpl.java
+401
-363
ListenerAsyncConfiguration.java
...a/com/yeejoin/amos/config/ListenerAsyncConfiguration.java
+76
-0
application-dev.properties
...-housepvapi/src/main/resources/application-dev.properties
+1
-1
TdHYGFInverterDayGenerateMapper.java
...f/api/tdenginemapper/TdHYGFInverterDayGenerateMapper.java
+6
-0
JpStationMapper.xml
...f-api/src/main/resources/mapper/mysql/JpStationMapper.xml
+0
-2
TdHYGFInverterDayGenerateMapper.xml
...urces/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
+56
-0
JpStationController.java
.../boot/module/hygf/biz/controller/JpStationController.java
+22
-5
JpInverterServiceImpl.java
...t/module/hygf/biz/service/impl/JpInverterServiceImpl.java
+47
-15
.factorypath
...tem-jxiop/amos-boot-module-jxiop-analyse-biz/.factorypath
+1
-0
.factorypath
...m-jxiop/amos-boot-module-jxiop-bigscreen-biz/.factorypath
+1
-0
LargeScreenImpl.java
...s/boot/module/jxiop/biz/service/impl/LargeScreenImpl.java
+61
-58
MonitorServiceImpl.java
...oot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
+39
-40
application-dev1.properties
...screen-biz/src/main/resources/application-dev1.properties
+3
-3
application.properties
...p-bigscreen-biz/src/main/resources/application.properties
+1
-1
.factorypath
...boot-system-jxiop/amos-boot-module-jxiop-biz/.factorypath
+1
-0
.factorypath
...boot-system-jxiop/amos-boot-module-jxiop-das/.factorypath
+271
-0
.factorypath
...tem-jxiop/amos-boot-module-jxiop-monitor-biz/.factorypath
+1
-0
.factorypath
...system-jxiop/amos-boot-module-jxiop-warn-biz/.factorypath
+1
-0
No files found.
amos-boot-data/amos-boot-data-housepvapi/pom.xml
View file @
60f881c8
...
...
@@ -58,6 +58,7 @@
<artifactId>
tyboot-component-emq
</artifactId>
<version>
${tyboot-version}
</version>
</dependency>
<!--
<dependency>
<groupId>org.typroject</groupId>
<artifactId>tyboot-component-event</artifactId>
...
...
@@ -69,6 +70,7 @@
</exclusion>
</exclusions>
</dependency>
-->
<dependency>
<groupId>
org.typroject
</groupId>
<artifactId>
tyboot-component-opendata
</artifactId>
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/HousevPVapiApplication.java
View file @
60f881c8
...
...
@@ -5,23 +5,21 @@ import java.net.InetAddress;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
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.annotation.ComponentScan
;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.core.env.Environment
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
/**
*
* <pre>
...
...
@@ -41,10 +39,13 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
@EnableScheduling
@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"
})
@ComponentScan
({
"org.typroject"
,
"com.yeejoin.amos"
})
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
DataSourceTransactionManagerAutoConfiguration
.
class
})
@ComponentScan
(
value
=
{
"org.typroject"
,
"com.yeejoin.amos"
},
excludeFilters
=
@ComponentScan
.
Filter
(
type
=
FilterType
.
REGEX
,
pattern
=
"org.typroject.tyboot.component.event"
))
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
DataSourceTransactionManagerAutoConfiguration
.
class
})
public
class
HousevPVapiApplication
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
HousevPVapiApplication
.
class
);
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// 服务启动
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
HousevPVapiApplication
.
class
,
args
);
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/Utils/GolangRequestUtil.java
View file @
60f881c8
...
...
@@ -126,7 +126,7 @@ public class GolangRequestUtil {
}
housepvapiRecords
.
setResponse
(
respone
);
// housepvapiRecordsMapper.insert(housepvapiRecords);
log
.
info
(
"锦浪云数据请求详情:"
+
JSONObject
.
toJSONString
(
housepvapiRecords
));
//
log.info("锦浪云数据请求详情:"+JSONObject.toJSONString(housepvapiRecords));
return
respone
;
}
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/Utils/ImasterUtils.java
View file @
60f881c8
...
...
@@ -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.mapper.houseapi.HousepvapiRecordsMapper
;
import
com.yeejoin.amos.api.householdapi.face.service.impl.GoodWeDataAcquisitionServiceImpl
;
import
com.yeejoin.amos.openapi.enums.PVProducerInfoEnum
;
import
lombok.extern.slf4j.Slf4j
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
java.util.*
;
@Component
...
...
@@ -30,16 +33,20 @@ public class ImasterUtils {
HousepvapiRecordsMapper
housepvapiRecordsMapper
;
@Autowired
RedisUtils
redisUtils
;
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ImasterUtils
.
class
);
/**
* @return HashMap<String, Object> 发送请求前的准备 准备header信息
* @deprecated 根据厂商编码获取厂商的hearer
*/
public
static
HashMap
<
String
,
String
>
getHeader
()
{
HashMap
<
String
,
String
>
hashMap
=
new
HashMap
<>();
String
requestParam
=
""
;
String
requestParam
=
""
;
HashMap
<
String
,
String
>
hashMaphead
=
new
HashMap
<>();
try
{
requestParam
=
"{ \"userName\": \""
+
ImasterConstant
.
account
+
"\", \"systemCode\": \""
+
ImasterConstant
.
password
+
"\"}"
;
requestParam
=
"{ \"userName\": \""
+
ImasterConstant
.
account
+
"\", \"systemCode\": \""
+
ImasterConstant
.
password
+
"\"}"
;
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
...
...
@@ -61,26 +68,27 @@ public class ImasterUtils {
* @return List<T> list<Result>
* @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
params
=
""
;
JSONArray
jsonArray
=
null
;
List
<
T
>
result
=
new
ArrayList
<>();
try
{
Object
o
=
redisUtils
.
get
(
redisKey
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
HashMap
<
String
,
String
>
headMap
=
new
HashMap
<>();
headMap
.
put
(
"XSRF-TOKEN"
,
o
.
toString
());
String
url
=
ImasterConstant
.
baseurl
+
apiurl
;
respone
=
sendRequest
(
requestMethod
,
url
,
requestParmInfo
,
headMap
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
respone
);
if
(
jsonObject
.
get
(
"failCode"
).
toString
().
equals
(
"305"
))
{
if
(
jsonObject
.
get
(
"failCode"
).
toString
().
equals
(
"305"
))
{
headMap
=
getHeader
();
respone
=
sendRequest
(
requestMethod
,
url
,
requestParmInfo
,
headMap
);
jsonArray
=
handlerResponseByResultResolverule
(
ResultResolveRule
,
respone
);
if
(!
ObjectUtils
.
isEmpty
(
jsonArray
))
{
result
=
JSONArray
.
parseArray
(
jsonArray
.
toJSONString
(),
tClass
);
redisUtils
.
set
(
redisKey
,
headMap
.
get
(
"XSRF-TOKEN"
));
redisUtils
.
set
(
redisKey
,
headMap
.
get
(
"XSRF-TOKEN"
));
}
}
else
{
jsonArray
=
handlerResponseByResultResolverule
(
ResultResolveRule
,
respone
);
...
...
@@ -95,7 +103,7 @@ public class ImasterUtils {
jsonArray
=
handlerResponseByResultResolverule
(
ResultResolveRule
,
respone
);
if
(!
ObjectUtils
.
isEmpty
(
jsonArray
))
{
result
=
JSONArray
.
parseArray
(
jsonArray
.
toJSONString
(),
tClass
);
redisUtils
.
set
(
redisKey
,
headMap
.
get
(
"XSRF-TOKEN"
));
redisUtils
.
set
(
redisKey
,
headMap
.
get
(
"XSRF-TOKEN"
));
}
}
}
catch
(
Exception
exception
)
{
...
...
@@ -114,31 +122,37 @@ public class ImasterUtils {
* @return List<T> list<Result>
* @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
params
=
""
;
JSONArray
jsonArray
=
null
;
List
<
T
>
result
=
new
ArrayList
<>();
try
{
Object
o
=
redisUtils
.
get
(
redisKey
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
HashMap
<
String
,
String
>
headMap
=
new
HashMap
<>();
headMap
.
put
(
"XSRF-TOKEN"
,
o
.
toString
());
String
url
=
ImasterConstant
.
baseurl
+
apiurl
;
respone
=
sendRequest
(
requestMethod
,
url
,
requestParmInfo
,
headMap
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
respone
);
if
(
jsonObject
.
get
(
"failCode"
).
toString
().
equals
(
"305"
))
{
if
(
jsonObject
.
get
(
"failCode"
).
toString
().
equals
(
"305"
))
{
headMap
=
getHeader
();
respone
=
sendRequest
(
requestMethod
,
url
,
requestParmInfo
,
headMap
);
jsonArray
=
handlerResponseByResultResolveruleOther
(
ResultResolveRule
,
respone
);
if
(!
ObjectUtils
.
isEmpty
(
jsonArray
))
{
result
=
JSONArray
.
parseArray
(
jsonArray
.
toJSONString
(),
tClass
);
redisUtils
.
set
(
redisKey
,
headMap
.
get
(
"XSRF-TOKEN"
));
redisUtils
.
set
(
redisKey
,
headMap
.
get
(
"XSRF-TOKEN"
));
}
}
else
{
jsonArray
=
handlerResponseByResultResolveruleOther
(
ResultResolveRule
,
respone
);
if
(!
ObjectUtils
.
isEmpty
(
jsonArray
))
{
try
{
result
=
JSONArray
.
parseArray
(
jsonArray
.
toJSONString
(),
tClass
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"华为数据解析错误(getResPonseOther):"
+
jsonArray
.
toJSONString
());
}
}
}
}
else
{
...
...
@@ -148,7 +162,7 @@ public class ImasterUtils {
jsonArray
=
handlerResponseByResultResolveruleOther
(
ResultResolveRule
,
respone
);
if
(!
ObjectUtils
.
isEmpty
(
jsonArray
))
{
result
=
JSONArray
.
parseArray
(
jsonArray
.
toJSONString
(),
tClass
);
redisUtils
.
set
(
redisKey
,
headMap
.
get
(
"XSRF-TOKEN"
));
redisUtils
.
set
(
redisKey
,
headMap
.
get
(
"XSRF-TOKEN"
));
}
}
}
catch
(
Exception
exception
)
{
...
...
@@ -182,7 +196,7 @@ public class ImasterUtils {
}
}
if
(
jsonArray
.
size
()
==
0
)
{
jsonArray
.
addAll
((
JSONArray
)
jsonObject
.
get
(
"list"
));
jsonArray
.
addAll
((
JSONArray
)
jsonObject
.
get
(
"list"
));
}
}
return
jsonArray
;
...
...
@@ -202,28 +216,37 @@ public class ImasterUtils {
String
[]
rules
=
resultResovle
.
split
(
","
);
if
(
rules
.
length
>
0
)
{
for
(
int
i
=
0
;
i
<
rules
.
length
;
i
++)
{
if
(
"ACCESS_FREQUENCY_IS_TOO_HIGH"
.
equals
(
jsonObject
.
get
(
rules
[
i
])))
{
logger
.
error
(
"华为数据解析错误(handlerResponseByResultResolveruleOther):请求系统次数太频繁,无法获取接口数据"
);
continue
;
}
try
{
jsonObject
=
(
JSONObject
)
jsonObject
.
get
(
rules
[
i
]);
if
(
jsonObject
==
null
)
{
jsonArray
=
(
JSONArray
)
jsonObject
.
get
(
rules
[
i
]);
}
}
catch
(
Exception
exception
)
{
try
{
jsonArray
=
(
JSONArray
)
jsonObject
.
get
(
rules
[
i
]);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"华为数据解析错误:"
+
jsonObject
.
get
(
rules
[
i
]));
}
}
}
}
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
);
if
(
jsonObject1
.
get
(
"dataItemMap"
)
!=
null
)
{
JSONObject
jsonObject2
=
(
JSONObject
)
jsonObject1
.
get
(
"dataItemMap"
);
if
(
jsonObject1
.
get
(
"sn"
)
!=
null
)
{
if
(
jsonObject1
.
get
(
"dataItemMap"
)
!=
null
)
{
JSONObject
jsonObject2
=
(
JSONObject
)
jsonObject1
.
get
(
"dataItemMap"
);
if
(
jsonObject1
.
get
(
"sn"
)
!=
null
)
{
jsonObject2
.
put
(
"inverterId"
,
jsonObject1
.
get
(
"sn"
).
toString
());
}
if
(
jsonObject1
.
get
(
"stationCode"
)
!=
null
)
{
if
(
jsonObject1
.
get
(
"stationCode"
)
!=
null
)
{
jsonObject2
.
put
(
"stationCode"
,
jsonObject1
.
get
(
"stationCode"
).
toString
());
}
if
(
jsonObject1
.
get
(
"collectTime"
)
!=
null
)
{
if
(
jsonObject1
.
get
(
"collectTime"
)
!=
null
)
{
jsonObject2
.
put
(
"collectTime"
,
jsonObject1
.
get
(
"collectTime"
).
toString
());
}
...
...
@@ -245,16 +268,14 @@ public class ImasterUtils {
housepvapiRecords
.
setThridCode
(
PVProducerInfoEnum
.
HUAWEI
.
getCode
());
String
respone
=
""
;
if
(
requestMethod
.
equals
(
"POST"
))
{
respone
=
HttpUtil
.
createPost
(
url
).
headerMap
(
headMap
,
false
).
body
(
params
).
execute
().
body
();
respone
=
HttpUtil
.
createPost
(
url
).
headerMap
(
headMap
,
false
).
body
(
params
).
execute
().
body
();
}
if
(
requestMethod
.
equals
(
"GET"
))
{
respone
=
HttpUtil
.
createGet
(
url
).
headerMap
(
headMap
,
true
).
body
(
params
).
execute
().
body
();
respone
=
HttpUtil
.
createGet
(
url
).
headerMap
(
headMap
,
true
).
body
(
params
).
execute
().
body
();
}
housepvapiRecords
.
setResponse
(
respone
);
// housepvapiRecordsMapper.insert(housepvapiRecords);
log
.
info
(
"华为数据请求详情:"
+
JSONObject
.
toJSONString
(
housepvapiRecords
));
//
log.info("华为数据请求详情:"+JSONObject.toJSONString(housepvapiRecords));
return
respone
;
}
...
...
@@ -266,10 +287,12 @@ public class ImasterUtils {
* @param appsecret appsecret
* @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
);
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
=
""
;
try
{
sign
=
GoLangHeaderUtils
.
HmacSHA1Encrypt
(
param
,
appsecret
);
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/Utils/KsolarRequestUtil.java
View file @
60f881c8
...
...
@@ -70,7 +70,7 @@ public class KsolarRequestUtil {
String
url
=
KSolarConstant
.
baseurl
+
apiurl
;
respone
=
sendRequest
(
requestMethod
,
url
,
requestParmInfo
,
headMap
);
jsonArray
=
handlerResponseByResultResolverule
(
ResultResolveRule
,
respone
);
log
.
info
(
"原始数据:{}"
,
jsonArray
);
//
log.info("原始数据:{}", jsonArray);
if
(!
ObjectUtils
.
isEmpty
(
jsonArray
))
{
result
=
JSONArray
.
parseArray
(
jsonArray
.
toJSONString
(),
tClass
);
}
...
...
@@ -134,7 +134,7 @@ public class KsolarRequestUtil {
}
housepvapiRecords
.
setResponse
(
respone
);
// housepvapiRecordsMapper.insert(housepvapiRecords);
log
.
info
(
"科士达数据请求详情:"
+
JSONObject
.
toJSONString
(
housepvapiRecords
));
//
log.info("科士达数据请求详情:"+JSONObject.toJSONString(housepvapiRecords));
return
respone
;
}
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/Utils/SunlightUtil.java
View file @
60f881c8
...
...
@@ -116,7 +116,14 @@ public class SunlightUtil {
{
put
(
"1"
,
"在线"
);
put
(
"0"
,
"离线"
);
put
(
"2"
,
"报警"
);
}
};
public
static
final
HashMap
<
String
,
String
>
gzzt
=
new
HashMap
<
String
,
String
>()
{
{
put
(
"1"
,
"故障"
);
put
(
"2"
,
"报警"
);
put
(
"4"
,
"正常"
);
}
};
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/houseapi/entity/tdeingine/ImasterInverterListDetails.java
View file @
60f881c8
...
...
@@ -19,7 +19,7 @@ public class ImasterInverterListDetails {
Double
mppt_total_cap
;
Double
pv24_i
;
Double
pv8_u
;
Double
open_time
;
String
open_time
;
Double
pv22_u
;
Double
a_i
;
Double
pv24_u
;
...
...
@@ -43,7 +43,7 @@ public class ImasterInverterListDetails {
Double
mppt_power
;
Double
pv13_u
;
int
run_state
;
Double
close_time
;
String
close_time
;
Double
pv19_i
;
Double
mppt_7_cap
;
Double
mppt_5_cap
;
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/GoLangDataAcquisitionServiceImpl.java
View file @
60f881c8
...
...
@@ -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.openapi.enums.PVProducerInfoEnum
;
import
fastjson.JSON
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
...
...
@@ -31,58 +34,58 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.ObjectUtils
;
import
java.lang.reflect.Array
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
@Async
@Service
public
class
GoLangDataAcquisitionServiceImpl
implements
GoLangDataAcquisitionService
{
//定时任务执行频率 当前为10分钟一次
// 定时任务执行频率 当前为10分钟一次
//
锦浪云请求工具封装
//
锦浪云请求工具封装
@Autowired
private
GolangRequestUtil
golangRequestUtil
;
//
锦浪云场站mapper
//
锦浪云场站mapper
@Autowired
private
GolangStationMapper
golangStationMapper
;
//
监盘场站mapper
//
监盘场站mapper
@Autowired
private
JpStationMapper
jpStationMapper
;
//
监盘采集器mapper
//
监盘采集器mapper
@Autowired
private
JpCollectorMapper
jpCollectorMapper
;
//
监盘逆变器mapper
//
监盘逆变器mapper
@Autowired
private
JpInverterMapper
jpInverterMapper
;
//
监盘逆变器电量mapper
//
监盘逆变器电量mapper
@Autowired
private
JpInverterElectricityMapper
jpInverterElectricityMapper
;
//
锦浪云场站详情mapper
//
锦浪云场站详情mapper
@Autowired
private
GolangStationDetailMapper
golangStationDetailMapper
;
//
锦浪云采集器列表mapper
//
锦浪云采集器列表mapper
@Autowired
private
GolangCollectorListMapper
golangCollectorListMapper
;
//
锦浪云逆变器列表
//
锦浪云逆变器列表
@Autowired
private
GolangInverterListMapper
golangInverterListMapper
;
//
户用光伏场站历史mapper
//
户用光伏场站历史mapper
@Autowired
private
HYGFJPStationPowerHistoryMapper
hygfjpStationPowerHistoryMapper
;
//
户用光伏逆变器历史mapper
//
户用光伏逆变器历史mapper
@Autowired
private
HYGFJPInverterHistoryMapper
hygfjpInverterHistoryMapper
;
//
户用光伏采集器历史mapper
//
户用光伏采集器历史mapper
@Autowired
private
HYGFJPCollectorHistoryMapper
hygfjpCollectorHistoryMapper
;
//
户用光伏逆变器告警
//
户用光伏逆变器告警
@Autowired
private
HYGFJPInverterWarnMapper
hygfjpInverterWarnMapper
;
//
户用光伏逆变器历史mapper
//
户用光伏逆变器历史mapper
@Autowired
private
HYGFJPInverterElecHistoryMapper
hygfjpInverterElecHistoryMapper
;
//
户用光伏日发电量
//
户用光伏日发电量
@Autowired
private
HYGFJPDayPowerMapper
hygfjpDayPowerMapper
;
...
...
@@ -104,34 +107,37 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
@Autowired
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}"
)
@Async
@Override
public
void
stationList
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------锦浪同步电站开始+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"pageNo"
,
1
);
requestInfo
.
put
(
"pageSize"
,
100
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GolangStationList
>
result
=
golangRequestUtil
.
getResPonse
(
GoLangConstant
.
stationListUrl
,
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data_page_records
,
GolangStationList
.
class
);
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data_page_records
,
GolangStationList
.
class
);
for
(
int
i
=
0
;
i
<
result
.
size
();
i
++)
{
GolangStationList
golangStationList
=
result
.
get
(
i
);
golangStationList
.
setCreatedTime
(
System
.
currentTimeMillis
());
golangStationMapper
.
insert
(
golangStationList
);
}
logger
.
info
(
"-------锦浪同步电站结束+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Async
@Override
public
void
stationDetail
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------锦浪同步电站详情开始+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
stationIds
=
golangStationMapper
.
getStationIds
();
String
today
=
DateUtil
.
today
();
String
hour
=
new
Date
().
getHours
()
+
":00"
;
...
...
@@ -140,21 +146,13 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
TimeUnit
.
SECONDS
.
sleep
(
1
);
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
}
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"id"
,
Long
.
valueOf
(
stationIds
.
get
(
i
)));
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GolangStationDetail
>
result
=
golangRequestUtil
.
getResPonse
(
GoLangConstant
.
stationDetailUrl
,
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data
,
GolangStationDetail
.
class
);
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data
,
GolangStationDetail
.
class
);
if
(
result
.
size
()
>
0
)
{
}
else
{
...
...
@@ -163,10 +161,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
for
(
int
j
=
0
;
j
<
result
.
size
();
j
++)
{
GolangStationDetail
golangStationDetail
=
result
.
get
(
j
);
golangStationDetail
.
setCreatedTime
(
System
.
currentTimeMillis
());
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
JLY
.
getCode
()).
eq
(
"third_station_id"
,
stationIds
.
get
(
i
)));
//给户用光伏存储的数据赋值
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>()
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
JLY
.
getCode
()).
eq
(
"third_station_id"
,
stationIds
.
get
(
i
)));
// 给户用光伏存储的数据赋值
if
(
ObjectUtils
.
isEmpty
(
jpStation
))
{
jpStation
=
new
JpStation
();
}
...
...
@@ -179,15 +176,18 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
jpStation
.
setLatitude
(
golangStationDetail
.
getLatitude
());
jpStation
.
setUserName
(
golangStationDetail
.
getUsername
());
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
()))
{
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
.
setThirdStationId
(
String
.
valueOf
(
golangStationDetail
.
getId
()));
jpStation
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
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
());
if
(!
golangStationDetail
.
getMonthenergystr
().
toLowerCase
().
equals
(
"kwh"
))
{
jpStation
.
setMonthGenerate
(
golangStationDetail
.
getMonthenergy
()
*
GoLangConstant
.
mwhTokwh
);
...
...
@@ -202,10 +202,18 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
jpStation
.
setCumulativeIncome
(
golangStationDetail
.
getAllincome
());
jpStation
.
setArea
(
golangStationDetail
.
getRegionstr
());
jpStation
.
setEmail
(
golangStationDetail
.
getUseremail
());
jpStation
.
setOnGridTime
(
golangStationDetail
.
getFispowertime
()!=
null
?
new
Date
(
golangStationDetail
.
getFispowertime
()):
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
.
setOnGridTime
(
golangStationDetail
.
getFispowertime
()
!=
null
?
new
Date
(
golangStationDetail
.
getFispowertime
())
:
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
.
setRecDate
(
new
Date
());
if
(!
ObjectUtils
.
isEmpty
(
jpStation
.
getSequenceNbr
()))
{
...
...
@@ -235,7 +243,6 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
// tdJpStationMapper.insert(tdJpStation);
// }
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
...
...
@@ -243,26 +250,16 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpStationPowerHistory
.
setThirdCode
(
jpStation
.
getThirdCode
());
hygfjpStationPowerHistory
.
setTime
(
System
.
currentTimeMillis
());
//新加
// 新加
hygfjpStationPowerHistory
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpStationPowerHistory
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpStationPowerHistory
.
setStationName
(
jpStation
.
getName
());
hygfjpStationPowerHistory
.
setStationState
(
jpStation
.
getState
());
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
))
{
hygfjpDayPower
=
new
HYGFJPDayPower
();
}
...
...
@@ -271,7 +268,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpDayPower
.
setYearMonthDay
(
today
);
hygfjpDayPower
.
setPower
(
golangStationDetail
.
getPower
());
//
新加
//
新加
hygfjpDayPower
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpDayPower
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpDayPower
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -284,9 +281,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpDayPowerMapper
.
insert
(
hygfjpDayPower
);
}
Date
today1
=
new
Date
();
//
户用场站日发电量
TdHYGFStationDayGenerate
tdHYGFStationDayGenerate
=
tdHYGFStationDayGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationDayGenerate
>()
.
eq
(
"third_station_id"
,
stationIds
.
get
(
i
))
//
户用场站日发电量
TdHYGFStationDayGenerate
tdHYGFStationDayGenerate
=
tdHYGFStationDayGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationDayGenerate
>()
.
eq
(
"third_station_id"
,
stationIds
.
get
(
i
))
.
eq
(
"day_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM-dd"
))
.
eq
(
"year_month"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
)));
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationDayGenerate
))
{
...
...
@@ -299,23 +296,21 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationDayGenerate
.
setFullhour
(
jpStation
.
getDayGenerate
()
/
jpStation
.
getCapacity
());
tdHYGFStationDayGenerate
.
setIncome
(
jpStation
.
getDayIncome
());
//新加
// 新加
tdHYGFStationDayGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationDayGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationDayGenerate
.
setStationName
(
jpStation
.
getName
());
tdHYGFStationDayGenerate
.
setStationState
(
jpStation
.
getState
());
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationDayGenerate
.
getCreatedTime
()))
{
tdHYGFStationDayGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFStationDayGenerateMapper
.
insert
(
tdHYGFStationDayGenerate
);
}
else
{
tdHYGFStationDayGenerateMapper
.
insert
(
tdHYGFStationDayGenerate
);
}
//
户用场站月发电量
TdHYGFStationMonthGenerate
tdHYGFStationMonthGenerate
=
tdHYGFStationMonthGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationMonthGenerate
>()
.
eq
(
"third_station_id"
,
stationIds
.
get
(
i
))
//
户用场站月发电量
TdHYGFStationMonthGenerate
tdHYGFStationMonthGenerate
=
tdHYGFStationMonthGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationMonthGenerate
>()
.
eq
(
"third_station_id"
,
stationIds
.
get
(
i
))
.
eq
(
"month_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
))
.
eq
(
"year"
,
DateUtil
.
format
(
today1
,
"yyyy"
)));
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationMonthGenerate
))
{
...
...
@@ -327,7 +322,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationMonthGenerate
.
setGenerate
(
jpStation
.
getMonthGenerate
());
tdHYGFStationMonthGenerate
.
setFullhour
(
jpStation
.
getMonthGenerate
()
/
jpStation
.
getCapacity
());
tdHYGFStationMonthGenerate
.
setIncome
(
jpStation
.
getMonthIncome
());
//
新加
//
新加
tdHYGFStationMonthGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationMonthGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationMonthGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -339,9 +334,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
else
{
tdHYGFStationMonthGenerateMapper
.
insert
(
tdHYGFStationMonthGenerate
);
}
//
户用场站年发电量
TdHYGFStationYearGenerate
tdHYGFStationYearGenerate
=
tdHYGFStationYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationYearGenerate
>()
.
eq
(
"third_station_id"
,
stationIds
.
get
(
i
))
//
户用场站年发电量
TdHYGFStationYearGenerate
tdHYGFStationYearGenerate
=
tdHYGFStationYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationYearGenerate
>()
.
eq
(
"third_station_id"
,
stationIds
.
get
(
i
))
.
eq
(
"year_time"
,
DateUtil
.
format
(
today1
,
"yyyy"
))
.
eq
(
"year"
,
DateUtil
.
format
(
today1
,
"yyyy"
)));
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationYearGenerate
))
{
...
...
@@ -354,7 +349,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFStationYearGenerate
.
setFullhour
(
jpStation
.
getYearGenerate
()
/
jpStation
.
getCapacity
());
tdHYGFStationYearGenerate
.
setIncome
(
jpStation
.
getYearIncome
());
//
新加
//
新加
tdHYGFStationYearGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationYearGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationYearGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -368,13 +363,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
}
logger
.
info
(
"-------锦浪同步电站详情结束+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Async
@Override
public
void
collectorList
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------锦浪同步采集器开始+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
// List<String> stationIds = golangStationMapper.getStationIds();
// for (int i = 0; i < stationIds.size(); i++) {
try
{
...
...
@@ -388,23 +385,23 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
requestInfo
.
put
(
"pageSize"
,
100
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GolangCollectorList
>
result
=
golangRequestUtil
.
getResPonse
(
GoLangConstant
.
collectorListUrl
,
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data_page_records
,
GolangCollectorList
.
class
);
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data_page_records
,
GolangCollectorList
.
class
);
for
(
int
j
=
0
;
j
<
result
.
size
();
j
++)
{
GolangCollectorList
golangCollectorList
=
result
.
get
(
j
);
golangCollectorList
.
setCreatedTime
(
System
.
currentTimeMillis
());
golangCollectorListMapper
.
insert
(
golangCollectorList
);
}
// }
logger
.
info
(
"-------锦浪同步采集器结束+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Async
@Override
public
void
collectorDetail
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------锦浪同步采集器详情开始+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
Long
>
collectorIds
=
golangCollectorListMapper
.
getCollectIds
();
for
(
int
i
=
0
;
i
<
collectorIds
.
size
();
i
++)
{
try
{
...
...
@@ -416,47 +413,43 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
requestInfo
.
put
(
"id"
,
Long
.
valueOf
(
collectorIds
.
get
(
i
)));
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
List
<
CollectorDetailDto
>
result
=
golangRequestUtil
.
getResPonse
(
GoLangConstant
.
collectorDetailUrl
,
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data
,
CollectorDetailDto
.
class
);
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data
,
CollectorDetailDto
.
class
);
for
(
int
j
=
0
;
j
<
result
.
size
();
j
++)
{
CollectorDetailDto
collectorDetailDto
=
result
.
get
(
j
);
JpCollector
jpCollector
=
jpCollectorMapper
.
selectOne
(
new
QueryWrapper
<
JpCollector
>().
eq
(
"third_station_id"
,
collectorDetailDto
.
getStationId
()).
eq
(
"third_code"
,
PVProducerInfoEnum
.
JLY
.
getCode
()).
eq
(
"sn_code"
,
collectorDetailDto
.
getSn
()));
JpCollector
jpCollector
=
jpCollectorMapper
.
selectOne
(
new
QueryWrapper
<
JpCollector
>()
.
eq
(
"third_station_id"
,
collectorDetailDto
.
getStationId
())
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
JLY
.
getCode
()).
eq
(
"sn_code"
,
collectorDetailDto
.
getSn
()));
if
(
ObjectUtils
.
isEmpty
(
jpCollector
))
{
jpCollector
=
new
JpCollector
();
}
//
sn编码
//
sn编码
jpCollector
.
setSnCode
(
collectorDetailDto
.
getSn
());
//
类型
//
类型
jpCollector
.
setType
(
collectorDetailDto
.
getModel
());
//
更新时间
//
更新时间
jpCollector
.
setUpdateTime
(
new
Date
());
//
出场日期
//
出场日期
jpCollector
.
setDischargeDate
(
new
Date
(
collectorDetailDto
.
getFactoryTime
()));
//
生产日期
//
生产日期
jpCollector
.
setProductDate
(
new
Date
(
collectorDetailDto
.
getFactoryTime
()));
//
数据上传间隔
//
数据上传间隔
jpCollector
.
setDataPeriod
(
collectorDetailDto
.
getDataUploadCycle
());
//
本次上电时间
//
本次上电时间
jpCollector
.
setThisWorkTime
(
new
DateTime
(
collectorDetailDto
.
getCurrentWorkingTime
()));
//
累计工作时间
//
累计工作时间
jpCollector
.
setTotalWorkTime
(
new
DateTime
(
collectorDetailDto
.
getTotalWorkingTime
()));
//
第三方电站id
//
第三方电站id
jpCollector
.
setThirdStationId
(
collectorDetailDto
.
getStationId
());
//
第三方厂商标识
//
第三方厂商标识
jpCollector
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
//
第三方厂商标识
//
第三方厂商标识
jpCollector
.
setState
(
GoLangConstant
.
stationStaus
.
get
(
collectorDetailDto
.
getState
()));
jpCollector
.
setStationName
(
collectorDetailDto
.
getStationName
());
jpCollector
.
setAddr
(
collectorDetailDto
.
getAddr
());
jpCollector
.
setName
(
collectorDetailDto
.
getName
());
//
信号强度
//
信号强度
jpCollector
.
setSignalStrength
(
collectorDetailDto
.
getRssiLevel
());
jpCollector
.
setRecDate
(
new
Date
());
if
(
ObjectUtils
.
isEmpty
(
jpCollector
.
getSequenceNbr
()))
{
...
...
@@ -475,12 +468,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpCollectorHistoryMapper
.
insert
(
hygfjpCollectorHistory
);
}
}
logger
.
info
(
"-------锦浪同步采集器详情结束+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Async
@Override
public
void
inverterList
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------锦浪同步逆变器开始+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
// List<String> stationIds = golangStationMapper.getStationIds();
// for (int i = 0; i < stationIds.size(); i++) {
try
{
...
...
@@ -494,23 +490,23 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
requestInfo
.
put
(
"pageSize"
,
100
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GolangInverterList
>
result
=
golangRequestUtil
.
getResPonse
(
GoLangConstant
.
inverterListUrl
,
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data_page_records
,
GolangInverterList
.
class
);
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data_page_records
,
GolangInverterList
.
class
);
for
(
int
j
=
0
;
j
<
result
.
size
();
j
++)
{
GolangInverterList
golangInverterList
=
result
.
get
(
j
);
golangInverterList
.
setCreatedTime
(
System
.
currentTimeMillis
());
golangInverterListMapper
.
insert
(
golangInverterList
);
}
// }
logger
.
info
(
"-------锦浪同步逆变器结束+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Async
@Override
public
void
inverterDetail
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------锦浪同步逆变器详情开始+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
inverterSns
=
golangInverterListMapper
.
getInverterSns
();
for
(
int
i
=
0
;
i
<
inverterSns
.
size
();
i
++)
{
try
{
...
...
@@ -522,23 +518,21 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
requestInfo
.
put
(
"sn"
,
inverterSns
.
get
(
i
));
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
List
<
InverterDetailDto
>
result
=
golangRequestUtil
.
getResPonse
(
GoLangConstant
.
inverterDetailUrl
,
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data
,
InverterDetailDto
.
class
);
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data
,
InverterDetailDto
.
class
);
for
(
int
j
=
0
;
j
<
result
.
size
();
j
++)
{
InverterDetailDto
inverterDetailDto
=
result
.
get
(
j
);
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_station_id"
,
inverterDetailDto
.
getStationId
()).
eq
(
"third_code"
,
PVProducerInfoEnum
.
JLY
.
getCode
()).
eq
(
"sn_code"
,
inverterDetailDto
.
getSn
()));
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>()
.
eq
(
"third_station_id"
,
inverterDetailDto
.
getStationId
())
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
JLY
.
getCode
()).
eq
(
"sn_code"
,
inverterDetailDto
.
getSn
()));
if
(
ObjectUtils
.
isEmpty
(
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
.
setState
(
golangRequestUtil
.
getInverterState
(
inverterDetailDto
.
getCurrentState
(),
inverterDetailDto
.
getDataTimestamp
()));
jpInverter
.
setState
(
golangRequestUtil
.
getInverterState
(
inverterDetailDto
.
getCurrentState
(),
inverterDetailDto
.
getDataTimestamp
()));
jpInverter
.
setCollectorId
(
String
.
valueOf
(
inverterDetailDto
.
getCollectorId
()));
jpInverter
.
setCollectorSnCode
(
inverterDetailDto
.
getCollectorsn
());
jpInverter
.
setUpdateTime
(
new
Date
());
...
...
@@ -575,11 +569,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
String
jsonString
=
JSON
.
toJSONString
(
inverterDetailDto
);
Map
<
String
,
Object
>
hanlderResult
=
JSON
.
parseObject
(
jsonString
,
Map
.
class
);
for
(
int
k
=
1
;
k
<
4
;
k
++)
{
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
inverterDetailDto
.
getSn
()).
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"AC"
+
k
)
);
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
inverterDetailDto
.
getSn
()).
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"AC"
+
k
));
if
(
ObjectUtils
.
isEmpty
(
jpInverterElectricity
))
{
jpInverterElectricity
=
new
JpInverterElectricity
();
}
...
...
@@ -598,11 +590,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
for
(
int
k1
=
1
;
k1
<
33
;
k1
++)
{
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
inverterDetailDto
.
getSn
()).
eq
(
"type"
,
"直流"
).
eq
(
"name"
,
"PV"
+
k1
)
);
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
inverterDetailDto
.
getSn
()).
eq
(
"type"
,
"直流"
).
eq
(
"name"
,
"PV"
+
k1
));
if
(
ObjectUtils
.
isEmpty
(
jpInverterElectricity
))
{
jpInverterElectricity
=
new
JpInverterElectricity
();
}
...
...
@@ -636,8 +626,8 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpInverterElecHistoryMapper
.
insert
(
hygfjpInverterElecHistory
);
// 逆变器历史
String
today
=
DateUtil
.
today
();
HYGFJPInverterHistory
hygfjpInverterHistory
=
hygfjpInverterHistoryMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterHistory
>()
.
eq
(
"sn_code"
,
inverterDetailDto
.
getSn
())
HYGFJPInverterHistory
hygfjpInverterHistory
=
hygfjpInverterHistoryMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterHistory
>()
.
eq
(
"sn_code"
,
inverterDetailDto
.
getSn
())
.
eq
(
"date"
,
today
));
if
(
ObjectUtils
.
isEmpty
(
hygfjpInverterHistory
))
{
hygfjpInverterHistory
=
new
HYGFJPInverterHistory
();
...
...
@@ -655,34 +645,34 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
else
{
hygfjpInverterHistoryMapper
.
insert
(
hygfjpInverterHistory
);
}
//
-----------------------户用光伏日报表----------------------
//
-----------------------户用光伏日报表----------------------
TdHYGFInverterDayGenerate
tdHYGFInverterDayGenerate
=
new
TdHYGFInverterDayGenerate
();
tdHYGFInverterDayGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFInverterDayGenerate
.
setName
(
jpInverter
.
getName
());
tdHYGFInverterDayGenerate
.
setThirdStationId
(
String
.
valueOf
(
jpInverter
.
getThirdStationId
()));
tdHYGFInverterDayGenerate
.
setSnCode
(
jpInverter
.
getSnCode
().
trim
());
tdHYGFInverterDayGenerate
.
setWorkStatus
(
jpInverter
.
getState
());
//
交流电压
//
交流电压
tdHYGFInverterDayGenerate
.
setDcv1
(
inverterDetailDto
.
getUAc1
());
tdHYGFInverterDayGenerate
.
setDcv2
(
inverterDetailDto
.
getUAc2
());
tdHYGFInverterDayGenerate
.
setDcv3
(
inverterDetailDto
.
getUAc3
());
//
交流电流
//
交流电流
// tdHYGFInverterDayGenerate.setDcv4(inverterDetailDto.getUAc4());
tdHYGFInverterDayGenerate
.
setDcc1
(
inverterDetailDto
.
getIAc1
());
tdHYGFInverterDayGenerate
.
setDcc2
(
inverterDetailDto
.
getIAc2
());
tdHYGFInverterDayGenerate
.
setDcc3
(
inverterDetailDto
.
getIAc3
());
// tdHYGFInverterDayGenerate.setDcc4(inverterDetailDto.getIAc4());
//
直流电压
//
直流电压
tdHYGFInverterDayGenerate
.
setAcv1
(
inverterDetailDto
.
getUPv1
());
tdHYGFInverterDayGenerate
.
setAcv2
(
inverterDetailDto
.
getUPv2
());
tdHYGFInverterDayGenerate
.
setAcv3
(
inverterDetailDto
.
getUPv3
());
tdHYGFInverterDayGenerate
.
setAcv4
(
inverterDetailDto
.
getUPv4
());
//
直流电流
//
直流电流
tdHYGFInverterDayGenerate
.
setAcc1
(
inverterDetailDto
.
getIPv1
());
tdHYGFInverterDayGenerate
.
setAcc2
(
inverterDetailDto
.
getIPv2
());
tdHYGFInverterDayGenerate
.
setAcc3
(
inverterDetailDto
.
getIPv3
());
tdHYGFInverterDayGenerate
.
setAcc4
(
inverterDetailDto
.
getIPv4
());
//
功率
//
功率
tdHYGFInverterDayGenerate
.
setPv1
(
inverterDetailDto
.
getPow1
());
tdHYGFInverterDayGenerate
.
setPv2
(
inverterDetailDto
.
getPow2
());
tdHYGFInverterDayGenerate
.
setPv3
(
inverterDetailDto
.
getPow3
());
...
...
@@ -700,14 +690,12 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFInverterDayGenerate
.
setIncome
(
null
);
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
())));
//电站区域经销商,
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
JLY
.
getCode
()).
eq
(
"third_station_id"
,
String
.
valueOf
(
inverterDetailDto
.
getStationId
())));
if
(
jpStation
!=
null
){
if
(
jpStation
!=
null
)
{
tdHYGFInverterDayGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterDayGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterDayGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -715,13 +703,11 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
tdHYGFInverterDayGenerateMapper
.
insert
(
tdHYGFInverterDayGenerate
);
//
户用场站月发电量
//
户用场站月发电量
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
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"day_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM-dd"
))
...
...
@@ -736,8 +722,8 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFInverterMonthGenerate
.
setYearMonth
(
DateUtil
.
format
(
today1
,
"yyyy-MM"
));
tdHYGFInverterMonthGenerate
.
setGenerate
(
jpInverter
.
getDayPowerGeneration
());
tdHYGFInverterMonthGenerate
.
setFullhour
(
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
());
//
新加
if
(
jpStation
!=
null
)
{
//
新加
if
(
jpStation
!=
null
)
{
tdHYGFInverterMonthGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterMonthGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterMonthGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -750,8 +736,9 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
else
{
tdHYGFInverterMonthGenerateMapper
.
insert
(
tdHYGFInverterMonthGenerate
);
}
//户用场站年发电量
TdHYGFInverterYearGenerate
tdHYGFInverterYearGenerate
=
tdHYGFInverterYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterYearGenerate
>()
// 户用场站年发电量
TdHYGFInverterYearGenerate
tdHYGFInverterYearGenerate
=
tdHYGFInverterYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterYearGenerate
>()
.
eq
(
"third_station_id"
,
jpInverter
.
getThirdStationId
())
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"month_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
))
...
...
@@ -767,8 +754,8 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
tdHYGFInverterYearGenerate
.
setFullhour
(
jpInverter
.
getMonthPowerGeneration
()
/
jpInverter
.
getCapacity
());
tdHYGFInverterYearGenerate
.
setName
(
jpInverter
.
getName
());
//
新加
if
(
jpStation
!=
null
)
{
//
新加
if
(
jpStation
!=
null
)
{
tdHYGFInverterYearGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterYearGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterYearGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -776,33 +763,30 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
if
(
ObjectUtils
.
isEmpty
(
tdHYGFInverterYearGenerate
.
getCreatedTime
()))
{
tdHYGFInverterYearGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFInverterYearGenerateMapper
.
insert
(
tdHYGFInverterYearGenerate
);
}
else
{
tdHYGFInverterYearGenerateMapper
.
insert
(
tdHYGFInverterYearGenerate
);
}
//户用场站年发电量
TdHYGFInverterTotalGenerate
tdHYGFInverterTotalGenerate
=
tdHYGFInverterTotalGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterTotalGenerate
>()
// 户用场站年发电量
TdHYGFInverterTotalGenerate
tdHYGFInverterTotalGenerate
=
tdHYGFInverterTotalGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterTotalGenerate
>()
.
eq
(
"third_station_id"
,
jpInverter
.
getThirdStationId
())
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"year_time"
,
DateUtil
.
format
(
today1
,
"yyyy"
))
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
()).
eq
(
"year_time"
,
DateUtil
.
format
(
today1
,
"yyyy"
))
.
eq
(
"year"
,
DateUtil
.
format
(
today1
,
"yyyy"
)));
if
(
ObjectUtils
.
isEmpty
(
tdHYGFInverterTotalGenerate
))
{
tdHYGFInverterTotalGenerate
=
new
TdHYGFInverterTotalGenerate
();
}
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
.
setYearTime
(
DateUtil
.
format
(
today1
,
"yyyy"
));
tdHYGFInverterTotalGenerate
.
setYear
(
DateUtil
.
format
(
today1
,
"yyyy"
));
tdHYGFInverterTotalGenerate
.
setGenerate
(
jpInverter
.
getYearPowerGeneration
());
tdHYGFInverterTotalGenerate
.
setFullhour
(
jpInverter
.
getYearPowerGeneration
()
/
jpInverter
.
getCapacity
());
//
新加
if
(
jpStation
!=
null
)
{
//
新加
if
(
jpStation
!=
null
)
{
tdHYGFInverterTotalGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterTotalGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterTotalGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -817,12 +801,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
}
logger
.
info
(
"-------锦浪同步逆变器详情结束+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Async
@Override
public
void
inverAlramInfo
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------锦浪同步告警开始+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
inverterIds
=
golangInverterListMapper
.
getInverterSns
();
for
(
int
i
=
0
;
i
<
inverterIds
.
size
();
i
++)
{
try
{
...
...
@@ -838,19 +825,15 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
requestInfo
.
put
(
"alarmEndTime"
,
DateUtil
.
today
());
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
List
<
AlarmDto
>
result
=
golangRequestUtil
.
getResPonse
(
GoLangConstant
.
alarmListUrl
,
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data_records
,
AlarmDto
.
class
);
GoLangConstant
.
requestPost
,
requestParaminfo
,
GoLangConstant
.
resovleRule_data_records
,
AlarmDto
.
class
);
for
(
int
j
=
0
;
j
<
result
.
size
();
j
++)
{
AlarmDto
alarmDto
=
result
.
get
(
j
);
if
(!
ObjectUtils
.
isEmpty
(
alarmDto
.
getAlarmDeviceSn
()))
{
HYGFJPInverterWarn
hygfjpInverterWarn
=
hygfjpInverterWarnMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterWarn
>()
.
eq
(
"sn_code"
,
alarmDto
.
getAlarmDeviceSn
())
HYGFJPInverterWarn
hygfjpInverterWarn
=
hygfjpInverterWarnMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterWarn
>()
.
eq
(
"sn_code"
,
alarmDto
.
getAlarmDeviceSn
())
.
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
))
{
hygfjpInverterWarn
=
new
HYGFJPInverterWarn
();
}
...
...
@@ -863,28 +846,27 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpInverterWarn
.
setTreatment
(
alarmDto
.
getAdvice
());
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
()))));
//电站区域经销商,
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
){
if
(
jpStation
!=
null
)
{
hygfjpInverterWarn
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpInverterWarn
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpInverterWarn
.
setStationName
(
jpStation
.
getName
());
hygfjpInverterWarn
.
setStationState
(
jpStation
.
getState
());
}
hygfjpInverterWarn
.
setStationState
(
jpStation
.
getState
());
}
hygfjpInverterWarn
.
setRecoverTime
(
null
);
if
(!
ObjectUtils
.
isEmpty
(
alarmDto
.
getAlarmEndTime
()))
{
hygfjpInverterWarn
.
setRecoverTime
(
alarmDto
.
getAlarmEndTime
());
}
hygfjpInverterWarn
.
setTimeLong
(
null
);
if
((!
ObjectUtils
.
isEmpty
(
alarmDto
.
getAlarmBeginTime
()))
&&
(!
ObjectUtils
.
isEmpty
(
alarmDto
.
getAlarmEndTime
())))
{
hygfjpInverterWarn
.
setTimeLong
(
golangRequestUtil
.
convertDate
(
alarmDto
.
getAlarmEndTime
())
-
golangRequestUtil
.
convertDate
(
alarmDto
.
getAlarmBeginTime
()));
if
((!
ObjectUtils
.
isEmpty
(
alarmDto
.
getAlarmBeginTime
()))
&&
(!
ObjectUtils
.
isEmpty
(
alarmDto
.
getAlarmEndTime
())))
{
hygfjpInverterWarn
.
setTimeLong
(
golangRequestUtil
.
convertDate
(
alarmDto
.
getAlarmEndTime
())
-
golangRequestUtil
.
convertDate
(
alarmDto
.
getAlarmBeginTime
()));
}
hygfjpInverterWarn
.
setState
(
GoLangConstant
.
alarmstatus
.
get
(
alarmDto
.
getState
()));
if
(
ObjectUtils
.
isEmpty
(
hygfjpInverterWarn
.
getCreatedTime
()))
{
...
...
@@ -896,6 +878,6 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
}
logger
.
info
(
"-------锦浪同步告警结束+"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/GoodWeDataAcquisitionServiceImpl.java
View file @
60f881c8
...
...
@@ -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.service.GoodWeDataAcquisitionService
;
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.boot.web.servlet.server.Jsp
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.annotation.PostConstruct
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
@Service
public
class
GoodWeDataAcquisitionServiceImpl
implements
GoodWeDataAcquisitionService
{
@Autowired
...
...
@@ -51,19 +60,19 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
private
JpInverterMapper
jpInverterMapper
;
@Autowired
private
HYGFJPStationPowerHistoryMapper
hygfjpStationPowerHistoryMapper
;
//
户用光伏逆变器历史mapper
//
户用光伏逆变器历史mapper
@Autowired
private
HYGFJPInverterHistoryMapper
hygfjpInverterHistoryMapper
;
//
户用光伏采集器历史mapper
//
户用光伏采集器历史mapper
@Autowired
private
HYGFJPCollectorHistoryMapper
hygfjpCollectorHistoryMapper
;
//
户用光伏逆变器告警
//
户用光伏逆变器告警
@Autowired
private
HYGFJPInverterWarnMapper
hygfjpInverterWarnMapper
;
//
户用光伏逆变器历史mapper
//
户用光伏逆变器历史mapper
@Autowired
private
HYGFJPInverterElecHistoryMapper
hygfjpInverterElecHistoryMapper
;
//
户用光伏日发电量
//
户用光伏日发电量
@Autowired
private
JpInverterElectricityMapper
jpInverterElectricityMapper
;
@Autowired
...
...
@@ -85,23 +94,36 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
private
TdHYGFInverterTotalGenerateMapper
tdHYGFInverterTotalGenerateMapper
;
@Autowired
TdJpStationMapper
tdJpStationMapper
;
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
GoodWeDataAcquisitionServiceImpl
.
class
);
final
static
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
@Override
@Scheduled
(
cron
=
"${dataRequstScheduled.GoodWe}"
)
@Async
public
void
stationList
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------固德威同步场站和告警开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"page_index"
,
1
);
requestInfo
.
put
(
"page_size"
,
200
);
// requestInfo.put("key", "龙虎山北区");
String
requstParam
=
JSON
.
toJSONString
(
requestInfo
);
String
today
=
DateUtil
.
today
();
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
)
{
goodWeStationLists
.
forEach
(
goodWeStationMonitorDto
->
{
GoodWeStationMonitorList
goodWeStationList
=
new
GoodWeStationMonitorList
();
BeanUtil
.
copyProperties
(
goodWeStationMonitorDto
,
goodWeStationList
);
goodWeStationList
.
setCreatedTime
(
System
.
currentTimeMillis
());
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
))
{
jpStation
=
new
JpStation
();
}
...
...
@@ -114,19 +136,22 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpStation
.
setAddress
(
goodWeStationList
.
getLocation
());
jpStation
.
setLatitude
(
goodWeStationList
.
getLatitude
());
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
.
setStationContact
(
goodWeStationList
.
getOwner_name
());
jpStation
.
setModuleCount
(
0
);
jpStation
.
setRealTimePower
(
goodWeStationList
.
getPac
()!=
null
?
goodWeStationList
.
getPac
()
*
GoodWeConstant
.
wToKw
:
null
);
jpStation
.
setState
(
goodWeStationList
.
getStatus
()!=
null
?
GoodWeConstant
.
stationStaus
.
get
(
goodWeStationList
.
getStatus
()+
""
):
null
);
jpStation
.
setRealTimePower
(
goodWeStationList
.
getPac
()
!=
null
?
goodWeStationList
.
getPac
()
*
GoodWeConstant
.
wToKw
:
null
);
jpStation
.
setState
(
goodWeStationList
.
getStatus
()
!=
null
?
GoodWeConstant
.
stationStaus
.
get
(
goodWeStationList
.
getStatus
()
+
""
)
:
null
);
jpStation
.
setDayGenerate
(
goodWeStationList
.
getEday
());
jpStation
.
setDayIncome
(
goodWeStationList
.
getEday_income
());
jpStation
.
setAccumulatedPower
(
goodWeStationList
.
getEtotal
());
jpStation
.
setCumulativeIncome
(
goodWeStationList
.
getEtotal_income
());
jpStation
.
setType
(
goodWeStationList
.
getPowerstation_type
());
jpStation
.
setRecDate
(
new
Date
());
if
(
ObjectUtils
.
isEmpty
(
jpStation
.
getSequenceNbr
()))
{
jpStation
.
setCreateTime
(
new
Date
(
goodWeStationList
.
getCreatedTime
()));
if
(
ObjectUtils
.
isNotEmpty
(
goodWeStationList
.
getTurnon_time
()))
{
...
...
@@ -138,8 +163,13 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpStationMapper
.
updateById
(
jpStation
);
}
try
{
this
.
inverAlramInfo
(
goodWeStationList
.
getPowerstation_id
());
//增加td 电站区域公司,经销商绑定表
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
// 增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code",PVProducerInfoEnum.GDW.getCode()).
// eq("third_station_id", jpStation.getThirdStationId()));
...
...
@@ -160,10 +190,6 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
// tdJpStationMapper.insert(tdJpStation);
// }
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
...
...
@@ -171,20 +197,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpStationPowerHistory
.
setThirdCode
(
jpStation
.
getThirdCode
());
hygfjpStationPowerHistory
.
setTime
(
System
.
currentTimeMillis
());
//
新加
//
新加
hygfjpStationPowerHistory
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpStationPowerHistory
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpStationPowerHistory
.
setStationName
(
jpStation
.
getName
());
hygfjpStationPowerHistory
.
setStationState
(
jpStation
.
getState
());
hygfjpStationPowerHistoryMapper
.
insert
(
hygfjpStationPowerHistory
);
HYGFJPDayPower
hygfjpDayPower
=
hygfjpDayPowerMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPDayPower
>().
eq
(
"tation_id"
,
jpStation
.
getThirdStationId
()).
eq
(
"year_month_day"
,
today
).
eq
(
"hour"
,
hour
)
);
HYGFJPDayPower
hygfjpDayPower
=
hygfjpDayPowerMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPDayPower
>()
.
eq
(
"tation_id"
,
jpStation
.
getThirdStationId
()).
eq
(
"year_month_day"
,
today
).
eq
(
"hour"
,
hour
));
if
(
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
hygfjpDayPower
))
{
hygfjpDayPower
=
new
HYGFJPDayPower
();
}
...
...
@@ -193,7 +214,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpDayPower
.
setYearMonthDay
(
today
);
hygfjpDayPower
.
setPower
(
jpStation
.
getRealTimePower
());
//
新加
//
新加
hygfjpDayPower
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpDayPower
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpDayPower
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -206,8 +227,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpDayPowerMapper
.
insert
(
hygfjpDayPower
);
}
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
(
"day_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM-dd"
))
.
eq
(
"year_month"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
)));
...
...
@@ -220,7 +242,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFStationDayGenerate
.
setGenerate
(
jpStation
.
getDayGenerate
());
tdHYGFStationDayGenerate
.
setFullhour
(
goodWeStationList
.
getTo_hour
());
tdHYGFStationDayGenerate
.
setIncome
(
jpStation
.
getDayIncome
());
//
新加
//
新加
tdHYGFStationDayGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationDayGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationDayGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -232,8 +254,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
else
{
tdHYGFStationDayGenerateMapper
.
insert
(
tdHYGFStationDayGenerate
);
}
//户用场站月发电量
TdHYGFStationMonthGenerate
tdHYGFStationMonthGenerate
=
tdHYGFStationMonthGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationMonthGenerate
>()
// 户用场站月发电量
TdHYGFStationMonthGenerate
tdHYGFStationMonthGenerate
=
tdHYGFStationMonthGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationMonthGenerate
>()
.
eq
(
"third_station_id"
,
jpStation
.
getThirdStationId
())
.
eq
(
"month_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
))
.
eq
(
"year"
,
DateUtil
.
format
(
today1
,
"yyyy"
)));
...
...
@@ -248,7 +271,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFStationMonthGenerate
.
setFullhour
(
jpStation
.
getMonthGenerate
()
/
jpStation
.
getCapacity
());
}
tdHYGFStationMonthGenerate
.
setIncome
(
jpStation
.
getMonthIncome
());
//
新加
//
新加
tdHYGFStationMonthGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationMonthGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationMonthGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -260,8 +283,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
else
{
tdHYGFStationMonthGenerateMapper
.
insert
(
tdHYGFStationMonthGenerate
);
}
//户用场站年发电量
TdHYGFStationYearGenerate
tdHYGFStationYearGenerate
=
tdHYGFStationYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationYearGenerate
>()
// 户用场站年发电量
TdHYGFStationYearGenerate
tdHYGFStationYearGenerate
=
tdHYGFStationYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationYearGenerate
>()
.
eq
(
"third_station_id"
,
jpStation
.
getThirdStationId
())
.
eq
(
"year_time"
,
DateUtil
.
format
(
today1
,
"yyyy"
))
.
eq
(
"year"
,
DateUtil
.
format
(
today1
,
"yyyy"
)));
...
...
@@ -274,7 +298,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFStationYearGenerate
.
setGenerate
(
jpStation
.
getYearGenerate
());
tdHYGFStationYearGenerate
.
setFullhour
(
jpStation
.
getYearGenerate
()
/
jpStation
.
getCapacity
());
tdHYGFStationYearGenerate
.
setIncome
(
jpStation
.
getYearIncome
());
//
新加
//
新加
tdHYGFStationYearGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationYearGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationYearGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -288,41 +312,52 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
});
}
logger
.
info
(
"-------固德威同步场站和告警结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Override
@Scheduled
(
cron
=
"${dataRequstScheduled.GoodWe}"
)
@Async
public
void
stationDetail
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------固德威同步场站详情开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
stationIds
=
goodWeStationMonitorListMapper
.
getStationIds
();
stationIds
.
forEach
(
stationId
->
{
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
String
requstParam
=
JSON
.
toJSONString
(
requestInfo
);
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
)
{
goodWeStationDetails
.
forEach
(
goodWeStationDetail
->
{
goodWeStationDetail
.
setCreatedTime
(
System
.
currentTimeMillis
());
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
))
{
jpStation
=
new
JpStation
();
}
jpStation
.
setUserName
(
goodWeStationDetail
.
getOwner_name
());
jpStation
.
setUserPhone
(
goodWeStationDetail
.
getOwner_phone
());
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
()))
{
jpStationMapper
.
updateById
(
jpStation
);
}
});
}
});
logger
.
info
(
"-------固德威同步场站详情结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Override
@Scheduled
(
cron
=
"${dataRequstScheduled.GoodWe}"
)
@Async
public
void
stationMonthGen
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------固德威同步场站月发电量开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
stationIds
=
goodWeStationMonitorListMapper
.
getStationIds
();
stationIds
.
forEach
(
stationId
->
{
String
currentMonth
=
DateUtil
.
format
(
new
Date
(),
"yyyyMM"
);
...
...
@@ -332,22 +367,34 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo
.
put
(
"count"
,
0
);
requestInfo
.
put
(
"type"
,
1
);
String
requstParam
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GoodWEGenStation
>
goodWEGenStations
=
goodWeRequestUtil
.
getResPonse
(
GoodWeConstant
.
stationGenUrl
,
GoodWeConstant
.
requestPost
,
requstParam
,
GoodWeConstant
.
resovleRule_data
,
GoodWEGenStation
.
class
);
List
<
GoodWEGenStation
>
currentMonthGenStations
=
goodWEGenStations
.
stream
().
filter
(
goodWEGenStation
->
goodWEGenStation
.
getDate
().
equals
(
currentMonth
)).
collect
(
Collectors
.
toList
());
List
<
GoodWEGenStation
>
goodWEGenStations
=
goodWeRequestUtil
.
getResPonse
(
GoodWeConstant
.
stationGenUrl
,
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
->
{
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
))
{
jpStation
.
setMonthGenerate
(
Double
.
parseDouble
(
goodWEGenStation
.
getPower
()));
jpStation
.
setMonthIncome
(
jpStation
.
getMonthGenerate
()
*
0.42
);
jpStationMapper
.
updateById
(
jpStation
);
// if(jpStation.getName().contains("刘国荣"))
// {
// System.out.println(jpStation);
// }
}
});
});
logger
.
info
(
"-------固德威同步场站月发电量结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Override
@Scheduled
(
cron
=
"${dataRequstScheduled.GoodWe}"
)
@Async
public
void
stationYearGen
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------固德威同步场站年发电量开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
stationIds
=
goodWeStationMonitorListMapper
.
getStationIds
();
stationIds
.
forEach
(
stationId
->
{
String
currentYear
=
DateUtil
.
format
(
new
Date
(),
"yyyy"
);
...
...
@@ -357,10 +404,14 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo
.
put
(
"count"
,
0
);
requestInfo
.
put
(
"type"
,
2
);
String
requstParam
=
JSON
.
toJSONString
(
requestInfo
);
List
<
GoodWEGenStation
>
goodWEGenStations
=
goodWeRequestUtil
.
getResPonse
(
GoodWeConstant
.
stationGenUrl
,
GoodWeConstant
.
requestPost
,
requstParam
,
GoodWeConstant
.
resovleRule_data
,
GoodWEGenStation
.
class
);
List
<
GoodWEGenStation
>
currentMonthGenStations
=
goodWEGenStations
.
stream
().
filter
(
goodWEGenStation
->
goodWEGenStation
.
getDate
().
equals
(
currentYear
)).
collect
(
Collectors
.
toList
());
List
<
GoodWEGenStation
>
goodWEGenStations
=
goodWeRequestUtil
.
getResPonse
(
GoodWeConstant
.
stationGenUrl
,
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
->
{
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
))
{
jpStation
.
setYearGenerate
(
Double
.
parseDouble
(
goodWEGenStation
.
getPower
()));
jpStation
.
setYearIncome
(
jpStation
.
getYearGenerate
()
*
0.42
);
...
...
@@ -368,9 +419,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
});
});
logger
.
info
(
"-------固德威同步场站年发电量开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Override
public
void
collectorList
()
{
...
...
@@ -383,23 +434,28 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
@Override
@Scheduled
(
cron
=
"${dataRequstScheduled.GoodWe}"
)
@Async
public
void
inverterList
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------固德威同步逆变器开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
stationIds
=
goodWeStationMonitorListMapper
.
getStationIds
();
stationIds
.
stream
().
forEach
(
stationId
->
{
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"page_index"
,
1
);
requestInfo
.
put
(
"page_size"
,
100
);
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
);
List
<
GoodWeINverterDetailDto
>
inverterDetailDtoList
=
goodWeRequestUtil
.
getResPonse
(
GoodWeConstant
.
queryInventerUrl
,
GoodWeConstant
.
requestPost
,
requstParam
,
GoodWeConstant
.
resovleRule_data_list
,
GoodWeINverterDetailDto
.
class
);
List
<
GoodWeINverterDetailDto
>
inverterDetailDtoList
=
goodWeRequestUtil
.
getResPonse
(
GoodWeConstant
.
queryInventerUrl
,
GoodWeConstant
.
requestPost
,
requstParam
,
GoodWeConstant
.
resovleRule_data_list
,
GoodWeINverterDetailDto
.
class
);
inverterDetailDtoList
.
forEach
(
goodWeINverterDetailDto
->
{
// System.out.println(goodWeINverterDetailDto.getIt_sn());
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_station_id"
,
goodWeINverterDetailDto
.
getPw_id
()).
eq
(
"third_code"
,
PVProducerInfoEnum
.
GDW
.
getCode
()).
eq
(
"sn_code"
,
goodWeINverterDetailDto
.
getIt_sn
()));
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_station_id"
,
goodWeINverterDetailDto
.
getPw_id
())
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
GDW
.
getCode
())
.
eq
(
"sn_code"
,
goodWeINverterDetailDto
.
getIt_sn
()));
if
(
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
jpInverter
))
{
jpInverter
=
new
JpInverter
();
}
...
...
@@ -410,7 +466,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
jpInverter
.
setCapacity
(
goodWeINverterDetailDto
.
getIt_capacity
());
jpInverter
.
setThirdStationId
(
goodWeINverterDetailDto
.
getPw_id
());
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
.
setRecDate
(
new
Date
());
...
...
@@ -421,11 +477,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
});
});
logger
.
info
(
"-------固德威同步逆变器结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Override
@Scheduled
(
cron
=
"${dataRequstScheduled.GoodWe}"
)
@Async
public
void
inverterDetail
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------固德威同步逆变器详情开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
goodweSnList
=
jpInverterMapper
.
getGoodWeSnCodes
();
List
<
List
<
String
>>
splitList
=
Lists
.
partition
(
goodweSnList
,
50
);
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
...
...
@@ -433,22 +493,23 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
for
(
int
i
=
0
;
i
<
splitList
.
size
();
i
++)
{
String
requestSns
=
splitList
.
get
(
i
).
stream
().
map
(
s
->
"sns="
+
s
).
collect
(
Collectors
.
joining
(
"&"
));
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
->
{
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
GDW
.
getCode
()).
eq
(
"sn_code"
,
goodWeInverterCurrentDataDto
.
getSn
()));
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
GDW
.
getCode
())
.
eq
(
"sn_code"
,
goodWeInverterCurrentDataDto
.
getSn
()));
jpInverter
.
setIgbtTemperature
(
String
.
valueOf
(
goodWeInverterCurrentDataDto
.
getTempperature
()));
jpInverter
.
setDayPowerGeneration
(
goodWeInverterCurrentDataDto
.
getEday
());
jpInverter
.
setCapacity
(
goodWeInverterCurrentDataDto
.
getCapacity
());
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
++)
{
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
goodWeInverterCurrentDataDto
.
getSn
()).
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"AC"
+
k
)
);
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
goodWeInverterCurrentDataDto
.
getSn
()).
eq
(
"type"
,
"交流"
)
.
eq
(
"name"
,
"AC"
+
k
));
if
(
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
jpInverterElectricity
))
{
jpInverterElectricity
=
new
JpInverterElectricity
();
}
...
...
@@ -467,11 +528,10 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
}
for
(
int
k1
=
1
;
k1
<
4
;
k1
++)
{
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
goodWeInverterCurrentDataDto
.
getSn
()).
eq
(
"type"
,
"直流"
).
eq
(
"name"
,
"PV"
+
k1
)
);
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
goodWeInverterCurrentDataDto
.
getSn
()).
eq
(
"type"
,
"直流"
)
.
eq
(
"name"
,
"PV"
+
k1
));
if
(
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
jpInverterElectricity
))
{
jpInverterElectricity
=
new
JpInverterElectricity
();
}
...
...
@@ -505,9 +565,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpInverterElecHistoryMapper
.
insert
(
hygfjpInverterElecHistory
);
// 逆变器历史
String
today
=
DateUtil
.
today
();
HYGFJPInverterHistory
hygfjpInverterHistory
=
hygfjpInverterHistoryMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterHistory
>()
.
eq
(
"sn_code"
,
goodWeInverterCurrentDataDto
.
getSn
()
)
.
eq
(
"date"
,
today
));
HYGFJPInverterHistory
hygfjpInverterHistory
=
hygfjpInverterHistoryMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterHistory
>(
)
.
eq
(
"sn_code"
,
goodWeInverterCurrentDataDto
.
getSn
())
.
eq
(
"date"
,
today
));
if
(
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
hygfjpInverterHistory
))
{
hygfjpInverterHistory
=
new
HYGFJPInverterHistory
();
}
...
...
@@ -516,8 +576,10 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
hygfjpInverterHistory
.
setInverterId
(
jpInverter
.
getId
());
hygfjpInverterHistory
.
setSnCode
(
goodWeInverterCurrentDataDto
.
getSn
());
hygfjpInverterHistory
.
setThirdCode
(
PVProducerInfoEnum
.
GDW
.
getCode
());
if
(
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getCapacity
())&&
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getDayPowerGeneration
())){
hygfjpInverterHistory
.
setGenerationHours
(
jpInverter
.
getDayPowerGeneration
()/
jpInverter
.
getCapacity
());
if
(
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getCapacity
())
&&
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getDayPowerGeneration
()))
{
hygfjpInverterHistory
.
setGenerationHours
(
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
());
}
hygfjpInverterHistory
.
setPowerGeneration
(
goodWeInverterCurrentDataDto
.
getEday
());
...
...
@@ -527,7 +589,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
else
{
hygfjpInverterHistoryMapper
.
insert
(
hygfjpInverterHistory
);
}
//
-----------------------户用光伏日报表----------------------
//
-----------------------户用光伏日报表----------------------
TdHYGFInverterDayGenerate
tdHYGFInverterDayGenerate
=
new
TdHYGFInverterDayGenerate
();
tdHYGFInverterDayGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFInverterDayGenerate
.
setName
(
jpInverter
.
getName
());
...
...
@@ -535,27 +597,27 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterDayGenerate
.
setSnCode
(
jpInverter
.
getSnCode
().
trim
());
tdHYGFInverterDayGenerate
.
setWorkStatus
(
jpInverter
.
getState
());
D
d
=
goodWeInverterCurrentDataDto
.
getD
();
//
交流电压
//
交流电压
tdHYGFInverterDayGenerate
.
setDcv1
(
d
.
getVac1
());
tdHYGFInverterDayGenerate
.
setDcv2
(
d
.
getVac2
());
tdHYGFInverterDayGenerate
.
setDcv3
(
d
.
getVac3
());
//
交流电流
//
交流电流
// tdHYGFInverterDayGenerate.setDcv4(inverterDetailDto.getUAc4());
tdHYGFInverterDayGenerate
.
setDcc1
(
d
.
getIac1
());
tdHYGFInverterDayGenerate
.
setDcc2
(
d
.
getIac2
());
tdHYGFInverterDayGenerate
.
setDcc3
(
d
.
getIac3
());
// tdHYGFInverterDayGenerate.setDcc4(inverterDetailDto.getIAc4());
//
直流电压
//
直流电压
tdHYGFInverterDayGenerate
.
setAcv1
(
d
.
getVpv1
());
tdHYGFInverterDayGenerate
.
setAcv2
(
d
.
getVpv2
());
tdHYGFInverterDayGenerate
.
setAcv3
(
d
.
getVpv3
());
tdHYGFInverterDayGenerate
.
setAcv4
(
d
.
getVpv4
());
//
直流电流
//
直流电流
tdHYGFInverterDayGenerate
.
setAcc1
(
d
.
getIpv1
());
tdHYGFInverterDayGenerate
.
setAcc2
(
d
.
getIpv2
());
tdHYGFInverterDayGenerate
.
setAcc3
(
d
.
getIpv3
());
tdHYGFInverterDayGenerate
.
setAcc4
(
d
.
getIpv4
());
//
功率
//
功率
// tdHYGFInverterDayGenerate.setPv1(inverterDetailDto.getPow1());
// tdHYGFInverterDayGenerate.setPv2(inverterDetailDto.getPow2());
// tdHYGFInverterDayGenerate.setPv3(inverterDetailDto.getPow3());
...
...
@@ -571,17 +633,18 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterDayGenerate
.
setTotalGen
(
jpInverter
.
getTotalPowerGeneration
());
tdHYGFInverterDayGenerate
.
setIgbtTemp
(
goodWeInverterCurrentDataDto
.
getTempperature
());
tdHYGFInverterDayGenerate
.
setIncome
(
null
);
if
(
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getCapacity
())&&
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getDayPowerGeneration
())){
tdHYGFInverterDayGenerate
.
setFullhour
(
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
());}
if
(
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getCapacity
())
&&
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getDayPowerGeneration
()))
{
tdHYGFInverterDayGenerate
.
setFullhour
(
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
());
}
//
电站区域经销商,
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
GDW
.
getCode
()).
eq
(
"third_station_id"
,
String
.
valueOf
(
jpInverter
.
getThirdStationId
())));
//
电站区域经销商,
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
GDW
.
getCode
())
.
eq
(
"third_station_id"
,
String
.
valueOf
(
jpInverter
.
getThirdStationId
())));
if
(
jpStation
!=
null
)
{
if
(
jpStation
!=
null
)
{
tdHYGFInverterDayGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterDayGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterDayGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -589,11 +652,11 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
tdHYGFInverterDayGenerateMapper
.
insert
(
tdHYGFInverterDayGenerate
);
//
户用场站月发电量
//
户用场站月发电量
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
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"day_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM-dd"
))
...
...
@@ -608,8 +671,8 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterMonthGenerate
.
setYearMonth
(
DateUtil
.
format
(
today1
,
"yyyy-MM"
));
tdHYGFInverterMonthGenerate
.
setGenerate
(
jpInverter
.
getDayPowerGeneration
());
//
新加
if
(
jpStation
!=
null
)
{
//
新加
if
(
jpStation
!=
null
)
{
tdHYGFInverterMonthGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterMonthGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterMonthGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -617,8 +680,11 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
if
(
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getCapacity
())&&
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getDayPowerGeneration
())){
tdHYGFInverterMonthGenerate
.
setFullhour
(
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
());}
if
(
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getCapacity
())
&&
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getDayPowerGeneration
()))
{
tdHYGFInverterMonthGenerate
.
setFullhour
(
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
());
}
if
(
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
tdHYGFInverterMonthGenerate
.
getCreatedTime
()))
{
tdHYGFInverterMonthGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
...
...
@@ -626,8 +692,9 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
else
{
tdHYGFInverterMonthGenerateMapper
.
insert
(
tdHYGFInverterMonthGenerate
);
}
//户用场站年发电量
TdHYGFInverterYearGenerate
tdHYGFInverterYearGenerate
=
tdHYGFInverterYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterYearGenerate
>()
// 户用场站年发电量
TdHYGFInverterYearGenerate
tdHYGFInverterYearGenerate
=
tdHYGFInverterYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterYearGenerate
>()
.
eq
(
"third_station_id"
,
jpInverter
.
getThirdStationId
())
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"month_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
))
...
...
@@ -640,13 +707,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterYearGenerate
.
setMonthTime
(
DateUtil
.
format
(
today1
,
"yyyy-MM"
));
tdHYGFInverterYearGenerate
.
setYear
(
DateUtil
.
format
(
today1
,
"yyyy"
));
tdHYGFInverterYearGenerate
.
setGenerate
(
jpInverter
.
getMonthPowerGeneration
());
if
(
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getCapacity
())&&
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getMonthPowerGeneration
())){
tdHYGFInverterYearGenerate
.
setFullhour
(
jpInverter
.
getMonthPowerGeneration
()
/
jpInverter
.
getCapacity
());
if
(
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getCapacity
())
&&
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getMonthPowerGeneration
()))
{
tdHYGFInverterYearGenerate
.
setFullhour
(
jpInverter
.
getMonthPowerGeneration
()
/
jpInverter
.
getCapacity
());
}
tdHYGFInverterYearGenerate
.
setName
(
jpInverter
.
getName
());
//
新加
if
(
jpStation
!=
null
)
{
//
新加
if
(
jpStation
!=
null
)
{
tdHYGFInverterYearGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterYearGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterYearGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -660,11 +729,11 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
else
{
tdHYGFInverterYearGenerateMapper
.
insert
(
tdHYGFInverterYearGenerate
);
}
//户用场站年发电量
TdHYGFInverterTotalGenerate
tdHYGFInverterTotalGenerate
=
tdHYGFInverterTotalGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterTotalGenerate
>()
// 户用场站年发电量
TdHYGFInverterTotalGenerate
tdHYGFInverterTotalGenerate
=
tdHYGFInverterTotalGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterTotalGenerate
>()
.
eq
(
"third_station_id"
,
jpInverter
.
getThirdStationId
())
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"year_time"
,
DateUtil
.
format
(
today1
,
"yyyy"
))
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
()).
eq
(
"year_time"
,
DateUtil
.
format
(
today1
,
"yyyy"
))
.
eq
(
"year"
,
DateUtil
.
format
(
today1
,
"yyyy"
)));
if
(
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
tdHYGFInverterTotalGenerate
))
{
tdHYGFInverterTotalGenerate
=
new
TdHYGFInverterTotalGenerate
();
...
...
@@ -675,11 +744,13 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
tdHYGFInverterTotalGenerate
.
setYearTime
(
DateUtil
.
format
(
today1
,
"yyyy"
));
tdHYGFInverterTotalGenerate
.
setYear
(
DateUtil
.
format
(
today1
,
"yyyy"
));
tdHYGFInverterTotalGenerate
.
setGenerate
(
jpInverter
.
getYearPowerGeneration
());
if
(
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getCapacity
())&&
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getYearPowerGeneration
()))
{
tdHYGFInverterTotalGenerate
.
setFullhour
(
jpInverter
.
getYearPowerGeneration
()
/
jpInverter
.
getCapacity
());
if
(
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getCapacity
())
&&
ObjectUtils
.
isNotEmpty
(
jpInverter
.
getYearPowerGeneration
()))
{
tdHYGFInverterTotalGenerate
.
setFullhour
(
jpInverter
.
getYearPowerGeneration
()
/
jpInverter
.
getCapacity
());
}
//
新加
if
(
jpStation
!=
null
)
{
//
新加
if
(
jpStation
!=
null
)
{
tdHYGFInverterTotalGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterTotalGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterTotalGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -695,12 +766,16 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
});
}
logger
.
info
(
"-------固德威同步逆变器详情结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Override
@Scheduled
(
cron
=
"${dataRequstScheduled.GoodWe}"
)
@Async
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"
);
sns
.
forEach
(
sn
->
{
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
...
...
@@ -709,24 +784,33 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo
.
put
(
"count"
,
0
);
requestInfo
.
put
(
"type"
,
1
);
String
requstParam
=
JSON
.
toJSONString
(
requestInfo
);
String
apiUrl
=
GoodWeConstant
.
getinverterGenURl
+
"?sn="
+
sn
+
"&date="
+
DateUtil
.
today
()+
"&count=0&type=1"
;
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
());
String
apiUrl
=
GoodWeConstant
.
getinverterGenURl
+
"?sn="
+
sn
+
"&date="
+
DateUtil
.
today
()
+
"&count=0&type=1"
;
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
->
{
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
))
{
jpInverter
.
setMonthPowerGeneration
(
Double
.
parseDouble
(
goodWEGenStation
.
getPower
()));
jpInverterMapper
.
updateById
(
jpInverter
);
}
});
});
logger
.
info
(
"-------固德威同步逆变器月发电量结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Override
@Scheduled
(
cron
=
"${dataRequstScheduled.GoodWe}"
)
@Async
public
void
inverterYearGen
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------固德威同步逆变器年发电量开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
String
currentYear
=
DateUtil
.
format
(
new
Date
(),
"yyyy"
);
List
<
String
>
sns
=
jpInverterMapper
.
getGoodWeSnCodes
()
;
List
<
String
>
sns
=
jpInverterMapper
.
getGoodWeSnCodes
()
;
sns
.
forEach
(
sn
->
{
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"sn"
,
sn
);
...
...
@@ -734,17 +818,23 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo
.
put
(
"count"
,
0
);
requestInfo
.
put
(
"type"
,
2
);
String
requstParam
=
JSON
.
toJSONString
(
requestInfo
);
String
apiUrl
=
GoodWeConstant
.
getinverterGenURl
+
"?sn="
+
sn
+
"&date="
+
DateUtil
.
today
()+
"&count=0&type=2"
;
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
());
String
apiUrl
=
GoodWeConstant
.
getinverterGenURl
+
"?sn="
+
sn
+
"&date="
+
DateUtil
.
today
()
+
"&count=0&type=2"
;
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
->
{
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
))
{
jpInverter
.
setYearPowerGeneration
(
Double
.
parseDouble
(
goodWEGenStation
.
getPower
()));
jpInverterMapper
.
updateById
(
jpInverter
);
}
});
});
logger
.
info
(
"-------固德威同步逆变器年发电量结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Override
...
...
@@ -758,14 +848,14 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo
.
put
(
"stationid"
,
stationid
);
// requestInfo.put("status", 2);
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
->
{
if
(!
ObjectUtils
.
isEmpty
(
goodWeAlarmDto
.
getDevicesn
()))
{
HYGFJPInverterWarn
hygfjpInverterWarn
=
hygfjpInverterWarnMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterWarn
>()
.
eq
(
"sn_code"
,
goodWeAlarmDto
.
getDevicesn
())
HYGFJPInverterWarn
hygfjpInverterWarn
=
hygfjpInverterWarnMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterWarn
>()
.
eq
(
"sn_code"
,
goodWeAlarmDto
.
getDevicesn
())
.
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
))
{
hygfjpInverterWarn
=
new
HYGFJPInverterWarn
();
}
...
...
@@ -775,17 +865,18 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
// hygfjpInverterWarn.setLevel(GoLangConstant.alarmLevel.get(alarmDto.getAlarmLevel()));
hygfjpInverterWarn
.
setContent
(
goodWeAlarmDto
.
getWarningname
());
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
());
// 电站区域经销商,
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
GDW
.
getCode
())
.
eq
(
"third_station_id"
,
String
.
valueOf
(
goodWeAlarmDto
.
getStationId
())));
//电站区域经销商,
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
GDW
.
getCode
()).
eq
(
"third_station_id"
,
String
.
valueOf
(
goodWeAlarmDto
.
getStationId
())));
if
(
jpStation
!=
null
){
if
(
jpStation
!=
null
)
{
hygfjpInverterWarn
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpInverterWarn
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpInverterWarn
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -793,15 +884,15 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
}
hygfjpInverterWarn
.
setRecoverTime
(
null
);
if
(!
ObjectUtils
.
isEmpty
(
goodWeAlarmDto
.
getRecoverytime
()))
{
hygfjpInverterWarn
.
setRecoverTime
(
goodWeAlarmDto
.
getRecoverytime
().
getMillis
());
}
hygfjpInverterWarn
.
setTimeLong
(
null
);
if
((!
ObjectUtils
.
isEmpty
(
goodWeAlarmDto
.
getHappentime
()))
&&
(!
ObjectUtils
.
isEmpty
(
goodWeAlarmDto
.
getRecoverytime
())))
{
hygfjpInverterWarn
.
setTimeLong
(
goodWeAlarmDto
.
getRecoverytime
().
getMillis
()
-
goodWeAlarmDto
.
getHappentime
().
getMillis
());
if
((!
ObjectUtils
.
isEmpty
(
goodWeAlarmDto
.
getHappentime
()))
&&
(!
ObjectUtils
.
isEmpty
(
goodWeAlarmDto
.
getRecoverytime
())))
{
hygfjpInverterWarn
.
setTimeLong
(
goodWeAlarmDto
.
getRecoverytime
().
getMillis
()
-
goodWeAlarmDto
.
getHappentime
().
getMillis
());
}
hygfjpInverterWarn
.
setState
(
GoodWeConstant
.
warningStaus
.
get
(
goodWeAlarmDto
.
getStatus
().
toString
()));
if
(
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
hygfjpInverterWarn
.
getCreatedTime
()))
{
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/ImasterDataServiceImpl.java
View file @
60f881c8
...
...
@@ -22,13 +22,17 @@ import com.yeejoin.amos.api.householdapi.face.service.ImasterDataService;
import
com.yeejoin.amos.openapi.enums.PVProducerInfoEnum
;
import
fastjson.JSON
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -117,9 +121,16 @@ public class ImasterDataServiceImpl implements ImasterDataService {
@Autowired
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}"
)
@Override
@Async
public
void
stationList
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------华为同步电站开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"pageNo"
,
1
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
...
...
@@ -134,13 +145,16 @@ public class ImasterDataServiceImpl implements ImasterDataService {
imasterStationList
.
setCreatedTime
(
System
.
currentTimeMillis
());
imasterStationMapper
.
insert
(
imasterStationList
);
}
logger
.
info
(
"-------华为同步电站结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Override
@Async
public
void
stationDetail
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------华为同步电站详情开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
stationList
=
imasterStationMapper
.
getStationIds
();
String
today
=
DateUtil
.
today
();
String
hour
=
new
Date
().
getHours
()
+
":00"
;
...
...
@@ -456,12 +470,16 @@ public class ImasterDataServiceImpl implements ImasterDataService {
}
}
this
.
inverterDetail
(
result4
);
logger
.
info
(
"-------华为同步电站详情结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Override
@Async
public
void
collectorList
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------华为同步采集器/逆变器开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
stationIds
=
imasterStationMapper
.
getStationIds
();
// try {
// TimeUnit.SECONDS.sleep(1);
...
...
@@ -547,6 +565,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
this
.
inverterList
(
result
);
logger
.
info
(
"-------华为同步采集器/逆变器结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Override
...
...
@@ -1017,8 +1036,10 @@ public class ImasterDataServiceImpl implements ImasterDataService {
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Override
@Async
public
void
inverAlramInfo
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------华为同步告警开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
inverterSns
=
imasterInverterListMapper
.
getCollectIds
();
// for (int i = 0; i < inverterSns.size(); i++) {
// try {
...
...
@@ -1087,5 +1108,6 @@ public class ImasterDataServiceImpl implements ImasterDataService {
}
}
// }
logger
.
info
(
"-------华为同步告警结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/KsolarDataAcquisitionServiceImpl.java
View file @
60f881c8
...
...
@@ -26,8 +26,11 @@ import com.yeejoin.amos.api.householdapi.face.service.KSolarDataAcquisitionServi
import
com.yeejoin.amos.openapi.enums.PVProducerInfoEnum
;
import
fastjson.JSON
;
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.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -49,7 +52,6 @@ import java.util.stream.Collectors;
@Service
public
class
KsolarDataAcquisitionServiceImpl
implements
KSolarDataAcquisitionService
{
@Autowired
KsolarRequestUtil
kSolarRequestUtil
;
...
...
@@ -91,7 +93,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
@Autowired
private
JpInverterMapper
jpInverterMapper
;
//
监盘逆变器电量mapper
//
监盘逆变器电量mapper
@Autowired
private
JpInverterElectricityMapper
jpInverterElectricityMapper
;
@Autowired
...
...
@@ -111,26 +113,33 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
@Autowired
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}"
)
@Override
@Async
public
void
stationList
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------科士达同步场站开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
List
<
KsolarStationList
>
kSolarStationListList
=
kSolarRequestUtil
.
getResPonse
(
KSolarConstant
.
stationListUrl
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_rows
,
KsolarStationList
.
class
);
List
<
KsolarStationList
>
kSolarStationListList
=
kSolarRequestUtil
.
getResPonse
(
KSolarConstant
.
stationListUrl
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_rows
,
KsolarStationList
.
class
);
for
(
KsolarStationList
kSolarStation
:
kSolarStationListList
)
{
kSolarStation
.
setCreatedTime
(
System
.
currentTimeMillis
());
kSolarStationMapper
.
insert
(
kSolarStation
);
}
logger
.
info
(
"-------科士达同步场站结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Scheduled
(
cron
=
"${dataRequstScheduled.keshida}"
)
@Override
@Async
public
void
stationDetail
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------科士达同步场站详情开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
stationIds
=
kSolarStationMapper
.
getStationIds
();
String
today
=
DateUtil
.
today
();
String
hour
=
new
Date
().
getHours
()
+
":00"
;
...
...
@@ -151,11 +160,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
String
url
=
KSolarConstant
.
stationInfoByIdUrl
+
"?stationId="
+
ksolarStation
.
getStationId
();
// 获取电站详情
List
<
KsolarStationDetails
>
ksolarStationDetailsList
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestPOST
,
requestParaminfo
,
KSolarConstant
.
resovle_data
,
List
<
KsolarStationDetails
>
ksolarStationDetailsList
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestPOST
,
requestParaminfo
,
KSolarConstant
.
resovle_data
,
KsolarStationDetails
.
class
);
// 获取单个电站的发电量和收益
KsolarStationEarn
stationEarn
=
getStationEarn
(
ksolarStation
.
getStationId
());
...
...
@@ -169,9 +175,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
for
(
KsolarStationDetails
ksolarStationDetail
:
ksolarStationDetailsList
)
{
ksolarStationDetail
.
setCreatedTime
(
System
.
currentTimeMillis
());
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()).
eq
(
"third_station_id"
,
ksolarStation
.
getStationId
()));
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
())
.
eq
(
"third_station_id"
,
ksolarStation
.
getStationId
()));
// 给户用光伏存储的数据赋值
if
(
ObjectUtils
.
isEmpty
(
jpStation
))
{
jpStation
=
new
JpStation
();
...
...
@@ -182,14 +188,15 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpStation
.
setPrice
(
ksolarStationDetail
.
getElecPrice
());
jpStation
.
setAddress
(
ksolarStationDetail
.
getStationAddressDetail
());
jpStation
.
setLongitude
(
ksolarStationDetail
.
getLongitude
());
jpStation
.
setOnGridType
(
"自发自用"
);
//
客户确认
jpStation
.
setRatedPower
(
4360.4
);
//
客户确认
jpStation
.
setOnGridType
(
"自发自用"
);
//
客户确认
jpStation
.
setRatedPower
(
4360.4
);
//
客户确认
jpStation
.
setLatitude
(
ksolarStationDetail
.
getLatitude
());
jpStation
.
setThirdCode
(
PVProducerInfoEnum
.
KSOLAR
.
getCode
());
// 业主姓名
jpStation
.
setUserName
(
ksolarStation
.
getUserName
());
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
.
setAccumulatedPower
(
ksolarStation
.
getTotalGeneration
());
...
...
@@ -229,7 +236,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// 业主电话
// 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
.
setRecDate
(
new
Date
());
...
...
@@ -239,10 +247,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpStationMapper
.
insert
(
jpStation
);
}
//增加td 电站区域公司,经销商绑定表
// 增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code",PVProducerInfoEnum.KSOLAR.getCode()).
// eq("third_station_id", ksolarStation.getStationId()));
...
...
@@ -271,21 +276,16 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpStationPowerHistory
.
setThirdCode
(
jpStation
.
getThirdCode
());
hygfjpStationPowerHistory
.
setTime
(
System
.
currentTimeMillis
());
//
新加
//
新加
hygfjpStationPowerHistory
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpStationPowerHistory
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpStationPowerHistory
.
setStationName
(
jpStation
.
getName
());
hygfjpStationPowerHistory
.
setStationState
(
jpStation
.
getState
());
hygfjpStationPowerHistoryMapper
.
insert
(
hygfjpStationPowerHistory
);
HYGFJPDayPower
hygfjpDayPower
=
hygfjpDayPowerMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPDayPower
>().
eq
(
"tation_id"
,
ksolarStation
.
getStationId
()).
eq
(
"year_month_day"
,
today
).
eq
(
"hour"
,
hour
)
);
HYGFJPDayPower
hygfjpDayPower
=
hygfjpDayPowerMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPDayPower
>().
eq
(
"tation_id"
,
ksolarStation
.
getStationId
())
.
eq
(
"year_month_day"
,
today
).
eq
(
"hour"
,
hour
));
if
(
ObjectUtils
.
isEmpty
(
hygfjpDayPower
))
{
hygfjpDayPower
=
new
HYGFJPDayPower
();
}
...
...
@@ -294,7 +294,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpDayPower
.
setYearMonthDay
(
today
);
hygfjpDayPower
.
setPower
(
ksolarStation
.
getPowerInter
());
//
新加
//
新加
hygfjpDayPower
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpDayPower
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpDayPower
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -310,9 +310,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
ksolarStationDetailsMapper
.
insert
(
ksolarStationDetail
);
Date
today1
=
new
Date
();
//
户用场站日发电量
TdHYGFStationDayGenerate
tdHYGFStationDayGenerate
=
tdHYGFStationDayGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationDayGenerate
>()
.
eq
(
"third_station_id"
,
stationId
)
//
户用场站日发电量
TdHYGFStationDayGenerate
tdHYGFStationDayGenerate
=
tdHYGFStationDayGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationDayGenerate
>()
.
eq
(
"third_station_id"
,
stationId
)
.
eq
(
"day_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM-dd"
))
.
eq
(
"year_month"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
)));
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationDayGenerate
))
{
...
...
@@ -325,7 +325,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationDayGenerate
.
setFullhour
(
jpStation
.
getDayGenerate
()
/
jpStation
.
getCapacity
());
tdHYGFStationDayGenerate
.
setIncome
(
jpStation
.
getDayIncome
());
//
新加
//
新加
tdHYGFStationDayGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationDayGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationDayGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -337,9 +337,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
}
else
{
tdHYGFStationDayGenerateMapper
.
insert
(
tdHYGFStationDayGenerate
);
}
//
户用场站月发电量
TdHYGFStationMonthGenerate
tdHYGFStationMonthGenerate
=
tdHYGFStationMonthGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationMonthGenerate
>()
.
eq
(
"third_station_id"
,
stationId
)
//
户用场站月发电量
TdHYGFStationMonthGenerate
tdHYGFStationMonthGenerate
=
tdHYGFStationMonthGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationMonthGenerate
>()
.
eq
(
"third_station_id"
,
stationId
)
.
eq
(
"month_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
))
.
eq
(
"year"
,
DateUtil
.
format
(
today1
,
"yyyy"
)));
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationMonthGenerate
))
{
...
...
@@ -352,7 +352,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationMonthGenerate
.
setFullhour
(
jpStation
.
getMonthGenerate
()
/
jpStation
.
getCapacity
());
tdHYGFStationMonthGenerate
.
setIncome
(
jpStation
.
getMonthIncome
());
//
新加
//
新加
tdHYGFStationMonthGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationMonthGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationMonthGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -364,9 +364,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
}
else
{
tdHYGFStationMonthGenerateMapper
.
insert
(
tdHYGFStationMonthGenerate
);
}
//
户用场站年发电量
TdHYGFStationYearGenerate
tdHYGFStationYearGenerate
=
tdHYGFStationYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationYearGenerate
>()
.
eq
(
"third_station_id"
,
stationId
)
//
户用场站年发电量
TdHYGFStationYearGenerate
tdHYGFStationYearGenerate
=
tdHYGFStationYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationYearGenerate
>()
.
eq
(
"third_station_id"
,
stationId
)
.
eq
(
"year_time"
,
DateUtil
.
format
(
today1
,
"yyyy"
))
.
eq
(
"year"
,
DateUtil
.
format
(
today1
,
"yyyy"
)));
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationYearGenerate
))
{
...
...
@@ -378,7 +378,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFStationYearGenerate
.
setGenerate
(
jpStation
.
getYearGenerate
());
tdHYGFStationYearGenerate
.
setFullhour
(
jpStation
.
getYearGenerate
()
/
jpStation
.
getCapacity
());
tdHYGFStationYearGenerate
.
setIncome
(
jpStation
.
getYearIncome
());
//
新加
//
新加
tdHYGFStationYearGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationYearGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationYearGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -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
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>(
1
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
String
url
=
KSolarConstant
.
stationEarnUrl
+
"?stationId="
+
stationId
;
List
<
KsolarStationEarn
>
ksolarStationEarns
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_data
,
KsolarStationEarn
.
class
);
List
<
KsolarStationEarn
>
ksolarStationEarns
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_data
,
KsolarStationEarn
.
class
);
if
(!
CollectionUtils
.
isEmpty
(
ksolarStationEarns
))
{
ksolarStationEarn
=
ksolarStationEarns
.
get
(
0
);
...
...
@@ -427,7 +424,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
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
);
try
{
TimeUnit
.
SECONDS
.
sleep
(
1
);
...
...
@@ -451,16 +448,15 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
attribId
=
"202"
;
stime
=
year
;
}
String
url
=
KSolarConstant
.
stationEarnChartUrl
+
"?stationId="
+
stationId
+
"&attribId="
+
attribId
+
"&stime="
+
stime
;
List
<
KsolarStationEarnChart
>
ksolarStationEarnCharts
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_arr
,
KsolarStationEarnChart
.
class
);
String
url
=
KSolarConstant
.
stationEarnChartUrl
+
"?stationId="
+
stationId
+
"&attribId="
+
attribId
+
"&stime="
+
stime
;
List
<
KsolarStationEarnChart
>
ksolarStationEarnCharts
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_arr
,
KsolarStationEarnChart
.
class
);
double
earnValues
=
0
;
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
))
{
map
.
put
(
"yearEarn"
,
earnValues
);
...
...
@@ -472,7 +468,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
@Scheduled
(
cron
=
"${dataRequstScheduled.keshida}"
)
@Override
@Async
public
void
collectorList
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------科士达同步采集器开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
String
>
stationIds
=
kSolarStationMapper
.
getStationIds
();
for
(
String
stationId
:
stationIds
)
{
LambdaQueryWrapper
<
KsolarStationList
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -488,24 +487,20 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
}
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>(
1
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
String
url
=
KSolarConstant
.
stationCollectListUrl
+
"?stationId="
+
ksolarStationList
.
getStationId
()
+
"&pageNumber=1&pageSize=200"
;
List
<
KsolarStationCollectList
>
result
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_rows
,
KsolarStationCollectList
.
class
);
String
url
=
KSolarConstant
.
stationCollectListUrl
+
"?stationId="
+
ksolarStationList
.
getStationId
()
+
"&pageNumber=1&pageSize=200"
;
List
<
KsolarStationCollectList
>
result
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_rows
,
KsolarStationCollectList
.
class
);
for
(
KsolarStationCollectList
ksolarStationCollectList
:
result
)
{
ksolarStationCollectList
.
setCreatedTime
(
System
.
currentTimeMillis
());
ksolarStationCollectList
.
setThirdStationId
(
ksolarStationList
.
getStationId
());
ksolarStationCollectListMapper
.
insert
(
ksolarStationCollectList
);
JpCollector
jpCollector
=
jpCollectorMapper
.
selectOne
(
new
QueryWrapper
<
JpCollector
>().
eq
(
"third_station_id"
,
ksolarStationCollectList
.
getThirdStationId
()).
eq
(
"sn_code"
,
ksolarStationCollectList
.
getCollectId
().
trim
()).
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()));
JpCollector
jpCollector
=
jpCollectorMapper
.
selectOne
(
new
QueryWrapper
<
JpCollector
>()
.
eq
(
"third_station_id"
,
ksolarStationCollectList
.
getThirdStationId
())
.
eq
(
"sn_code"
,
ksolarStationCollectList
.
getCollectId
().
trim
())
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()));
if
(
ObjectUtils
.
isEmpty
(
jpCollector
))
{
jpCollector
=
new
JpCollector
();
}
...
...
@@ -528,14 +523,14 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpCollector
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
// 第三方厂商标识
jpCollector
.
setThirdCode
(
PVProducerInfoEnum
.
KSOLAR
.
getCode
());
//
第三方厂商标识
//
第三方厂商标识
jpCollector
.
setState
(
KSolarConstant
.
collectStaus
.
get
(
ksolarStationCollectList
.
getStatus
()));
jpCollector
.
setStationName
(
ksolarStationCollectList
.
getStationName
());
jpCollector
.
setAddr
(
ksolarStationCollectList
.
getAddress
());
jpCollector
.
setName
(
ksolarStationCollectList
.
getCollectName
());
jpCollector
.
setVersion
(
ksolarStationCollectList
.
getCollectVersion
());
jpCollector
.
setType
(
ksolarStationCollectList
.
getDeviceModel
());
//
信号强度
//
信号强度
jpCollector
.
setSignalStrength
(
String
.
valueOf
(
ksolarStationCollectList
.
getSignal
()));
jpCollector
.
setRecDate
(
new
Date
());
if
(
ObjectUtils
.
isEmpty
(
jpCollector
.
getSequenceNbr
()))
{
...
...
@@ -554,21 +549,25 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
}
}
}
logger
.
info
(
"-------科士达同步采集器开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Scheduled
(
cron
=
"${dataRequstScheduled.keshida}"
)
@Override
@Async
public
void
collectorDetail
()
{
List
<
JpCollector
>
jpCollectorlist
=
jpCollectorMapper
.
selectList
(
new
QueryWrapper
<
JpCollector
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()));
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------科士达同步采集器详情/逆变器开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
List
<
JpCollector
>
jpCollectorlist
=
jpCollectorMapper
.
selectList
(
new
QueryWrapper
<
JpCollector
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()));
List
<
String
>
collectIds
=
ksolarStationCollectListMapper
.
getCollectIds
();
if
(!
CollectionUtils
.
isEmpty
(
collectIds
))
{
collectIds
.
forEach
(
collectId
->
{
LambdaQueryWrapper
<
KsolarStationCollectList
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
KsolarStationCollectList:
:
getCollectId
,
collectId
);
wrapper
.
orderByDesc
(
KsolarStationCollectList:
:
getCreatedTime
);
List
<
KsolarStationCollectList
>
ksolarStationCollectLists
=
ksolarStationCollectListMapper
.
selectList
(
wrapper
);
List
<
KsolarStationCollectList
>
ksolarStationCollectLists
=
ksolarStationCollectListMapper
.
selectList
(
wrapper
);
if
(!
CollectionUtils
.
isEmpty
(
ksolarStationCollectLists
))
{
KsolarStationCollectList
ksolarStationCollectList
=
ksolarStationCollectLists
.
get
(
0
);
try
{
...
...
@@ -579,31 +578,29 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>(
1
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
String
url
=
KSolarConstant
.
stationCollectDataUrl
+
"?collectId="
+
collectId
;
List
<
KsolarStationCollectData
>
result
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_data
,
KsolarStationCollectData
.
class
);
List
<
KsolarStationCollectData
>
result
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_data
,
KsolarStationCollectData
.
class
);
if
(
jpCollectorlist
!=
null
&&
jpCollectorlist
.
size
()
>
0
)
{
JpCollector
jpCollectorflag
=
null
;
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
;
break
;
}
}
if
(
jpCollectorflag
!=
null
)
{
//
离线状态
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"collector_sn_code"
,
jpCollectorflag
.
getSnCode
().
trim
())
);
//
离线状态
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>()
.
eq
(
"collector_sn_code"
,
jpCollectorflag
.
getSnCode
().
trim
())
);
if
(
ObjectUtils
.
isEmpty
(
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
.
setId
(
jpInverter
.
getId
());
jpInverter
.
setState
(
jpCollectorflag
.
getState
());
...
...
@@ -626,19 +623,17 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
if
(!
ObjectUtils
.
isEmpty
(
jpInverter
.
getSequenceNbr
()))
{
jpInverterMapper
.
updateById
(
jpInverter
);
}
else
{
if
(
StringUtils
.
isNotEmpty
(
jpInverter
.
getSnCode
()))
{
if
(
StringUtils
.
isNotEmpty
(
jpInverter
.
getSnCode
()))
{
jpInverterMapper
.
insert
(
jpInverter
);
}
}
for
(
int
k1
=
1
;
k1
<
13
;
k1
++)
{
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
jpInverter
.
getSnCode
().
trim
()).
eq
(
"type"
,
"直流"
).
eq
(
"name"
,
"PV"
+
k1
)
);
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
().
trim
()).
eq
(
"type"
,
"直流"
)
.
eq
(
"name"
,
"PV"
+
k1
));
if
(
ObjectUtils
.
isEmpty
(
jpInverterElectricity
))
{
jpInverterElectricity
=
new
JpInverterElectricity
();
}
...
...
@@ -658,11 +653,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
}
}
JpInverterElectricity
jpInverterElectricityR
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
jpInverter
.
getSnCode
().
trim
()).
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"RS"
)
);
JpInverterElectricity
jpInverterElectricityR
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
().
trim
()).
eq
(
"type"
,
"交流"
)
.
eq
(
"name"
,
"RS"
));
if
(
ObjectUtils
.
isEmpty
(
jpInverterElectricityR
))
{
jpInverterElectricityR
=
new
JpInverterElectricity
();
}
...
...
@@ -681,11 +675,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpInverterElectricityMapper
.
updateById
(
jpInverterElectricityR
);
}
JpInverterElectricity
jpInverterElectricityS
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
jpInverter
.
getSnCode
().
trim
()).
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"ST"
)
);
JpInverterElectricity
jpInverterElectricityS
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
().
trim
()).
eq
(
"type"
,
"交流"
)
.
eq
(
"name"
,
"ST"
));
if
(
ObjectUtils
.
isEmpty
(
jpInverterElectricityS
))
{
jpInverterElectricityS
=
new
JpInverterElectricity
();
}
...
...
@@ -703,12 +696,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpInverterElectricityMapper
.
updateById
(
jpInverterElectricityS
);
}
JpInverterElectricity
jpInverterElectricityT
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
jpInverter
.
getSnCode
().
trim
()).
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"TR"
)
);
JpInverterElectricity
jpInverterElectricityT
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
().
trim
()).
eq
(
"type"
,
"交流"
)
.
eq
(
"name"
,
"TR"
));
if
(
ObjectUtils
.
isEmpty
(
jpInverterElectricityT
))
{
jpInverterElectricityT
=
new
JpInverterElectricity
();
}
...
...
@@ -744,8 +735,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// 逆变器历史
String
today
=
DateUtil
.
today
();
HYGFJPInverterHistory
hygfjpInverterHistory
=
hygfjpInverterHistoryMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterHistory
>().
eq
(
"sn_code"
,
jpInverter
.
getSnCode
().
trim
()).
eq
(
"date"
,
today
));
HYGFJPInverterHistory
hygfjpInverterHistory
=
hygfjpInverterHistoryMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterHistory
>()
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
().
trim
()).
eq
(
"date"
,
today
));
if
(
ObjectUtils
.
isEmpty
(
hygfjpInverterHistory
))
{
hygfjpInverterHistory
=
new
HYGFJPInverterHistory
();
}
...
...
@@ -764,23 +756,20 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
}
else
{
hygfjpInverterHistoryMapper
.
insert
(
hygfjpInverterHistory
);
}
}
else
{
if
(!
CollectionUtils
.
isEmpty
(
result
))
{
result
.
forEach
(
ksolarStationCollectData
->
{
List
<
JpInverter
>
jpInverterList
=
jpInverterMapper
.
selectList
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_station_id"
,
ksolarStationCollectList
.
getThirdStationId
()).
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()).
like
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
().
trim
())
.
isNotNull
(
"sn_code"
)
.
orderByDesc
(
"update_time"
));
JpInverter
jpInverter
=
jpInverterList
.
get
(
0
);
if
(
ObjectUtils
.
isEmpty
(
jpInverter
))
{
jpInverter
=
new
JpInverter
();
List
<
JpInverter
>
jpInverterList
=
jpInverterMapper
.
selectList
(
new
QueryWrapper
<
JpInverter
>()
.
eq
(
"third_station_id"
,
ksolarStationCollectList
.
getThirdStationId
())
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
())
.
like
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
().
trim
())
.
isNotNull
(
"sn_code"
).
orderByDesc
(
"update_time"
));
JpInverter
jpInverter
=
new
JpInverter
();
if
(
jpInverterList
.
size
()
>
0
)
{
jpInverter
=
jpInverterList
.
get
(
0
);
}
// 品牌
// jpInverter.setBrand(inverterDetailDto.getName());
// 国标
...
...
@@ -791,19 +780,24 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// jpInverter.setCapacity();
if
(
jpCollectorlist
!=
null
&&
jpCollectorlist
.
size
()
>
0
)
{
for
(
JpCollector
jpCollector
:
jpCollectorlist
)
{
if
(
jpCollector
.
getSnCode
().
equals
(
ksolarStationCollectList
.
getCollectId
().
trim
()))
{
jpInverter
.
setCapacity
(
KSolarConstant
.
Capacity
.
get
(
StringUtils
.
lowerCase
(
jpCollector
.
getName
())));
if
(
jpCollector
.
getSnCode
()
.
equals
(
ksolarStationCollectList
.
getCollectId
().
trim
()))
{
jpInverter
.
setCapacity
(
KSolarConstant
.
Capacity
.
get
(
StringUtils
.
lowerCase
(
jpCollector
.
getName
())));
}
}
}
jpInverter
.
setSnCode
(
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
.
setCollectorSnCode
(
ksolarStationCollectList
.
getCollectId
().
trim
());
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
.
setMonthPowerGeneration
(
ksolarStationCollectData
.
getMonthGeneration
());
jpInverter
.
setYearPowerGeneration
(
ksolarStationCollectData
.
getYearGeneration
());
...
...
@@ -818,33 +812,37 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
if
(!
ObjectUtils
.
isEmpty
(
jpInverter
.
getSequenceNbr
()))
{
jpInverterMapper
.
updateById
(
jpInverter
);
}
else
{
if
(
StringUtils
.
isNotEmpty
(
jpInverter
.
getSnCode
()))
{
if
(
StringUtils
.
isNotEmpty
(
jpInverter
.
getSnCode
()))
{
jpInverterMapper
.
insert
(
jpInverter
);
}
}
String
jsonString
=
JSON
.
toJSONString
(
ksolarStationCollectData
);
Map
<
String
,
Object
>
hanlderResult
=
JSON
.
parseObject
(
jsonString
,
Map
.
class
);
for
(
int
k1
=
1
;
k1
<
13
;
k1
++)
{
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
().
trim
()).
eq
(
"type"
,
"直流"
).
eq
(
"name"
,
"PV"
+
k1
)
);
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
().
trim
())
.
eq
(
"type"
,
"直流"
).
eq
(
"name"
,
"PV"
+
k1
));
if
(
ObjectUtils
.
isEmpty
(
jpInverterElectricity
))
{
jpInverterElectricity
=
new
JpInverterElectricity
();
}
jpInverterElectricity
.
setInverterId
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricity
.
setSnCode
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricity
.
setInverterId
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricity
.
setSnCode
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricity
.
setThirdCode
(
PVProducerInfoEnum
.
KSOLAR
.
getCode
());
jpInverterElectricity
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
jpInverterElectricity
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
jpInverterElectricity
.
setType
(
"直流"
);
jpInverterElectricity
.
setName
(
"PV"
+
k1
);
jpInverterElectricity
.
setVoltage
(
Double
.
valueOf
(
hanlderResult
.
get
(
"voltagePv"
+
k1
).
toString
()));
jpInverterElectricity
.
setCurrent
(
Double
.
valueOf
(
hanlderResult
.
get
(
"currentPv"
+
k1
).
toString
()));
jpInverterElectricity
.
setPower
(
Double
.
valueOf
(
hanlderResult
.
get
(
"powerPv"
+
k1
).
toString
()));
jpInverterElectricity
.
setVoltage
(
Double
.
valueOf
(
hanlderResult
.
get
(
"voltagePv"
+
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
()))
{
jpInverterElectricityMapper
.
insert
(
jpInverterElectricity
);
}
else
{
...
...
@@ -852,18 +850,19 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
}
}
JpInverterElectricity
jpInverterElectricityR
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
().
trim
()).
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"RS"
)
);
JpInverterElectricity
jpInverterElectricityR
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
().
trim
())
.
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"RS"
));
if
(
ObjectUtils
.
isEmpty
(
jpInverterElectricityR
))
{
jpInverterElectricityR
=
new
JpInverterElectricity
();
}
jpInverterElectricityR
.
setInverterId
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricityR
.
setInverterId
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricityR
.
setSnCode
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricityR
.
setThirdCode
(
PVProducerInfoEnum
.
KSOLAR
.
getCode
());
jpInverterElectricityR
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
jpInverterElectricityR
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
jpInverterElectricityR
.
setFrequency
(
ksolarStationCollectData
.
getFrequencyRs
());
jpInverterElectricityR
.
setType
(
"交流"
);
jpInverterElectricityR
.
setName
(
"RS"
);
...
...
@@ -875,18 +874,19 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpInverterElectricityMapper
.
updateById
(
jpInverterElectricityR
);
}
JpInverterElectricity
jpInverterElectricityS
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
().
trim
()).
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"ST"
)
);
JpInverterElectricity
jpInverterElectricityS
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
().
trim
())
.
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"ST"
));
if
(
ObjectUtils
.
isEmpty
(
jpInverterElectricityS
))
{
jpInverterElectricityS
=
new
JpInverterElectricity
();
}
jpInverterElectricityS
.
setInverterId
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricityS
.
setInverterId
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricityS
.
setSnCode
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricityS
.
setThirdCode
(
PVProducerInfoEnum
.
KSOLAR
.
getCode
());
jpInverterElectricityS
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
jpInverterElectricityS
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
jpInverterElectricityS
.
setType
(
"交流"
);
jpInverterElectricityS
.
setName
(
"ST"
);
jpInverterElectricityS
.
setVoltage
(
ksolarStationCollectData
.
getVoltageSt
());
...
...
@@ -897,19 +897,19 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpInverterElectricityMapper
.
updateById
(
jpInverterElectricityS
);
}
JpInverterElectricity
jpInverterElectricityT
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
().
trim
()).
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"TR"
)
);
JpInverterElectricity
jpInverterElectricityT
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
().
trim
())
.
eq
(
"type"
,
"交流"
).
eq
(
"name"
,
"TR"
));
if
(
ObjectUtils
.
isEmpty
(
jpInverterElectricityT
))
{
jpInverterElectricityT
=
new
JpInverterElectricity
();
}
jpInverterElectricityT
.
setInverterId
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricityT
.
setInverterId
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricityT
.
setSnCode
(
ksolarStationCollectData
.
getInverterId
().
trim
());
jpInverterElectricityT
.
setThirdCode
(
PVProducerInfoEnum
.
KSOLAR
.
getCode
());
jpInverterElectricityT
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
jpInverterElectricityT
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
jpInverterElectricityT
.
setType
(
"交流"
);
jpInverterElectricityT
.
setName
(
"TR"
);
jpInverterElectricityT
.
setVoltage
(
ksolarStationCollectData
.
getVoltageTr
());
...
...
@@ -922,9 +922,11 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
//
HYGFJPInverterElecHistory
hygfjpInverterElecHistory
=
new
HYGFJPInverterElecHistory
();
hygfjpInverterElecHistory
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
hygfjpInverterElecHistory
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
hygfjpInverterElecHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterElecHistory
.
setSnCode
(
ksolarStationCollectData
.
getInverterId
().
trim
());
hygfjpInverterElecHistory
.
setSnCode
(
ksolarStationCollectData
.
getInverterId
().
trim
());
hygfjpInverterElecHistory
.
setUAcCurrent
(
ksolarStationCollectData
.
getCurrentR
());
hygfjpInverterElecHistory
.
setVAcCurrent
(
ksolarStationCollectData
.
getCurrents
());
...
...
@@ -938,8 +940,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// 逆变器历史
String
today
=
DateUtil
.
today
();
HYGFJPInverterHistory
hygfjpInverterHistory
=
hygfjpInverterHistoryMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterHistory
>().
eq
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
()).
eq
(
"date"
,
today
));
HYGFJPInverterHistory
hygfjpInverterHistory
=
hygfjpInverterHistoryMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPInverterHistory
>()
.
eq
(
"sn_code"
,
ksolarStationCollectData
.
getInverterId
())
.
eq
(
"date"
,
today
));
if
(
ObjectUtils
.
isEmpty
(
hygfjpInverterHistory
))
{
hygfjpInverterHistory
=
new
HYGFJPInverterHistory
();
}
...
...
@@ -947,11 +951,13 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// 满发小时数
// hygfjpInverterHistory.setGenerationHours(inverterDetailDto.getFullHour());
hygfjpInverterHistory
.
setDate
(
today
);
hygfjpInverterHistory
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
hygfjpInverterHistory
.
setThirdStationId
(
ksolarStationCollectList
.
getThirdStationId
());
hygfjpInverterHistory
.
setInverterId
(
ksolarStationCollectData
.
getInverterId
());
hygfjpInverterHistory
.
setSnCode
(
jpInverter
.
getSnCode
().
trim
());
hygfjpInverterHistory
.
setThirdCode
(
PVProducerInfoEnum
.
KSOLAR
.
getCode
());
hygfjpInverterHistory
.
setPowerGeneration
(
ksolarStationCollectData
.
getTotalGeneration
());
hygfjpInverterHistory
.
setPowerGeneration
(
ksolarStationCollectData
.
getTotalGeneration
());
if
(
ObjectUtils
.
isEmpty
(
hygfjpInverterHistory
.
getCreatedTime
()))
{
hygfjpInverterHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterHistoryMapper
.
insert
(
hygfjpInverterHistory
);
...
...
@@ -959,74 +965,89 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpInverterHistoryMapper
.
insert
(
hygfjpInverterHistory
);
}
//
-----------------------户用光伏日报表----------------------
//
-----------------------户用光伏日报表----------------------
TdHYGFInverterDayGenerate
tdHYGFInverterDayGenerate
=
new
TdHYGFInverterDayGenerate
();
tdHYGFInverterDayGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFInverterDayGenerate
.
setThirdStationId
(
jpInverter
.
getThirdStationId
());
tdHYGFInverterDayGenerate
.
setSnCode
(
jpInverter
.
getSnCode
());
tdHYGFInverterDayGenerate
.
setName
(
jpInverter
.
getName
());
tdHYGFInverterDayGenerate
.
setWorkStatus
(
jpInverter
.
getState
());
//
交流电压
//
交流电压
tdHYGFInverterDayGenerate
.
setDcv1
(
jpInverterElectricityR
.
getVoltage
());
tdHYGFInverterDayGenerate
.
setDcv2
(
jpInverterElectricityS
.
getVoltage
());
tdHYGFInverterDayGenerate
.
setDcv3
(
jpInverterElectricityT
.
getVoltage
());
//
交流电流
//
交流电流
// tdHYGFInverterDayGenerate.setDcv4(inverterDetailDto.getUAc4());
tdHYGFInverterDayGenerate
.
setDcc1
(
jpInverterElectricityR
.
getCurrent
());
tdHYGFInverterDayGenerate
.
setDcc2
(
jpInverterElectricityS
.
getCurrent
());
tdHYGFInverterDayGenerate
.
setDcc3
(
jpInverterElectricityT
.
getCurrent
());
// tdHYGFInverterDayGenerate.setDcc4(inverterDetailDto.getIAc4());
//直流电压
tdHYGFInverterDayGenerate
.
setAcv1
(
Double
.
valueOf
(
hanlderResult
.
get
(
"voltagePv1"
).
toString
()));
tdHYGFInverterDayGenerate
.
setAcv2
(
Double
.
valueOf
(
hanlderResult
.
get
(
"voltagePv2"
).
toString
()));
tdHYGFInverterDayGenerate
.
setAcv3
(
Double
.
valueOf
(
hanlderResult
.
get
(
"voltagePv3"
).
toString
()));
tdHYGFInverterDayGenerate
.
setAcv4
(
Double
.
valueOf
(
hanlderResult
.
get
(
"voltagePv4"
).
toString
()));
//直流电流
tdHYGFInverterDayGenerate
.
setAcc1
(
Double
.
valueOf
(
hanlderResult
.
get
(
"currentPv1"
).
toString
()));
tdHYGFInverterDayGenerate
.
setAcc2
(
Double
.
valueOf
(
hanlderResult
.
get
(
"currentPv2"
).
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
.
setAcv1
(
Double
.
valueOf
(
hanlderResult
.
get
(
"voltagePv1"
).
toString
()));
tdHYGFInverterDayGenerate
.
setAcv2
(
Double
.
valueOf
(
hanlderResult
.
get
(
"voltagePv2"
).
toString
()));
tdHYGFInverterDayGenerate
.
setAcv3
(
Double
.
valueOf
(
hanlderResult
.
get
(
"voltagePv3"
).
toString
()));
tdHYGFInverterDayGenerate
.
setAcv4
(
Double
.
valueOf
(
hanlderResult
.
get
(
"voltagePv4"
).
toString
()));
// 直流电流
tdHYGFInverterDayGenerate
.
setAcc1
(
Double
.
valueOf
(
hanlderResult
.
get
(
"currentPv1"
).
toString
()));
tdHYGFInverterDayGenerate
.
setAcc2
(
Double
.
valueOf
(
hanlderResult
.
get
(
"currentPv2"
).
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
.
setFrequency
(
String
.
valueOf
(
jpInverterElectricityR
.
getFrequency
()));
tdHYGFInverterDayGenerate
.
setFrequency
(
String
.
valueOf
(
jpInverterElectricityR
.
getFrequency
()));
// //功率因数
tdHYGFInverterDayGenerate
.
setPowerFactor
(
1.0
);
tdHYGFInverterDayGenerate
.
setDayGen
(
jpInverter
.
getDayPowerGeneration
());
tdHYGFInverterDayGenerate
.
setMonthGen
(
jpInverter
.
getMonthPowerGeneration
());
tdHYGFInverterDayGenerate
.
setYearGen
(
jpInverter
.
getYearPowerGeneration
());
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
.
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
())));
//电站区域经销商,
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()).
eq
(
"third_station_id"
,
String
.
valueOf
(
jpInverter
.
getThirdStationId
())));
if
(
jpStation
!=
null
){
if
(
jpStation
!=
null
)
{
tdHYGFInverterDayGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterDayGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterDayGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterDayGenerate
.
setStationName
(
jpStation
.
getName
());
tdHYGFInverterDayGenerate
.
setStationState
(
jpStation
.
getState
());
}
tdHYGFInverterDayGenerateMapper
.
insert
(
tdHYGFInverterDayGenerate
);
//
户用场站月发电量
//
户用场站月发电量
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
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"day_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM-dd"
))
...
...
@@ -1041,11 +1062,13 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFInverterMonthGenerate
.
setGenerate
(
jpInverter
.
getDayPowerGeneration
());
tdHYGFInverterMonthGenerate
.
setName
(
jpInverter
.
getName
());
tdHYGFInverterMonthGenerate
.
setFullhour
(
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
());
//新加
if
(
jpStation
!=
null
){
tdHYGFInverterMonthGenerate
.
setFullhour
(
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
());
// 新加
if
(
jpStation
!=
null
)
{
tdHYGFInverterMonthGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterMonthGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterMonthGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterMonthGenerate
.
setStationName
(
jpStation
.
getName
());
tdHYGFInverterMonthGenerate
.
setStationState
(
jpStation
.
getState
());
...
...
@@ -1057,8 +1080,9 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
}
else
{
tdHYGFInverterMonthGenerateMapper
.
insert
(
tdHYGFInverterMonthGenerate
);
}
//户用场站年发电量
TdHYGFInverterYearGenerate
tdHYGFInverterYearGenerate
=
tdHYGFInverterYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterYearGenerate
>()
// 户用场站年发电量
TdHYGFInverterYearGenerate
tdHYGFInverterYearGenerate
=
tdHYGFInverterYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterYearGenerate
>()
.
eq
(
"third_station_id"
,
jpInverter
.
getThirdStationId
())
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"month_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
))
...
...
@@ -1073,26 +1097,28 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFInverterYearGenerate
.
setGenerate
(
jpInverter
.
getMonthPowerGeneration
());
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
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterYearGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterYearGenerate
.
setStationName
(
jpStation
.
getName
());
tdHYGFInverterYearGenerate
.
setStationState
(
jpStation
.
getState
());
}
if
(
ObjectUtils
.
isEmpty
(
tdHYGFInverterYearGenerate
.
getCreatedTime
()))
{
tdHYGFInverterYearGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFInverterYearGenerateMapper
.
insert
(
tdHYGFInverterYearGenerate
);
}
else
{
tdHYGFInverterYearGenerateMapper
.
insert
(
tdHYGFInverterYearGenerate
);
}
//户用场站年发电量
TdHYGFInverterTotalGenerate
tdHYGFInverterTotalGenerate
=
tdHYGFInverterTotalGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterTotalGenerate
>()
// 户用场站年发电量
TdHYGFInverterTotalGenerate
tdHYGFInverterTotalGenerate
=
tdHYGFInverterTotalGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterTotalGenerate
>()
.
eq
(
"third_station_id"
,
jpInverter
.
getThirdStationId
())
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"year_time"
,
DateUtil
.
format
(
today1
,
"yyyy"
))
...
...
@@ -1107,15 +1133,17 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
tdHYGFInverterTotalGenerate
.
setGenerate
(
jpInverter
.
getYearPowerGeneration
());
tdHYGFInverterTotalGenerate
.
setFullhour
(
0.0d
);
tdHYGFInverterTotalGenerate
.
setName
(
jpInverter
.
getName
());
//
新加
if
(
jpStation
!=
null
)
{
//
新加
if
(
jpStation
!=
null
)
{
tdHYGFInverterTotalGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterTotalGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterTotalGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterTotalGenerate
.
setStationName
(
jpStation
.
getName
());
tdHYGFInverterTotalGenerate
.
setStationState
(
jpStation
.
getState
());
}
tdHYGFInverterTotalGenerate
.
setFullhour
(
jpInverter
.
getYearPowerGeneration
()
/
jpInverter
.
getCapacity
());
tdHYGFInverterTotalGenerate
.
setFullhour
(
jpInverter
.
getYearPowerGeneration
()
/
jpInverter
.
getCapacity
());
if
(
ObjectUtils
.
isEmpty
(
tdHYGFInverterTotalGenerate
.
getCreatedTime
()))
{
tdHYGFInverterTotalGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFInverterTotalGenerateMapper
.
insert
(
tdHYGFInverterTotalGenerate
);
...
...
@@ -1125,13 +1153,10 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
});
}
}
}
// if (!CollectionUtils.isEmpty(result)) {
// result.forEach(ksolarStationCollectData -> {
// JpInverter jpInverter = jpInverterMapper.selectOne(new QueryWrapper<JpInverter>().
...
...
@@ -1327,6 +1352,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
// } catch (ParseException e) {
// e.printStackTrace();
// }
logger
.
info
(
"-------科士达同步采集器详情/逆变器结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
@Override
...
...
@@ -1338,20 +1364,21 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
public
void
inverterDetail
()
{
}
@Scheduled
(
cron
=
"${dataRequstScheduled.keshida}"
)
@Override
@Async
public
void
inverAlramInfo
()
{
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------科士达同步告警开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
try
{
TimeUnit
.
SECONDS
.
sleep
(
1
);
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
}
List
<
JpInverter
>
ksdInverterList
=
jpInverterMapper
.
selectList
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()));
ksdInverterList
=
ksdInverterList
.
stream
().
filter
(
jpInverter
->
!
ObjectUtils
.
isEmpty
(
jpInverter
.
getSnCode
())).
collect
(
Collectors
.
toList
());
List
<
JpInverter
>
ksdInverterList
=
jpInverterMapper
.
selectList
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()));
ksdInverterList
=
ksdInverterList
.
stream
().
filter
(
jpInverter
->
!
ObjectUtils
.
isEmpty
(
jpInverter
.
getSnCode
()))
.
collect
(
Collectors
.
toList
());
Map
<
String
,
String
>
ksdInverterListMap
=
new
HashMap
<>();
ksdInverterList
.
forEach
(
jpInverter
->
{
...
...
@@ -1362,13 +1389,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
HashMap
<
String
,
Object
>
requestInfo
=
new
HashMap
<>(
1
);
String
requestParaminfo
=
JSON
.
toJSONString
(
requestInfo
);
String
url
=
KSolarConstant
.
stationCollectAlarmUrl
+
"?pageNumber=1&pageSize=200"
;
List
<
KsolarAlarmDto
>
result
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_rows
,
KsolarAlarmDto
.
class
);
List
<
KsolarAlarmDto
>
result
=
kSolarRequestUtil
.
getResPonse
(
url
,
KSolarConstant
.
requestGET
,
requestParaminfo
,
KSolarConstant
.
resovle_rows
,
KsolarAlarmDto
.
class
);
if
(!
CollectionUtils
.
isEmpty
(
result
))
{
for
(
KsolarAlarmDto
ksolarAlarmDto
:
result
)
{
if
(!
ObjectUtils
.
isEmpty
(
ksolarAlarmDto
.
getInverterId
()))
{
...
...
@@ -1383,12 +1405,12 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
if
(
ObjectUtils
.
isEmpty
(
snCode
))
{
continue
;
}
List
<
HYGFJPInverterWarn
>
list
=
hygfjpInverterWarnMapper
.
selectList
(
new
QueryWrapper
<
HYGFJPInverterWarn
>()
.
eq
(
"sn_code"
,
snCode
)
.
eq
(
"start_time"
,
DateUtil
.
parse
(
ksolarAlarmDto
.
getSaveTime
(),
DatePattern
.
NORM_DATETIME_PATTERN
).
getTime
())
List
<
HYGFJPInverterWarn
>
list
=
hygfjpInverterWarnMapper
.
selectList
(
new
QueryWrapper
<
HYGFJPInverterWarn
>().
eq
(
"sn_code"
,
snCode
).
eq
(
"start_time"
,
DateUtil
.
parse
(
ksolarAlarmDto
.
getSaveTime
(),
DatePattern
.
NORM_DATETIME_PATTERN
)
.
getTime
())
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
())
.
eq
(
"third_station_id"
,
ksolarAlarmDto
.
getStationId
())
);
.
eq
(
"third_station_id"
,
ksolarAlarmDto
.
getStationId
()));
HYGFJPInverterWarn
hygfjpInverterWarn
=
new
HYGFJPInverterWarn
();
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
hygfjpInverterWarn
=
list
.
get
(
0
);
...
...
@@ -1401,19 +1423,18 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpInverterWarn
.
setContent
(
ksolarAlarmDto
.
getMessage
());
hygfjpInverterWarn
.
setThirdCode
(
PVProducerInfoEnum
.
KSOLAR
.
getCode
());
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
.
setTimeLong
(
null
);
hygfjpInverterWarn
.
setRecoverTime
(
null
);
// 电站区域经销商,
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
())
.
eq
(
"third_station_id"
,
ksolarAlarmDto
.
getStationId
()));
//电站区域经销商,
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()).
eq
(
"third_station_id"
,
ksolarAlarmDto
.
getStationId
()));
if
(
jpStation
!=
null
){
if
(
jpStation
!=
null
)
{
hygfjpInverterWarn
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpInverterWarn
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpInverterWarn
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -1421,13 +1442,14 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
}
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
()))
{
hygfjpInverterWarn
.
setTimeLong
(
hygfjpInverterWarn
.
getRecoverTime
()
-
hygfjpInverterWarn
.
getStartTime
());
if
(!
ObjectUtils
.
isEmpty
(
ksolarAlarmDto
.
getSaveTime
())
&&
!
ObjectUtils
.
isEmpty
(
ksolarAlarmDto
.
getRemoveTime
()))
{
hygfjpInverterWarn
.
setTimeLong
(
hygfjpInverterWarn
.
getRecoverTime
()
-
hygfjpInverterWarn
.
getStartTime
());
}
if
(
ObjectUtils
.
isEmpty
(
hygfjpInverterWarn
.
getCreatedTime
()))
{
hygfjpInverterWarn
.
setCreatedTime
(
System
.
currentTimeMillis
());
...
...
@@ -1439,5 +1461,6 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
}
}
logger
.
info
(
"-------科士达同步告警结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/SofarDataAcquisitionServiceImpl.java
View file @
60f881c8
...
...
@@ -112,7 +112,6 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
@Override
@Scheduled
(
cron
=
"${dataRequstScheduled.Sofar}"
)
@PostConstruct
public
void
stationList
()
{
Map
<
String
,
Object
>
requestInfo
=
new
HashMap
<>();
requestInfo
.
put
(
"page"
,
1
);
...
...
@@ -1199,15 +1198,15 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
requestInfo
.
put
(
"stationId"
,
jpStation
.
getThirdStationId
());
if
(
jpStation
.
getThirdStationId
().
equals
(
"517021808701218816"
)){
System
.
out
.
println
(
"6666666666666666666666666"
);
}
//
if (jpStation.getThirdStationId().equals("517021808701218816")){
//
System.out.println("6666666666666666666666666");
//
}
String
param
=
JSON
.
toJSONString
(
requestInfo
);
List
<
SofarWarm
>
jsonObject2
=
requestUtil
.
getResPonse
(
SoFarConstant
.
alert
,
SoFarConstant
.
requestPost
,
param
,
SoFarConstant
.
stationAlertItems
,
SofarWarm
.
class
);
if
(
jsonObject2
!=
null
&&
jsonObject2
.
size
()
>
0
)
{
System
.
out
.
println
(
"88888888888888888888888"
);
}
//
if (jsonObject2 != null && jsonObject2.size() > 0) {
//
System.out.println("88888888888888888888888");
//
}
for
(
SofarWarm
sofarWarm
:
jsonObject2
)
{
if
(
sofarWarm
.
getDeviceType
().
equals
(
"INVERTER"
)
||
sofarWarm
.
getDeviceType
().
equals
(
"COLLECTOR"
))
{
HYGFJPInverterWarn
hygfjpInverterWarn
=
new
HYGFJPInverterWarn
();
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/SunlightServiceImpl.java
View file @
60f881c8
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
service
.
impl
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSONArray
;
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.constant.ImasterConstant
;
import
com.yeejoin.amos.api.householdapi.constant.KSolarConstant
;
...
...
@@ -28,6 +29,8 @@ import com.yeejoin.amos.api.householdapi.face.service.SunlightService;
import
com.yeejoin.amos.openapi.enums.PVProducerInfoEnum
;
import
fastjson.JSON
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.scheduling.annotation.Async
;
...
...
@@ -50,7 +53,6 @@ import java.util.stream.Collectors;
@Service
public
class
SunlightServiceImpl
implements
SunlightService
{
@Autowired
SunlightMapper
sunlightMapper
;
...
...
@@ -62,7 +64,7 @@ public class SunlightServiceImpl implements SunlightService {
@Autowired
private
JpInverterMapper
jpInverterMapper
;
//
监盘逆变器电量mapper
//
监盘逆变器电量mapper
@Autowired
private
JpInverterElectricityMapper
jpInverterElectricityMapper
;
@Autowired
...
...
@@ -81,7 +83,7 @@ public class SunlightServiceImpl implements SunlightService {
private
TdHYGFInverterTotalGenerateMapper
tdHYGFInverterTotalGenerateMapper
;
@Autowired
ApplicationContext
applicationContext
;
//
户用光伏逆变器告警
//
户用光伏逆变器告警
@Autowired
private
HYGFJPInverterWarnMapper
hygfjpInverterWarnMapper
;
@Autowired
...
...
@@ -92,212 +94,229 @@ public class SunlightServiceImpl implements SunlightService {
TdJpStationMapper
tdJpStationMapper
;
@Autowired
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
@Scheduled
(
cron
=
"${dataRequstScheduled.Sunlight}"
)
@Async
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
(
"size"
,
3000
);
bodyparam
.
put
(
"curPage"
,
1
);
JSONObject
data
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getPowerStationList
,
bodyparam
);
JSONObject
data
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getPowerStationList
,
bodyparam
);
List
<
Sunlight
>
list
=
JSONArray
.
parseArray
(
JSON
.
toJSONString
(
data
.
get
(
"pageList"
)),
Sunlight
.
class
);
this
.
stationDetail
(
data
);
for
(
Sunlight
sunlight
:
list
)
{
sunlight
.
setCreatedTime
(
System
.
currentTimeMillis
());
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
<
JpStation
>
jpStations
=
jpStationMapper
.
selectList
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
()));
//
业务表场站
List
<
JpStation
>
jpStations
=
jpStationMapper
.
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
)
{
bodyparam
.
put
(
jpStation
.
getThirdStationId
(),
jpStation
);
bodyparam
.
put
(
jpStation
.
getThirdStationId
(),
jpStation
);
}
}
//封装电站数据
// 封装电站数据
// for (SunlightDto sunlightDto : list) {
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
SunlightDto
sunlightDto
=
list
.
get
(
i
);
SunlightDto
sunlightDto
=
list
.
get
(
i
);
// if(i==160){
// System.out.println("22222");
// }
// System.out.println(i+"====================================================");
JpStation
jpStation
=
null
;
JpStation
jpStation
=
null
;
if
(
bodyparam
.
containsKey
(
sunlightDto
.
getPs_id
().
toString
())){
jpStation
=
bodyparam
.
get
(
sunlightDto
.
getPs_id
().
toString
());
}
else
{
jpStation
=
new
JpStation
();
if
(
bodyparam
.
containsKey
(
sunlightDto
.
getPs_id
().
toString
()))
{
jpStation
=
bodyparam
.
get
(
sunlightDto
.
getPs_id
().
toString
());
}
else
{
jpStation
=
new
JpStation
();
}
jpStation
.
setThirdStationId
(
sunlightDto
.
getPs_id
().
toString
());
jpStation
.
setName
(
sunlightDto
.
getPs_name
());
jpStation
.
setAddress
(
sunlightDto
.
getPs_location
());
jpStation
.
setLongitude
((
"null"
.
equals
(
sunlightDto
.
getLongitude
())||(
sunlightDto
.
getLongitude
()==
null
)||
"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
.
setLongitude
((
"null"
.
equals
(
sunlightDto
.
getLongitude
())
||
(
sunlightDto
.
getLongitude
()
==
null
)
||
"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
.
setOnGridType
(
SunlightUtil
.
intoNetWorkStatus
.
get
(
String
.
valueOf
(
sunlightDto
.
getConnect_type
())));
//
第三方厂商标识
//
第三方厂商标识
jpStation
.
setThirdCode
(
PVProducerInfoEnum
.
YG
.
getCode
());
jpStation
.
setRecDate
(
new
Date
());
//
获取单个电站详情
Map
<
String
,
Object
>
bodyparamf
=
new
HashMap
<>();
//
获取单个电站详情
Map
<
String
,
Object
>
bodyparamf
=
new
HashMap
<>();
bodyparamf
.
put
(
"ps_id"
,
sunlightDto
.
getPs_id
().
toString
());
JSONObject
jsonObject
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getPowerStationDetail
,
bodyparamf
);
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
.
setEmail
(
jsonObject
.
get
(
"email"
)!=
null
?
jsonObject
.
get
(
"email"
).
toString
():
null
);
// 邮箱
jpStation
.
setUserPhone
(
jsonObject
.
get
(
"user_moble_tel"
)!=
null
?
jsonObject
.
get
(
"user_moble_tel"
).
toString
():
null
);
//业主电话
jpStation
.
setCreateTime
(
jsonObject
.
get
(
"install_date"
)!=
null
?
DateUtil
.
parse
(
jsonObject
.
get
(
"install_date"
)+
""
,
"yyyy-MM-dd HH:mm:ss"
)
:
null
);
// 创建时间
jpStation
.
setType
(
"家庭户用"
);
//电站类型
JSONObject
jsonObject
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getPowerStationDetail
,
bodyparamf
);
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
.
setEmail
(
jsonObject
.
get
(
"email"
)
!=
null
?
jsonObject
.
get
(
"email"
).
toString
()
:
null
);
// 邮箱
jpStation
.
setUserPhone
(
jsonObject
.
get
(
"user_moble_tel"
)
!=
null
?
jsonObject
.
get
(
"user_moble_tel"
).
toString
()
:
null
);
// 业主电话
jpStation
.
setCreateTime
(
jsonObject
.
get
(
"install_date"
)
!=
null
?
DateUtil
.
parse
(
jsonObject
.
get
(
"install_date"
)
+
""
,
"yyyy-MM-dd HH:mm:ss"
)
:
null
);
// 创建时间
jpStation
.
setType
(
"家庭户用"
);
// 电站类型
// jpStation.setArea();//地区
jpStation
.
setPrice
(
1.0
);
//
上网电价
jpStation
.
setPrice
(
1.0
);
//
上网电价
// jpStation.setOnGridTime(); // 并网时间
// jpStation.setAccessTime();// 接入平台时间
// jpStation.setStationContact();// 电站联系人
// 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
();
jpStation
.
setCapacity
(
map
!=
null
&&
map
.
get
(
"unit"
)!=
null
?
SunlightUtil
.
zj
.
get
(
String
.
valueOf
(
map
.
get
(
"unit"
)))*
Double
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"value"
))):
null
);
//装机容量
Map
<
String
,
String
>
map1
=
sunlightDto
.
getCurr_power
();
if
(
map1
!=
null
&&
map1
.
get
(
"unit"
)
!=
null
&&
!
map1
.
get
(
"unit"
).
isEmpty
()
&&
!
"--"
.
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
();
jpStation
.
setRealTimePower
(
map1
!=
null
&&
map1
.
get
(
"unit"
)!=
null
?
SunlightUtil
.
GL
.
get
(
String
.
valueOf
(
map1
.
get
(
"unit"
)))*
Double
.
valueOf
(
String
.
valueOf
(
map1
.
get
(
"value"
))):
null
);
//实时功率
Map
<
String
,
String
>
map3
=
sunlightDto
.
getTotal_energy
();
if
(
map3
!=
null
&&
map3
.
get
(
"unit"
)
!=
null
&&
!
map3
.
get
(
"unit"
).
isEmpty
()
&&
!
"--"
.
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
();
jpStation
.
setDayGenerate
(
map2
!=
null
&&
map2
.
get
(
"unit"
)!=
null
?
SunlightUtil
.
fd
.
get
(
String
.
valueOf
(
map2
.
get
(
"unit"
)))*
Double
.
valueOf
(
String
.
valueOf
(
map2
.
get
(
"value"
))):
null
);
//日发电量
Map
<
String
,
String
>
map3
=
sunlightDto
.
getTotal_energy
();
jpStation
.
setAccumulatedPower
(
map3
!=
null
&&
map3
.
get
(
"unit"
)!=
null
?
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
>
map4
=
sunlightDto
.
getToday_income
();
if
(
map4
!=
null
&&
map4
.
get
(
"unit"
)
!=
null
&&
!
map4
.
get
(
"unit"
).
isEmpty
()
&&
!
"--"
.
equals
(
map4
.
get
(
"value"
)))
{
jpStation
.
setDayIncome
(
SunlightUtil
.
sy
.
get
(
String
.
valueOf
(
map4
.
get
(
"unit"
)))
*
Double
.
valueOf
(
String
.
valueOf
(
map4
.
get
(
"value"
))));
// 日收益
}
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
<>();
List
<
String
>
lif11
=
new
ArrayList
<>();
//
获取电站下通讯模块
Map
<
String
,
Object
>
bodyparamjp11
=
new
HashMap
<>();
List
<
String
>
lif11
=
new
ArrayList
<>();
lif11
.
add
(
"22"
);
bodyparamjp11
.
put
(
"ps_id"
,
sunlightDto
.
getPs_id
().
toString
());
bodyparamjp11
.
put
(
"size"
,
3000
);
bodyparamjp11
.
put
(
"curPage"
,
1
);
bodyparamjp11
.
put
(
"device_type_list"
,
lif11
);
JSONObject
jsonObject1data11
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getDeviceList
,
bodyparamjp11
);
List
<
Device
>
listdtx
=
JSONArray
.
parseArray
(
JSON
.
toJSONString
(
jsonObject1data11
.
get
(
"pageList"
)),
Device
.
class
);
//获取电站下逆变器
Map
<
String
,
Object
>
bodyparamjp
=
new
HashMap
<>();
List
<
String
>
lif
=
new
ArrayList
<>();
bodyparamjp11
.
put
(
"device_type_list"
,
lif11
);
JSONObject
jsonObject1data11
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getDeviceList
,
bodyparamjp11
);
List
<
Device
>
listdtx
=
JSONArray
.
parseArray
(
JSON
.
toJSONString
(
jsonObject1data11
.
get
(
"pageList"
)),
Device
.
class
);
// 获取电站下逆变器
Map
<
String
,
Object
>
bodyparamjp
=
new
HashMap
<>();
List
<
String
>
lif
=
new
ArrayList
<>();
lif
.
add
(
"1"
);
bodyparamjp
.
put
(
"ps_id"
,
sunlightDto
.
getPs_id
().
toString
());
bodyparamjp
.
put
(
"size"
,
3000
);
bodyparamjp
.
put
(
"curPage"
,
1
);
bodyparamjp
.
put
(
"device_type_list"
,
lif
);
JSONObject
jsonObject1data
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getDeviceList
,
bodyparamjp
);
List
<
Device
>
listd
=
JSONArray
.
parseArray
(
JSON
.
toJSONString
(
jsonObject1data
.
get
(
"pageList"
)),
Device
.
class
);
bodyparamjp
.
put
(
"device_type_list"
,
lif
);
JSONObject
jsonObject1data
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getDeviceList
,
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
());
Calendar
calendar
=
Calendar
.
getInstance
();
int
year
=
calendar
.
get
(
Calendar
.
YEAR
);
int
month
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
bodyparamnb
.
put
(
"ps_key_list"
,
li
);
bodyparamnb
.
put
(
"start_time"
,
year
+
""
+
(
month
<
10
?
"0"
+
month
:
month
)
);
bodyparamnb
.
put
(
"end_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
(
"data_type"
,
"4"
);
bodyparamnb
.
put
(
"order"
,
"0"
);
bodyparamnb
.
put
(
"query_type"
,
"2"
);
bodyparamnb
.
put
(
"data_point"
,
"p1"
);
JSONObject
jsonObject1nb
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getDevicePointsDayMonthYearDataList
,
bodyparamnb
);
JSONObject
jsonObject1nb
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getDevicePointsDayMonthYearDataList
,
bodyparamnb
);
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
)
{
//获取电站,年发电量
if
(
listd
!=
null
&&
listd
.
size
()>
0
){
Map
<
String
,
Object
>
bodyparamnb
=
new
HashMap
<>();
List
<
String
>
li
=
new
ArrayList
<>();
Map
<
String
,
Object
>
bodyparamnb
=
new
HashMap
<>();
List
<
String
>
li
=
new
ArrayList
<>();
li
.
add
(
listd
.
get
(
0
).
getPs_key
());
Calendar
calendar
=
Calendar
.
getInstance
();
...
...
@@ -305,38 +324,28 @@ public class SunlightServiceImpl implements SunlightService {
int
month
=
calendar
.
get
(
Calendar
.
MONTH
)
+
1
;
bodyparamnb
.
put
(
"ps_key_list"
,
li
);
bodyparamnb
.
put
(
"start_time"
,
year
+
""
);
bodyparamnb
.
put
(
"start_time"
,
year
+
""
);
bodyparamnb
.
put
(
"end_time"
,
year
+
""
);
bodyparamnb
.
put
(
"data_type"
,
"4"
);
bodyparamnb
.
put
(
"order"
,
"0"
);
bodyparamnb
.
put
(
"query_type"
,
"3"
);
bodyparamnb
.
put
(
"data_point"
,
"p1"
);
JSONObject
jsonObject1nb
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getDevicePointsDayMonthYearDataList
,
bodyparamnb
);
JSONObject
jsonObject1nb
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getDevicePointsDayMonthYearDataList
,
bodyparamnb
);
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
);
if
(!
ObjectUtils
.
isEmpty
(
jpStation
.
getSequenceNbr
()))
{
jpStationMapper
.
updateById
(
jpStation
);
}
else
{
jpStationMapper
.
insert
(
jpStation
);
}
jpStation
.
setYearIncome
(
js
!=
null
?
Double
.
valueOf
(
js
.
get
(
0
).
get
(
"4"
)
+
""
)
/
1000
:
null
);
String
today
=
DateUtil
.
today
();
String
hour
=
new
Date
().
getHours
()
+
":00"
;
HYGFJPDayPower
hygfjpDayPower
=
hygfjpDayPowerMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPDayPower
>().
eq
(
"tation_id"
,
sunlightDto
.
getPs_id
().
toString
()).
eq
(
"year_month_day"
,
today
).
eq
(
"hour"
,
hour
)
);
HYGFJPDayPower
hygfjpDayPower
=
hygfjpDayPowerMapper
.
selectOne
(
new
QueryWrapper
<
HYGFJPDayPower
>().
eq
(
"tation_id"
,
sunlightDto
.
getPs_id
().
toString
())
.
eq
(
"year_month_day"
,
today
).
eq
(
"hour"
,
hour
));
if
(
ObjectUtils
.
isEmpty
(
hygfjpDayPower
))
{
hygfjpDayPower
=
new
HYGFJPDayPower
();
}
...
...
@@ -344,7 +353,7 @@ public class SunlightServiceImpl implements SunlightService {
hygfjpDayPower
.
setHour
(
hour
);
hygfjpDayPower
.
setYearMonthDay
(
today
);
hygfjpDayPower
.
setPower
(
jpStation
.
getRealTimePower
());
//
新加
//
新加
hygfjpDayPower
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpDayPower
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpDayPower
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -357,7 +366,6 @@ public class SunlightServiceImpl implements SunlightService {
hygfjpDayPowerMapper
.
insert
(
hygfjpDayPower
);
}
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
...
...
@@ -365,20 +373,15 @@ public class SunlightServiceImpl implements SunlightService {
hygfjpStationPowerHistory
.
setThirdCode
(
jpStation
.
getThirdCode
());
hygfjpStationPowerHistory
.
setTime
(
System
.
currentTimeMillis
());
//新加
// 新加
hygfjpStationPowerHistory
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpStationPowerHistory
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpStationPowerHistory
.
setStationName
(
jpStation
.
getName
());
hygfjpStationPowerHistory
.
setStationState
(
jpStation
.
getState
());
hygfjpStationPowerHistoryMapper
.
insert
(
hygfjpStationPowerHistory
);
//增加td 电站区域公司,经销商绑定表
// 增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code", PVProducerInfoEnum.YG.getCode()).
// eq("third_station_id", jpStation.getThirdStationId()));
...
...
@@ -398,19 +401,23 @@ public class SunlightServiceImpl implements SunlightService {
// tdJpStation.setCreatedTime(System.currentTimeMillis());
// tdJpStationMapper.insert(tdJpStation);
// }
}
this
.
setJpInverte
(
listd
,
jpStation
,
listdtx
);
this
.
collectorDetail
(
listd
,
jpStation
);
if
(!
ObjectUtils
.
isEmpty
(
jpStation
.
getSequenceNbr
()))
{
jpStationMapper
.
updateById
(
jpStation
);
}
else
{
jpStationMapper
.
insert
(
jpStation
);
}
this
.
setJpInverte
(
listd
,
jpStation
,
listdtx
);
this
.
collectorDetail
(
listd
,
jpStation
);
//
电站报表
//
户用场站日发电量
//
电站报表
//
户用场站日发电量
Date
today1
=
new
Date
();
TdHYGFStationDayGenerate
tdHYGFStationDayGenerate
=
tdHYGFStationDayGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationDayGenerate
>()
.
eq
(
"third_station_id"
,
jpStation
.
getThirdStationId
()
)
TdHYGFStationDayGenerate
tdHYGFStationDayGenerate
=
tdHYGFStationDayGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationDayGenerate
>().
eq
(
"third_station_id"
,
jpStation
.
getThirdStationId
()
)
.
eq
(
"day_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM-dd"
))
.
eq
(
"year_month"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
)));
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationDayGenerate
))
{
...
...
@@ -422,29 +429,29 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFStationDayGenerate
.
setGenerate
(
jpStation
.
getDayGenerate
());
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
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationDayGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationDayGenerate
.
setStationName
(
jpStation
.
getName
());
tdHYGFStationDayGenerate
.
setStationState
(
jpStation
.
getState
());
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationDayGenerate
.
getCreatedTime
()))
{
tdHYGFStationDayGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFStationDayGenerateMapper
.
insert
(
tdHYGFStationDayGenerate
);
}
else
{
tdHYGFStationDayGenerateMapper
.
insert
(
tdHYGFStationDayGenerate
);
}
//
户用场站月发电量
TdHYGFStationMonthGenerate
tdHYGFStationMonthGenerate
=
tdHYGFStationMonthGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationMonthGenerate
>()
.
eq
(
"third_station_id"
,
jpStation
.
getThirdStationId
())
//
户用场站月发电量
TdHYGFStationMonthGenerate
tdHYGFStationMonthGenerate
=
tdHYGFStationMonthGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationMonthGenerate
>()
.
eq
(
"third_station_id"
,
jpStation
.
getThirdStationId
())
.
eq
(
"month_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
))
.
eq
(
"year"
,
DateUtil
.
format
(
today1
,
"yyyy"
)));
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationMonthGenerate
))
{
...
...
@@ -458,33 +465,29 @@ public class SunlightServiceImpl implements SunlightService {
// jpStation.getMonthGenerate() / jpStation.getCapacity()
(
jpStation
.
getMonthGenerate
()==
null
||
jpStation
.
getCapacity
()==
null
)?
null
:
(
jpStation
.
getCapacity
()<=
0.0
?
null
:
jpStation
.
getMonthGenerate
()/
jpStation
.
getCapacity
())
(
jpStation
.
getMonthGenerate
()
==
null
||
jpStation
.
getCapacity
()
==
null
)
?
null
:
(
jpStation
.
getCapacity
()
<=
0.0
?
null
:
jpStation
.
getMonthGenerate
()
/
jpStation
.
getCapacity
())
);
tdHYGFStationMonthGenerate
.
setIncome
(
jpStation
.
getMonthIncome
());
//新加
// 新加
tdHYGFStationMonthGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationMonthGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationMonthGenerate
.
setStationName
(
jpStation
.
getName
());
tdHYGFStationMonthGenerate
.
setStationState
(
jpStation
.
getState
());
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationMonthGenerate
.
getCreatedTime
()))
{
tdHYGFStationMonthGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFStationMonthGenerateMapper
.
insert
(
tdHYGFStationMonthGenerate
);
}
else
{
tdHYGFStationMonthGenerateMapper
.
insert
(
tdHYGFStationMonthGenerate
);
}
//
户用场站年发电量
TdHYGFStationYearGenerate
tdHYGFStationYearGenerate
=
tdHYGFStationYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationYearGenerate
>()
.
eq
(
"third_station_id"
,
jpStation
.
getThirdStationId
())
//
户用场站年发电量
TdHYGFStationYearGenerate
tdHYGFStationYearGenerate
=
tdHYGFStationYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFStationYearGenerate
>()
.
eq
(
"third_station_id"
,
jpStation
.
getThirdStationId
())
.
eq
(
"year_time"
,
DateUtil
.
format
(
today1
,
"yyyy"
))
.
eq
(
"year"
,
DateUtil
.
format
(
today1
,
"yyyy"
)));
if
(
ObjectUtils
.
isEmpty
(
tdHYGFStationYearGenerate
))
{
...
...
@@ -496,11 +499,11 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFStationYearGenerate
.
setGenerate
(
jpStation
.
getYearGenerate
());
tdHYGFStationYearGenerate
.
setFullhour
(
// jpStation.getYearGenerate() / jpStation.getCapacity()
(
jpStation
.
getYearGenerate
()==
null
||
jpStation
.
getCapacity
()==
null
)?
null
:
(
jpStation
.
getCapacity
()<=
0.0
?
null
:
jpStation
.
getYearGenerate
()/
jpStation
.
getCapacity
())
);
(
jpStation
.
getYearGenerate
()
==
null
||
jpStation
.
getCapacity
()
==
null
)
?
null
:
(
jpStation
.
getCapacity
()
<=
0.0
?
null
:
jpStation
.
getYearGenerate
()
/
jpStation
.
getCapacity
())
);
tdHYGFStationYearGenerate
.
setIncome
(
jpStation
.
getYearIncome
());
//
新加
//
新加
tdHYGFStationYearGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFStationYearGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFStationYearGenerate
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -516,22 +519,18 @@ public class SunlightServiceImpl implements SunlightService {
}
//逆变器数据入库,逆变器参数入库
public
void
setJpInverte
(
List
<
Device
>
devices
,
JpStation
jpStation
,
List
<
Device
>
devicestx
){
new
Thread
(
new
Runnable
(){
// 逆变器数据入库,逆变器参数入库
public
void
setJpInverte
(
List
<
Device
>
devices
,
JpStation
jpStation
,
List
<
Device
>
devicestx
)
{
new
Thread
(
new
Runnable
()
{
@Override
public
void
run
(){
try
{
public
void
run
()
{
try
{
for
(
Device
device
:
devices
)
{
if
(
device
!=
null
)
{
//获取逆变器信息存库
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_station_id"
,
device
.
getPs_id
().
toString
()).
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
()).
eq
(
"ID"
,
device
.
getUuid
().
toString
()));
// 获取逆变器信息存库
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"sn_code"
,
device
.
getDevice_sn
().
toString
())
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
()));
if
(
ObjectUtils
.
isEmpty
(
jpInverter
))
{
jpInverter
=
new
JpInverter
();
}
...
...
@@ -540,12 +539,24 @@ public class SunlightServiceImpl implements SunlightService {
jpInverter
.
setSnCode
(
device
.
getDevice_sn
());
jpInverter
.
setId
(
device
.
getUuid
().
toString
());
if
(
device
.
getGetPs_fault_status
()>
2
)
{
jpInverter
.
setState
(
SunlightUtil
.
zt
.
get
(
device
.
getDev_status
()+
""
));
}
else
{
jpInverter
.
setState
(
"报警"
);
//电站状态
// 0离线 1在线
// 1故障 2告警 4正常
if
(
"0"
.
equals
(
device
.
getDev_status
()))
{
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
.
setDayPowerGeneration
(
jpStation
.
getDayGenerate
());
jpInverter
.
setMonthPowerGeneration
(
jpStation
.
getMonthGenerate
());
...
...
@@ -560,13 +571,13 @@ public class SunlightServiceImpl implements SunlightService {
jpInverter
.
setCapacity
(
jpStation
.
getCapacity
());
jpInverter
.
setCurrentPower
(
jpStation
.
getRealTimePower
());
if
(
devicestx
!=
null
)
{
if
(
devicestx
!=
null
)
{
for
(
Device
devicestx1
:
devicestx
)
{
if
(
devicestx1
.
getDevice_code
().
equals
(
device
.
getCommunication_dev_sn
()))
{
//
采集器id
if
(
devicestx1
.
getDevice_code
().
equals
(
device
.
getCommunication_dev_sn
()))
{
//
采集器id
jpInverter
.
setCollectorId
(
devicestx1
.
getUuid
().
toString
());
//
采集器sn编码
//
采集器sn编码
jpInverter
.
setCollectorSnCode
(
device
.
getCommunication_dev_sn
());
break
;
}
...
...
@@ -585,43 +596,41 @@ public class SunlightServiceImpl implements SunlightService {
jpInverterMapper
.
insert
(
jpInverter
);
}
}
//
逆变器指标信息
//
逆变器指标信息
Map
<
String
,
Object
>
bodyparamnb
=
new
HashMap
<>();
List
<
String
>
li
=
new
ArrayList
<>();
li
.
add
(
device
.
getPs_key
());
bodyparamnb
.
put
(
"ps_key_list"
,
li
);
JSONObject
jsonObject1nb
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getPVInverterRealTimeData
,
bodyparamnb
);
JSONObject
jsonObject1nb
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getPVInverterRealTimeData
,
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
)
{
Map
jsd
=
JSONUtil
.
parseObj
(
js
.
get
(
0
).
get
(
"device_point"
));
List
<
String
>
liname
=
new
ArrayList
<>();
liname
.
add
(
"AC1"
);
//
A 相电压
liname
.
add
(
"AC2"
);
//
B 相电压
liname
.
add
(
"AC3"
);
//
C 相电压
liname
.
add
(
"PV1"
);
//
直流电压 1
liname
.
add
(
"PV2"
);
//
直流电压 2
liname
.
add
(
"PV3"
);
//
直流电压 3
liname
.
add
(
"PV4"
);
//
直流电压 4
liname
.
add
(
"PV5"
);
//
直流电压 5
liname
.
add
(
"PV6"
);
//
直流电压 6
liname
.
add
(
"PV7"
);
//
直流电压 7
liname
.
add
(
"PV8"
);
//
直流电压 8
liname
.
add
(
"PV9"
);
//
直流电压 9
liname
.
add
(
"PV10"
);
//
直流电压 10
liname
.
add
(
"AC1"
);
//
A 相电压
liname
.
add
(
"AC2"
);
//
B 相电压
liname
.
add
(
"AC3"
);
//
C 相电压
liname
.
add
(
"PV1"
);
//
直流电压 1
liname
.
add
(
"PV2"
);
//
直流电压 2
liname
.
add
(
"PV3"
);
//
直流电压 3
liname
.
add
(
"PV4"
);
//
直流电压 4
liname
.
add
(
"PV5"
);
//
直流电压 5
liname
.
add
(
"PV6"
);
//
直流电压 6
liname
.
add
(
"PV7"
);
//
直流电压 7
liname
.
add
(
"PV8"
);
//
直流电压 8
liname
.
add
(
"PV9"
);
//
直流电压 9
liname
.
add
(
"PV10"
);
//
直流电压 10
for
(
int
i
=
0
;
i
<
liname
.
size
();
i
++)
{
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>().
eq
(
"sn_code"
,
jpInverter
.
getSnCode
()).
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
()).
eq
(
"name"
,
liname
.
get
(
i
))
);
JpInverterElectricity
jpInverterElectricity
=
jpInverterElectricityMapper
.
selectOne
(
new
QueryWrapper
<
JpInverterElectricity
>()
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
(
))
.
eq
(
"name"
,
liname
.
get
(
i
))
);
if
(
ObjectUtils
.
isEmpty
(
jpInverterElectricity
))
{
jpInverterElectricity
=
new
JpInverterElectricity
();
}
...
...
@@ -705,38 +714,52 @@ public class SunlightServiceImpl implements SunlightService {
jpInverterElectricityMapper
.
updateById
(
jpInverterElectricity
);
}
}
//
逆变器报表
//
-----------------------户用光伏日报表----------------------
//
逆变器报表
//
-----------------------户用光伏日报表----------------------
TdHYGFInverterDayGenerate
tdHYGFInverterDayGenerate
=
new
TdHYGFInverterDayGenerate
();
tdHYGFInverterDayGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFInverterDayGenerate
.
setThirdStationId
(
jpInverter
.
getThirdStationId
());
tdHYGFInverterDayGenerate
.
setSnCode
(
jpInverter
.
getSnCode
());
tdHYGFInverterDayGenerate
.
setName
(
jpInverter
.
getName
());
tdHYGFInverterDayGenerate
.
setWorkStatus
(
jpInverter
.
getState
());
//交流电压
tdHYGFInverterDayGenerate
.
setDcv1
(
jsd
.
get
(
"p18"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p18"
).
toString
())
:
null
);
tdHYGFInverterDayGenerate
.
setDcv2
(
jsd
.
get
(
"p19"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p19"
).
toString
())
:
null
);
tdHYGFInverterDayGenerate
.
setDcv3
(
jsd
.
get
(
"p20"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p20"
).
toString
())
:
null
);
//交流电流
tdHYGFInverterDayGenerate
.
setDcc1
(
jsd
.
get
(
"p21"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p21"
).
toString
())
:
null
);
tdHYGFInverterDayGenerate
.
setDcc2
(
jsd
.
get
(
"p22"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p22"
).
toString
())
:
null
);
tdHYGFInverterDayGenerate
.
setDcc3
(
jsd
.
get
(
"p23"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p23"
).
toString
())
:
null
);
//直流电压
tdHYGFInverterDayGenerate
.
setAcv1
(
jsd
.
get
(
"p5"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p5"
).
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
.
setDcv1
(
jsd
.
get
(
"p18"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p18"
).
toString
())
:
null
);
tdHYGFInverterDayGenerate
.
setDcv2
(
jsd
.
get
(
"p19"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p19"
).
toString
())
:
null
);
tdHYGFInverterDayGenerate
.
setDcv3
(
jsd
.
get
(
"p20"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p20"
).
toString
())
:
null
);
// 交流电流
tdHYGFInverterDayGenerate
.
setDcc1
(
jsd
.
get
(
"p21"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p21"
).
toString
())
:
null
);
tdHYGFInverterDayGenerate
.
setDcc2
(
jsd
.
get
(
"p22"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p22"
).
toString
())
:
null
);
tdHYGFInverterDayGenerate
.
setDcc3
(
jsd
.
get
(
"p23"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p23"
).
toString
())
:
null
);
// 直流电压
tdHYGFInverterDayGenerate
.
setAcv1
(
jsd
.
get
(
"p5"
)
!=
null
?
Double
.
valueOf
(
jsd
.
get
(
"p5"
).
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
.
setPv2
(
null
);
tdHYGFInverterDayGenerate
.
setPv3
(
null
);
tdHYGFInverterDayGenerate
.
setPv4
(
null
);
//
功率
//
功率
tdHYGFInverterDayGenerate
.
setTotalPower
(
jpInverter
.
getCurrentPower
());
// //频率
tdHYGFInverterDayGenerate
.
setFrequency
(
String
.
valueOf
(
jsd
.
get
(
"p27"
)));
...
...
@@ -746,30 +769,36 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFInverterDayGenerate
.
setMonthGen
(
jpInverter
.
getMonthPowerGeneration
());
tdHYGFInverterDayGenerate
.
setYearGen
(
jpInverter
.
getYearPowerGeneration
());
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
.
setFullhour
(
(
jpInverter
.
getDayPowerGeneration
()
==
null
||
jpInverter
.
getCapacity
()
==
null
)
?
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
())));
(
jpInverter
.
getDayPowerGeneration
()
==
null
||
jpInverter
.
getCapacity
()
==
null
)
?
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
())));
if
(
jpStation
!=
null
)
{
tdHYGFInverterDayGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterDayGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterDayGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterDayGenerate
.
setStationName
(
jpStation
.
getName
());
tdHYGFInverterDayGenerate
.
setStationState
(
jpStation
.
getState
());
}
tdHYGFInverterDayGenerateMapper
.
insert
(
tdHYGFInverterDayGenerate
);
//
户用场站月发电量
//
户用场站月发电量
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
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"day_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM-dd"
))
...
...
@@ -784,28 +813,31 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFInverterMonthGenerate
.
setGenerate
(
jpInverter
.
getDayPowerGeneration
());
tdHYGFInverterMonthGenerate
.
setName
(
jpInverter
.
getName
());
tdHYGFInverterMonthGenerate
.
setFullhour
(
(
jpInverter
.
getDayPowerGeneration
()
==
null
||
jpInverter
.
getCapacity
()
==
null
)
?
null
:
(
jpInverter
.
getCapacity
()
<=
0.0
?
null
:
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
())
);
(
jpInverter
.
getDayPowerGeneration
()
==
null
||
jpInverter
.
getCapacity
()
==
null
)
?
null
:
(
jpInverter
.
getCapacity
()
<=
0.0
?
null
:
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
()));
//
新加
//
新加
if
(
jpStation
!=
null
)
{
tdHYGFInverterMonthGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterMonthGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterMonthGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterMonthGenerate
.
setStationName
(
jpStation
.
getName
());
tdHYGFInverterMonthGenerate
.
setStationState
(
jpStation
.
getState
());
}
if
(
ObjectUtils
.
isEmpty
(
tdHYGFInverterMonthGenerate
.
getCreatedTime
()))
{
tdHYGFInverterMonthGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFInverterMonthGenerateMapper
.
insert
(
tdHYGFInverterMonthGenerate
);
}
else
{
tdHYGFInverterMonthGenerateMapper
.
insert
(
tdHYGFInverterMonthGenerate
);
}
//户用场站年发电量
TdHYGFInverterYearGenerate
tdHYGFInverterYearGenerate
=
tdHYGFInverterYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterYearGenerate
>()
// 户用场站年发电量
TdHYGFInverterYearGenerate
tdHYGFInverterYearGenerate
=
tdHYGFInverterYearGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterYearGenerate
>()
.
eq
(
"third_station_id"
,
jpInverter
.
getThirdStationId
())
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"month_time"
,
DateUtil
.
format
(
today1
,
"yyyy-MM"
))
...
...
@@ -819,14 +851,17 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFInverterYearGenerate
.
setYear
(
DateUtil
.
format
(
today1
,
"yyyy"
));
tdHYGFInverterYearGenerate
.
setGenerate
(
jpInverter
.
getMonthPowerGeneration
());
tdHYGFInverterYearGenerate
.
setName
(
jpInverter
.
getName
());
tdHYGFInverterYearGenerate
.
setFullhour
(
(
jpInverter
.
getMonthPowerGeneration
()
==
null
||
jpInverter
.
getCapacity
()
==
null
)
?
null
:
(
jpInverter
.
getCapacity
()
<=
0.0
?
null
:
jpInverter
.
getMonthPowerGeneration
()
/
jpInverter
.
getCapacity
())
);
//新加
tdHYGFInverterYearGenerate
.
setFullhour
((
jpInverter
.
getMonthPowerGeneration
()
==
null
||
jpInverter
.
getCapacity
()
==
null
)
?
null
:
(
jpInverter
.
getCapacity
()
<=
0.0
?
null
:
jpInverter
.
getMonthPowerGeneration
()
/
jpInverter
.
getCapacity
()));
// 新加
if
(
jpStation
!=
null
)
{
tdHYGFInverterYearGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterYearGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterYearGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterYearGenerate
.
setStationName
(
jpStation
.
getName
());
tdHYGFInverterYearGenerate
.
setStationState
(
jpStation
.
getState
());
...
...
@@ -837,8 +872,9 @@ public class SunlightServiceImpl implements SunlightService {
}
else
{
tdHYGFInverterYearGenerateMapper
.
insert
(
tdHYGFInverterYearGenerate
);
}
//户用场站年发电量
TdHYGFInverterTotalGenerate
tdHYGFInverterTotalGenerate
=
tdHYGFInverterTotalGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterTotalGenerate
>()
// 户用场站年发电量
TdHYGFInverterTotalGenerate
tdHYGFInverterTotalGenerate
=
tdHYGFInverterTotalGenerateMapper
.
selectOne
(
new
QueryWrapper
<
TdHYGFInverterTotalGenerate
>()
.
eq
(
"third_station_id"
,
jpInverter
.
getThirdStationId
())
.
eq
(
"sn_code"
,
jpInverter
.
getSnCode
())
.
eq
(
"year_time"
,
DateUtil
.
format
(
today1
,
"yyyy"
))
...
...
@@ -853,20 +889,22 @@ public class SunlightServiceImpl implements SunlightService {
tdHYGFInverterTotalGenerate
.
setGenerate
(
jpInverter
.
getYearPowerGeneration
());
tdHYGFInverterTotalGenerate
.
setFullhour
(
0.0d
);
tdHYGFInverterTotalGenerate
.
setName
(
jpInverter
.
getName
());
tdHYGFInverterTotalGenerate
.
setFullhour
(
(
jpInverter
.
getYearPowerGeneration
()
==
null
||
jpInverter
.
getCapacity
()
==
null
)
?
null
:
(
jpInverter
.
getCapacity
()
<=
0.0
?
null
:
jpInverter
.
getYearPowerGeneration
()
/
jpInverter
.
getCapacity
())
);
//新加
tdHYGFInverterTotalGenerate
.
setFullhour
((
jpInverter
.
getYearPowerGeneration
()
==
null
||
jpInverter
.
getCapacity
()
==
null
)
?
null
:
(
jpInverter
.
getCapacity
()
<=
0.0
?
null
:
jpInverter
.
getYearPowerGeneration
()
/
jpInverter
.
getCapacity
()));
// 新加
if
(
jpStation
!=
null
)
{
tdHYGFInverterTotalGenerate
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdHYGFInverterTotalGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterTotalGenerate
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdHYGFInverterTotalGenerate
.
setStationName
(
jpStation
.
getName
());
tdHYGFInverterTotalGenerate
.
setStationState
(
jpStation
.
getState
());
}
if
(
ObjectUtils
.
isEmpty
(
tdHYGFInverterTotalGenerate
.
getCreatedTime
()))
{
tdHYGFInverterTotalGenerate
.
setCreatedTime
(
System
.
currentTimeMillis
());
tdHYGFInverterTotalGenerateMapper
.
insert
(
tdHYGFInverterTotalGenerate
);
...
...
@@ -876,37 +914,34 @@ public class SunlightServiceImpl implements SunlightService {
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}).
start
();
}
@Async
public
void
collectorDetail
(
List
<
Device
>
devices
,
JpStation
jpStation
)
{
public
void
collectorDetail
(
List
<
Device
>
devices
,
JpStation
jpStation
)
{
for
(
Device
device
:
devices
)
{
JpCollector
jpCollector
=
jpCollectorMapper
.
selectOne
(
new
QueryWrapper
<
JpCollector
>().
eq
(
"third_station_id"
,
jpStation
.
getThirdStationId
()).
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
()).
eq
(
"sn_code"
,
device
.
getDevice_sn
()));
JpCollector
jpCollector
=
jpCollectorMapper
.
selectOne
(
new
QueryWrapper
<
JpCollector
>().
eq
(
"third_station_id"
,
jpStation
.
getThirdStationId
())
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
()).
eq
(
"sn_code"
,
device
.
getDevice_sn
()));
if
(
ObjectUtils
.
isEmpty
(
jpCollector
))
{
jpCollector
=
new
JpCollector
();
}
//
sn编码
//
sn编码
jpCollector
.
setSnCode
(
device
.
getDevice_sn
());
jpCollector
.
setAddr
(
jpStation
.
getAddress
());
jpCollector
.
setName
(
device
.
getDevice_name
());
//
类型
//
类型
jpCollector
.
setType
(
"通信模块"
);
//
更新时间
//
更新时间
jpCollector
.
setUpdateTime
(
new
Date
());
//
出场日期
//
出场日期
// jpCollector.setDischargeDate(new Date(collectorDetailDto.getFactoryTime()));
// //生产日期
// jpCollector.setProductDate(new Date(collectorDetailDto.getFactoryTime()));
...
...
@@ -916,14 +951,21 @@ public class SunlightServiceImpl implements SunlightService {
// jpCollector.setThisWorkTime(new DateTime(collectorDetailDto.getCurrentWorkingTime()));
// //累计工作时间
// jpCollector.setTotalWorkTime(new DateTime(collectorDetailDto.getTotalWorkingTime()));
//
第三方电站id
//
第三方电站id
jpCollector
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
//
第三方厂商标识
//
第三方厂商标识
jpCollector
.
setThirdCode
(
PVProducerInfoEnum
.
YG
.
getCode
());
if
(
device
.
getGetPs_fault_status
()>
2
)
{
jpCollector
.
setState
(
SunlightUtil
.
zt
.
get
(
device
.
getDev_status
()+
""
));
}
else
{
jpCollector
.
setState
(
"报警"
);
//电站状态
if
(
device
.
getGetPs_fault_status
()
!=
null
)
{
if
(
device
.
getGetPs_fault_status
()
>
2
)
{
jpCollector
.
setState
(
SunlightUtil
.
zt
.
get
(
device
.
getDev_status
()
+
""
));
}
else
{
jpCollector
.
setState
(
"报警"
);
// 电站状态
}
}
else
{
// 如果获取不了逆变器状态 并且逆变器没状态就默认离线
if
(
jpCollector
.
getState
()
==
null
)
{
jpCollector
.
setState
(
"离线"
);
}
}
jpCollector
.
setStationName
(
jpStation
.
getName
());
// jpCollector.setVersion(imasterCollectorList.getSoftwareVersion());
...
...
@@ -936,67 +978,71 @@ public class SunlightServiceImpl implements SunlightService {
}
}
@Scheduled
(
cron
=
"${dataRequstScheduled.Sunlight}"
)
@Override
@Async
public
void
inverAlramInfo
()
{
//获取所有未处理告警
Map
<
String
,
Object
>
bodyparamf
=
new
HashMap
<>();
long
ts
=
System
.
currentTimeMillis
();
logger
.
info
(
"-------阳光同步告警开始"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
// 获取所有未处理告警
Map
<
String
,
Object
>
bodyparamf
=
new
HashMap
<>();
bodyparamf
.
put
(
"size"
,
1000
);
bodyparamf
.
put
(
"curPage"
,
1
);
JSONObject
jsonObject
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getFaultAlarmInfo
,
bodyparamf
);
List
<
SunlightWarm
>
listd
=
jsonObject
.
get
(
"pageList"
)!=
null
?
JSONArray
.
parseArray
(
JSON
.
toJSONString
(
jsonObject
.
get
(
"pageList"
)),
SunlightWarm
.
class
):
null
;
//获取系统未处理的告警
List
<
String
>
li
=
new
ArrayList
<>();
bodyparamf
.
put
(
"curPage"
,
1
);
JSONObject
jsonObject
=
SunlightUtil
.
getdata
(
SunlightUtil
.
getFaultAlarmInfo
,
bodyparamf
);
List
<
SunlightWarm
>
listd
=
jsonObject
.
get
(
"pageList"
)
!=
null
?
JSONArray
.
parseArray
(
JSON
.
toJSONString
(
jsonObject
.
get
(
"pageList"
)),
SunlightWarm
.
class
)
:
null
;
// 获取系统未处理的告警
List
<
String
>
li
=
new
ArrayList
<>();
li
.
add
(
SunlightUtil
.
alarmstatus
.
get
(
"4"
));
li
.
add
(
SunlightUtil
.
alarmstatus
.
get
(
"5"
));
List
<
HYGFJPInverterWarn
>
hygfjpInverterWarnlist
=
hygfjpInverterWarnMapper
.
selectList
(
new
QueryWrapper
<
HYGFJPInverterWarn
>()
.
notIn
(
"`state`"
,
li
)
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
())
);
Map
<
String
,
HYGFJPInverterWarn
>
bodyparam
=
new
HashMap
<>();
if
(
hygfjpInverterWarnlist
!=
null
&&
hygfjpInverterWarnlist
.
size
()>
0
){
bodyparam
=
hygfjpInverterWarnlist
.
stream
().
collect
(
Collectors
.
toMap
(
HYGFJPInverterWarn:
:
getWarnId
,
Function
.
identity
()));
}
//获取所有逆变器
List
<
JpInverter
>
jpInverter
=
jpInverterMapper
.
selectList
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
()));
Map
<
String
,
String
>
jpInverterbodyparam
=
new
HashMap
<>();
if
(
jpInverter
!=
null
&&
jpInverter
.
size
()>
0
){
jpInverterbodyparam
=
jpInverter
.
stream
().
collect
(
Collectors
.
toMap
(
JpInverter:
:
getId
,
JpInverter:
:
getSnCode
));
}
if
(
listd
!=
null
&&!
listd
.
isEmpty
()){
List
<
HYGFJPInverterWarn
>
hygfjpInverterWarnlist
=
hygfjpInverterWarnMapper
.
selectList
(
new
QueryWrapper
<
HYGFJPInverterWarn
>().
notIn
(
"`state`"
,
li
).
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
()));
Map
<
String
,
HYGFJPInverterWarn
>
bodyparam
=
new
HashMap
<>();
if
(
hygfjpInverterWarnlist
!=
null
&&
hygfjpInverterWarnlist
.
size
()
>
0
)
{
bodyparam
=
hygfjpInverterWarnlist
.
stream
()
.
collect
(
Collectors
.
toMap
(
HYGFJPInverterWarn:
:
getWarnId
,
Function
.
identity
()));
}
// 获取所有逆变器
List
<
JpInverter
>
jpInverter
=
jpInverterMapper
.
selectList
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
()));
Map
<
String
,
String
>
jpInverterbodyparam
=
new
HashMap
<>();
if
(
jpInverter
!=
null
&&
jpInverter
.
size
()
>
0
)
{
jpInverterbodyparam
=
jpInverter
.
stream
()
.
collect
(
Collectors
.
toMap
(
JpInverter:
:
getId
,
JpInverter:
:
getSnCode
));
}
if
(
listd
!=
null
&&
!
listd
.
isEmpty
())
{
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
());
}
else
{
//
告警不存在,新增
}
else
{
//
告警不存在,新增
HYGFJPInverterWarn
hygfjpInverterWarn
=
new
HYGFJPInverterWarn
();
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
.
setLevel
(
SunlightUtil
.
alarmLevel
.
get
(
sunlightWarm
.
getFault_level
().
toString
()));
hygfjpInverterWarn
.
setContent
(
sunlightWarm
.
getFault_name
());
hygfjpInverterWarn
.
setThirdCode
(
PVProducerInfoEnum
.
YG
.
getCode
());
hygfjpInverterWarn
.
setTreatment
(
sunlightWarm
.
getFault_desc
());
hygfjpInverterWarn
.
setStartTime
(
DateUtil
.
parse
(
sunlightWarm
.
getCreate_time
(),
DatePattern
.
NORM_DATETIME_PATTERN
).
getTime
());
hygfjpInverterWarn
.
setState
(
SunlightUtil
.
alarmstatus
.
get
(
sunlightWarm
.
getProcess_status
().
toString
()));
hygfjpInverterWarn
.
setStartTime
(
DateUtil
.
parse
(
sunlightWarm
.
getCreate_time
(),
DatePattern
.
NORM_DATETIME_PATTERN
).
getTime
());
hygfjpInverterWarn
.
setState
(
SunlightUtil
.
alarmstatus
.
get
(
sunlightWarm
.
getProcess_status
().
toString
()));
hygfjpInverterWarn
.
setTimeLong
(
null
);
hygfjpInverterWarn
.
setRecoverTime
(
null
);
hygfjpInverterWarn
.
setTimeLong
(
null
);
hygfjpInverterWarn
.
setWarnId
(
sunlightWarm
.
getFault_code
());
//
电站区域经销商,
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
()).
eq
(
"third_station_id"
,
sunlightWarm
.
getPs_id
().
toString
()));
if
(
jpStation
!=
null
)
{
//
电站区域经销商,
JpStation
jpStation
=
jpStationMapper
.
selectOne
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
YG
.
getCode
())
.
eq
(
"third_station_id"
,
sunlightWarm
.
getPs_id
().
toString
()));
if
(
jpStation
!=
null
)
{
hygfjpInverterWarn
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpInverterWarn
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpInverterWarn
.
setStationName
(
jpStation
.
getName
());
...
...
@@ -1005,7 +1051,7 @@ public class SunlightServiceImpl implements SunlightService {
try
{
TimeUnit
.
MINUTES
.
sleep
(
1
);
hygfjpInverterWarn
.
setCreatedTime
(
System
.
currentTimeMillis
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
hygfjpInverterWarnMapper
.
insert
(
hygfjpInverterWarn
);
...
...
@@ -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
)
{
// Map<String, Object> bodyparamfx=new HashMap<>();
// bodyparamfx.put("size", 1000);
...
...
@@ -1032,7 +1077,7 @@ public class SunlightServiceImpl implements SunlightService {
// if(listx!=null&&!listx.isEmpty()){
// SunlightWarm sunlightWarm=listx.get(0);
HYGFJPInverterWarn
hygfjpInverterWarn
=
bodyparam
.
get
(
id
);
HYGFJPInverterWarn
hygfjpInverterWarn
=
bodyparam
.
get
(
id
);
//
// if (StringUtils.isNotBlank(sunlightWarm.getOver_time())) {
// hygfjpInverterWarn.setRecoverTime(DateUtil.parse(sunlightWarm.getOver_time(), DatePattern.NORM_DATETIME_PATTERN).getTime());
...
...
@@ -1041,20 +1086,13 @@ public class SunlightServiceImpl implements SunlightService {
// 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"
));
hygfjpInverterWarnMapper
.
insert
(
hygfjpInverterWarn
);
// }
}
}
logger
.
info
(
"-------阳光同步告警结束"
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/config/ListenerAsyncConfiguration.java
0 → 100644
View file @
60f881c8
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
);
}
};
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/resources/application-dev.properties
View file @
60f881c8
spring.application.name
=
AMOS-API-HOUSEPVAPI
spring.application.name
=
AMOS-API-HOUSEPVAPI
-WJ
server.servlet.context-path
=
/housepvapi
server.port
=
11006
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHYGFInverterDayGenerateMapper.java
View file @
60f881c8
...
...
@@ -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"
)
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
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpStationMapper.xml
View file @
60f881c8
...
...
@@ -301,8 +301,6 @@
<select
id=
"getCountJpStationdata"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto"
>
select
ROUND(sum(real_time_power),3) realTimePower,
ROUND(sum(capacity)/1000,3) capacity,
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHYGFInverterDayGenerateMapper.xml
View file @
60f881c8
...
...
@@ -23,4 +23,59 @@
</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 <= #{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
<
= #{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>
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpStationController.java
View file @
60f881c8
...
...
@@ -40,10 +40,25 @@ import java.util.stream.Collectors;
@RequestMapping
(
value
=
"/jp-station"
)
public
class
JpStationController
extends
BaseController
{
private
static
Double
CARBON
=
0.997
*
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 = 0.997 * 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
LX
=
"离线"
;
private
static
String
BJ
=
"报警"
;
...
...
@@ -485,7 +500,7 @@ public class JpStationController extends BaseController {
if
(
jpStation
==
null
){
jpStation
=
new
JpStationDto
();
}
if
(
jpStation
!=
null
&&
jpStation
.
getRealTimePower
()
!=
null
&&
jpStation
.
get
RatedPower
()
!=
null
&&
jpStation
.
getRatedPower
()
>
0
)
{
if
(
jpStation
!=
null
&&
jpStation
.
getRealTimePower
()
!=
null
&&
jpStation
.
get
Capacity
()
!=
null
&&
jpStation
.
getCapacity
()
>
0
)
{
map
.
put
(
"value"
,
String
.
format
(
"%.4f"
,
jpStation
.
getRealTimePower
()
/
(
jpStation
.
getCapacity
()
*
FDXSS
)));
}
else
{
map
.
put
(
"value"
,
0
);
...
...
@@ -543,6 +558,8 @@ public class JpStationController extends BaseController {
map
.
put
(
"dust"
,
format2
.
format
(
accumulatedPower
*
FDXSS
*
DUST
));
//煤
map
.
put
(
"coal"
,
format2
.
format
(
accumulatedPower
*
FDXSS
*
COAL
));
itemList
.
add
(
map
);
result
.
setCurrent
(
1
);
result
.
setTotal
(
1
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpInverterServiceImpl.java
View file @
60f881c8
...
...
@@ -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.rdbms.service.BaseService
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -118,7 +121,8 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
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"
)){
key1
=
treeParam
.
get
(
"key"
).
toString
().
replace
(
"_"
,
""
);
}
value
.
add
(
obj
.
get
(
key1
).
toString
());
}
value
.
add
(
obj
.
get
(
key1
).
toString
());
}
treeParam
.
put
(
"data"
,
value
);
}
...
...
@@ -132,23 +136,51 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
@UserLimits
public
Page
<
TdHYGFInverterDayGenerate
>
jpInverterDayReport
(
int
current
,
int
size
,
String
time
,
List
<
String
>
sncodes
,
List
<
String
>
stationIds
)
{
Page
<
TdHYGFInverterDayGenerate
>
tdHYGFInverterDayGeneratePage
=
new
Page
<>();
Date
date
=
DateUtil
.
parse
(
time
,
"yyyy-MM-dd"
);
Date
timeStart
=
DateUtils
.
dateAddHours
(
date
,
-
8
);
Date
tiemEnd
=
DateUtils
.
dateAddHours
(
date
,
16
);
String
startTime
=
DateUtil
.
format
(
timeStart
,
"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
)
.
le
(
"created_time"
,
endTime
);
// .in("third_station_id", stationIds);
;
if
(
CollectionUtil
.
isNotEmpty
(
sncodes
))
{
queryWrapper
.
in
(
"sn_code"
,
sncodes
);
// Date date = DateUtil.parse(time, "yyyy-MM-dd");
// Date timeStart = DateUtils.dateAddHours(date, -8);
// Date tiemEnd = DateUtils.dateAddHours(date, 16);
// String startTime = DateUtil.format(timeStart, "yyyy-MM-dd HH:mm:ss");
// String endTime = DateUtil.format(tiemEnd, "yyyy-MM-dd HH:mm:ss");
CharSequence
time1
=
time
+
" 00:00:00"
;
CharSequence
time2
=
time
+
" 23:59:59"
;
DateTimeFormatter
df
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
String
startTime
=
DateUtil
.
format
(
LocalDateTime
.
parse
(
time1
,
df
),
"yyyy-MM-dd HH:mm:ss"
);
String
endTime
=
DateUtil
.
format
(
LocalDateTime
.
parse
(
time2
,
df
),
"yyyy-MM-dd HH:mm:ss"
);
// 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
);
List
<
TdHYGFInverterDayGenerate
>
tdHYGFInverterDayGenerates
=
tdHYGFInverterDayGenerateMapper
.
selectList
(
queryWrapper
);
List
<
TdHYGFInverterDayGenerate
>
tdHYGFInverterDayGenerates
=
tdHYGFInverterDayGenerateMapper
.
selectListPage
(
snCodeList
,
maxCreatedTimeList
);
tdHYGFInverterDayGenerates
.
forEach
(
tdHYGFInverterDayGenerate
->
{
Date
date1
=
new
Date
(
tdHYGFInverterDayGenerate
.
getCreatedTime
());
tdHYGFInverterDayGenerate
.
setCreatedTimeStr
(
DateUtil
.
format
(
date1
,
DatePattern
.
NORM_DATETIME_PATTERN
));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/.factorypath
View file @
60f881c8
<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/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"/>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/.factorypath
View file @
60f881c8
<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/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"/>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/LargeScreenImpl.java
View file @
60f881c8
...
...
@@ -38,6 +38,8 @@ import java.util.*;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
import
javax.annotation.PostConstruct
;
/**
* @description:
* @author: tw
...
...
@@ -72,16 +74,17 @@ public class LargeScreenImpl {
* 全国
*/
@Scheduled
(
cron
=
"0/10 * * * * ?"
)
@PostConstruct
public
Map
<
String
,
Double
>
getqg
()
{
Map
<
String
,
Double
>
mapdta
=
new
HashMap
<>();
mapdta
.
put
(
"SS"
,
0
d
);
mapdta
.
put
(
"ZFS"
,
0
d
);
mapdta
.
put
(
"ZFSLJ"
,
0
d
);
mapdta
.
put
(
"RSD"
,
0
d
);
mapdta
.
put
(
"YFD"
,
0
d
);
mapdta
.
put
(
"NFD"
,
0
d
);
mapdta
.
put
(
"YJHWC"
,
0
d
);
mapdta
.
put
(
"NJHWC"
,
0
d
);
//
mapdta.put("RSD", 0d);
//
mapdta.put("YFD", 0d);
//
mapdta.put("NFD", 0d);
//
mapdta.put("YJHWC", 0d);
//
mapdta.put("NJHWC", 0d);
//平均数
List
<
String
>
value
=
new
ArrayList
<>();
value
.
add
(
SS
);
...
...
@@ -113,37 +116,37 @@ public class LargeScreenImpl {
}
}
}
//日发电量
AtomicReference
<
Double
>
dailyPower
=
new
AtomicReference
<>(
0.0
);
//月发电量
AtomicReference
<
Double
>
monthlyPower
=
new
AtomicReference
<>(
0.0
);
//年发电量
AtomicReference
<
Double
>
annualPower
=
new
AtomicReference
<>(
0.0
);
for
(
StationCacheInfoDto
stationCacheInfoDto
:
stationCacheInfoDtos
)
{
if
(
"FDZ"
.
equals
(
stationCacheInfoDto
.
getStationType
()))
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)));
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
CommonConstans
.
taiHeGenIndicator
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
)));
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
)));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
)));
}
}
mapdta
.
put
(
"RSD"
,
keepFourdecimalPlaces
(
dailyPower
.
get
()));
mapdta
.
put
(
"YFD"
,
keepFourdecimalPlaces
(
monthlyPower
.
get
()));
mapdta
.
put
(
"NFD"
,
keepFourdecimalPlaces
(
annualPower
.
get
()));
//
//日发电量
//
AtomicReference<Double> dailyPower = new AtomicReference<>(0.0);
//
//月发电量
//
AtomicReference<Double> monthlyPower = new AtomicReference<>(0.0);
//
//年发电量
//
AtomicReference<Double> annualPower = new AtomicReference<>(0.0);
//
for (StationCacheInfoDto stationCacheInfoDto : stationCacheInfoDtos) {
//
//
if ("FDZ".equals(stationCacheInfoDto.getStationType())) {
//
Map<String, List<String>> queryCondtion = new HashMap<>();
//
queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("日发电量", "月发电量", "年发电量"));
//
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationCacheInfoDto.getFanGatewayId()));
//
List<ESEquipments> result = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class);
//
dailyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "日发电量")));
//
monthlyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "月发电量")));
//
annualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, "年发电量")));
//
} else {
//
Map<String, List<String>> queryCondtion = new HashMap<>();
//
queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, CommonConstans.taiHeGenIndicator);
//
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationCacheInfoDto.getBoosterGatewayId()));
//
List<ESEquipments> result = commonServiceImpl.getListDataByCondtions(queryCondtion, null, ESEquipments.class);
//
dailyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, CommonConstans.taiHeGenIndicatorDay)));
//
monthlyPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, CommonConstans.taiHeGenIndicatorMonth)));
//
annualPower.updateAndGet(v -> v + keepFourdecimalPlaces(commonServiceImpl.getSumByEquipmentIndxName(result, CommonConstans.taiHeGenIndicatorYear)));
//
}
//
//
}
//
//
mapdta.put("RSD", keepFourdecimalPlaces(dailyPower.get()));
//
mapdta.put("YFD", keepFourdecimalPlaces(monthlyPower.get()));
//
mapdta.put("NFD", keepFourdecimalPlaces(annualPower.get()));
//总和
// value.clear();
...
...
@@ -172,28 +175,28 @@ public class LargeScreenImpl {
// }
// }
// }
//计算月完成百分比
//当前月份 获取
LocalDate
currentDate
=
LocalDate
.
now
();
int
month
=
currentDate
.
getMonthValue
();
QueryWrapper
<
StationPlan
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
select
(
"ifnull(sum(value), 0) as sum_value"
);
wrapper
.
eq
(
"monthly"
,
month
);
List
<
Map
<
String
,
Object
>>
list
=
StationPlanMapper
.
selectMaps
(
wrapper
);
Double
sumValue
=
list
!=
null
&&
!
list
.
isEmpty
()
?
(
Double
)
list
.
get
(
0
).
get
(
"sum_value"
)
:
0
;
//计算年完成百分比
Double
ybfb
=
sumValue
>
0
?
mapdta
.
get
(
"YFD"
)
/
sumValue
*
100
:
0
;
ybfb
=
new
BigDecimal
(
ybfb
).
setScale
(
4
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
mapdta
.
put
(
"YJHWC"
,
ybfb
);
QueryWrapper
<
StationPlan
>
wrapper1
=
new
QueryWrapper
<>();
wrapper1
.
select
(
"ifnull(sum(value), 0) as sum_value"
);
List
<
Map
<
String
,
Object
>>
list1
=
StationPlanMapper
.
selectMaps
(
wrapper1
);
Double
sumValuen
=
list1
!=
null
&&
!
list1
.
isEmpty
()
?
(
Double
)
list1
.
get
(
0
).
get
(
"sum_value"
)
:
0
;
Double
ybfbn
=
sumValuen
>
0
?
mapdta
.
get
(
"NFD"
)
/
sumValue
*
100
:
0
;
ybfbn
=
new
BigDecimal
(
ybfbn
).
setScale
(
4
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
mapdta
.
put
(
"NJHWC"
,
ybfbn
);
//
//计算月完成百分比
//
//当前月份 获取
//
LocalDate currentDate = LocalDate.now();
//
int month = currentDate.getMonthValue();
//
//
QueryWrapper<StationPlan> wrapper = new QueryWrapper<>();
//
wrapper.select("ifnull(sum(value), 0) as sum_value");
//
wrapper.eq("monthly", month);
//
List<Map<String, Object>> list = StationPlanMapper.selectMaps(wrapper);
//
Double sumValue = list != null && !list.isEmpty() ? (Double) list.get(0).get("sum_value") : 0;
//
//计算年完成百分比
//
Double ybfb = sumValue > 0 ? mapdta.get("YFD") / sumValue * 100 : 0;
//
ybfb = new BigDecimal(ybfb).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
//
//
mapdta.put("YJHWC", ybfb);
//
QueryWrapper<StationPlan> wrapper1 = new QueryWrapper<>();
//
wrapper1.select("ifnull(sum(value), 0) as sum_value");
//
List<Map<String, Object>> list1 = StationPlanMapper.selectMaps(wrapper1);
//
Double sumValuen = list1 != null && !list1.isEmpty() ? (Double) list1.get(0).get("sum_value") : 0;
//
Double ybfbn = sumValuen > 0 ? mapdta.get("NFD") / sumValue * 100 : 0;
//
ybfbn = new BigDecimal(ybfbn).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
//
mapdta.put("NJHWC", ybfbn);
try
{
emqKeeper
.
getMqttClient
().
publish
(
"qg/yxzb"
,
JSON
.
toJSONString
(
mapdta
).
getBytes
(),
0
,
true
);
}
catch
(
MqttException
e
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
View file @
60f881c8
...
...
@@ -570,46 +570,45 @@ public class MonitorServiceImpl implements MonitorService {
*
* @return 返回一个包含各种指标数据的map,其中键为指标名称,值为指标数值。
*/
public
Map
<
String
,
Double
>
getqg
()
{
// 初始化存储数据的map,设置默认值为0
Map
<
String
,
Double
>
mapdta
=
new
HashMap
<>();
mapdta
.
put
(
"SS"
,
0
d
);
mapdta
.
put
(
"ZFS"
,
0
d
);
mapdta
.
put
(
"ZFSLJ"
,
0
d
);
mapdta
.
put
(
"RSD"
,
0
d
);
mapdta
.
put
(
"YFD"
,
0
d
);
mapdta
.
put
(
"NFD"
,
0
d
);
mapdta
.
put
(
"YJHWC"
,
0
d
);
mapdta
.
put
(
"NJHWC"
,
0
d
);
// 获取核心数值数据
List
<
CoreValuesDto
>
coreValuesDtos
=
new
ArrayList
<>();
coreValuesDtos
=
coreCommonService
.
getValuesByStationNamesAndPointsNames
(
null
,
null
);
// 构建请求URL并发起HTTP GET请求,获取相关数据
String
requestUrl
=
Constants
.
BASE_URL
+
"?"
+
Constants
.
get_area_item_url
;
List
<
BuDunGenDto
>
buDunGenDtos
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BuDunGenDto
.
class
);
// 如果有获取到数据,则更新map中的相应数据
if
(
buDunGenDtos
.
size
()
>
0
)
{
BuDunGenDto
buDunGenDto
=
buDunGenDtos
.
get
(
0
);
mapdta
.
put
(
"RSD"
,
keepFourdecimalPlaces
(
buDunGenDto
.
getDay
()));
mapdta
.
put
(
"YFD"
,
keepFourdecimalPlaces
(
buDunGenDto
.
getMonth
()));
mapdta
.
put
(
"NFD"
,
keepFourdecimalPlaces
(
buDunGenDto
.
getYear
()));
mapdta
.
put
(
"YJHWC"
,
keepTwodecimalPlaces
(
buDunGenDto
.
getMonth_complete
()));
mapdta
.
put
(
"NJHWC"
,
keepTwodecimalPlaces
(
buDunGenDto
.
getYear_complete
()));
}
// 更新map中剩余的数据项
mapdta
.
put
(
"SS"
,
keepTwodecimalPlaces
(
coreCommonService
.
getAverageOfByPointName
(
coreValuesDtos
,
CommonConstans
.
WIND_SPEED_THIRTY_SECONDS
)));
mapdta
.
put
(
"ZFS"
,
keepTwodecimalPlaces
(
coreCommonService
.
getAverageOfByPointName
(
coreValuesDtos
,
CommonConstans
.
TOTAL_RADIATION
)));
mapdta
.
put
(
"ZFSLJ"
,
keepTwodecimalPlaces
(
coreCommonService
.
getAverageOfByPointName
(
coreValuesDtos
,
CommonConstans
.
TOTAL_RADIATION_SUM
)));
// 将数据发布到MQTT主题
try
{
emqKeeper
.
getMqttClient
().
publish
(
"qg/yxzb"
,
JSON
.
toJSONString
(
mapdta
).
getBytes
(),
0
,
true
);
}
catch
(
MqttException
e
)
{
e
.
printStackTrace
();
}
return
mapdta
;
}
// public Map<String, Double> getqg() {
//
// // 初始化存储数据的map,设置默认值为0
// Map<String, Double> mapdta = new HashMap<>();
// mapdta.put("SS", 0d);
// mapdta.put("ZFS", 0d);
// mapdta.put("ZFSLJ", 0d);
// mapdta.put("RSD", 0d);
// mapdta.put("YFD", 0d);
// mapdta.put("NFD", 0d);
// mapdta.put("YJHWC", 0d);
// mapdta.put("NJHWC", 0d);
// // 获取核心数值数据
// List<CoreValuesDto> coreValuesDtos = new ArrayList<>();
// coreValuesDtos = coreCommonService.getValuesByStationNamesAndPointsNames(null, null);
// // 构建请求URL并发起HTTP GET请求,获取相关数据
// String requestUrl = Constants.BASE_URL + "?" + Constants.get_area_item_url;
// List<BuDunGenDto> buDunGenDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class);
// // 如果有获取到数据,则更新map中的相应数据
// if (buDunGenDtos.size() > 0) {
// BuDunGenDto buDunGenDto = buDunGenDtos.get(0);
// mapdta.put("RSD", keepFourdecimalPlaces(buDunGenDto.getDay()));
// mapdta.put("YFD", keepFourdecimalPlaces(buDunGenDto.getMonth()));
// mapdta.put("NFD", keepFourdecimalPlaces(buDunGenDto.getYear()));
// mapdta.put("YJHWC", keepTwodecimalPlaces(buDunGenDto.getMonth_complete()));
// mapdta.put("NJHWC", keepTwodecimalPlaces(buDunGenDto.getYear_complete()));
// }
// // 更新map中剩余的数据项
// mapdta.put("SS", keepTwodecimalPlaces(coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.WIND_SPEED_THIRTY_SECONDS)));
// mapdta.put("ZFS", keepTwodecimalPlaces(coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.TOTAL_RADIATION)));
// mapdta.put("ZFSLJ", keepTwodecimalPlaces(coreCommonService.getAverageOfByPointName(coreValuesDtos, CommonConstans.TOTAL_RADIATION_SUM)));
// // 将数据发布到MQTT主题
// try {
// emqKeeper.getMqttClient().publish("qg/yxzb", JSON.toJSONString(mapdta).getBytes(), 0, true);
// } catch (MqttException e) {
// e.printStackTrace();
// }
// return mapdta;
// }
@Scheduled
(
cron
=
"0/10 * * * * ?"
)
private
void
sendQYYXZBMqtt
()
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/application-dev1.properties
View file @
60f881c8
...
...
@@ -23,7 +23,7 @@ spring.db4.datasource.password=taosdata
spring.db4.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
## eureka properties:
eureka.instance.hostname
=
1
72.16.10.22
0
eureka.instance.hostname
=
1
0.20.1.16
0
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties:
spring.redis.database
=
1
...
...
@@ -63,10 +63,10 @@ lettuce.timeout=10000
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://1
72.16.10.220:1
883
emqx.broker
=
tcp://1
0.20.1.210:2
883
emqx.user-name
=
admin
emqx.password
=
public
mqtt.scene.host
=
mqtt://1
72.16.10.22
0:8083/mqtt
mqtt.scene.host
=
mqtt://1
0.20.1.21
0:8083/mqtt
mqtt.client.product.id
=
mqtt
mqtt.topic
=
topic_mqtt
spring.mqtt.completionTimeout
=
3000
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/application.properties
View file @
60f881c8
spring.application.name
=
AMOS-JXIOP-BIGSCREEN
spring.application.name
=
AMOS-JXIOP-BIGSCREEN
-WJ
server.servlet.context-path
=
/jxiop-bigscreen
server.port
=
33300
server.uri-encoding
=
UTF-8
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/.factorypath
View file @
60f881c8
<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/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"/>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-das/.factorypath
0 → 100644
View file @
60f881c8
<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>
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/.factorypath
View file @
60f881c8
<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/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"/>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-warn-biz/.factorypath
View file @
60f881c8
...
...
@@ -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/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/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/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"/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment