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
2941497c
Commit
2941497c
authored
Dec 08, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
21362
parent
a5438d12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
EquipmentSpecificAlarmLogServiceImpl.java
...ge/service/impl/EquipmentSpecificAlarmLogServiceImpl.java
+8
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmLogServiceImpl.java
View file @
2941497c
...
...
@@ -105,8 +105,14 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
||
0
>
(
Integer
.
valueOf
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"sumNum"
)))
-
Integer
.
valueOf
(
String
.
valueOf
(
alarmEquipDayLink
.
get
(
"hbSumNum"
)))))
{
alarmEquipDayLink
.
put
(
"hbRate"
,
bigDecimal
+
"%"
);
}
else
{
BigDecimal
rate
=
nowDaySum
.
subtract
(
lastDaySum
).
divide
(
lastDaySum
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
alarmEquipDayLink
.
put
(
"hbRate"
,
"0.00"
.
equals
(
String
.
valueOf
(
rate
))
?
"0%"
:
rate
+
"%"
);
BigDecimal
rate
=
nowDaySum
.
subtract
(
lastDaySum
).
divide
(
lastDaySum
,
4
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
"0.0000"
.
equals
(
String
.
valueOf
(
rate
)))
{
alarmEquipDayLink
.
put
(
"hbRate"
,
"0%"
);
}
else
{
BigDecimal
rateNew
=
rate
.
multiply
(
new
BigDecimal
(
"100"
));
BigDecimal
bigDecimal1
=
rateNew
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
alarmEquipDayLink
.
put
(
"hbRate"
,
bigDecimal1
+
"%"
);
}
}
// 获取今日告警设备、月环比
...
...
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