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
177bcd23
Commit
177bcd23
authored
Sep 18, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
风机状态公共方法处理
parent
707e2f0d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+1
-0
ESEquipmentsDTO.java
...ejoin/amos/boot/module/jxiop/biz/dto/ESEquipmentsDTO.java
+1
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+12
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
177bcd23
...
@@ -106,6 +106,7 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -106,6 +106,7 @@ public class MonitorFanIdxController extends BaseController {
List
<
ESEquipmentsDTO
>
fanStatusList
=
monitorFanIndicator
.
getFanStatusList
(
stationId
);
List
<
ESEquipmentsDTO
>
fanStatusList
=
monitorFanIndicator
.
getFanStatusList
(
stationId
);
Page
<
ESEquipmentsDTO
>
page
=
new
Page
<>(
current
,
size
);
Page
<
ESEquipmentsDTO
>
page
=
new
Page
<>(
current
,
size
);
List
<
ESEquipmentsDTO
>
collect
=
fanStatusList
.
stream
()
List
<
ESEquipmentsDTO
>
collect
=
fanStatusList
.
stream
()
.
sorted
(
Comparator
.
comparing
(
t
->
Integer
.
parseInt
(
t
.
getEquipmentNumber
())))
.
skip
((
long
)
(
current
-
1
)
*
size
)
.
skip
((
long
)
(
current
-
1
)
*
size
)
.
limit
(
size
)
.
limit
(
size
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/ESEquipmentsDTO.java
View file @
177bcd23
...
@@ -25,4 +25,5 @@ public class ESEquipmentsDTO {
...
@@ -25,4 +25,5 @@ public class ESEquipmentsDTO {
private
String
pictureName
;
private
String
pictureName
;
private
String
displayName
;
private
String
displayName
;
private
String
state
;
private
String
state
;
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 @
177bcd23
...
@@ -295,13 +295,25 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -295,13 +295,25 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
List
<
ESEquipments
>
equipNumList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion1
,
null
,
ESEquipments
.
class
);
List
<
ESEquipments
>
equipNumList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion1
,
null
,
ESEquipments
.
class
);
Map
<
String
,
String
>
collect
=
CollectionUtils
.
isEmpty
(
result
)
?
new
HashMap
<
String
,
String
>()
:
result
.
stream
().
collect
(
Collectors
.
toMap
(
ESEquipments:
:
getEquipmentNumber
,
ESEquipments:
:
getEquipmentIndexName
,
(
item1
,
item2
)
->
item1
));
Map
<
String
,
String
>
collect
=
CollectionUtils
.
isEmpty
(
result
)
?
new
HashMap
<
String
,
String
>()
:
result
.
stream
().
collect
(
Collectors
.
toMap
(
ESEquipments:
:
getEquipmentNumber
,
ESEquipments:
:
getEquipmentIndexName
,
(
item1
,
item2
)
->
item1
));
HashMap
<
String
,
String
>
colorMap
=
new
HashMap
<>();
colorMap
.
put
(
"正常运行"
,
"#00aa00"
);
colorMap
.
put
(
"报警运行"
,
"#ffc400"
);
colorMap
.
put
(
"停机状态"
,
"#0055ff"
);
colorMap
.
put
(
"故障状态"
,
"#ff0000"
);
colorMap
.
put
(
"限功率"
,
"#a3f5aa"
);
colorMap
.
put
(
"待机状态"
,
"#00aaff"
);
colorMap
.
put
(
"维护状态"
,
"#ff00ff"
);
colorMap
.
put
(
"通讯中断"
,
"#7d8e95"
);
List
<
ESEquipmentsDTO
>
resultList
=
new
ArrayList
<>();
List
<
ESEquipmentsDTO
>
resultList
=
new
ArrayList
<>();
equipNumList
.
forEach
(
item
->
{
equipNumList
.
forEach
(
item
->
{
String
status
=
ObjectUtils
.
isEmpty
(
CommonConstans
.
fanStatus
.
get
(
collect
.
get
(
item
.
getEquipmentNumber
())))
?
"通讯中断"
:
CommonConstans
.
fanStatus
.
get
(
collect
.
get
(
item
.
getEquipmentNumber
()));
String
status
=
ObjectUtils
.
isEmpty
(
CommonConstans
.
fanStatus
.
get
(
collect
.
get
(
item
.
getEquipmentNumber
())))
?
"通讯中断"
:
CommonConstans
.
fanStatus
.
get
(
collect
.
get
(
item
.
getEquipmentNumber
()));
item
.
setAddress
(
status
);
item
.
setAddress
(
status
);
ESEquipmentsDTO
esEquipmentsDTO
=
new
ESEquipmentsDTO
();
ESEquipmentsDTO
esEquipmentsDTO
=
new
ESEquipmentsDTO
();
BeanUtil
.
copyProperties
(
item
,
esEquipmentsDTO
);
BeanUtil
.
copyProperties
(
item
,
esEquipmentsDTO
);
String
color
=
colorMap
.
get
(
status
);
esEquipmentsDTO
.
setState
(
status
);
esEquipmentsDTO
.
setState
(
status
);
esEquipmentsDTO
.
setColor
(
color
);
resultList
.
add
(
esEquipmentsDTO
);
resultList
.
add
(
esEquipmentsDTO
);
});
});
...
...
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