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
14bbcbe3
Commit
14bbcbe3
authored
Oct 24, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公共方法修改
parent
ea7996a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+4
-4
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+1
-1
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 @
14bbcbe3
...
...
@@ -196,7 +196,7 @@ public class BigScreenAnalyseController extends BaseController {
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthInfoByArea
()
throws
Exception
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getHealthInfoByArea
();
Map
<
String
,
BigDecimal
>
collect
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"area"
).
toString
(),
t
->
new
BigDecimal
(
t
.
get
(
"healthIndex"
).
toString
())));
Map
<
String
,
Integer
>
collect
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"area"
).
toString
(),
t
->
Integer
.
valueOf
(
t
.
get
(
"healthIndex"
).
toString
())));
// List<String> list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区");
List
<
String
>
list
=
new
ArrayList
<>();
...
...
@@ -214,7 +214,7 @@ public class BigScreenAnalyseController extends BaseController {
}
list
=
companyModels
.
stream
().
map
(
CompanyModel:
:
getCompanyName
).
collect
(
Collectors
.
toList
());
List
<
Object
>
seriesData
=
new
ArrayList
<>();
list
.
forEach
(
item
->
seriesData
.
add
(
collect
.
getOrDefault
(
item
,
new
BigDecimal
(
"100"
)
)));
list
.
forEach
(
item
->
seriesData
.
add
(
collect
.
getOrDefault
(
item
,
100
)));
resultMap
.
put
(
"axisData"
,
list
);
resultMap
.
put
(
"seriesData"
,
seriesData
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
...
...
@@ -478,14 +478,14 @@ public class BigScreenAnalyseController extends BaseController {
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getSubSystemInfo
(
equipmentName
,
stationBasic
.
getFanGatewayId
());
Map
<
Object
,
Double
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"subSystem"
),
t
->
Double
.
parseDouble
(
t
.
get
(
"healthIndex"
).
toString
())));
Map
<
Object
,
Integer
>
equipmentHealthIndexMap
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"subSystem"
),
t
->
Integer
.
valueOf
(
t
.
get
(
"healthIndex"
).
toString
())));
List
<
Object
>
seriesData
=
new
ArrayList
<>();
List
<
Object
>
axisData
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
equipmentList
=
idxBizFanHealthIndexMapper
.
getSumSystemListByEquipment
(
stationBasic
.
getFanGatewayId
(),
equipmentName
);
equipmentList
.
forEach
(
item
->
{
Double
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"subSystem"
),
100.
0
);
Integer
equipmentHealthScore
=
equipmentHealthIndexMap
.
getOrDefault
(
item
.
get
(
"subSystem"
),
10
0
);
seriesData
.
add
(
equipmentHealthScore
);
axisData
.
add
(
item
.
get
(
"subSystem"
));
});
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
14bbcbe3
...
...
@@ -403,7 +403,7 @@
<select
id=
"getSubSystemInfo"
resultType=
"java.util.Map"
>
SELECT
IFNULL( HEALTH_INDEX, 100
) AS healthIndex,
CEILING(IFNULL( HEALTH_INDEX, 100 )
) AS healthIndex,
SUB_SYSTEM AS subSystem
FROM
idx_biz_fan_health_index
...
...
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