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
ac085722
Commit
ac085722
authored
Aug 02, 2023
by
caotao
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
2f6463cb
a87b3bf1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+14
-12
No files found.
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 @
ac085722
...
...
@@ -836,9 +836,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
for
(
IndicatorsDto
listDatum
:
listData
)
{
Map
<
String
,
Object
>
statusMap
=
new
HashMap
<>();
statusMap
.
put
(
"data"
,
StringUtils
.
isEmpty
(
listDatum
.
getDisplayName
())?
listDatum
.
getEquipmentIndexName
():
listDatum
.
getDisplayName
());
statusMap
.
put
(
"state"
,
listDatum
.
getState
().
equals
(
"
true"
)?
0
:
1
);
statusMap
.
put
(
"status"
,
listDatum
.
getState
().
equals
(
"
true"
)?
0
:
1
);
statusMap
.
put
(
"title"
,
listDatum
.
getState
().
equals
(
"
true"
)?
"通"
:
"断
"
);
statusMap
.
put
(
"state"
,
listDatum
.
getState
().
equals
(
"
false"
)?
1
:
0
);
statusMap
.
put
(
"status"
,
listDatum
.
getState
().
equals
(
"
false"
)?
1
:
0
);
statusMap
.
put
(
"title"
,
listDatum
.
getState
().
equals
(
"
false"
)?
"断"
:
"通
"
);
statusMaps
.
add
(
statusMap
);
}
return
statusMaps
;
...
...
@@ -881,7 +881,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
for
(
IndicatorsDto
indicatorsDto
:
indicatorsDtos
)
{
if
(
indicatorsDto
.
getDisplayName
().
contains
(
"合位"
)){
statusMap
.
put
(
"type"
,
indicatorsDto
.
getValue
());
statusMap
.
put
(
"status"
,
indicatorsDto
.
getValue
().
equals
(
"
true"
)?
"1"
:
"0
"
);
statusMap
.
put
(
"status"
,
indicatorsDto
.
getValue
().
equals
(
"
false"
)?
"0"
:
"1
"
);
statusMap
.
put
(
"position"
,
indicatorsDto
.
getDisplayName
().
split
(
"_"
)[
0
]+
"开关位置"
);
}
...
...
@@ -1395,10 +1395,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"scxurl"
,
pictureUrl
+
split1
[
1
]);
}
}
else
{
if
(
listDatum
.
getValue
().
equals
(
"true"
)){
url
=
pictureUrl
+
listDatum
.
getPictureName
();
}
else
{
if
(
listDatum
.
getValue
().
equals
(
"false"
)){
url
=
pictureUrl
+
listDatum
.
getPictureName
().
replace
(
"green"
,
"red"
);
}
else
{
url
=
pictureUrl
+
listDatum
.
getPictureName
();
}
photoUrls
.
put
(
listDatum
.
getDisplayName
().
split
(
"_"
)[
0
]+
"url"
,
url
);
}
...
...
@@ -1441,7 +1442,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
resultMap
.
put
(
"equipmentSpecificName"
,
list
.
get
(
0
).
getEquipmentSpecificName
());
resultMap
.
put
(
"equipmentIndexName"
,
list
.
get
(
0
).
getEquipmentSpecificName
());
resultMap
.
put
(
"equipmentInfoName"
,
list
.
get
(
0
).
getEquipmentSpecificName
().
substring
(
5
).
replace
(
"/"
,
" "
));
resultMap
.
put
(
"status"
,
list
.
get
(
0
).
getValue
().
equals
(
"
true"
)?
"正常运行"
:
"异常
"
);
resultMap
.
put
(
"status"
,
list
.
get
(
0
).
getValue
().
equals
(
"
false"
)?
"异常"
:
"正常运行
"
);
}
return
resultMap
;
}
...
...
@@ -1485,9 +1486,10 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
HashMap
<
String
,
Object
>
SpeedIndicator
(
String
gatewayId
,
String
equipmentNumber
,
String
equipmentIndexName
){
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" WHERE equipmentNumber ='"
+
equipmentNumber
+
"' and equipmentIndexName = '"
+
equipmentIndexName
+
"'"
;
log
.
info
(
"执行sql"
+
sql
);
List
<
IndicatorsDto
>
list
=
influxDButils
.
getListData
(
sql
,
IndicatorsDto
.
class
);
if
(!
ValidationUtil
.
isEmpty
(
list
)){
resultMap
.
put
(
"value"
,
list
.
get
(
0
).
getValue
(
));
resultMap
.
put
(
"value"
,
String
.
format
(
"%.2f"
,
Double
.
parseDouble
(
list
.
get
(
0
).
getValue
())
));
}
return
resultMap
;
}
...
...
@@ -1505,10 +1507,10 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
collect
.
get
(
s
).
stream
().
forEach
(
e
->{
String
picturl
=
""
;
if
(
e
.
getValue
().
equals
(
"true"
)){
picturl
=
pictureUrl
+
"dlg-h-green.png"
;
}
else
{
if
(
e
.
getValue
().
equals
(
"false"
)){
picturl
=
pictureUrl
+
"dlg-h-red.png"
;
}
else
{
picturl
=
pictureUrl
+
"dlg-h-green.png"
;
}
if
(
e
.
getEquipmentIndexName
().
endsWith
(
"断路器合闸"
)){
resultMap
.
put
(
e
.
getEquipmentIndexName
().
substring
(
0
,
3
),
picturl
);
...
...
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