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
56757441
Commit
56757441
authored
Mar 01, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改液位bug
parent
75230cd5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
UnitTransformUtil.java
...m/yeejoin/equipmanage/common/utils/UnitTransformUtil.java
+4
-4
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+3
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/UnitTransformUtil.java
View file @
56757441
...
...
@@ -34,7 +34,7 @@ public class UnitTransformUtil {
map
.
put
(
"status"
,
"0"
);
map
.
put
(
"abs"
,
nowVal
.
divide
(
new
BigDecimal
(
maxValue
),
2
,
BigDecimal
.
ROUND_HALF_UP
).
movePointRight
(
2
));
}
else
if
(
nowVal
.
compareTo
(
new
BigDecimal
(
maxValue
))
==
0
)
{
map
.
put
(
"status"
,
"
2
"
);
map
.
put
(
"status"
,
"
1
"
);
map
.
put
(
"abs"
,
100
);
}
else
if
(
nowVal
.
compareTo
(
new
BigDecimal
(
0
))
==
0
)
{
map
.
put
(
"status"
,
"1"
);
...
...
@@ -71,7 +71,7 @@ public class UnitTransformUtil {
map
.
put
(
"abs"
,
100
);
}
else
if
(
nowVal
.
compareTo
(
new
BigDecimal
(
maxValue
))
==
0
)
{
map
.
put
(
"status"
,
"1"
);
map
.
put
(
"abs"
,
"--"
);
map
.
put
(
"abs"
,
100
);
}
else
{
map
.
put
(
"status"
,
"1"
);
map
.
put
(
"abs"
,
nowVal
.
divide
(
new
BigDecimal
(
maxValue
),
2
,
BigDecimal
.
ROUND_HALF_UP
).
movePointRight
(
2
));
...
...
@@ -104,7 +104,7 @@ public class UnitTransformUtil {
map
.
put
(
"abs"
,
100
);
}
else
if
(
nowVal
.
compareTo
(
new
BigDecimal
(
maxValue
))
==
0
)
{
map
.
put
(
"status"
,
"1"
);
map
.
put
(
"abs"
,
"--"
);
map
.
put
(
"abs"
,
100
);
}
else
{
map
.
put
(
"status"
,
"1"
);
map
.
put
(
"abs"
,
nowVal
.
divide
(
new
BigDecimal
(
maxValue
),
2
,
BigDecimal
.
ROUND_HALF_UP
).
movePointRight
(
2
));
...
...
@@ -139,7 +139,7 @@ public class UnitTransformUtil {
map
.
put
(
"abs"
,
100
);
}
else
if
(
nowVal
.
compareTo
(
new
BigDecimal
(
maxValue
))
==
0
)
{
map
.
put
(
"status"
,
"1"
);
map
.
put
(
"abs"
,
"--"
);
map
.
put
(
"abs"
,
100
);
}
else
{
map
.
put
(
"status"
,
"1"
);
map
.
put
(
"abs"
,
nowVal
.
divide
(
new
BigDecimal
(
maxValue
),
2
,
BigDecimal
.
ROUND_HALF_UP
).
movePointRight
(
2
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
56757441
...
...
@@ -96,6 +96,9 @@ public class SupervisionConfigureController extends AbstractBaseController {
BigDecimal
divide
=
new
BigDecimal
(
100
);
BigDecimal
bigDecimal
=
new
BigDecimal
(
String
.
valueOf
(
m
.
get
(
"volume"
))).
multiply
(
new
BigDecimal
(
String
.
valueOf
(
transResult
.
get
(
"abs"
)))).
divide
(
divide
,
0
,
BigDecimal
.
ROUND_HALF_UP
);
m
.
put
(
"levelAbs"
,
bigDecimal
+
"m³ "
+
" ("
+
transResult
.
get
(
"abs"
)
+
"%)"
);
}
else
if
(
String
.
valueOf
(
transResult
.
get
(
"abs"
)).
equals
(
"100"
)
&&
String
.
valueOf
(
transResult
.
get
(
"status"
)).
equals
(
"1"
))
{
BigDecimal
bigDecimal
=
new
BigDecimal
(
String
.
valueOf
(
m
.
get
(
"volume"
)));
m
.
put
(
"levelAbs"
,
bigDecimal
+
"m³ "
+
" ("
+
transResult
.
get
(
"abs"
)
+
"%)"
);
}
else
{
m
.
put
(
"levelAbs"
,
transResult
.
get
(
"abs"
));
}
...
...
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