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
23b49943
Commit
23b49943
authored
Jul 24, 2024
by
lilongyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://36.40.66.175:5000/moa/jxdj_zx/amos-boot-zx-biz
into developer
parents
b2ba174c
e89aed7a
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
1177 additions
and
108 deletions
+1177
-108
TanYinApiUtils.java
...m/yeejoin/amos/api/householdapi/Utils/TanYinApiUtils.java
+8
-7
TanYinConstant.java
...eejoin/amos/api/householdapi/constant/TanYinConstant.java
+5
-1
TanYinAlramInfo.java
...i/face/orm/houseapi/entity/tdeingine/TanYinAlramInfo.java
+63
-0
TanYinAlramInfoMapper.java
...ldapi/face/orm/mapper/tdengine/TanYinAlramInfoMapper.java
+8
-0
TanYinCustomerInfoMapper.java
...pi/face/orm/mapper/tdengine/TanYinCustomerInfoMapper.java
+1
-1
TanYinDataAcquisitionService.java
...useholdapi/face/service/TanYinDataAcquisitionService.java
+9
-0
TanYinDataAcquisitionServiceImpl.java
...i/face/service/impl/TanYinDataAcquisitionServiceImpl.java
+136
-43
application-dev.properties
...-housepvapi/src/main/resources/application-dev.properties
+7
-6
application-dev1.properties
...housepvapi/src/main/resources/application-dev1.properties
+9
-2
application-kingbase8.properties
...pvapi/src/main/resources/application-kingbase8.properties
+9
-2
application-qa.properties
...a-housepvapi/src/main/resources/application-qa.properties
+9
-2
application-dev.properties
...le-hygf-biz/src/main/resources/application-dev.properties
+2
-1
application-dev1.properties
...e-hygf-biz/src/main/resources/application-dev1.properties
+2
-2
application-dev220.properties
...hygf-biz/src/main/resources/application-dev220.properties
+2
-2
application-kingbase8.properties
...f-biz/src/main/resources/application-kingbase8.properties
+2
-2
application.properties
...module-hygf-biz/src/main/resources/application.properties
+26
-11
TestController.java
...amos/boot/module/jxiop/biz/controller/TestController.java
+16
-0
IFanHealthIndexService.java
...boot/module/jxiop/biz/service/IFanHealthIndexService.java
+88
-0
IPvHealthIndexService.java
.../boot/module/jxiop/biz/service/IPvHealthIndexService.java
+115
-0
FanHealthIndexServiceImpl.java
...ule/jxiop/biz/service/impl/FanHealthIndexServiceImpl.java
+269
-0
PvHealthIndexServiceImpl.java
...dule/jxiop/biz/service/impl/PvHealthIndexServiceImpl.java
+277
-0
TdengineTimeServiceImpl.java
...odule/jxiop/biz/service/impl/TdengineTimeServiceImpl.java
+40
-1
FanHealthIndexMapper.java
...boot/module/jxiop/biz/tdMapper2/FanHealthIndexMapper.java
+5
-0
PvHealthIndexMapper.java
.../boot/module/jxiop/biz/tdMapper2/PvHealthIndexMapper.java
+4
-0
application-dev.properties
...analyse-biz/src/main/resources/application-dev.properties
+26
-24
application.properties
...iop-analyse-biz/src/main/resources/application.properties
+1
-1
FanHealthIndex.xml
...iz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
+20
-0
PvHealthIndex.xml
...biz/src/main/resources/mapper/tdengine2/PvHealthIndex.xml
+18
-0
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/Utils/TanYinApiUtils.java
View file @
23b49943
...
@@ -160,7 +160,7 @@ public class TanYinApiUtils {
...
@@ -160,7 +160,7 @@ public class TanYinApiUtils {
headers
.
put
(
"Authorization"
,
"Bearer "
+
getAccessToken
(
clientKey
,
clientSecret
));
headers
.
put
(
"Authorization"
,
"Bearer "
+
getAccessToken
(
clientKey
,
clientSecret
));
// 记录请求日志。
// 记录请求日志。
log
.
debug
(
"请求 => 碳银{}接口,url:{},参数:{},headers:{}"
,
desc
,
url
,
paramsJsonStr
,
JSON
.
toJSONString
(
headers
));
log
.
info
(
"请求 => 碳银{}接口,url:{},参数:{},headers:{}"
,
desc
,
url
,
paramsJsonStr
,
JSON
.
toJSONString
(
headers
));
HttpResponse
response
=
null
;
HttpResponse
response
=
null
;
try
{
try
{
...
@@ -254,7 +254,7 @@ public class TanYinApiUtils {
...
@@ -254,7 +254,7 @@ public class TanYinApiUtils {
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
public
<
T
,
R
>
R
parseResponse
(
String
desc
,
HttpResponse
response
,
Class
<
T
>
resultClass
)
{
public
<
T
,
R
>
R
parseResponse
(
String
desc
,
HttpResponse
response
,
Class
<
T
>
resultClass
)
{
// 记录响应日志,包括接口描述、HTTP状态码和响应体。
// 记录响应日志,包括接口描述、HTTP状态码和响应体。
log
.
debug
(
"响应 => 碳银{}接口,httpCode:{}, response:{}"
,
desc
,
response
.
getStatus
(),
response
.
body
());
log
.
info
(
"响应 => 碳银{}接口,httpCode:{}, response:{}"
,
desc
,
response
.
getStatus
(),
response
.
body
());
// 检查响应是否成功,如果不成功则直接返回null。
// 检查响应是否成功,如果不成功则直接返回null。
if
(!
response
.
isOk
())
{
if
(!
response
.
isOk
())
{
...
@@ -296,7 +296,7 @@ public class TanYinApiUtils {
...
@@ -296,7 +296,7 @@ public class TanYinApiUtils {
*/
*/
public
<
T
>
PageInfo
<
T
>
parsePageResponse
(
String
desc
,
HttpResponse
response
,
Class
<
T
>
resultClass
)
{
public
<
T
>
PageInfo
<
T
>
parsePageResponse
(
String
desc
,
HttpResponse
response
,
Class
<
T
>
resultClass
)
{
// 记录请求的响应信息到日志,包括描述、HTTP状态码和响应体。
// 记录请求的响应信息到日志,包括描述、HTTP状态码和响应体。
log
.
info
(
"响应 => 碳银{}接口,httpCode:{}, response:{}"
,
desc
,
response
.
getStatus
(),
response
.
body
());
log
.
debug
(
"响应 => 碳银{}接口,httpCode:{}, response:{}"
,
desc
,
response
.
getStatus
(),
response
.
body
());
// 将响应体解析为TanYinBaseResultDTO对象,其中包含分页数据。
// 将响应体解析为TanYinBaseResultDTO对象,其中包含分页数据。
TanYinBaseResultDTO
<
JSONObject
>
listResult
=
JSONObject
.
parseObject
(
response
.
body
(),
TanYinBaseResultDTO
.
class
);
TanYinBaseResultDTO
<
JSONObject
>
listResult
=
JSONObject
.
parseObject
(
response
.
body
(),
TanYinBaseResultDTO
.
class
);
...
@@ -318,10 +318,11 @@ public class TanYinApiUtils {
...
@@ -318,10 +318,11 @@ public class TanYinApiUtils {
TanYinPageResultDTO
tanYinPageResultDTO
=
JSONObject
.
parseObject
(
listResult
.
getData
().
toJSONString
(),
TanYinPageResultDTO
.
class
);
TanYinPageResultDTO
tanYinPageResultDTO
=
JSONObject
.
parseObject
(
listResult
.
getData
().
toJSONString
(),
TanYinPageResultDTO
.
class
);
// 将分页数据中的列表数据转换为指定类型的集合。
// 将分页数据中的列表数据转换为指定类型的集合。
List
<
T
>
newList
=
(
List
<
T
>)
tanYinPageResultDTO
.
getList
().
parallelStream
().
map
(
json
->
JSON
.
toJavaObject
((
JSON
)
json
,
resultClass
)).
collect
(
Collectors
.
toList
());
if
(
tanYinPageResultDTO
.
getList
()
!=
null
)
{
List
<
T
>
newList
=
(
List
<
T
>)
tanYinPageResultDTO
.
getList
().
parallelStream
().
map
(
json
->
JSON
.
toJavaObject
((
JSON
)
json
,
resultClass
)).
collect
(
Collectors
.
toList
());
// 将转换后的集合设置到PageInfo对象中。
// 将转换后的集合设置到PageInfo对象中。
pageInfo
.
setList
(
newList
);
pageInfo
.
setList
(
newList
);
}
// 设置分页信息,包括总页数、每页大小、当前页码和总记录数。
// 设置分页信息,包括总页数、每页大小、当前页码和总记录数。
pageInfo
.
setPages
(
tanYinPageResultDTO
.
getTotalPage
()
==
null
?
0
:
tanYinPageResultDTO
.
getTotalPage
());
pageInfo
.
setPages
(
tanYinPageResultDTO
.
getTotalPage
()
==
null
?
0
:
tanYinPageResultDTO
.
getTotalPage
());
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/constant/TanYinConstant.java
View file @
23b49943
...
@@ -29,6 +29,10 @@ public class TanYinConstant {
...
@@ -29,6 +29,10 @@ public class TanYinConstant {
*/
*/
public
static
String
inverterListUrl
=
"/v1/station/getTodayDetail"
;
public
static
String
inverterListUrl
=
"/v1/station/getTodayDetail"
;
/**
/**
* 电站逆变器故障信息接口
*/
public
static
String
inverterAlramUrl
=
"/v1/yx/query/invert/fault"
;
/**
* 获取 Access_Token
* 获取 Access_Token
*/
*/
public
static
String
getAccessTokenUrl
=
"/v1/auth/getAccessToken"
;
public
static
String
getAccessTokenUrl
=
"/v1/auth/getAccessToken"
;
...
@@ -47,7 +51,7 @@ public class TanYinConstant {
...
@@ -47,7 +51,7 @@ public class TanYinConstant {
public
static
final
HashMap
<
String
,
String
>
intoNetWorkStatus
=
new
HashMap
<
String
,
String
>()
{
public
static
final
HashMap
<
String
,
String
>
intoNetWorkStatus
=
new
HashMap
<
String
,
String
>()
{
{
{
put
(
"0"
,
"
普通并
网"
);
put
(
"0"
,
"
固定全额上
网"
);
}
}
};
};
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/houseapi/entity/tdeingine/TanYinAlramInfo.java
0 → 100644
View file @
23b49943
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
houseapi
.
entity
.
tdeingine
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 客户信息
* <p>
* ProjectName: amos-boot-zx-biz
* PackageName: com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine
*
* @author yangyang
* @version v1.0
* @date 2024/7/15 16:11
*/
@NoArgsConstructor
@Data
@TableName
(
value
=
"tanyin_alram_info"
,
autoResultMap
=
true
)
public
class
TanYinAlramInfo
{
@ApiModelProperty
(
"项目编号"
)
@TableField
(
"project_no"
)
private
String
projectNo
;
@TableField
(
"create_time"
)
private
Long
createTime
;
@ApiModelProperty
(
"逆变器 SN"
)
@TableField
(
"sn"
)
private
String
sn
;
@ApiModelProperty
(
"故障状态"
)
@TableField
(
"status"
)
private
String
status
;
@ApiModelProperty
(
"故障码"
)
@TableField
(
"code"
)
private
String
code
;
@ApiModelProperty
(
"故障等级"
)
@TableField
(
"level"
)
private
String
level
;
@ApiModelProperty
(
"故障内容"
)
@TableField
(
"content"
)
private
String
content
;
@ApiModelProperty
(
"解决方法"
)
@TableField
(
"solution"
)
private
String
solution
;
@ApiModelProperty
(
"故障发生时间"
)
@TableField
(
"fault_occur_time"
)
private
String
faultOccurTime
;
@ApiModelProperty
(
"故障结束时间"
)
@TableField
(
"fault_end_time"
)
private
String
faultEndTime
;
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/mapper/tdengine/TanYinAlramInfoMapper.java
0 → 100644
View file @
23b49943
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
mapper
.
tdengine
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.TanYinAlramInfo
;
public
interface
TanYinAlramInfoMapper
extends
BaseMapper
<
TanYinAlramInfo
>
{
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/mapper/tdengine/TanYinCustomerInfoMapper.java
View file @
23b49943
...
@@ -8,7 +8,7 @@ import java.util.List;
...
@@ -8,7 +8,7 @@ import java.util.List;
public
interface
TanYinCustomerInfoMapper
extends
BaseMapper
<
TanYinCustomerInfo
>
{
public
interface
TanYinCustomerInfoMapper
extends
BaseMapper
<
TanYinCustomerInfo
>
{
@Select
(
"select project_no from tanyin_customer_info"
)
@Select
(
"select project_no from tanyin_customer_info
group by project_no
"
)
List
<
String
>
listProjectNo
();
List
<
String
>
listProjectNo
();
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/TanYinDataAcquisitionService.java
View file @
23b49943
...
@@ -43,4 +43,13 @@ public interface TanYinDataAcquisitionService {
...
@@ -43,4 +43,13 @@ public interface TanYinDataAcquisitionService {
*/
*/
void
inverterList
();
void
inverterList
();
/**
* 告警信息
*
* @return {@link }
* @throws
* @author yangyang
* @date 2024/7/24 09:44
*/
void
inverAlramInfo
();
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/TanYinDataAcquisitionServiceImpl.java
View file @
23b49943
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
service
.
impl
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.map.MapBuilder
;
import
cn.hutool.core.map.MapBuilder
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
...
@@ -15,7 +16,9 @@ import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpStation
...
@@ -15,7 +16,9 @@ import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpStation
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.HYGFJPDayPower
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.HYGFJPDayPower
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.HYGFJPInverterElecHistory
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.HYGFJPInverterElecHistory
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.HYGFJPInverterHistory
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.HYGFJPInverterHistory
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.HYGFJPInverterWarn
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.HYGFJPStationPowerHistory
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.HYGFJPStationPowerHistory
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.TanYinAlramInfo
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.TanYinCustomerInfo
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.TanYinCustomerInfo
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.TanYinInveterInfo
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.TanYinInveterInfo
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.TanYinStationInfo
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.TanYinStationInfo
;
...
@@ -36,10 +39,7 @@ import com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.HYGFJPInverter
...
@@ -36,10 +39,7 @@ import com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.HYGFJPInverter
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.HYGFJPInverterHistoryMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.HYGFJPInverterHistoryMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.HYGFJPInverterWarnMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.HYGFJPInverterWarnMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.HYGFJPStationPowerHistoryMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.HYGFJPStationPowerHistoryMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.KsolarStationCollectListMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TanYinAlramInfoMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.KsolarStationDetailsMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.KsolarStationEarnMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.KsolarStationMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TanYinCustomerInfoMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TanYinCustomerInfoMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TanYinInveterInfoMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TanYinInveterInfoMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TanYinStationInfoMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TanYinStationInfoMapper
;
...
@@ -47,14 +47,12 @@ import com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdHYGFInverter
...
@@ -47,14 +47,12 @@ import com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdHYGFInverter
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdHYGFInverterMonthGenerateMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdHYGFInverterMonthGenerateMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdHYGFInverterTotalGenerateMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdHYGFInverterTotalGenerateMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdHYGFInverterYearGenerateMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdHYGFInverterYearGenerateMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdHYGFStationAllGenerateMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdHYGFStationMonthGenerateMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdHYGFStationYearGenerateMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdJpStationMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine.TdJpStationMapper
;
import
com.yeejoin.amos.api.householdapi.face.service.TanYinDataAcquisitionService
;
import
com.yeejoin.amos.api.householdapi.face.service.TanYinDataAcquisitionService
;
import
com.yeejoin.amos.openapi.enums.PVProducerInfoEnum
;
import
com.yeejoin.amos.openapi.enums.PVProducerInfoEnum
;
import
fastjson.JSON
;
import
fastjson.JSON
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
...
@@ -68,11 +66,9 @@ import java.text.SimpleDateFormat;
...
@@ -68,11 +66,9 @@ import java.text.SimpleDateFormat;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -96,9 +92,6 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -96,9 +92,6 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
@Resource
(
type
=
TanYinApiUtils
.
class
)
@Resource
(
type
=
TanYinApiUtils
.
class
)
private
TanYinApiUtils
tanYinApiUtils
;
private
TanYinApiUtils
tanYinApiUtils
;
@Resource
(
type
=
RedisUtils
.
class
)
private
RedisUtils
redisUtils
;
@Resource
(
type
=
TanYinCustomerInfoMapper
.
class
)
@Resource
(
type
=
TanYinCustomerInfoMapper
.
class
)
private
TanYinCustomerInfoMapper
tanYinCustomerInfoMapper
;
private
TanYinCustomerInfoMapper
tanYinCustomerInfoMapper
;
...
@@ -108,6 +101,9 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -108,6 +101,9 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
@Resource
(
type
=
TanYinInveterInfoMapper
.
class
)
@Resource
(
type
=
TanYinInveterInfoMapper
.
class
)
private
TanYinInveterInfoMapper
tanYinInveterInfoMapper
;
private
TanYinInveterInfoMapper
tanYinInveterInfoMapper
;
@Resource
(
type
=
TanYinAlramInfoMapper
.
class
)
private
TanYinAlramInfoMapper
tanYinAlramInfoMapper
;
@Autowired
@Autowired
private
JpStationMapper
jpStationMapper
;
private
JpStationMapper
jpStationMapper
;
...
@@ -166,7 +162,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -166,7 +162,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
private
final
static
String
pageNo
=
"1"
;
private
final
static
String
pageNo
=
"1"
;
private
final
static
String
pageSize
=
"
100
"
;
private
final
static
String
pageSize
=
"
999
"
;
/**
/**
* 每隔 10分钟通过并网时间段同步碳银对应范围内的项目信息
* 每隔 10分钟通过并网时间段同步碳银对应范围内的项目信息
...
@@ -180,24 +176,36 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -180,24 +176,36 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
@Scheduled
(
cron
=
"${dataRequestScheduled.tanYin}"
)
@Scheduled
(
cron
=
"${dataRequestScheduled.tanYin}"
)
@Override
@Override
public
void
customerInfoList
()
{
public
void
customerInfoList
()
{
long
ts
=
System
.
currentTimeMillis
();
try
{
log
.
info
(
"-------碳银同步项目信息开始: {} ------- "
,
ts
);
String
startDate
=
LocalDate
.
now
().
minusMonths
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
Map
<
String
,
Object
>
params
=
MapBuilder
.<
String
,
Object
>
create
()
String
endDate
=
LocalDate
.
now
().
plusDays
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
.
put
(
"pageNo"
,
pageNo
)
log
.
info
(
"-------碳银同步项目信息开始: {} ------- "
,
sdf
.
format
(
new
Date
()));
.
put
(
"pageSize"
,
pageSize
)
// 每页行数
Map
<
String
,
Object
>
params
=
MapBuilder
.<
String
,
Object
>
create
()
.
put
(
"startDate"
,
LocalDate
.
now
().
minusYears
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)))
// 开始时间 YYYY-MM-dd
.
put
(
"pageNo"
,
pageNo
)
.
put
(
"endDate"
,
LocalDate
.
now
().
plusDays
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
)))
// 结束时间 YYYY-MM-dd
.
put
(
"pageSize"
,
pageSize
)
// 每页行数
.
build
();
.
put
(
"startDate"
,
startDate
)
// 开始时间 YYYY-MM-dd
PageInfo
<
TanYinCustomerInfo
>
tanYinCustomerInfos
=
tanYinApiUtils
.
postPage
(
"客户信息"
,
apiUrl
+
TanYinConstant
.
customerInfoUrl
,
JSON
.
toJSONString
(
params
),
null
,
TanYinCustomerInfo
.
class
);
.
put
(
"endDate"
,
endDate
)
// 结束时间 YYYY-MM-dd
if
(
tanYinCustomerInfos
==
null
||
CollectionUtils
.
isEmpty
(
tanYinCustomerInfos
.
getList
()))
{
.
build
();
return
;
PageInfo
<
TanYinCustomerInfo
>
tanYinCustomerInfos
=
tanYinApiUtils
.
postPage
(
"客户信息"
,
apiUrl
+
TanYinConstant
.
customerInfoUrl
,
JSON
.
toJSONString
(
params
),
null
,
TanYinCustomerInfo
.
class
);
}
if
(
tanYinCustomerInfos
==
null
||
CollectionUtils
.
isEmpty
(
tanYinCustomerInfos
.
getList
()))
{
for
(
TanYinCustomerInfo
tanYinCustomerInfo
:
tanYinCustomerInfos
.
getList
())
{
log
.
warn
(
"-------碳银同步项目信息结束: 未获取到项目信息 ------- "
);
if
(
tanYinCustomerInfoMapper
.
update
(
tanYinCustomerInfo
,
new
QueryWrapper
<
TanYinCustomerInfo
>().
lambda
().
eq
(
TanYinCustomerInfo:
:
getProjectNo
,
tanYinCustomerInfo
.
getProjectNo
()))
==
0
)
{
return
;
tanYinCustomerInfoMapper
.
insert
(
tanYinCustomerInfo
);
}
for
(
TanYinCustomerInfo
tanYinCustomerInfo
:
tanYinCustomerInfos
.
getList
())
{
TanYinCustomerInfo
oldTanYinCustomerInfo
=
tanYinCustomerInfoMapper
.
selectOne
(
new
QueryWrapper
<
TanYinCustomerInfo
>().
eq
(
"project_no"
,
tanYinCustomerInfo
.
getProjectNo
()).
eq
(
"customer_id_no"
,
tanYinCustomerInfo
.
getCustomerIdNo
()).
eq
(
"customer_phone"
,
tanYinCustomerInfo
.
getCustomerPhone
()).
orderByDesc
(
"create_time"
).
last
(
"limit 1"
));
if
(
oldTanYinCustomerInfo
==
null
)
{
tanYinCustomerInfo
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinCustomerInfoMapper
.
insert
(
tanYinCustomerInfo
);
}
else
{
tanYinCustomerInfo
.
setCreateTime
(
oldTanYinCustomerInfo
.
getCreateTime
());
tanYinCustomerInfoMapper
.
insert
(
tanYinCustomerInfo
);
}
}
}
log
.
info
(
"-------碳银同步项目信息结束: {} ------- "
,
sdf
.
format
(
new
Date
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"-------碳银同步项目信息异常: {} ------- "
,
e
);
}
}
log
.
info
(
"-------碳银同步项目信息结束: {} ------- "
,
ts
,
sdf
.
format
(
new
Date
()));
}
}
/**
/**
...
@@ -216,10 +224,9 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -216,10 +224,9 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
long
ts
=
System
.
currentTimeMillis
();
long
ts
=
System
.
currentTimeMillis
();
log
.
info
(
"-------碳银同步电站开始: {} ------- "
,
ts
);
log
.
info
(
"-------碳银同步电站开始: {} ------- "
,
ts
);
List
<
String
>
projectNos
=
tanYinCustomerInfoMapper
.
listProjectNo
();
List
<
String
>
projectNos
=
tanYinCustomerInfoMapper
.
listProjectNo
();
// projectNos.add("TF2024060312382700202");
// String powerDate = "2024-07-17";
String
powerDate
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
String
powerDate
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
if
(
CollectionUtils
.
isEmpty
(
projectNos
))
{
if
(
CollectionUtils
.
isEmpty
(
projectNos
))
{
log
.
warn
(
"-------碳银同步电站结束: 未同步到项目信息 -------"
);
return
;
return
;
}
}
List
<
List
<
String
>>
projectNoLists
=
ListUtil
.
partition
(
projectNos
,
200
);
// 每次最多 200个
List
<
List
<
String
>>
projectNoLists
=
ListUtil
.
partition
(
projectNos
,
200
);
// 每次最多 200个
...
@@ -228,11 +235,12 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -228,11 +235,12 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
Map
<
String
,
Object
>
params
=
MapBuilder
.<
String
,
Object
>
create
().
put
(
"projectNoList"
,
projectNoList
).
put
(
"powerDate"
,
powerDate
).
build
();
Map
<
String
,
Object
>
params
=
MapBuilder
.<
String
,
Object
>
create
().
put
(
"projectNoList"
,
projectNoList
).
put
(
"powerDate"
,
powerDate
).
build
();
List
<
TanYinStationInfo
>
tanYinStationInfoList
=
tanYinApiUtils
.
post
(
"电站基本信息"
,
apiUrl
+
TanYinConstant
.
stationListUrl
,
params
,
null
,
TanYinStationInfo
.
class
);
List
<
TanYinStationInfo
>
tanYinStationInfoList
=
tanYinApiUtils
.
post
(
"电站基本信息"
,
apiUrl
+
TanYinConstant
.
stationListUrl
,
params
,
null
,
TanYinStationInfo
.
class
);
if
(
CollectionUtils
.
isEmpty
(
tanYinStationInfoList
))
{
if
(
CollectionUtils
.
isEmpty
(
tanYinStationInfoList
))
{
return
;
continue
;
}
}
tanYinStationInfos
.
addAll
(
tanYinStationInfoList
);
tanYinStationInfos
.
addAll
(
tanYinStationInfoList
);
}
}
if
(
CollectionUtils
.
isEmpty
(
tanYinStationInfos
))
{
if
(
CollectionUtils
.
isEmpty
(
tanYinStationInfos
))
{
log
.
warn
(
"-------碳银同步电站结束: 未同步到电站基本信息 -------"
);
return
;
return
;
}
}
List
<
String
>
stationIds
=
tanYinStationInfos
.
stream
().
map
(
TanYinStationInfo:
:
getProjectNo
).
collect
(
Collectors
.
toList
());
List
<
String
>
stationIds
=
tanYinStationInfos
.
stream
().
map
(
TanYinStationInfo:
:
getProjectNo
).
collect
(
Collectors
.
toList
());
...
@@ -281,14 +289,16 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -281,14 +289,16 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
// jpStation.setPrice();
// jpStation.setPrice();
// 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
.
setOnGridType
(
TanYinConstant
.
intoNetWorkStatus
.
get
(
"0"
));
// 没有该字段默认写死
jpStation
.
setOnGridType
(
TanYinConstant
.
intoNetWorkStatus
.
get
(
"0"
));
// 没有该字段默认写死
// jpStation.setOnGridTime();
// 去tanyin_customer_info 查询并网时间
TanYinCustomerInfo
tanYinCustomerInfo
=
tanYinCustomerInfoMapper
.
selectOne
(
new
QueryWrapper
<
TanYinCustomerInfo
>().
eq
(
"project_no"
,
tanYinStationInfo
.
getProjectNo
()).
eq
(
"customer_id_no"
,
tanYinStationInfo
.
getCustomerIdNo
()).
eq
(
"customer_phone"
,
tanYinStationInfo
.
getCustomerPhone
()).
orderByDesc
(
"create_time"
).
last
(
" limit 1"
));
// 收益 = 发电量 * 0.45 @wujiang 确认过
jpStation
.
setOnGridTime
(
tanYinCustomerInfo
!=
null
?
new
Date
(
tanYinCustomerInfo
.
getElectricContractPass
())
:
null
);
jpStation
.
setDayIncome
(
tanYinStationInfo
.
getDayPower
()
!=
null
?
Double
.
parseDouble
(
tanYinStationInfo
.
getDayPower
())
*
0.45
:
0.0
);
jpStation
.
setDayIncome
(
tanYinStationInfo
.
getDayPower
()
!=
null
?
Double
.
parseDouble
(
tanYinStationInfo
.
getDayPower
())
*
0.45
:
0.0
);
jpStation
.
setMonthIncome
(
tanYinStationInfo
.
getMonthPower
()
!=
null
?
Double
.
parseDouble
(
tanYinStationInfo
.
getMonthPower
())
*
0.45
:
0.0
);
jpStation
.
setMonthIncome
(
tanYinStationInfo
.
getMonthPower
()
!=
null
?
Double
.
parseDouble
(
tanYinStationInfo
.
getMonthPower
())
*
0.45
:
0.0
);
jpStation
.
setYearIncome
(
tanYinStationInfo
.
getYearPower
()
!=
null
?
Double
.
parseDouble
(
tanYinStationInfo
.
getYearPower
())
*
0.45
:
0.0
);
jpStation
.
setYearIncome
(
tanYinStationInfo
.
getYearPower
()
!=
null
?
Double
.
parseDouble
(
tanYinStationInfo
.
getYearPower
())
*
0.45
:
0.0
);
jpStation
.
setCumulativeIncome
(
tanYinStationInfo
.
getTotalPower
()
!=
null
?
Double
.
parseDouble
(
tanYinStationInfo
.
getTotalPower
())
*
0.45
:
0.0
);
jpStation
.
setCumulativeIncome
(
tanYinStationInfo
.
getTotalPower
()
!=
null
?
Double
.
parseDouble
(
tanYinStationInfo
.
getTotalPower
())
*
0.45
:
0.0
);
jpStation
.
setArea
(
tanYinStationInfo
.
getArea
());
jpStation
.
setArea
(
tanYinStationInfo
.
getArea
());
// jpStation.setEmail();
// jpStation.setEmail();
// jpStation.setAccessTime();
// jpStation.setCreateTime();
// jpStation.setCreateTime();
// jpStation.setRatedPower();
// jpStation.setRatedPower();
jpStation
.
setType
(
"家庭户用"
);
jpStation
.
setType
(
"家庭户用"
);
...
@@ -417,6 +427,8 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -417,6 +427,8 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
log
.
info
(
"-------碳银同步逆变器开始: {} ------- "
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
log
.
info
(
"-------碳银同步逆变器开始: {} ------- "
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
inverterList
(
tanYinInveterInfos
);
inverterList
(
tanYinInveterInfos
);
log
.
info
(
"-------碳银同步逆变器结束: {} ------- "
+
ts
+
"------- "
+
sdf
.
format
(
new
Date
()));
}
}
@Override
@Override
...
@@ -424,6 +436,83 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -424,6 +436,83 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
}
}
@Scheduled
(
cron
=
"${dataRequestScheduled.tanYin.warn}"
)
@Override
public
void
inverAlramInfo
()
{
log
.
info
(
"-------碳银同步逆变器告警开始: {} ------- "
,
sdf
.
format
(
new
Date
()));
// region 先获取逆变器数据
List
<
JpInverter
>
jpInverters
=
jpInverterMapper
.
selectList
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
TANYIN
.
getCode
()));
if
(
CollectionUtils
.
isEmpty
(
jpInverters
))
{
log
.
warn
(
"-------碳银同步逆变器告警结束: 未获取到逆变器信息 ------- "
);
return
;
}
List
<
String
>
stationIds
=
jpInverters
.
stream
().
map
(
JpInverter:
:
getThirdStationId
).
collect
(
Collectors
.
toList
());
List
<
JpStation
>
jpStations
=
jpStationMapper
.
selectList
(
new
QueryWrapper
<
JpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
TANYIN
.
getCode
()).
in
(
"third_station_id"
,
stationIds
));
Map
<
String
,
JpStation
>
jpStationMap
=
jpStations
.
stream
().
collect
(
Collectors
.
toMap
(
JpStation:
:
getThirdStationId
,
Function
.
identity
()));
for
(
JpInverter
inverter
:
jpInverters
)
{
JpStation
jpStation
=
jpStationMap
.
get
(
inverter
.
getThirdStationId
());
if
(
jpStation
==
null
)
{
continue
;
}
this
.
inverAlramInfo
(
inverter
,
jpStation
);
}
log
.
info
(
"-------碳银同步逆变器告警结束: {} ------- "
,
sdf
.
format
(
new
Date
()));
}
@Async
public
void
inverAlramInfo
(
JpInverter
jpInverter
,
JpStation
jpStation
)
{
if
(
jpInverter
==
null
||
StringUtils
.
isEmpty
(
jpInverter
.
getSnCode
()))
{
return
;
}
String
startDate
=
LocalDate
.
now
().
minusYears
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
String
endDate
=
LocalDate
.
now
().
plusDays
(
1
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
Map
<
String
,
Object
>
params
=
MapBuilder
.<
String
,
Object
>
create
()
.
put
(
"sn"
,
jpInverter
.
getSnCode
())
.
put
(
"pageNo"
,
pageNo
)
.
put
(
"pageSize"
,
pageSize
)
.
put
(
"startDate"
,
startDate
)
.
put
(
"endDate"
,
endDate
).
build
();
PageInfo
<
TanYinAlramInfo
>
tanYinInveterInfo
=
tanYinApiUtils
.
postPage
(
"电站逆变器故障信息"
,
apiUrl
+
TanYinConstant
.
inverterAlramUrl
,
JSON
.
toJSONString
(
params
),
null
,
TanYinAlramInfo
.
class
);
List
<
TanYinAlramInfo
>
tanYinAlramInfos
=
tanYinInveterInfo
.
getList
();
for
(
TanYinAlramInfo
tanYinAlramInfo
:
tanYinAlramInfos
)
{
tanYinAlramInfo
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinAlramInfoMapper
.
insert
(
tanYinAlramInfo
);
HYGFJPInverterWarn
hygfjpInverterWarn
=
new
HYGFJPInverterWarn
();
hygfjpInverterWarn
.
setTime
(
System
.
currentTimeMillis
());
hygfjpInverterWarn
.
setSnCode
(
tanYinAlramInfo
.
getSn
());
hygfjpInverterWarn
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
hygfjpInverterWarn
.
setLevel
(
tanYinAlramInfo
.
getLevel
());
hygfjpInverterWarn
.
setWarnId
(
tanYinAlramInfo
.
getCode
());
hygfjpInverterWarn
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpInverterWarn
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpInverterWarn
.
setStationName
(
jpStation
.
getName
());
hygfjpInverterWarn
.
setStationState
(
jpStation
.
getState
());
hygfjpInverterWarn
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterWarn
.
setThirdCode
(
PVProducerInfoEnum
.
TANYIN
.
getCode
());
hygfjpInverterWarn
.
setContent
(
tanYinAlramInfo
.
getContent
());
hygfjpInverterWarn
.
setTreatment
(
tanYinAlramInfo
.
getSolution
());
hygfjpInverterWarn
.
setState
(
tanYinAlramInfo
.
getStatus
());
if
(!
ObjectUtils
.
isEmpty
(
tanYinAlramInfo
.
getFaultEndTime
()))
{
hygfjpInverterWarn
.
setRecoverTime
(
Long
.
valueOf
(
tanYinAlramInfo
.
getFaultEndTime
()));
}
if
(!
ObjectUtils
.
isEmpty
(
tanYinAlramInfo
.
getFaultOccurTime
()))
{
hygfjpInverterWarn
.
setStartTime
(
Long
.
valueOf
(
tanYinAlramInfo
.
getFaultOccurTime
()));
}
hygfjpInverterWarn
.
setTimeLong
(
null
);
if
((!
ObjectUtils
.
isEmpty
(
tanYinAlramInfo
.
getFaultOccurTime
()))
&&
(!
ObjectUtils
.
isEmpty
(
tanYinAlramInfo
.
getFaultEndTime
())))
{
hygfjpInverterWarn
.
setTimeLong
(
this
.
convertDate
(
hygfjpInverterWarn
.
getRecoverTime
())
-
this
.
convertDate
(
hygfjpInverterWarn
.
getStartTime
()));
}
if
(
ObjectUtils
.
isEmpty
(
hygfjpInverterWarn
.
getCreatedTime
()))
{
hygfjpInverterWarn
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterWarnMapper
.
insert
(
hygfjpInverterWarn
);
}
else
{
hygfjpInverterWarnMapper
.
insert
(
hygfjpInverterWarn
);
}
}
}
public
void
inverterList
(
List
<
TanYinInveterInfo
>
tanYinInveterInfos
)
{
public
void
inverterList
(
List
<
TanYinInveterInfo
>
tanYinInveterInfos
)
{
if
(
CollectionUtils
.
isEmpty
(
tanYinInveterInfos
))
{
if
(
CollectionUtils
.
isEmpty
(
tanYinInveterInfos
))
{
return
;
return
;
...
@@ -444,6 +533,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -444,6 +533,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
tanYinInveterInfoResultMap
.
putAll
(
tanYinInveterInfoResult
);
tanYinInveterInfoResultMap
.
putAll
(
tanYinInveterInfoResult
);
}
}
for
(
TanYinInveterInfo
tanYinInveterInfo
:
tanYinInveterInfos
)
{
for
(
TanYinInveterInfo
tanYinInveterInfo
:
tanYinInveterInfos
)
{
// region 逆变器信息
JSONObject
tanYinInveterInfoResultJson
=
tanYinInveterInfoResultMap
.
getJSONObject
(
tanYinInveterInfo
.
getSn
());
JSONObject
tanYinInveterInfoResultJson
=
tanYinInveterInfoResultMap
.
getJSONObject
(
tanYinInveterInfo
.
getSn
());
TanYinInveterInfo
tanYinInveterInfoDTO
=
tanYinInveterInfoResultJson
.
toJavaObject
(
TanYinInveterInfo
.
class
);
TanYinInveterInfo
tanYinInveterInfoDTO
=
tanYinInveterInfoResultJson
.
toJavaObject
(
TanYinInveterInfo
.
class
);
tanYinInveterInfoDTO
.
setProjectNo
(
tanYinInveterInfo
.
getProjectNo
());
tanYinInveterInfoDTO
.
setProjectNo
(
tanYinInveterInfo
.
getProjectNo
());
...
@@ -452,7 +542,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -452,7 +542,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
tanYinInveterInfoDTO
.
setSupplier
(
tanYinInveterInfo
.
getSupplier
());
tanYinInveterInfoDTO
.
setSupplier
(
tanYinInveterInfo
.
getSupplier
());
tanYinInveterInfoDTO
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinInveterInfoDTO
.
setCreateTime
(
System
.
currentTimeMillis
());
tanYinInveterInfoMapper
.
insert
(
tanYinInveterInfoDTO
);
tanYinInveterInfoMapper
.
insert
(
tanYinInveterInfoDTO
);
// endregion
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
JpInverter
jpInverter
=
jpInverterMapper
.
selectOne
(
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_station_id"
,
tanYinInveterInfo
.
getProjectNo
())
new
QueryWrapper
<
JpInverter
>().
eq
(
"third_station_id"
,
tanYinInveterInfo
.
getProjectNo
())
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
TANYIN
.
getCode
())
.
eq
(
"third_code"
,
PVProducerInfoEnum
.
TANYIN
.
getCode
())
...
@@ -477,10 +567,8 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -477,10 +567,8 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
jpStationMap
.
put
(
tanYinInveterInfo
.
getProjectNo
(),
jpStation
);
jpStationMap
.
put
(
tanYinInveterInfo
.
getProjectNo
(),
jpStation
);
}
}
// 逆变器没有就空着
// 逆变器没有就空着
// jpInverter.setDayPowerGeneration(jpStation.getDayGenerate());
jpInverter
.
setMonthPowerGeneration
(
jpStation
.
getMonthGenerate
());
// jpInverter.setMonthPowerGeneration(jpStation.getMonthGenerate());
jpInverter
.
setYearPowerGeneration
(
jpStation
.
getYearGenerate
());
// jpInverter.setYearPowerGeneration(jpStation.getYearGenerate());
// jpInverter.setTotalPowerGeneration(jpStation.getAccumulatedPower());
jpInverter
.
setStationName
(
jpStation
.
getName
());
jpInverter
.
setStationName
(
jpStation
.
getName
());
jpInverter
.
setAddr
(
jpStation
.
getAddress
());
jpInverter
.
setAddr
(
jpStation
.
getAddress
());
jpInverter
.
setCapacity
(
jpStation
.
getCapacity
());
jpInverter
.
setCapacity
(
jpStation
.
getCapacity
());
...
@@ -495,7 +583,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -495,7 +583,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
}
else
{
}
else
{
jpInverterMapper
.
insert
(
jpInverter
);
jpInverterMapper
.
insert
(
jpInverter
);
}
}
// 解析电站逆变器信息
//
region
解析电站逆变器信息
// 确认先按照 vol1, amp1 这样入库
// 确认先按照 vol1, amp1 这样入库
for
(
int
k
=
0
;
k
<=
15
;
k
++)
{
for
(
int
k
=
0
;
k
<=
15
;
k
++)
{
String
name
=
"vol"
+
k
;
String
name
=
"vol"
+
k
;
...
@@ -551,7 +639,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -551,7 +639,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
jpInverterElectricityMapper
.
updateById
(
jpInverterElectricity
);
jpInverterElectricityMapper
.
updateById
(
jpInverterElectricity
);
}
}
}
}
// endregion
HYGFJPInverterElecHistory
hygfjpInverterElecHistory
=
new
HYGFJPInverterElecHistory
();
HYGFJPInverterElecHistory
hygfjpInverterElecHistory
=
new
HYGFJPInverterElecHistory
();
hygfjpInverterElecHistory
.
setThirdStationId
(
jpInverter
.
getThirdStationId
());
hygfjpInverterElecHistory
.
setThirdStationId
(
jpInverter
.
getThirdStationId
());
hygfjpInverterElecHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterElecHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
...
@@ -584,7 +672,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -584,7 +672,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
.
setGenerationHours
(
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
());
.
setGenerationHours
(
jpInverter
.
getDayPowerGeneration
()
/
jpInverter
.
getCapacity
());
}
}
// hygfjpInverterHistory.setPowerGeneration(tanYinInveterInfoDTO.getWatt()
);
hygfjpInverterHistory
.
setPowerGeneration
(
tanYinInveterInfoDTO
.
getWatt
()
!=
null
?
Double
.
parseDouble
(
tanYinInveterInfoDTO
.
getWatt
())
:
null
);
if
(
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
hygfjpInverterHistory
.
getCreatedTime
()))
{
if
(
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
hygfjpInverterHistory
.
getCreatedTime
()))
{
hygfjpInverterHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterHistoryMapper
.
insert
(
hygfjpInverterHistory
);
hygfjpInverterHistoryMapper
.
insert
(
hygfjpInverterHistory
);
...
@@ -730,9 +818,14 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
...
@@ -730,9 +818,14 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
}
else
{
}
else
{
tdHYGFInverterTotalGenerateMapper
.
insert
(
tdHYGFInverterTotalGenerate
);
tdHYGFInverterTotalGenerateMapper
.
insert
(
tdHYGFInverterTotalGenerate
);
}
}
inverAlramInfo
(
jpInverter
,
jpStation
);
}
}
}
}
private
Long
convertDate
(
Long
input
)
{
Date
date
=
DateUtil
.
date
(
input
);
return
DateUtil
.
parse
(
DateUtil
.
format
(
date
,
DatePattern
.
NORM_DATETIME_PATTERN
)).
getTime
();
}
}
}
amos-boot-data/amos-boot-data-housepvapi/src/main/resources/application-dev.properties
View file @
23b49943
## DB properties hygf
## DB properties hygf
## db1-production database
## db1-production database
spring.db1.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url
=
jdbc:mysql://47.92.234.253:3306/amos_openapi?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.url
=
jdbc:mysql://47.92.234.253:
1
3306/amos_openapi?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.username
=
root
spring.db1.datasource.username
=
root
spring.db1.datasource.password
=
Yeejoin
@2020
spring.db1.datasource.password
=
Yeejoin
_1234
spring.db1.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.db1.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
## db2-sync_data
## db2-sync_data
spring.db2.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.url
=
jdbc:mysql://47.92.234.253:3306/amos_project?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.url
=
jdbc:mysql://47.92.234.253:
1
3306/amos_project?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.username
=
root
spring.db2.datasource.username
=
root
spring.db2.datasource.password
=
Yeejoin
@2020
spring.db2.datasource.password
=
Yeejoin
_1234
spring.db2.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.db2.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
## db3-taosiData
## db3-taosiData
spring.db3.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
...
@@ -78,4 +78,5 @@ dataRequstScheduled.Sofar=0 0/50 * * * *
...
@@ -78,4 +78,5 @@ dataRequstScheduled.Sofar=0 0/50 * * * *
tanYin.api.apiUrl
=
https://userauth.tanwin.cn
tanYin.api.apiUrl
=
https://userauth.tanwin.cn
tanYin.api.clientSecret
=
rKrWVa2sXsSZeNAOW43v
tanYin.api.clientSecret
=
rKrWVa2sXsSZeNAOW43v
tanYin.api.clientKey
=
yx10001
tanYin.api.clientKey
=
yx10001
dataRequestScheduled.tanYin
=
0 0/10 * * * *
dataRequestScheduled.tanYin
=
0 0/10 * * * *
\ No newline at end of file
dataRequestScheduled.tanYin.warn
=
0 0/5 * * * *
\ No newline at end of file
amos-boot-data/amos-boot-data-housepvapi/src/main/resources/application-dev1.properties
View file @
23b49943
...
@@ -44,4 +44,11 @@ emqx.client-user-name=admin
...
@@ -44,4 +44,11 @@ emqx.client-user-name=admin
emqx.client-password
=
public
emqx.client-password
=
public
##biz custem properties
##biz custem properties
biz.lxyd.lift.url
=
http://39.106.181.149:8088/elevatorapi
biz.lxyd.lift.url
=
http://39.106.181.149:8088/elevatorapi
\ No newline at end of file
# 碳银
tanYin.api.apiUrl
=
https://userauth.tanwin.cn
tanYin.api.clientSecret
=
rKrWVa2sXsSZeNAOW43v
tanYin.api.clientKey
=
yx10001
dataRequestScheduled.tanYin
=
0 0/10 * * * *
dataRequestScheduled.tanYin.warn
=
0 0/5 * * * *
\ No newline at end of file
amos-boot-data/amos-boot-data-housepvapi/src/main/resources/application-kingbase8.properties
View file @
23b49943
...
@@ -72,4 +72,11 @@ dataRequstScheduled.keshida=0 0/50 * * * *
...
@@ -72,4 +72,11 @@ dataRequstScheduled.keshida=0 0/50 * * * *
dataRequstScheduled.Sunlight
=
0 0/50 * * * *
dataRequstScheduled.Sunlight
=
0 0/50 * * * *
dataRequstScheduled.GoodWe
=
0 0/3 * * * *
dataRequstScheduled.GoodWe
=
0 0/3 * * * *
dataRequstScheduled.Sofar
=
0 0/50 * * * *
dataRequstScheduled.Sofar
=
0 0/50 * * * *
\ No newline at end of file
# 碳银
tanYin.api.apiUrl
=
https://userauth.tanwin.cn
tanYin.api.clientSecret
=
rKrWVa2sXsSZeNAOW43v
tanYin.api.clientKey
=
yx10001
dataRequestScheduled.tanYin
=
0 0/10 * * * *
dataRequestScheduled.tanYin.warn
=
0 0/5 * * * *
\ No newline at end of file
amos-boot-data/amos-boot-data-housepvapi/src/main/resources/application-qa.properties
View file @
23b49943
...
@@ -46,4 +46,11 @@ emqx.user-name=admin
...
@@ -46,4 +46,11 @@ emqx.user-name=admin
emqx.password
=
public
emqx.password
=
public
##biz custem properties
##biz custem properties
biz.lxyd.lift.url
=
http://39.106.181.149:8088/elevatorapi
biz.lxyd.lift.url
=
http://39.106.181.149:8088/elevatorapi
\ No newline at end of file
# 碳银
tanYin.api.apiUrl
=
https://userauth.tanwin.cn
tanYin.api.clientSecret
=
rKrWVa2sXsSZeNAOW43v
tanYin.api.clientKey
=
yx10001
dataRequestScheduled.tanYin
=
0 0/10 * * * *
dataRequestScheduled.tanYin.warn
=
0 0/5 * * * *
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-dev.properties
View file @
23b49943
...
@@ -254,7 +254,8 @@ hygf.icbc.corpNo=10000000000000088011
...
@@ -254,7 +254,8 @@ hygf.icbc.corpNo=10000000000000088011
hygf.icbc.myPrivateKey
=
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCxMt/01YNUsTfG6ml8Nyw7Xs80k3G72mmnD8mpR5v6ZU0v7i8lynBJxqDWFRqo6brZr/yzneyuEM0c+qbhYA4NNgWuri87PFWZND5H249ZpEZPmnZSOg6R7Rw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5xGJdh7qb+B95SUoxDlatg==
hygf.icbc.camsPublicKey
=
040978047533e0e7381dbb5d794b268cd68ad4655712d3de5bb37d6883c02e474374ff4dac6d706cef661aaa788c1dfc2c2f74b91d05f406ea135b865b416c8f97
#hygf.icbc.camsPublicKey=040978047533e0e7381dbb5d794b268cd68ad4655712d3de5bb37d6883c02e474374ff4dac6d706cef661aaa788c1dfc2c2f74b91d05f406ea135b865b416c8f97
hygf.icbc.camsPublicKey
=
7E095625BE87DF744C916E40BD6B1C1EA486125CA566006062D8FFBBD8BD536ABA64DA6B6A6070D65148A734F660A2A742372E5965E87F99CD644FAB5F6DF2B2
hygf.icbc.apigwPublicKey
=
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB
hygf.icbc.apigwPublicKey
=
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB
hygf.icbc.outVendorId
=
071301
hygf.icbc.outVendorId
=
071301
hygf.icbc.projectId
=
PJ14001401B000160171
hygf.icbc.projectId
=
PJ14001401B000160171
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-dev1.properties
View file @
23b49943
...
@@ -255,8 +255,8 @@ hygf.icbc.corpNo=10000000000000088011
...
@@ -255,8 +255,8 @@ hygf.icbc.corpNo=10000000000000088011
hygf.icbc.myPrivate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BL/Hw8hRFlt5ycpy2YyAZ/jdnoNiOuM5koFpQFvfs
hygf.icbc.serviceUrl
=
https://apipcs3.dccnet.com.cn
hygf.icbc.serviceUrl
=
https://apipcs3.dccnet.com.cn
hygf.icbc.aesKey
=
5xGJdh7qb+B95SUoxDlatg==
hygf.icbc.aesKey
=
5xGJdh7qb+B95SUoxDlatg==
hygf.icbc.camsPublicKey
=
040978047533e0e7381dbb5d794b268cd68ad4655712d3de5bb37d6883c02e474374ff4dac6d706cef661aaa788c1dfc2c2f74b91d05f406ea135b865b416c8f97
#
hygf.icbc.camsPublicKey=040978047533e0e7381dbb5d794b268cd68ad4655712d3de5bb37d6883c02e474374ff4dac6d706cef661aaa788c1dfc2c2f74b91d05f406ea135b865b416c8f97
hygf.icbc.apigwPublicKey
=
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB
hygf.icbc.
camsPublicKey
=
7E095625BE87DF744C916E40BD6B1C1EA486125CA566006062D8FFBBD8BD536ABA64DA6B6A6070D65148A734F660A2A742372E5965E87F99CD644FAB5F6DF2B2hygf.icbc.
apigwPublicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB
hygf.icbc.outVendorId
=
071301
hygf.icbc.outVendorId
=
071301
hygf.icbc.projectId
=
PJ14001401B000160171
hygf.icbc.projectId
=
PJ14001401B000160171
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-dev220.properties
View file @
23b49943
...
@@ -233,8 +233,8 @@ hygf.icbc.corpNo=10000000000000088011
...
@@ -233,8 +233,8 @@ hygf.icbc.corpNo=10000000000000088011
hygf.icbc.myPrivateKey
=
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCxMt/01YNUsTfG6ml8Nyw7Xs80k3G72mmnD8mpR5v6ZU0v7i8lynBJxqDWFRqo6brZr/yzneyuEM0c+qbhYA4NNgWuri87PFWZND5H249ZpEZPmnZSOg6R7RwiFQG8uhwMTlZwYkNJc6fBFnLvUwMu3pPHINx10iHh7dawbX1GZDKk82gUBaTzYMkg0CW8PtOUdGwW+4uyt5KGWp90MTqS47JmGCLWWwLMW3MhPe8/PBApFdRQi2cdOXHQ+HwleTL7kHXi2XEHnbIxZuOuyXUkiRog4fajs+ZS+o+YgC2JEhGN5om64LrSUXrEyeOZSdHMriKLxsBUbS5AUP8rOvqjAgMBAAECggEBAKwB55YhoK+Yq70ilSzn3b7wBJFTwyaIGOD7mVUCVy3UIf4x5oB3p1JmRoAp0kw/PorLo7CzzykU1BaaVV4XQOygERoEqYKFyc3DAeX9AoUQytPA67Rb+QK8OP/4hkwuGMX1UUEckZZ+d0wev4kDeuaHVsoIYxjX1t4aYrm2PtIRGFLYZvB44Chu8oCK/yesZ9JP+BKKPLJzsx1bEnxZHkQK4IJBWbxSbi/QGiJ254Q4nyinCPUuaRzpiiN/ZmbdLIZ4NYZeQr7sK4wXhgy6XMeMZFHm/WE0EKSBqR82oO6PL/AOR6v9GVMj9kGLfegQHsFyiDJKHzYqj80hX5tyZIkCgYEA6PdmNOpiplNBkg9xxGgSZIWqbRqKBTR51QDB2WPKkC27S7Biy1E+ncz7osSP9X16Y87eKV32ioqJzZ9eND1ri9DnETkPhnYfv4DJRsD3fTHZCtPh274KXASma4DyZnCJY913vjHKqAjJKwl10SR7EF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ecqQN2gAZkK/Dn3458KvPcTm3a4HjD8Q1jGgmwKBgHbzvyt1R38BEGeDhJhqOaBuTeqgChPyQrd1dFRE2VicrTksldel3eHbLgq1iYRyw+l9M66a/03XiCa3yLMIGOn/hOQE7dGxmBI2x44Tf5LugBuQnc5WSXwJ3Qa4+Yjw5yMBL/Hw8hRFlt5ycpy2YyAZ/jdnoNiOuM5koFpQFvfs
hygf.icbc.serviceUrl
=
https://apipcs3.dccnet.com.cn
hygf.icbc.serviceUrl
=
https://apipcs3.dccnet.com.cn
hygf.icbc.aesKey
=
5xGJdh7qb+B95SUoxDlatg==
hygf.icbc.aesKey
=
5xGJdh7qb+B95SUoxDlatg==
hygf.icbc.camsPublicKey
=
040978047533e0e7381dbb5d794b268cd68ad4655712d3de5bb37d6883c02e474374ff4dac6d706cef661aaa788c1dfc2c2f74b91d05f406ea135b865b416c8f97
#
hygf.icbc.camsPublicKey=040978047533e0e7381dbb5d794b268cd68ad4655712d3de5bb37d6883c02e474374ff4dac6d706cef661aaa788c1dfc2c2f74b91d05f406ea135b865b416c8f97
hygf.icbc.apigwPublicKey
=
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB
hygf.icbc.
camsPublicKey
=
7E095625BE87DF744C916E40BD6B1C1EA486125CA566006062D8FFBBD8BD536ABA64DA6B6A6070D65148A734F660A2A742372E5965E87F99CD644FAB5F6DF2B2hygf.icbc.
apigwPublicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB
hygf.icbc.outVendorId
=
071301
hygf.icbc.outVendorId
=
071301
hygf.icbc.projectId
=
PJ14001401B000160171
hygf.icbc.projectId
=
PJ14001401B000160171
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application-kingbase8.properties
View file @
23b49943
...
@@ -255,8 +255,8 @@ hygf.icbc.corpNo=10000000000000088011
...
@@ -255,8 +255,8 @@ hygf.icbc.corpNo=10000000000000088011
hygf.icbc.myPrivateKey
=
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCxMt/01YNUsTfG6ml8Nyw7Xs80k3G72mmnD8mpR5v6ZU0v7i8lynBJxqDWFRqo6brZr/yzneyuEM0c+qbhYA4NNgWuri87PFWZND5H249ZpEZPmnZSOg6R7RwiFQG8uhwMTlZwYkNJc6fBFnLvUwMu3pPHINx10iHh7dawbX1GZDKk82gUBaTzYMkg0CW8PtOUdGwW+4uyt5KGWp90MTqS47JmGCLWWwLMW3MhPe8/PBApFdRQi2cdOXHQ+HwleTL7kHXi2XEHnbIxZuOuyXUkiRog4fajs+ZS+o+YgC2JEhGN5om64LrSUXrEyeOZSdHMriKLxsBUbS5AUP8rOvqjAgMBAAECggEBAKwB55YhoK+Yq70ilSzn3b7wBJFTwyaIGOD7mVUCVy3UIf4x5oB3p1JmRoAp0kw/PorLo7CzzykU1BaaVV4XQOygERoEqYKFyc3DAeX9AoUQytPA67Rb+QK8OP/4hkwuGMX1UUEckZZ+d0wev4kDeuaHVsoIYxjX1t4aYrm2PtIRGFLYZvB44Chu8oCK/yesZ9JP+BKKPLJzsx1bEnxZHkQK4IJBWbxSbi/QGiJ254Q4nyinCPUuaRzpiiN/ZmbdLIZ4NYZeQr7sK4wXhgy6XMeMZFHm/WE0EKSBqR82oO6PL/AOR6v9GVMj9kG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JM0M1CQXryhKstGgPo7Ay9zyLT8i4UE7B4wQKBgQCKiNo2Jv2OUDn7sHkq+84J3M7A1XtMbLfZq/yuYGGp6DXAWrAgcsBTToqJLaBOeCysbYLNLGyC5wDa2TgoWCyoQd4YiS89zBn1IHFodfJ6AdFHwUISMVnsXxPbPMe8LPfViso2ecqQN2gAZkK/Dn3458KvPcTm3a4HjD8Q1jGgmwKBgHbzvyt1R38BEGeDhJhqOaBuTeqgChPyQrd1dFRE2VicrTksldel3eHbLgq1iYRyw+l9M66a/03XiCa3yLMIGOn/hOQE7dGxmBI2x44Tf5LugBuQnc5WSXwJ3Qa4+Yjw5yMBL/Hw8hRFlt5ycpy2YyAZ/jdnoNiOuM5koFpQFvfs
hygf.icbc.serviceUrl
=
https://apipcs3.dccnet.com.cn
hygf.icbc.serviceUrl
=
https://apipcs3.dccnet.com.cn
hygf.icbc.aesKey
=
5xGJdh7qb+B95SUoxDlatg==
hygf.icbc.aesKey
=
5xGJdh7qb+B95SUoxDlatg==
hygf.icbc.camsPublicKey
=
040978047533e0e7381dbb5d794b268cd68ad4655712d3de5bb37d6883c02e474374ff4dac6d706cef661aaa788c1dfc2c2f74b91d05f406ea135b865b416c8f97
#
hygf.icbc.camsPublicKey=040978047533e0e7381dbb5d794b268cd68ad4655712d3de5bb37d6883c02e474374ff4dac6d706cef661aaa788c1dfc2c2f74b91d05f406ea135b865b416c8f97
hygf.icbc.apigwPublicKey
=
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB
hygf.icbc.
camsPublicKey
=
7E095625BE87DF744C916E40BD6B1C1EA486125CA566006062D8FFBBD8BD536ABA64DA6B6A6070D65148A734F660A2A742372E5965E87F99CD644FAB5F6DF2B2hygf.icbc.
apigwPublicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB
hygf.icbc.outVendorId
=
071301
hygf.icbc.outVendorId
=
071301
hygf.icbc.projectId
=
PJ14001401B000160171
hygf.icbc.projectId
=
PJ14001401B000160171
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/resources/application.properties
View file @
23b49943
spring.application.name
=
AMOS-HYGF-
CZ
spring.application.name
=
AMOS-HYGF-
YY
server.servlet.context-path
=
/hygf
server.servlet.context-path
=
/hygf
server.port
=
33330
server.port
=
33330
server.uri-encoding
=
UTF-8
server.uri-encoding
=
UTF-8
spring.profiles.active
=
kingbase8
spring.profiles.active
=
dev
spring.jackson.time-zone
=
GMT+8
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-${spring.profiles.active}.xml
logging.config
=
classpath:logback-${spring.profiles.active}.xml
...
@@ -12,7 +12,16 @@ logging.config=classpath:logback-${spring.profiles.active}.xml
...
@@ -12,7 +12,16 @@ logging.config=classpath:logback-${spring.profiles.active}.xml
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.stdout.StdOutImpl
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.stdout.StdOutImpl
## DB properties:
## DB properties:
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle
=
10
spring.datasource.hikari.maximum-pool-size
=
25
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
120000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
##liquibase
##liquibase
...
@@ -22,7 +31,7 @@ spring.liquibase.enabled=true
...
@@ -22,7 +31,7 @@ spring.liquibase.enabled=true
## eureka properties:
## eureka properties:
eureka.instance.prefer-ip-address
=
true
eureka.instance.prefer-ip-address
=
true
eureka.instance.ip-address
=
172.
16.3.6
eureka.instance.ip-address
=
172.
26.190.244
eureka.client.registry-fetch-interval-seconds
=
5
eureka.client.registry-fetch-interval-seconds
=
5
eureka.instance.health-check-url-path
=
/actuator/health
eureka.instance.health-check-url-path
=
/actuator/health
eureka.instance.lease-expiration-duration-in-seconds
=
10
eureka.instance.lease-expiration-duration-in-seconds
=
10
...
@@ -35,7 +44,7 @@ spring.redis.lettuce.pool.max-active=200
...
@@ -35,7 +44,7 @@ spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
spring.redis.lettuce.pool.min-idle
=
0
## redis
失效时间
## redis
ʧЧʱ��
redis.cache.failure.time
=
10800
redis.cache.failure.time
=
10800
spring.servlet.multipart.maxFileSize
=
100MB
spring.servlet.multipart.maxFileSize
=
100MB
...
@@ -49,14 +58,21 @@ spring.http.encoding.force=true
...
@@ -49,14 +58,21 @@ spring.http.encoding.force=true
privilege.fegin.name
=
AMOS-API-PRIVILEGE
privilege.fegin.name
=
AMOS-API-PRIVILEGE
feign.client.config.default.connect-timeout
=
4
0000
feign.client.config.default.connect-timeout
=
2
0000
feign.client.config.default.read-timeout
=
4
0000
feign.client.config.default.read-timeout
=
2
0000
amos.system.user.user-name
=
hygf_robot
amos.system.user.user-name
=
hygf_robot
amos.system.user.password
=
a123456
0
amos.system.user.password
=
a123456
789
amos.system.user.product
=
AMOS_STUDIO_WEB
amos.system.user.product
=
AMOS_STUDIO_WEB
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.app-key
=
AMOS_STUDIO
workflow.feign.name
=
AMOS-API-WORKFLOW
feign.okhttp.enabled
=
true
\ No newline at end of file
dealer.appcode.manage
=
studio_normalapp_5155413,studio_normalapp_5133538
dealer.appcode.role
=
1767363928842571777
dealer.amosDealerId
=
1767820997374775298
feign.okhttp.enabled
=
true
workflow.feign.name
=
AMOS-API-WORKFLOW
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TestController.java
View file @
23b49943
...
@@ -4,6 +4,7 @@ import java.text.SimpleDateFormat;
...
@@ -4,6 +4,7 @@ import java.text.SimpleDateFormat;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
cn.hutool.core.date.DateUtil
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -176,4 +177,19 @@ public class TestController extends BaseController {
...
@@ -176,4 +177,19 @@ public class TestController extends BaseController {
pvWaringRecordMapper
.
saveBatchWarningRecords
(
list1
);
pvWaringRecordMapper
.
saveBatchWarningRecords
(
list1
);
}
}
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
PUBLIC
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"test2"
,
notes
=
"test1"
,
hidden
=
true
)
@GetMapping
(
"/insertMomentData"
)
public
void
insertMomentData
()
{
try
{
Date
time
=
new
Date
();
time
=
DateUtil
.
offsetMinute
(
time
,
-
DateUtil
.
minute
(
time
)
%
10
);
String
format
=
DateUtil
.
format
(
time
,
"yyyy-MM-dd HH:mm:00"
);
time
=
DateUtil
.
parse
(
format
,
"yyyy-MM-dd HH:mm:00"
);
tdengineTimeService
.
insertMomentDataNew
(
format
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/IFanHealthIndexService.java
0 → 100644
View file @
23b49943
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex
;
import
java.util.List
;
/**
* <p>
* ProjectName: amos-boot-zx-biz
* PackageName: com.yeejoin.amos.boot.module.jxiop.biz.service
*
* @author yangyang
* @version v1.0
* @date 2024/7/23 21:55
*/
public
interface
IFanHealthIndexService
{
List
<
FanHealthIndex
>
getInfoListByGroupByZxtFan
(
String
startTime
,
String
tableName
,
String
analysisObjectType
);
/**
* 设备加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
List
<
FanHealthIndex
>
getInfoListByGroupBySbFan
(
String
startTime
,
String
tableName
,
String
analysisObjectType
);
/**
* 场站加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
List
<
FanHealthIndex
>
getInfoListByGroupByCzFan
(
String
startTime
,
String
tableName
,
String
analysisObjectType
);
/**
* 区域加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
List
<
FanHealthIndex
>
getInfoListByGroupByQyFan
(
String
startTime
,
String
tableName
,
String
analysisObjectType
);
/**
* 全域【所有 / 全国】加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
List
<
FanHealthIndex
>
getInfoListByGroupByQgFan
(
String
startTime
,
String
tableName
,
String
analysisObjectType
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/IPvHealthIndexService.java
0 → 100644
View file @
23b49943
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex
;
import
java.util.List
;
/**
* <p>
* ProjectName: amos-boot-zx-biz
* PackageName: com.yeejoin.amos.boot.module.jxiop.biz.service.impl
*
* @author yangyang
* @version v1.0
* @date 2024/7/23 21:59
*/
public
interface
IPvHealthIndexService
{
/**
* 设备加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List < FanHealthIndex >}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
List
<
PvHealthIndex
>
getInfoListByGroupBySbPv
(
String
startTime
,
String
tableName
,
String
analysisObjectType
);
/**
* 子阵加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
List
<
PvHealthIndex
>
getInfoListByGroupByZzPv
(
String
startTime
,
String
tableName
,
String
analysisObjectType
);
/**
* 场站加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
List
<
PvHealthIndex
>
getInfoListByGroupByCzPv
(
String
startTime
,
String
tableName
,
String
analysisObjectType
);
/**
* 片区加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
List
<
PvHealthIndex
>
getInfoListByGroupByQyPv
(
String
startTime
,
String
tableName
,
String
analysisObjectType
);
/**
* 全域【所有 / 全国】加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
List
<
PvHealthIndex
>
getInfoListByGroupByQgPv
(
String
startTime
,
String
tableName
,
String
analysisObjectType
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/FanHealthIndexServiceImpl.java
0 → 100644
View file @
23b49943
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanWeightMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IFanHealthIndexService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 风电 - 按时刻生成子系统、设备、场站、区域 数据
* <p>
* ProjectName: amos-boot-zx-biz
* PackageName: com.yeejoin.amos.boot.module.jxiop.biz.service.impl
*
* @author yangyang
* @version v1.0
* @date 2024/7/23 19:05
*/
@Component
@Slf4j
public
class
FanHealthIndexServiceImpl
implements
IFanHealthIndexService
{
@Autowired
private
FanHealthIndexMapper
fanHealthIndexMapper
;
@Autowired
private
IdxBizFanWeightMapper
idxBizFanWeightMapper
;
/**
* 子系统加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
@Override
public
List
<
FanHealthIndex
>
getInfoListByGroupByZxtFan
(
String
startTime
,
String
tableName
,
String
analysisObjectType
)
{
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizFanWeight
>
idxBizFanWeightQueryWrapper
=
new
QueryWrapper
<>();
idxBizFanWeightQueryWrapper
.
ne
(
"type"
,
"5"
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
idxBizFanWeightQueryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
(),
IdxBizFanWeight:
:
getValue
));
// 开始计算加权平均
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubSystem
()
+
o
.
getOrgCode
()
+
o
.
getPointName
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
fanHealthIndicesZxtMap
.
forEach
((
k
,
v
)
->
{
FanHealthIndex
fanHealthIndex
=
new
FanHealthIndex
();
fanHealthIndex
.
setGatewayId
(
v
.
get
(
0
).
getGatewayId
());
fanHealthIndex
.
setStation
(
v
.
get
(
0
).
getStation
());
fanHealthIndex
.
setAnalysisObjType
(
"子系统"
);
fanHealthIndex
.
setArea
(
v
.
get
(
0
).
getArea
());
fanHealthIndex
.
setSubSystem
(
v
.
get
(
0
).
getSubSystem
());
fanHealthIndex
.
setEquipmentName
(
v
.
get
(
0
).
getEquipmentName
());
fanHealthIndex
.
setNumber
(
v
.
get
(
0
).
getNumber
());
fanHealthIndex
.
setOrgCode
(
v
.
get
(
0
).
getOrgCode
());
// 例如 子系统 = (测点1 * 测点1权重 + 测点2 * 测点2权重 + .... 测点n权重) / (测点1权重 + 测点2权重 + .... 测点n权重)
// 但是测点是没有权重的,所以子系统无法计算加权平均
// 设备 = (子系统1 * 子系统1权重 + 子系统2 * 子系统2权重 + .... 子系统n权重) / (子系统1权重 + 子系统2权重 + .... 子系统n权重)
// 但如果没有配置子系统的权重,如何计算?
Double
totalHealthIndex
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubSystem
()
+
o
.
getPointName
()).
doubleValue
()
*
o
.
getHealthIndex
()).
sum
();
Double
totalAnomaly
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubSystem
()
+
o
.
getPointName
()).
doubleValue
()
*
o
.
getAnomaly
()).
sum
();
Double
totalWeight
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubSystem
()
+
o
.
getPointName
()).
doubleValue
()).
sum
();
fanHealthIndex
.
setAnomaly
(
totalAnomaly
/
totalWeight
);
fanHealthIndex
.
setHealthIndex
(
totalHealthIndex
/
totalWeight
);
fanHealthIndicesZxtNews
.
add
(
fanHealthIndex
);
});
return
fanHealthIndicesZxtNews
;
}
/**
* 设备加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
@Override
public
List
<
FanHealthIndex
>
getInfoListByGroupBySbFan
(
String
startTime
,
String
tableName
,
String
analysisObjectType
)
{
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizFanWeight
>
idxBizFanWeightQueryWrapper
=
new
QueryWrapper
<>();
idxBizFanWeightQueryWrapper
.
ne
(
"type"
,
"5"
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
idxBizFanWeightQueryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
(),
IdxBizFanWeight:
:
getValue
));
// 开始计算加权平均
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getNumber
()
+
o
.
getEquipmentName
()
+
o
.
getOrgCode
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
fanHealthIndicesZxtMap
.
forEach
((
k
,
v
)
->
{
FanHealthIndex
fanHealthIndex
=
new
FanHealthIndex
();
fanHealthIndex
.
setGatewayId
(
v
.
get
(
0
).
getGatewayId
());
fanHealthIndex
.
setStation
(
v
.
get
(
0
).
getStation
());
fanHealthIndex
.
setAnalysisObjType
(
"设备"
);
fanHealthIndex
.
setArea
(
v
.
get
(
0
).
getArea
());
fanHealthIndex
.
setNumber
(
v
.
get
(
0
).
getNumber
());
fanHealthIndex
.
setEquipmentName
(
v
.
get
(
0
).
getEquipmentName
());
fanHealthIndex
.
setOrgCode
(
v
.
get
(
0
).
getOrgCode
());
// 例如 子系统 = (测点1 * 测点1权重 + 测点2 * 测点2权重 + .... 测点n权重) / (测点1权重 + 测点2权重 + .... 测点n权重)
// 但是测点是没有权重的,所以子系统无法计算加权平均
// 设备 = (子系统1 * 子系统1权重 + 子系统2 * 子系统2权重 + .... 子系统n权重) / (子系统1权重 + 子系统2权重 + .... 子系统n权重)
// 但如果没有配置子系统的权重,如何计算?
Double
totalHealthIndex
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubSystem
()).
doubleValue
()
*
o
.
getHealthIndex
()).
sum
();
Double
totalAnomaly
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubSystem
()).
doubleValue
()
*
o
.
getAnomaly
()).
sum
();
Double
totalWeight
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubSystem
()).
doubleValue
()).
sum
();
fanHealthIndex
.
setAnomaly
(
totalAnomaly
/
totalWeight
);
fanHealthIndex
.
setHealthIndex
(
totalHealthIndex
/
totalWeight
);
fanHealthIndicesZxtNews
.
add
(
fanHealthIndex
);
});
return
fanHealthIndicesZxtNews
;
}
/**
* 场站加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
@Override
public
List
<
FanHealthIndex
>
getInfoListByGroupByCzFan
(
String
startTime
,
String
tableName
,
String
analysisObjectType
)
{
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizFanWeight
>
idxBizFanWeightQueryWrapper
=
new
QueryWrapper
<>();
idxBizFanWeightQueryWrapper
.
ne
(
"type"
,
"5"
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
idxBizFanWeightQueryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
(),
IdxBizFanWeight:
:
getValue
));
// 开始计算加权平均
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getOrgCode
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
fanHealthIndicesZxtMap
.
forEach
((
k
,
v
)
->
{
FanHealthIndex
fanHealthIndex
=
new
FanHealthIndex
();
fanHealthIndex
.
setGatewayId
(
v
.
get
(
0
).
getGatewayId
());
fanHealthIndex
.
setStation
(
v
.
get
(
0
).
getStation
());
fanHealthIndex
.
setAnalysisObjType
(
"场站"
);
fanHealthIndex
.
setArea
(
v
.
get
(
0
).
getArea
());
fanHealthIndex
.
setOrgCode
(
v
.
get
(
0
).
getOrgCode
());
// 例如 子系统 = (测点1 * 测点1权重 + 测点2 * 测点2权重 + .... 测点n权重) / (测点1权重 + 测点2权重 + .... 测点n权重)
// 但是测点是没有权重的,所以子系统无法计算加权平均
// 设备 = (子系统1 * 子系统1权重 + 子系统2 * 子系统2权重 + .... 子系统n权重) / (子系统1权重 + 子系统2权重 + .... 子系统n权重)
// 但如果没有配置子系统的权重,如何计算?
Double
totalHealthIndex
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()).
doubleValue
()
*
o
.
getHealthIndex
()).
sum
();
Double
totalAnomaly
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()).
doubleValue
()
*
o
.
getAnomaly
()).
sum
();
Double
totalWeight
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()).
doubleValue
()).
sum
();
fanHealthIndex
.
setAnomaly
(
totalAnomaly
/
totalWeight
);
fanHealthIndex
.
setHealthIndex
(
totalHealthIndex
/
totalWeight
);
fanHealthIndicesZxtNews
.
add
(
fanHealthIndex
);
});
return
fanHealthIndicesZxtNews
;
}
/**
* 区域加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
@Override
public
List
<
FanHealthIndex
>
getInfoListByGroupByQyFan
(
String
startTime
,
String
tableName
,
String
analysisObjectType
)
{
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizFanWeight
>
idxBizFanWeightQueryWrapper
=
new
QueryWrapper
<>();
idxBizFanWeightQueryWrapper
.
ne
(
"type"
,
"5"
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
idxBizFanWeightQueryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
(),
IdxBizFanWeight:
:
getValue
));
// 开始计算加权平均
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getOrgCode
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
fanHealthIndicesZxtMap
.
forEach
((
k
,
v
)
->
{
FanHealthIndex
fanHealthIndex
=
new
FanHealthIndex
();
fanHealthIndex
.
setAnalysisObjType
(
"片区"
);
fanHealthIndex
.
setArea
(
v
.
get
(
0
).
getArea
());
fanHealthIndex
.
setOrgCode
(
v
.
get
(
0
).
getOrgCode
());
// 例如 子系统 = (测点1 * 测点1权重 + 测点2 * 测点2权重 + .... 测点n权重) / (测点1权重 + 测点2权重 + .... 测点n权重)
// 但是测点是没有权重的,所以子系统无法计算加权平均
// 设备 = (子系统1 * 子系统1权重 + 子系统2 * 子系统2权重 + .... 子系统n权重) / (子系统1权重 + 子系统2权重 + .... 子系统n权重)
// 但如果没有配置子系统的权重,如何计算?
Double
totalHealthIndex
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()).
doubleValue
()
*
o
.
getHealthIndex
()).
sum
();
Double
totalAnomaly
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()).
doubleValue
()
*
o
.
getAnomaly
()).
sum
();
Double
totalWeight
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()).
doubleValue
()).
sum
();
fanHealthIndex
.
setAnomaly
(
totalAnomaly
/
totalWeight
);
fanHealthIndex
.
setHealthIndex
(
totalHealthIndex
/
totalWeight
);
fanHealthIndicesZxtNews
.
add
(
fanHealthIndex
);
});
return
fanHealthIndicesZxtNews
;
}
/**
* 全域【所有 / 全国】加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
@Override
public
List
<
FanHealthIndex
>
getInfoListByGroupByQgFan
(
String
startTime
,
String
tableName
,
String
analysisObjectType
)
{
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizFanWeight
>
idxBizFanWeightQueryWrapper
=
new
QueryWrapper
<>();
idxBizFanWeightQueryWrapper
.
ne
(
"type"
,
"5"
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
idxBizFanWeightQueryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
(),
IdxBizFanWeight:
:
getValue
));
// 开始计算加权平均
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getAnalysisObjType
()
+
o
.
getOrgCode
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
fanHealthIndicesZxtMap
.
forEach
((
k
,
v
)
->
{
FanHealthIndex
fanHealthIndex
=
new
FanHealthIndex
();
fanHealthIndex
.
setAnalysisObjType
(
"全域"
);
fanHealthIndex
.
setOrgCode
(
v
.
get
(
0
).
getOrgCode
());
// 例如 子系统 = (测点1 * 测点1权重 + 测点2 * 测点2权重 + .... 测点n权重) / (测点1权重 + 测点2权重 + .... 测点n权重)
// 但是测点是没有权重的,所以子系统无法计算加权平均
// 设备 = (子系统1 * 子系统1权重 + 子系统2 * 子系统2权重 + .... 子系统n权重) / (子系统1权重 + 子系统2权重 + .... 子系统n权重)
// 但如果没有配置子系统的权重,如何计算?
Double
totalHealthIndex
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()).
doubleValue
()
*
o
.
getHealthIndex
()).
sum
();
Double
totalAnomaly
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()).
doubleValue
()
*
o
.
getAnomaly
()).
sum
();
Double
totalWeight
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()).
doubleValue
()).
sum
();
fanHealthIndex
.
setAnomaly
(
totalAnomaly
/
totalWeight
);
fanHealthIndex
.
setHealthIndex
(
totalHealthIndex
/
totalWeight
);
fanHealthIndicesZxtNews
.
add
(
fanHealthIndex
);
});
return
fanHealthIndicesZxtNews
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PvHealthIndexServiceImpl.java
0 → 100644
View file @
23b49943
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvWeightMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IPvHealthIndexService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 光伏 - 按时刻生成设备、子阵、场站和片区数据
* <p>
* ProjectName: amos-boot-zx-biz
* PackageName: com.yeejoin.amos.boot.module.jxiop.biz.service.impl
*
* @author yangyang
* @version v1.0
* @date 2024/7/23 21:08
*/
@Component
@Slf4j
public
class
PvHealthIndexServiceImpl
implements
IPvHealthIndexService
{
@Autowired
private
PvHealthIndexMapper
pvHealthIndexMapper
;
@Autowired
private
IdxBizPvWeightMapper
idxBizPvWeightMapper
;
/**
* 设备加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
@Override
public
List
<
PvHealthIndex
>
getInfoListByGroupBySbPv
(
String
startTime
,
String
tableName
,
String
analysisObjectType
)
{
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizPvWeight
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
ne
(
"type"
,
"5"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
(),
IdxBizPvWeight:
:
getValue
));
// 开始计算加权平均
Map
<
String
,
List
<
PvHealthIndex
>>
healthIndicesMap
=
pvHealthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getSubarray
()
+
o
.
getOrgCode
()
+
o
.
getEquipmentName
()));
List
<
PvHealthIndex
>
pvHealthIndexList
=
new
ArrayList
<>();
healthIndicesMap
.
forEach
((
k
,
v
)
->
{
PvHealthIndex
pvHealthIndex
=
new
PvHealthIndex
();
pvHealthIndex
.
setGatewayId
(
v
.
get
(
0
).
getGatewayId
());
pvHealthIndex
.
setStation
(
v
.
get
(
0
).
getStation
());
pvHealthIndex
.
setAnalysisObjType
(
"设备"
);
pvHealthIndex
.
setArea
(
v
.
get
(
0
).
getArea
());
pvHealthIndex
.
setSubarray
(
v
.
get
(
0
).
getSubarray
());
pvHealthIndex
.
setEquipmentName
(
v
.
get
(
0
).
getEquipmentName
());
pvHealthIndex
.
setOrgCode
(
v
.
get
(
0
).
getOrgCode
());
// 例如 子系统 = (测点1 * 测点1权重 + 测点2 * 测点2权重 + .... 测点n权重) / (测点1权重 + 测点2权重 + .... 测点n权重)
// 但是测点是没有权重的,所以子系统无法计算加权平均
// 设备 = (子系统1 * 子系统1权重 + 子系统2 * 子系统2权重 + .... 子系统n权重) / (子系统1权重 + 子系统2权重 + .... 子系统n权重)
// 但如果没有配置子系统的权重,如何计算?
Double
totalHealthIndex
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
()).
doubleValue
()
*
o
.
getHealthIndex
()).
sum
();
Double
totalAnomaly
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
()).
doubleValue
()
*
o
.
getAnomaly
()).
sum
();
Double
totalWeight
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
()).
doubleValue
()).
sum
();
pvHealthIndex
.
setAnomaly
(
totalAnomaly
/
totalWeight
);
pvHealthIndex
.
setHealthIndex
(
totalHealthIndex
/
totalWeight
);
pvHealthIndexList
.
add
(
pvHealthIndex
);
});
return
pvHealthIndexList
;
}
/**
* 子阵加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
@Override
public
List
<
PvHealthIndex
>
getInfoListByGroupByZzPv
(
String
startTime
,
String
tableName
,
String
analysisObjectType
)
{
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizPvWeight
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
ne
(
"type"
,
"5"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
(),
IdxBizPvWeight:
:
getValue
));
// 开始计算加权平均
Map
<
String
,
List
<
PvHealthIndex
>>
healthIndicesMap
=
pvHealthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getSubarray
()
+
o
.
getOrgCode
()));
List
<
PvHealthIndex
>
pvHealthIndexList
=
new
ArrayList
<>();
healthIndicesMap
.
forEach
((
k
,
v
)
->
{
PvHealthIndex
pvHealthIndex
=
new
PvHealthIndex
();
pvHealthIndex
.
setGatewayId
(
v
.
get
(
0
).
getGatewayId
());
pvHealthIndex
.
setStation
(
v
.
get
(
0
).
getStation
());
pvHealthIndex
.
setAnalysisObjType
(
"子阵"
);
pvHealthIndex
.
setArea
(
v
.
get
(
0
).
getArea
());
pvHealthIndex
.
setSubarray
(
v
.
get
(
0
).
getSubarray
());
pvHealthIndex
.
setOrgCode
(
v
.
get
(
0
).
getOrgCode
());
// 例如 子系统 = (测点1 * 测点1权重 + 测点2 * 测点2权重 + .... 测点n权重) / (测点1权重 + 测点2权重 + .... 测点n权重)
// 但是测点是没有权重的,所以子系统无法计算加权平均
// 设备 = (子系统1 * 子系统1权重 + 子系统2 * 子系统2权重 + .... 子系统n权重) / (子系统1权重 + 子系统2权重 + .... 子系统n权重)
// 但如果没有配置子系统的权重,如何计算?
Double
totalHealthIndex
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()).
doubleValue
()
*
o
.
getHealthIndex
()).
sum
();
Double
totalAnomaly
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()).
doubleValue
()
*
o
.
getAnomaly
()).
sum
();
Double
totalWeight
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()).
doubleValue
()).
sum
();
pvHealthIndex
.
setAnomaly
(
totalAnomaly
/
totalWeight
);
pvHealthIndex
.
setHealthIndex
(
totalHealthIndex
/
totalWeight
);
pvHealthIndexList
.
add
(
pvHealthIndex
);
});
return
pvHealthIndexList
;
}
/**
* 场站加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
@Override
public
List
<
PvHealthIndex
>
getInfoListByGroupByCzPv
(
String
startTime
,
String
tableName
,
String
analysisObjectType
)
{
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizPvWeight
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
ne
(
"type"
,
"5"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
(),
IdxBizPvWeight:
:
getValue
));
// 开始计算加权平均
Map
<
String
,
List
<
PvHealthIndex
>>
healthIndicesMap
=
pvHealthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getOrgCode
()));
List
<
PvHealthIndex
>
pvHealthIndexList
=
new
ArrayList
<>();
healthIndicesMap
.
forEach
((
k
,
v
)
->
{
PvHealthIndex
pvHealthIndex
=
new
PvHealthIndex
();
pvHealthIndex
.
setGatewayId
(
v
.
get
(
0
).
getGatewayId
());
pvHealthIndex
.
setStation
(
v
.
get
(
0
).
getStation
());
pvHealthIndex
.
setAnalysisObjType
(
"场站"
);
pvHealthIndex
.
setArea
(
v
.
get
(
0
).
getArea
());
pvHealthIndex
.
setOrgCode
(
v
.
get
(
0
).
getOrgCode
());
// 例如 子系统 = (测点1 * 测点1权重 + 测点2 * 测点2权重 + .... 测点n权重) / (测点1权重 + 测点2权重 + .... 测点n权重)
// 但是测点是没有权重的,所以子系统无法计算加权平均
// 设备 = (子系统1 * 子系统1权重 + 子系统2 * 子系统2权重 + .... 子系统n权重) / (子系统1权重 + 子系统2权重 + .... 子系统n权重)
// 但如果没有配置子系统的权重,如何计算?
Double
totalHealthIndex
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()).
doubleValue
()
*
o
.
getHealthIndex
()).
sum
();
Double
totalAnomaly
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()).
doubleValue
()
*
o
.
getAnomaly
()).
sum
();
Double
totalWeight
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()).
doubleValue
()).
sum
();
pvHealthIndex
.
setAnomaly
(
totalAnomaly
/
totalWeight
);
pvHealthIndex
.
setHealthIndex
(
totalHealthIndex
/
totalWeight
);
pvHealthIndexList
.
add
(
pvHealthIndex
);
});
return
pvHealthIndexList
;
}
/**
* 片区加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
@Override
public
List
<
PvHealthIndex
>
getInfoListByGroupByQyPv
(
String
startTime
,
String
tableName
,
String
analysisObjectType
)
{
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizPvWeight
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
ne
(
"type"
,
"5"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
(),
IdxBizPvWeight:
:
getValue
));
// 开始计算加权平均
Map
<
String
,
List
<
PvHealthIndex
>>
healthIndicesMap
=
pvHealthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getOrgCode
()));
List
<
PvHealthIndex
>
pvHealthIndexList
=
new
ArrayList
<>();
healthIndicesMap
.
forEach
((
k
,
v
)
->
{
PvHealthIndex
pvHealthIndex
=
new
PvHealthIndex
();
pvHealthIndex
.
setAnalysisObjType
(
"片区"
);
pvHealthIndex
.
setArea
(
v
.
get
(
0
).
getArea
());
pvHealthIndex
.
setOrgCode
(
v
.
get
(
0
).
getOrgCode
());
// 例如 子系统 = (测点1 * 测点1权重 + 测点2 * 测点2权重 + .... 测点n权重) / (测点1权重 + 测点2权重 + .... 测点n权重)
// 但是测点是没有权重的,所以子系统无法计算加权平均
// 设备 = (子系统1 * 子系统1权重 + 子系统2 * 子系统2权重 + .... 子系统n权重) / (子系统1权重 + 子系统2权重 + .... 子系统n权重)
// 但如果没有配置子系统的权重,如何计算?
Double
totalHealthIndex
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()).
doubleValue
()
*
o
.
getHealthIndex
()).
sum
();
Double
totalAnomaly
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()).
doubleValue
()
*
o
.
getAnomaly
()).
sum
();
Double
totalWeight
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()
+
o
.
getStation
()).
doubleValue
()).
sum
();
pvHealthIndex
.
setAnomaly
(
totalAnomaly
/
totalWeight
);
pvHealthIndex
.
setHealthIndex
(
totalHealthIndex
/
totalWeight
);
pvHealthIndexList
.
add
(
pvHealthIndex
);
});
return
pvHealthIndexList
;
}
/**
* 全域【所有 / 全国】加权平均
* 加权平均数 = (w1 * x1 + w2 * x2 + … + wn * xn) / (w1 + w2 + … + wn)
* w1, w2, …, wn 是各个数据点的权重;
* x1, x2, …, xn 是各个数据点的数值;
* n 是数据点的总数。
*
* @param startTime startTime
* @param tableName tableName
* @param analysisObjectType analysisObjectType
* @return {@link List< FanHealthIndex>}
* @throws
* @author yangyang
* @date 2024/7/23 21:02
*/
@Override
public
List
<
PvHealthIndex
>
getInfoListByGroupByQgPv
(
String
startTime
,
String
tableName
,
String
analysisObjectType
)
{
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndexMapper
.
getInfoList
(
startTime
,
tableName
,
analysisObjectType
);
QueryWrapper
<
IdxBizPvWeight
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
ne
(
"type"
,
"5"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
(),
IdxBizPvWeight:
:
getValue
));
// 开始计算加权平均
Map
<
String
,
List
<
PvHealthIndex
>>
healthIndicesMap
=
pvHealthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getAnalysisObjType
()
+
o
.
getOrgCode
()));
List
<
PvHealthIndex
>
pvHealthIndexList
=
new
ArrayList
<>();
healthIndicesMap
.
forEach
((
k
,
v
)
->
{
PvHealthIndex
pvHealthIndex
=
new
PvHealthIndex
();
pvHealthIndex
.
setAnalysisObjType
(
"全域"
);
pvHealthIndex
.
setOrgCode
(
v
.
get
(
0
).
getOrgCode
());
// 例如 子系统 = (测点1 * 测点1权重 + 测点2 * 测点2权重 + .... 测点n权重) / (测点1权重 + 测点2权重 + .... 测点n权重)
// 但是测点是没有权重的,所以子系统无法计算加权平均
// 设备 = (子系统1 * 子系统1权重 + 子系统2 * 子系统2权重 + .... 子系统n权重) / (子系统1权重 + 子系统2权重 + .... 子系统n权重)
// 但如果没有配置子系统的权重,如何计算?
Double
totalHealthIndex
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()).
doubleValue
()
*
o
.
getHealthIndex
()).
sum
();
Double
totalAnomaly
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()).
doubleValue
()
*
o
.
getAnomaly
()).
sum
();
Double
totalWeight
=
v
.
stream
().
mapToDouble
(
o
->
weightMap
.
get
(
o
.
getArea
()).
doubleValue
()).
sum
();
pvHealthIndex
.
setAnomaly
(
totalAnomaly
/
totalWeight
);
pvHealthIndex
.
setHealthIndex
(
totalHealthIndex
/
totalWeight
);
pvHealthIndexList
.
add
(
pvHealthIndex
);
});
return
pvHealthIndexList
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/TdengineTimeServiceImpl.java
View file @
23b49943
...
@@ -9,6 +9,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvHealthLevel;
...
@@ -9,6 +9,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvHealthLevel;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthLevelMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthLevelMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvHealthLevelMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvHealthLevelMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IFanHealthIndexService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IPvHealthIndexService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex
;
...
@@ -16,7 +18,6 @@ import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex;
...
@@ -16,7 +18,6 @@ import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -54,6 +55,12 @@ public class TdengineTimeServiceImpl {
...
@@ -54,6 +55,12 @@ public class TdengineTimeServiceImpl {
@Autowired
@Autowired
private
HealthStatusIndicatorServiceImpl
healthStatusIndicatorServiceImpl
;
private
HealthStatusIndicatorServiceImpl
healthStatusIndicatorServiceImpl
;
@Autowired
private
IFanHealthIndexService
fanHealthIndexService
;
@Autowired
private
IPvHealthIndexService
pvHealthIndexService
;
/**
/**
* 风电 - 按时刻生成子系统、设备、场站、区域 数据
* 风电 - 按时刻生成子系统、设备、场站、区域 数据
*/
*/
...
@@ -83,6 +90,38 @@ public class TdengineTimeServiceImpl {
...
@@ -83,6 +90,38 @@ public class TdengineTimeServiceImpl {
}
}
public
void
insertMomentDataNew
(
String
recDate
)
throws
ParseException
{
//s 489分钟 为 8小时 + 19分钟
String
startTime
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddMinutes
(
new
Date
(),
-
489
),
DateUtils
.
DATE_TIME_PATTERN
);
startTime
=
"2024-07-23 08:00:00"
;
// 子系统
List
<
IdxBizFanHealthLevel
>
levelListZxt
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"子系统"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndexService
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
List
<
FanHealthIndex
>
fanHealthIndicesZxt
=
fanHealthIndexMapper
.
getInfoListByGroupByZxtFan
(
startTime
,
"fan_health_index_moment"
,
"测点"
);
//saveBatchFan(fanHealthIndicesZxt, "fan_health_index_moment", recDate, WarningPeriodEnum.MINUTES.getName(), levelListZxt);
// 设备
List
<
IdxBizFanHealthLevel
>
levelListSb
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"设备"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesSb
=
fanHealthIndexMapper
.
getInfoListByGroupBySbFan
(
startTime
,
"fan_health_index_moment"
,
"子系统"
);
//saveBatchFan(fanHealthIndicesSb, "fan_health_index_moment", recDate, WarningPeriodEnum.MINUTES.getName(), levelListSb);
// 场站
List
<
IdxBizFanHealthLevel
>
levelListCz
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"场站"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesCz
=
fanHealthIndexMapper
.
getInfoListByGroupByCzFan
(
startTime
,
"fan_health_index_moment"
,
"设备"
);
//saveBatchFan(fanHealthIndicesCz, "fan_health_index_moment", recDate, WarningPeriodEnum.MINUTES.getName(), levelListCz);
// 区域
List
<
IdxBizFanHealthLevel
>
levelListQy
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"片区"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesQy
=
fanHealthIndexMapper
.
getInfoListByGroupByQyFan
(
startTime
,
"fan_health_index_moment"
,
"场站"
);
//saveBatchFan(fanHealthIndicesQy, "fan_health_index_moment", recDate, WarningPeriodEnum.MINUTES.getName(), levelListQy);
// 全域【所有 / 全国】
List
<
IdxBizFanHealthLevel
>
levelListQg
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"全域"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndicesQg
=
fanHealthIndexMapper
.
getInfoListByGroupByQgFan
(
startTime
,
"fan_health_index_moment"
,
"片区"
);
// saveBatchFan(fanHealthIndicesQg, "fan_health_index_moment", recDate, WarningPeriodEnum.MINUTES.getName(), levelListQg);
}
/**
/**
* 风电 - 按小时生成测点、子系统、设备、场站、区域 数据
* 风电 - 按小时生成测点、子系统、设备、场站、区域 数据
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanHealthIndexMapper.java
View file @
23b49943
...
@@ -102,4 +102,9 @@ public interface FanHealthIndexMapper extends BaseMapper<FanHealthIndex> {
...
@@ -102,4 +102,9 @@ public interface FanHealthIndexMapper extends BaseMapper<FanHealthIndex> {
List
<
Map
<
String
,
Object
>>
getInfoByHour
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"list"
)
List
<
String
>
list
);
List
<
Map
<
String
,
Object
>>
getInfoByHour
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"list"
)
List
<
String
>
list
);
List
<
Map
<
String
,
Object
>>
getInfoByMoment
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"list"
)
List
<
String
>
list
);
List
<
Map
<
String
,
Object
>>
getInfoByMoment
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"list"
)
List
<
String
>
list
);
List
<
FanHealthIndex
>
getInfoList
(
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"analysisObjectType"
)
String
analysisObjectType
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/PvHealthIndexMapper.java
View file @
23b49943
...
@@ -62,4 +62,8 @@ public interface PvHealthIndexMapper extends BaseMapper<PvHealthIndex> {
...
@@ -62,4 +62,8 @@ public interface PvHealthIndexMapper extends BaseMapper<PvHealthIndex> {
List
<
PvHealthIndex
>
getInfoByPage
(
@Param
(
"dto"
)
PvHealthIndexDto
dto
);
List
<
PvHealthIndex
>
getInfoByPage
(
@Param
(
"dto"
)
PvHealthIndexDto
dto
);
Integer
getInfoByPageTotal
(
@Param
(
"dto"
)
PvHealthIndexDto
dto
);
Integer
getInfoByPageTotal
(
@Param
(
"dto"
)
PvHealthIndexDto
dto
);
List
<
PvHealthIndex
>
getInfoList
(
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"analysisObjectType"
)
String
analysisObjectType
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/application-dev.properties
View file @
23b49943
## DB properties:
## DB properties:
## db1-production database
## db1-production database
spring.db1.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url
=
jdbc:mysql://
139.9.173.44:
3306/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.url
=
jdbc:mysql://
47.92.234.253:1
3306/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.username
=
root
spring.db1.datasource.username
=
root
spring.db1.datasource.password
=
Yeejoin
@2020
spring.db1.datasource.password
=
Yeejoin
_1234
spring.db1.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
spring.db1.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## db2-sync_data
## db2-sync_data
spring.db2.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.url
=
jdbc:mysql://
139.9.173.44:3306/amos_idx_biz
?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.url
=
jdbc:mysql://
47.92.234.253:13306/amos_idx_biz_new
?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.username
=
root
spring.db2.datasource.username
=
root
spring.db2.datasource.password
=
Yeejoin
@2020
spring.db2.datasource.password
=
Yeejoin
_1234
spring.db2.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
spring.db2.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## db5-sync_data
## db5-sync_data
spring.db5.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db5.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db5.datasource.url
=
jdbc:mysql://
139.9.173.44:
3306/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db5.datasource.url
=
jdbc:mysql://
47.92.234.253:1
3306/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db5.datasource.username
=
root
spring.db5.datasource.username
=
root
spring.db5.datasource.password
=
Yeejoin
@2020
spring.db5.datasource.password
=
Yeejoin
_1234
spring.db5.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
spring.db5.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## amos-project
## amos-project
spring.db6.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db6.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db6.datasource.url
=
jdbc:mysql://
139.9.173.44
:3306/amos_project?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db6.datasource.url
=
jdbc:mysql://
47.92.234.253
:3306/amos_project?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db6.datasource.username
=
root
spring.db6.datasource.username
=
root
spring.db6.datasource.password
=
Yeejoin
@2020
spring.db6.datasource.password
=
Yeejoin
_1234
spring.db6.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
spring.db6.datasource.driver-class-name
:
com.mysql.cj.jdbc.Driver
## eureka properties:
## eureka properties:
eureka.instance.hostname
=
139.9.173.44
eureka.instance.hostname
=
47.92.234.253
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties:
## redis properties:
spring.redis.database
=
1
spring.redis.database
=
1
spring.redis.host
=
139.9.173.44
spring.redis.host
=
47.92.234.253
spring.redis.port
=
6379
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.password
=
yeejoin@2020
...
@@ -66,10 +66,10 @@ lettuce.timeout=10000
...
@@ -66,10 +66,10 @@ lettuce.timeout=10000
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://
139.9.173.44
:2883
emqx.broker
=
tcp://
47.92.234.253
:2883
emqx.user-name
=
admin
emqx.user-name
=
admin
emqx.password
=
public
emqx.password
=
public
mqtt.scene.host
=
mqtt://
139.9.173.44
:8083/mqtt
mqtt.scene.host
=
mqtt://
47.92.234.253
:8083/mqtt
mqtt.client.product.id
=
mqtt
mqtt.client.product.id
=
mqtt
mqtt.topic
=
topic_mqtt
mqtt.topic
=
topic_mqtt
spring.mqtt.completionTimeout
=
3000
spring.mqtt.completionTimeout
=
3000
...
@@ -79,13 +79,13 @@ emqx.client-password=public
...
@@ -79,13 +79,13 @@ emqx.client-password=public
tdengine-server
:
tdengine-server
:
driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
jdbc-url
:
jdbc:TAOS-RS://
139.9.170.47
:6041/iot_data_1?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
jdbc-url
:
jdbc:TAOS-RS://
47.92.234.253
:6041/iot_data_1?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
username
:
root
username
:
root
password
:
taosdata
password
:
taosdata
#spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource
#spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.url
=
jdbc:TAOS-RS://
10.20.0.20
3:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.url
=
jdbc:TAOS-RS://
47.92.234.25
3:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.username
=
root
spring.db3.datasource.username
=
root
spring.db3.datasource.password
=
taosdata
spring.db3.datasource.password
=
taosdata
spring.db3.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
spring.db3.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
...
@@ -93,7 +93,7 @@ spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
...
@@ -93,7 +93,7 @@ spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
# ����ר��td���ݿ� analyse_data
# ����ר��td���ݿ� analyse_data
#spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource
#spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db4.datasource.url
=
jdbc:TAOS-RS://
10.20.0.20
3:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.url
=
jdbc:TAOS-RS://
47.92.234.25
3:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.username
=
root
spring.db4.datasource.username
=
root
spring.db4.datasource.password
=
taosdata
spring.db4.datasource.password
=
taosdata
spring.db4.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
spring.db4.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
...
@@ -101,7 +101,7 @@ spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
...
@@ -101,7 +101,7 @@ spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
## influxDB
## influxDB
#spring.influx.url= http://172.16.3.155:18186
#spring.influx.url= http://172.16.3.155:18186
#spring.influx.password=Yeejoin
@2020
#spring.influx.password=Yeejoin
_1234
#spring.influx.user=root
#spring.influx.user=root
#spring.influx.database=iot_platform
#spring.influx.database=iot_platform
#spring.influx.retention_policy=default
#spring.influx.retention_policy=default
...
@@ -120,8 +120,8 @@ spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
...
@@ -120,8 +120,8 @@ spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
#spring.influx.bufferLimit=20000
#spring.influx.bufferLimit=20000
spring.influx.url
=
http://
139.9.173.44
:8086
spring.influx.url
=
http://
47.92.234.253
:8086
spring.influx.password
=
Yeejoin
@2020
spring.influx.password
=
Yeejoin
_1234
spring.influx.user
=
root
spring.influx.user
=
root
spring.influx.database
=
iot_platform
spring.influx.database
=
iot_platform
spring.influx.retention_policy
=
default
spring.influx.retention_policy
=
default
...
@@ -150,7 +150,7 @@ amos.secret.key=qaz
...
@@ -150,7 +150,7 @@ amos.secret.key=qaz
#eureka.instance.ip-address=172.16.3.122
#eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url
=
tcp://
139.9.173.44
:61616
spring.activemq.broker-url
=
tcp://
47.92.234.253
:61616
spring.activemq.user
=
admin
spring.activemq.user
=
admin
spring.activemq.password
=
admin
spring.activemq.password
=
admin
spring.jms.pub-sub-domain
=
false
spring.jms.pub-sub-domain
=
false
...
@@ -166,16 +166,16 @@ pictureUrl=upload/jxiop/syz/
...
@@ -166,16 +166,16 @@ pictureUrl=upload/jxiop/syz/
#kafka
#kafka
spring.kafka.bootstrap-servers
=
139.9.173.44
:9092
spring.kafka.bootstrap-servers
=
47.92.234.253
:9092
spring.kafka.producer.retries
=
1
spring.kafka.producer.retries
=
1
spring.kafka.producer.bootstrap-servers
=
139.9.173.44
:9092
spring.kafka.producer.bootstrap-servers
=
47.92.234.253
:9092
spring.kafka.producer.batch-size
=
16384
spring.kafka.producer.batch-size
=
16384
spring.kafka.producer.buffer-memory
=
33554432
spring.kafka.producer.buffer-memory
=
33554432
spring.kafka.producer.acks
=
1
spring.kafka.producer.acks
=
1
spring.kafka.producer.key-serializer
=
org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.key-serializer
=
org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer
=
org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer
=
org.apache.kafka.common.serialization.StringSerializer
spring.kafka.consumer.group-id
=
consumerGroup
spring.kafka.consumer.group-id
=
consumerGroup
spring.kafka.consumer.bootstrap-servers
=
139.9.173.44
:9092
spring.kafka.consumer.bootstrap-servers
=
47.92.234.253
:9092
spring.kafka.consumer.enable-auto-commit
=
false
spring.kafka.consumer.enable-auto-commit
=
false
spring.kafka.consumer.auto-offset-reset
=
earliest
spring.kafka.consumer.auto-offset-reset
=
earliest
spring.kafka.consumer.key-deserializer
=
org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.consumer.key-deserializer
=
org.apache.kafka.common.serialization.StringDeserializer
...
@@ -197,4 +197,6 @@ base.url.GKHF=http://139.9.171.247:8052/intelligent-analysis/working-condition-d
...
@@ -197,4 +197,6 @@ base.url.GKHF=http://139.9.171.247:8052/intelligent-analysis/working-condition-d
#����� �㷨����
#����� �㷨����
base.url.ZXZ
=
http://139.9.171.247:8052/intelligent-analysis/central-value
base.url.ZXZ
=
http://139.9.171.247:8052/intelligent-analysis/central-value
#ָ���������㷨����
#ָ���������㷨����
base.url.zsfx
:
http://139.9.171.247:8052/intelligent-analysis/index-analysis
base.url.zsfx
:
http://139.9.171.247:8052/intelligent-analysis/index-analysis
\ No newline at end of file
logic
=
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/application.properties
View file @
23b49943
...
@@ -2,7 +2,7 @@ spring.application.name=AMOS-JXIOP-ANALYSE-CZ
...
@@ -2,7 +2,7 @@ spring.application.name=AMOS-JXIOP-ANALYSE-CZ
server.servlet.context-path
=
/jxiop-analyse
server.servlet.context-path
=
/jxiop-analyse
server.port
=
33400
server.port
=
33400
server.uri-encoding
=
UTF-8
server.uri-encoding
=
UTF-8
spring.profiles.active
=
dev
1
spring.profiles.active
=
dev
spring.jackson.time-zone
=
GMT+8
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-${spring.profiles.active}.xml
logging.config
=
classpath:logback-${spring.profiles.active}.xml
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
View file @
23b49943
...
@@ -529,4 +529,24 @@
...
@@ -529,4 +529,24 @@
analysis_obj_type,
analysis_obj_type,
org_code
org_code
</select>
</select>
<select
id=
"getInfoList"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex"
>
select
gateway_id ,
station,
analysis_obj_type,
area,
sub_system,
equipment_name,
number,
anomaly,
org_code,
health_index
from
#{tableName}
where
analysis_obj_type = #{analysisObjectType}
and ts > #{startTime}
</select>
</mapper>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/PvHealthIndex.xml
View file @
23b49943
...
@@ -293,4 +293,22 @@
...
@@ -293,4 +293,22 @@
analysis_obj_type,
analysis_obj_type,
org_code
org_code
</select>
</select>
<select
id=
"getInfoList"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex"
>
select
gateway_id ,
station,
analysis_obj_type,
area,
subarray,
equipment_name,
anomaly,
org_code,
health_index
from
#{tableName}
where
analysis_obj_type = #{analysisObjectType}
and ts > #{startTime}
</select>
</mapper>
</mapper>
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