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
a72da86b
Commit
a72da86b
authored
Oct 20, 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
07377096
a6368fb6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
38 deletions
+53
-38
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+10
-38
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+2
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+41
-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/BigScreenAnalyseController.java
View file @
a72da86b
...
...
@@ -501,33 +501,19 @@ public class BigScreenAnalyseController extends BaseController {
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
throws
UnsupportedEncodingException
{
subSystem
=
java
.
net
.
URLDecoder
.
decode
(
subSystem
,
"UTF-8"
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getHealthInfoBySubSystem
(
subSystem
,
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
Double
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"pointName"
),
t
->
Double
.
parseDouble
(
t
.
get
(
"healthIndex"
).
toString
())));
// List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getHealthInfoBySubSystem(subSystem, stationBasic.getFanGatewayId());
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getWarningInfoBySubSystem
(
subSystem
,
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
String
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"pointName"
),
t
->
t
.
get
(
"warningName"
).
toString
()));
List
<
Map
<
String
,
Object
>>
pointNameList
=
idxBizFanHealthIndexMapper
.
getPointNameListBySumSystem
(
stationBasic
.
getFanGatewayId
(),
subSystem
);
pointNameList
.
forEach
(
item
->
{
Double
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"pointName"
),
100.0
);
if
(
100.0
==
equipmentHealthScore
)
{
item
.
put
(
"warningName"
,
"安全"
);
}
else
{
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"设备"
);
query
.
eq
(
IdxBizFanHealthLevel:
:
getStatus
,
item
.
get
(
"station"
));
query
.
lt
(
IdxBizFanHealthLevel:
:
getGroupLowerLimit
,
equipmentHealthScore
);
query
.
ge
(
IdxBizFanHealthLevel:
:
getGroupUpperLimit
,
equipmentHealthScore
);
IdxBizFanHealthLevel
idxBizFanHealthLevel
=
idxBizFanHealthLevelMapper
.
selectOne
(
query
);
item
.
put
(
"warningName"
,
idxBizFanHealthLevel
.
getHealthLevel
());
}
item
.
put
(
"healthIndex"
,
equipmentHealthScore
);
String
warningName
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"pointName"
),
"安全"
);
item
.
put
(
"warningName"
,
warningName
);
});
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
mapPage
.
setSize
(
pointNameList
.
size
());
mapPage
.
setTotal
(
pointNameList
.
size
());
mapPage
.
setCurrent
(
1
);
mapPage
.
setRecords
(
pointNameList
);
return
ResponseHelper
.
buildResponse
(
mapPage
);
}
...
...
@@ -606,33 +592,19 @@ public class BigScreenAnalyseController extends BaseController {
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
throws
UnsupportedEncodingException
{
equipmentName
=
java
.
net
.
URLDecoder
.
decode
(
equipmentName
,
"UTF-8"
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getPvHealthInfoBySubSystem
(
equipmentName
,
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
Double
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"pointName"
),
t
->
Double
.
parseDouble
(
t
.
get
(
"healthIndex"
).
toString
())));
// List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getPvHealthInfoBySubSystem(equipmentName, stationBasic.getFanGatewayId());
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getPvWarningInfoBySubSystem
(
equipmentName
,
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
String
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"pointName"
),
t
->
t
.
get
(
"warningName"
).
toString
()));
List
<
Map
<
String
,
Object
>>
pointNameList
=
idxBizFanHealthIndexMapper
.
getPvPointNameListBySumSystem
(
stationBasic
.
getFanGatewayId
(),
equipmentName
);
pointNameList
.
forEach
(
item
->
{
Double
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"pointName"
),
100.0
);
if
(
100.0
==
equipmentHealthScore
)
{
item
.
put
(
"warningName"
,
"安全"
);
}
else
{
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"设备"
);
query
.
eq
(
IdxBizPvHealthLevel:
:
getStatus
,
item
.
get
(
"station"
).
toString
());
query
.
lt
(
IdxBizPvHealthLevel:
:
getGroupLowerLimit
,
equipmentHealthScore
);
query
.
ge
(
IdxBizPvHealthLevel:
:
getGroupUpperLimit
,
equipmentHealthScore
);
IdxBizPvHealthLevel
idxBizPvHealthLevel
=
idxBizPvHealthLevelMapper
.
selectOne
(
query
);
item
.
put
(
"warningName"
,
idxBizPvHealthLevel
.
getHealthLevel
());
}
item
.
put
(
"healthIndex"
,
equipmentHealthScore
);
String
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"pointName"
),
"安全"
);
item
.
put
(
"warningName"
,
equipmentHealthScore
);
});
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
mapPage
.
setSize
(
pointNameList
.
size
());
mapPage
.
setTotal
(
pointNameList
.
size
());
mapPage
.
setCurrent
(
1
);
mapPage
.
setRecords
(
pointNameList
);
return
ResponseHelper
.
buildResponse
(
mapPage
);
}
...
...
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 @
a72da86b
...
...
@@ -56,6 +56,7 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
List
<
Map
<
String
,
Object
>>
getHealthInfoBySubSystem
(
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
getWarningInfoBySubSystem
(
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"gatewayId"
)
String
gatewayId
);
...
...
@@ -75,6 +76,7 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
List
<
Map
<
String
,
Object
>>
getPvHealthInfoBySubSystem
(
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
getPvWarningInfoBySubSystem
(
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"gatewayId"
)
String
gatewayId
);
List
<
Map
<
String
,
Object
>>
getPvPointNameListBySumSystem
(
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"equipmentName"
)
String
equipmentName
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
a72da86b
...
...
@@ -520,6 +520,26 @@
</select>
<select
id=
"getWarningInfoBySubSystem"
resultType=
"java.util.Map"
>
SELECT
POINT_NAME as pointName,
WARNING_NAME as warningName
FROM
idx_biz_fan_warning_record
<where>
DISPOSOTION_STATE = '未处置'
<if
test=
"subSystem != null and subSystem != ''"
>
AND SUB_SYSTEM = #{subSystem}
</if>
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
GROUP BY
POINT_NAME
ORDER BY
WARNING_NAME ASC
</select>
...
...
@@ -639,6 +659,27 @@
POINT_NAME
</select>
<select
id=
"getPvWarningInfoBySubSystem"
resultType=
"java.util.Map"
>
SELECT
POINT_NAME as pointName,
WARNING_NAME as warningName
FROM
idx_biz_pv_warning_record
<where>
DISPOSOTION_STATE = '未处置'
<if
test=
"equipmentName != null and equipmentName != ''"
>
AND EQUIPMENT_NAME = #{equipmentName}
</if>
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
GROUP BY
POINT_NAME
ORDER BY
WARNING_NAME ASC
</select>
<select
id=
"getPvPointNameListBySumSystem"
resultType=
"java.util.Map"
>
...
...
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