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
c466eefa
Commit
c466eefa
authored
Sep 01, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增代码保证健壮性
parent
fba3ccad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+6
-3
InfluxDButils.java
...ejoin/amos/boot/module/jxiop/biz/utils/InfluxDButils.java
+1
-1
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 @
c466eefa
...
...
@@ -984,7 +984,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
windSqlList
.
add
(
item
);
}
if
(
"有功功率"
.
equals
(
item
.
getEquipmentIndexName
()))
{
item
.
setValue
(
String
.
format
(
"%.2f"
,
Double
.
parseDouble
(
item
.
getValue
())
/
1000
));
if
(!
ObjectUtils
.
isEmpty
(
item
.
getValue
()))
{
item
.
setValue
(
String
.
format
(
"%.2f"
,
Double
.
parseDouble
(
item
.
getValue
())
/
1000
));
}
powerSqlList
.
add
(
item
);
}
if
(
"瞬时风速"
.
equals
(
item
.
getEquipmentIndexName
()))
{
...
...
@@ -1001,10 +1003,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
windSqlList
.
forEach
(
item
->
{
HashMap
<
String
,
String
>
stringStringHashMap
=
new
HashMap
<>();
stringStringHashMap
.
put
(
"equipmentNumber"
,
item
.
getEquipmentNumber
());
stringStringHashMap
.
put
(
"wind"
,
item
.
getValue
());
stringStringHashMap
.
put
(
"wind"
,
ObjectUtils
.
isEmpty
(
item
.
getValue
())?
"0.0"
:
item
.
getValue
());
stringStringHashMap
.
put
(
"power"
,
powerSqlMap
.
get
(
item
.
getEquipmentNumber
()));
stringStringHashMap
.
put
(
"windSpeed"
,
windSpeedSqlMap
.
get
(
item
.
getEquipmentNumber
()));
stringStringHashMap
.
put
(
"electricity"
,
String
.
format
(
"%.4f"
,
Double
.
valueOf
(
electricitySqlMap
.
get
(
item
.
getEquipmentNumber
()))));
stringStringHashMap
.
put
(
"electricity"
,
String
.
format
(
"%.4f"
,
ObjectUtils
.
isEmpty
(
item
.
getEquipmentNumber
())?
0.0000
:
Double
.
valueOf
(
electricitySqlMap
.
get
(
item
.
getEquipmentNumber
()
))));
resultList
.
add
(
stringStringHashMap
);
});
//构建平台数据
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/utils/InfluxDButils.java
View file @
c466eefa
...
...
@@ -90,7 +90,7 @@ public class InfluxDButils {
for
(
int
j
=
0
;
j
<
columns
.
size
();
++
j
)
{
String
k
=
columns
.
get
(
j
);
Object
v
=
values
.
get
(
i
).
get
(
j
);
v
=
v
.
toString
().
equals
(
""
)?
0.0
:
v
;
bean
.
setPropertyValue
(
k
,
v
);
}
...
...
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