Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
139cedcb
Commit
139cedcb
authored
Nov 02, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
c8f2aa65
69d72c1e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
10 deletions
+84
-10
KafkaAnalyseController.java
...t/module/jxiop/biz/controller/KafkaAnalyseController.java
+10
-9
FullViewRecallInfoDTO.java
...amos/boot/module/jxiop/biz/dto/FullViewRecallInfoDTO.java
+1
-1
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+2
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+71
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+0
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/KafkaAnalyseController.java
View file @
139cedcb
...
@@ -190,7 +190,7 @@ public class KafkaAnalyseController {
...
@@ -190,7 +190,7 @@ public class KafkaAnalyseController {
int
stationInt
=
1
;
int
stationInt
=
1
;
int
equipmentInt
=
1
;
int
equipmentInt
=
1
;
int
subSystemInt
=
1
;
int
subSystemInt
=
1
;
Double
healthScoreInfo
=
idxBizFanHealthIndexMapper
.
getHealthScoreInfo
(
null
,
null
).
doubleValue
();
Double
healthScoreInfo
=
idxBizFanHealthIndexMapper
.
getHealthScoreInfo
ByParam
(
null
,
null
,
analysisType
).
doubleValue
();
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
...
@@ -208,14 +208,14 @@ public class KafkaAnalyseController {
...
@@ -208,14 +208,14 @@ public class KafkaAnalyseController {
allMapDto
.
setScore
(
healthScoreInfo
);
allMapDto
.
setScore
(
healthScoreInfo
);
allMapDto
.
setIsRoot
(
true
);
allMapDto
.
setIsRoot
(
true
);
allMapDto
.
setCategory
(
"category"
);
allMapDto
.
setCategory
(
"category"
);
allMapDto
.
setChild
List
(
new
ArrayList
<>());
allMapDto
.
setChild
ren
(
new
ArrayList
<>());
allMapDto
.
setParentKey
(
"0"
);
allMapDto
.
setParentKey
(
"0"
);
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>>>>
areaMap
:
resultMap
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>>>>
areaMap
:
resultMap
.
entrySet
())
{
Double
areaLowScore
=
null
;
Double
areaLowScore
=
null
;
Double
areaHighScore
=
null
;
Double
areaHighScore
=
null
;
Double
areaHealthScoreInfo
=
idxBizFanHealthIndexMapper
.
getHealthScoreInfo
(
areaMap
.
getKey
(),
null
).
doubleValue
();
Double
areaHealthScoreInfo
=
idxBizFanHealthIndexMapper
.
getHealthScoreInfo
ByParam
(
areaMap
.
getKey
(),
null
,
analysisType
).
doubleValue
();
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
areaQuery
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
areaQuery
=
new
LambdaQueryWrapper
<>();
areaQuery
.
isNull
(
IdxBizFanHealthLevel:
:
getStatus
);
areaQuery
.
isNull
(
IdxBizFanHealthLevel:
:
getStatus
);
...
@@ -230,7 +230,7 @@ public class KafkaAnalyseController {
...
@@ -230,7 +230,7 @@ public class KafkaAnalyseController {
areaMapDto
.
setStatus
(
areaIdxBizFanHealthLevel
.
getHealthLevel
());
areaMapDto
.
setStatus
(
areaIdxBizFanHealthLevel
.
getHealthLevel
());
areaMapDto
.
setScore
(
areaHealthScoreInfo
);
areaMapDto
.
setScore
(
areaHealthScoreInfo
);
areaMapDto
.
setParentKey
(
allMapDto
.
getKey
());
areaMapDto
.
setParentKey
(
allMapDto
.
getKey
());
allMapDto
.
getChild
List
().
add
(
areaMapDto
);
allMapDto
.
getChild
ren
().
add
(
areaMapDto
);
areaInt
++;
areaInt
++;
List
<
FullViewRecallInfoDTO
>
areaMapList
=
new
ArrayList
<>();
List
<
FullViewRecallInfoDTO
>
areaMapList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>>>
stationMap
:
areaMap
.
getValue
().
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>>>
stationMap
:
areaMap
.
getValue
().
entrySet
())
{
...
@@ -273,7 +273,7 @@ public class KafkaAnalyseController {
...
@@ -273,7 +273,7 @@ public class KafkaAnalyseController {
}
}
}
}
stationDto
.
setParentKey
(
areaMapDto
.
getKey
());
stationDto
.
setParentKey
(
areaMapDto
.
getKey
());
areaMapDto
.
getChild
List
().
add
(
stationDto
);
areaMapDto
.
getChild
ren
().
add
(
stationDto
);
stationInt
++;
stationInt
++;
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>>
equipmentMap
:
stationMap
.
getValue
().
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Map
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>>
equipmentMap
:
stationMap
.
getValue
().
entrySet
())
{
...
@@ -298,7 +298,7 @@ public class KafkaAnalyseController {
...
@@ -298,7 +298,7 @@ public class KafkaAnalyseController {
equipmentMapDto
.
setStatus
(
levelInfo
.
getHealthLevel
());
equipmentMapDto
.
setStatus
(
levelInfo
.
getHealthLevel
());
equipmentMapDto
.
setScore
(
equipmentIndexInfoMap
.
getOrDefault
(
equipmentMap
.
getKey
(),
100.0
));
equipmentMapDto
.
setScore
(
equipmentIndexInfoMap
.
getOrDefault
(
equipmentMap
.
getKey
(),
100.0
));
equipmentMapDto
.
setParentKey
(
stationDto
.
getKey
());
equipmentMapDto
.
setParentKey
(
stationDto
.
getKey
());
stationDto
.
getChild
List
().
add
(
equipmentMapDto
);
stationDto
.
getChild
ren
().
add
(
equipmentMapDto
);
equipmentInt
++;
equipmentInt
++;
for
(
Map
.
Entry
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>
subSystemMap
:
equipmentMap
.
getValue
().
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Map
<
String
,
List
<
FullViewRecallDataDTO
>>>
subSystemMap
:
equipmentMap
.
getValue
().
entrySet
())
{
FullViewRecallInfoDTO
subSystemMapDto
=
new
FullViewRecallInfoDTO
();
FullViewRecallInfoDTO
subSystemMapDto
=
new
FullViewRecallInfoDTO
();
...
@@ -312,7 +312,7 @@ public class KafkaAnalyseController {
...
@@ -312,7 +312,7 @@ public class KafkaAnalyseController {
subSystemMapDto
.
setScore
(
subSystemIndexInfoMap
.
getOrDefault
(
subSystemMap
.
getKey
(),
100.0
));
subSystemMapDto
.
setScore
(
subSystemIndexInfoMap
.
getOrDefault
(
subSystemMap
.
getKey
(),
100.0
));
subSystemMapDto
.
setParentKey
(
equipmentMapDto
.
getKey
());
subSystemMapDto
.
setParentKey
(
equipmentMapDto
.
getKey
());
equipmentMapDto
.
getChild
List
().
add
(
subSystemMapDto
);
equipmentMapDto
.
getChild
ren
().
add
(
subSystemMapDto
);
subSystemInt
++;
subSystemInt
++;
for
(
Map
.
Entry
<
String
,
List
<
FullViewRecallDataDTO
>>
pointNameMap
:
subSystemMap
.
getValue
().
entrySet
())
{
for
(
Map
.
Entry
<
String
,
List
<
FullViewRecallDataDTO
>>
pointNameMap
:
subSystemMap
.
getValue
().
entrySet
())
{
FullViewRecallInfoDTO
pointNameMapDto
=
new
FullViewRecallInfoDTO
();
FullViewRecallInfoDTO
pointNameMapDto
=
new
FullViewRecallInfoDTO
();
...
@@ -328,7 +328,7 @@ public class KafkaAnalyseController {
...
@@ -328,7 +328,7 @@ public class KafkaAnalyseController {
pointNameMapDto
.
setScore
(
pointNameIndexInfoMap
.
getOrDefault
(
fullViewRecallDataDTO
.
getStation
()
+
"_"
+
fullViewRecallDataDTO
.
getIndexAddress
(),
100.0
));
pointNameMapDto
.
setScore
(
pointNameIndexInfoMap
.
getOrDefault
(
fullViewRecallDataDTO
.
getStation
()
+
"_"
+
fullViewRecallDataDTO
.
getIndexAddress
(),
100.0
));
pointNameMapDto
.
setParentKey
(
subSystemMapDto
.
getKey
());
pointNameMapDto
.
setParentKey
(
subSystemMapDto
.
getKey
());
subSystemMapDto
.
getChild
List
().
add
(
pointNameMapDto
);
subSystemMapDto
.
getChild
ren
().
add
(
pointNameMapDto
);
pointNameInt
++;
pointNameInt
++;
}
}
...
@@ -352,8 +352,9 @@ public class KafkaAnalyseController {
...
@@ -352,8 +352,9 @@ public class KafkaAnalyseController {
String
stationType
=
"风电站"
;
String
stationType
=
"风电站"
;
List
<
IdxBizFanHealthLevel
>
collect
=
healthLevelInfoList
.
stream
().
filter
(
item
->
item
.
getAnalysisObjType
().
contains
(
station
)).
collect
(
Collectors
.
toList
());
List
<
IdxBizFanHealthLevel
>
collect
=
healthLevelInfoList
.
stream
().
filter
(
item
->
item
.
getAnalysisObjType
().
contains
(
station
)).
collect
(
Collectors
.
toList
());
for
(
IdxBizFanHealthLevel
item
:
collect
)
{
for
(
IdxBizFanHealthLevel
item
:
collect
)
{
if
(
!
item
.
getAnalysisObjType
().
contains
(
"子系统
"
))
{
if
(
item
.
getAnalysisObjType
().
contains
(
"子阵
"
))
{
stationType
=
"光伏站"
;
stationType
=
"光伏站"
;
break
;
}
}
}
}
for
(
IdxBizFanHealthLevel
item
:
collect
)
{
for
(
IdxBizFanHealthLevel
item
:
collect
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/FullViewRecallInfoDTO.java
View file @
139cedcb
...
@@ -15,6 +15,6 @@ public class FullViewRecallInfoDTO {
...
@@ -15,6 +15,6 @@ public class FullViewRecallInfoDTO {
private
String
status
=
""
;
private
String
status
=
""
;
private
Boolean
isRoot
=
false
;
private
Boolean
isRoot
=
false
;
private
String
category
=
""
;
private
String
category
=
""
;
private
List
<
FullViewRecallInfoDTO
>
child
List
=
new
ArrayList
<>();
private
List
<
FullViewRecallInfoDTO
>
child
ren
=
new
ArrayList
<>();
private
String
parentKey
;
private
String
parentKey
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
View file @
139cedcb
...
@@ -25,6 +25,8 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
...
@@ -25,6 +25,8 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
BigDecimal
getHealthScoreInfoByStation
(
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"tableName"
)
String
tableName
);
BigDecimal
getHealthScoreInfoByStation
(
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"tableName"
)
String
tableName
);
BigDecimal
getHealthScoreInfoByParam
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"analysisType"
)
String
analysisType
);
List
<
Map
<
String
,
Object
>>
getHealthListInfo
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
);
List
<
Map
<
String
,
Object
>>
getHealthListInfo
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
139cedcb
...
@@ -53,6 +53,77 @@
...
@@ -53,6 +53,77 @@
) a
) a
</select>
</select>
<select
id=
"getHealthScoreInfoByParam"
resultType=
"java.math.BigDecimal"
>
SELECT
CEILING(avg( a.avgHealthIndex )) AS healthIndex
FROM
(
SELECT
IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex
FROM
idx_biz_fan_health_index
<where>
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, "%Y-%m-%d") = CURRENT_DATE
</if>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按时刻'"
>
AND ANALYSIS_TYPE = '按时刻'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ANALYSIS_OBJ_TYPE = '片区'
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
AND GATEWAY_ID = #{stationCode}
AND ANALYSIS_OBJ_TYPE = '场站'
</if>
<if
test=
"(stationCode == null or stationCode == '') and (areaCode == null or areaCode == '')"
>
AND ANALYSIS_OBJ_TYPE = '片区'
</if>
</where>
UNION ALL
(
SELECT
IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex
FROM
idx_biz_pv_health_index
<where>
<if
test=
"analysisType == '按天' or analysisType == null or analysisType == ''"
>
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT(REC_DATE, "%Y-%m-%d") = CURRENT_DATE
</if>
<if
test=
"analysisType == '按小时'"
>
AND ANALYSIS_TYPE = '按小时'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 59 MINUTE )
</if>
<if
test=
"analysisType == '按时刻'"
>
AND ANALYSIS_TYPE = '按时刻'
AND REC_DATE >= DATE_SUB( NOW(), INTERVAL 9 MINUTE )
</if>
<if
test=
"areaCode != null and areaCode != ''"
>
AND ARAE like concat('%', #{areaCode}, '%')
AND ANALYSIS_OBJ_TYPE = '片区'
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
AND GATEWAY_ID = #{stationCode}
AND ANALYSIS_OBJ_TYPE = '场站'
</if>
<if
test=
"(stationCode == null or stationCode == '') and (areaCode == null or areaCode == '')"
>
AND ANALYSIS_OBJ_TYPE = '片区'
</if>
</where>
)
) a
</select>
<select
id=
"getHealthScoreInfoByStation"
resultType=
"java.math.BigDecimal"
>
<select
id=
"getHealthScoreInfoByStation"
resultType=
"java.math.BigDecimal"
>
SELECT
SELECT
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
139cedcb
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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