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
0396fa89
Commit
0396fa89
authored
Aug 05, 2022
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:消防系统4小,图例数据结构修改
parent
b160b375
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
EquipmentSpecificAlarmServiceImpl.java
...anage/service/impl/EquipmentSpecificAlarmServiceImpl.java
+4
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmServiceImpl.java
View file @
0396fa89
...
@@ -670,7 +670,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
...
@@ -670,7 +670,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
List
<
EquipAlarmLineVo
>
list
=
equipmentSpecificAlarmMapper
.
equipAlarmLine
(
hashMap
);
List
<
EquipAlarmLineVo
>
list
=
equipmentSpecificAlarmMapper
.
equipAlarmLine
(
hashMap
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
LinkedHashSet
<
String
>
xAxis
=
new
LinkedHashSet
<>();
LinkedHashSet
<
String
>
xAxis
=
new
LinkedHashSet
<>();
List
<
Map
<
String
,
LinkedList
<
Object
>
>>
yAxis
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
yAxis
=
new
ArrayList
<>();
// 取出所有非空indexName
// 取出所有非空indexName
Set
<
String
>
indexKNameSet
=
list
.
stream
().
map
(
EquipAlarmLineVo:
:
getIndexName
).
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
indexKNameSet
=
list
.
stream
().
map
(
EquipAlarmLineVo:
:
getIndexName
).
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toSet
());
...
@@ -681,7 +681,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
...
@@ -681,7 +681,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
// 迭代器倒序遍历map
// 迭代器倒序遍历map
String
date
=
null
;
String
date
=
null
;
for
(
String
indexName
:
indexKNameSet
)
{
for
(
String
indexName
:
indexKNameSet
)
{
HashMap
<
String
,
LinkedList
<
Object
>
>
dataMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
LinkedList
<
Object
>
yData
=
new
LinkedList
<>();
LinkedList
<
Object
>
yData
=
new
LinkedList
<>();
// 解决迭代器遍历一次的问题
// 解决迭代器遍历一次的问题
ListIterator
<
Map
.
Entry
<
String
,
List
<
EquipAlarmLineVo
>>>
i
=
new
ArrayList
<
Map
.
Entry
<
String
,
List
<
EquipAlarmLineVo
>>>(
sortMap
.
entrySet
()).
listIterator
(
sortMap
.
size
());
ListIterator
<
Map
.
Entry
<
String
,
List
<
EquipAlarmLineVo
>>>
i
=
new
ArrayList
<
Map
.
Entry
<
String
,
List
<
EquipAlarmLineVo
>>>(
sortMap
.
entrySet
()).
listIterator
(
sortMap
.
size
());
...
@@ -693,7 +693,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
...
@@ -693,7 +693,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
for
(
EquipAlarmLineVo
vo
:
value
)
{
for
(
EquipAlarmLineVo
vo
:
value
)
{
String
name
=
vo
.
getIndexName
();
String
name
=
vo
.
getIndexName
();
if
(
key
.
equals
(
date
))
{
if
(
key
.
equals
(
date
))
{
yData
=
yAxis
.
get
(
i
.
previousIndex
()).
get
(
"data"
);
yData
=
(
LinkedList
<
Object
>)
yAxis
.
get
(
i
.
previousIndex
()).
get
(
"data"
);
}
}
if
(
indexName
.
equals
(
name
))
{
if
(
indexName
.
equals
(
name
))
{
yData
.
add
(
vo
.
getTotal
());
yData
.
add
(
vo
.
getTotal
());
...
@@ -705,6 +705,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
...
@@ -705,6 +705,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
date
=
key
;
date
=
key
;
}
}
dataMap
.
put
(
"data"
,
yData
);
dataMap
.
put
(
"data"
,
yData
);
dataMap
.
put
(
"name"
,
indexName
);
yAxis
.
add
(
dataMap
);
yAxis
.
add
(
dataMap
);
}
}
resultMap
.
put
(
"legend"
,
indexKNameSet
);
resultMap
.
put
(
"legend"
,
indexKNameSet
);
...
...
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