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
2e821726
Commit
2e821726
authored
Jul 07, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
a58fd3f3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
IndexDto.java
.../com/yeejoin/amos/boot/module/jxiop/api/dto/IndexDto.java
+2
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+11
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/dto/IndexDto.java
View file @
2e821726
...
...
@@ -28,4 +28,6 @@ public class IndexDto {
private
String
unit
;
// 单位
private
String
F
;
//风机编号 -- 适应大屏
private
String
state
;
// 指标名称【风机状态名称】
private
String
countString
;
private
String
color
;
}
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 @
2e821726
...
...
@@ -257,11 +257,21 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
List
<
IndexDto
>
influxDBList
=
influxDButils
.
getListData
(
sql
,
IndexDto
.
class
);
Map
<
String
,
Long
>
collect
=
influxDBList
.
stream
().
collect
(
Collectors
.
groupingBy
(
IndexDto:
:
getEquipmentIndexName
,
Collectors
.
counting
()));
List
<
String
>
list
=
Arrays
.
asList
(
"正常运行"
,
"告警运行"
,
"正常停机"
,
"故障停机"
,
"限功率"
,
"待机状态"
,
"维护状态"
,
"通讯中断"
);
HashMap
<
String
,
String
>
colorMap
=
new
HashMap
<>();
colorMap
.
put
(
"正常运行"
,
"#00aa00"
);
colorMap
.
put
(
"告警运行"
,
"#ffc400"
);
colorMap
.
put
(
"正常停机"
,
"#0055ff"
);
colorMap
.
put
(
"故障停机"
,
"#00aaff"
);
colorMap
.
put
(
"限功率"
,
"#a3f5aa"
);
colorMap
.
put
(
"待机状态"
,
"#ff0000"
);
colorMap
.
put
(
"维护状态"
,
"#ff00ff"
);
colorMap
.
put
(
"通讯中断"
,
"#7d8e95"
);
List
<
IndexDto
>
resultList
=
new
ArrayList
<>();
list
.
forEach
(
item
->
{
IndexDto
indexDto
=
new
IndexDto
();
indexDto
.
setCount
(
Math
.
toIntExact
(
collect
.
getOrDefault
(
item
,
0L
))
);
indexDto
.
setCount
String
(
collect
.
containsKey
(
item
)
?
String
.
valueOf
(
collect
.
get
(
item
))
:
"0"
);
indexDto
.
setEquipmentIndexName
(
item
);
indexDto
.
setColor
(
colorMap
.
get
(
item
));
resultList
.
add
(
indexDto
);
});
return
resultList
;
...
...
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