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
3c6e903a
Commit
3c6e903a
authored
Jul 25, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
碳银 - 逆变器告警接口对接
parent
f2d6fdfb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
4 deletions
+17
-4
HealthIndexDTO.java
...eejoin/amos/boot/module/jxiop/biz/dto/HealthIndexDTO.java
+3
-0
FanHealthIndexServiceImpl.java
...ule/jxiop/biz/service/impl/FanHealthIndexServiceImpl.java
+3
-3
TdengineTimeServiceImpl.java
...odule/jxiop/biz/service/impl/TdengineTimeServiceImpl.java
+1
-1
FanHealthIndex.xml
...iz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
+4
-0
PvHealthIndex.xml
...biz/src/main/resources/mapper/tdengine2/PvHealthIndex.xml
+6
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/HealthIndexDTO.java
View file @
3c6e903a
...
...
@@ -37,4 +37,7 @@ public class HealthIndexDTO {
private
String
analysisTime
;
private
String
kks
;
private
String
orgCode
;
private
String
manufacturer
;
private
String
deviceType
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/FanHealthIndexServiceImpl.java
View file @
3c6e903a
...
...
@@ -58,14 +58,14 @@ public class FanHealthIndexServiceImpl implements IFanHealthIndexService {
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
.
getGatewayId
()
+
o
.
get
Station
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getSubSystem
()
+
o
.
getEquipmentName
()
+
o
.
getNumber
()
+
o
.
getOrgCode
()));
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
get
IndexAddress
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getAnalysisObjSeq
()
+
o
.
getWeight
()
+
o
.
getArea
()
+
o
.
getSubSystem
()
+
o
.
getEquipmentName
()
+
o
.
getNumber
()
+
o
.
getPointName
()
+
o
.
getKks
()
+
o
.
getOrgCode
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
fanHealthIndicesZxtMap
.
forEach
((
k
,
v
)
->
{
FanHealthIndex
fanHealthIndex
=
new
FanHealthIndex
();
fanHealthIndex
.
setIndexAddress
(
v
.
get
(
0
).
getIndexAddress
());
fanHealthIndex
.
setGatewayId
(
v
.
get
(
0
).
getGatewayId
());
fanHealthIndex
.
setStation
(
v
.
get
(
0
).
getStation
());
fanHealthIndex
.
setAnalysisObjType
(
"测点"
);
fanHealthIndex
.
setAnalysisObjType
(
v
.
get
(
0
).
getAnalysisObjType
()
);
fanHealthIndex
.
setAnalysisObjSeq
(
v
.
get
(
0
).
getAnalysisObjSeq
());
fanHealthIndex
.
setWeight
(
v
.
get
(
0
).
getWeight
());
fanHealthIndex
.
setArea
(
v
.
get
(
0
).
getArea
());
...
...
@@ -73,7 +73,7 @@ public class FanHealthIndexServiceImpl implements IFanHealthIndexService {
fanHealthIndex
.
setNumber
(
v
.
get
(
0
).
getNumber
());
fanHealthIndex
.
setEquipmentName
(
v
.
get
(
0
).
getEquipmentName
());
fanHealthIndex
.
setPointName
(
v
.
get
(
0
).
getPointName
());
fanHealthIndex
.
setKks
(
v
.
get
(
0
).
get
Number
());
fanHealthIndex
.
setKks
(
v
.
get
(
0
).
get
Kks
());
fanHealthIndex
.
setOrgCode
(
v
.
get
(
0
).
getOrgCode
());
// 例如 子系统 = (测点1 * 测点1权重 + 测点2 * 测点2权重 + .... 测点n权重) / (测点1权重 + 测点2权重 + .... 测点n权重)
// 但是测点是没有权重的,所以子系统无法计算加权平均
...
...
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 @
3c6e903a
...
...
@@ -182,7 +182,7 @@ public class TdengineTimeServiceImpl {
String
startTime
=
DateUtils
.
dateFormat
(
DateUtils
.
dateAddHours
(
new
Date
(),
-
32
),
DateUtils
.
DATE_TIME_PATTERN
);
List
<
IdxBizFanHealthLevel
>
levelList
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"测点"
).
last
(
"limit 4"
));
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndex
Mapper
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_hour"
,
"测点"
);
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndex
Service
.
getInfoListByGroupByCdFan
(
startTime
,
"fan_health_index_hour"
,
"测点"
);
saveBatchFan
(
fanHealthIndices
,
"fan_health_index_day"
,
recDate
,
WarningPeriodEnum
.
DAY
.
getName
(),
levelList
);
// 子系统
List
<
IdxBizFanHealthLevel
>
levelListZxt
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"子系统"
).
last
(
"limit 4"
));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
View file @
3c6e903a
...
...
@@ -533,9 +533,12 @@
<select
id=
"getInfoList"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex"
>
select
index_address,
gateway_id ,
station,
analysis_obj_type,
analysis_obj_seq,
weight,
area,
sub_system,
equipment_name,
...
...
@@ -543,6 +546,7 @@
anomaly,
org_code,
health_index,
kks,
point_name
from
#{tableName}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/PvHealthIndex.xml
View file @
3c6e903a
...
...
@@ -296,15 +296,21 @@
<select
id=
"getInfoList"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex"
>
select
index_address,
gateway_id ,
station,
analysis_obj_type,
analysis_obj_seq,
weight,
area,
subarray,
manufacturer,
equipment_name,
anomaly,
org_code,
health_index,
device_type,
kks,
point_name
from
#{tableName}
...
...
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