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
9cce7838
Commit
9cce7838
authored
Oct 18, 2023
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.赋码统计百分比计算错误及四射5入
parent
fd28d54d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
PersonQrCodeController.java
...t/module/jxiop/biz/controller/PersonQrCodeController.java
+5
-5
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/PersonQrCodeController.java
View file @
9cce7838
...
@@ -165,10 +165,10 @@ public class PersonQrCodeController extends BaseController {
...
@@ -165,10 +165,10 @@ public class PersonQrCodeController extends BaseController {
}
else
if
(
"job"
.
equals
(
dataType
))
{
}
else
if
(
"job"
.
equals
(
dataType
))
{
countAll
=
sjglZsjZsbtzMapper
.
getJobYardByPageCount
(
parentCode
,
null
,
null
,
null
);
countAll
=
sjglZsjZsbtzMapper
.
getJobYardByPageCount
(
parentCode
,
null
,
null
,
null
);
}
}
result
.
put
(
"red
ToGreen
Percent"
,
getPercent
(
new
BigDecimal
(
red
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"redPercent"
,
getPercent
(
new
BigDecimal
(
red
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"redPercent"
,
getPercent
(
new
BigDecimal
(
redToGreen
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"red
ToGreen
Percent"
,
getPercent
(
new
BigDecimal
(
redToGreen
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"yellow
ToGreen
Percent"
,
getPercent
(
new
BigDecimal
(
yellow
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"yellowPercent"
,
getPercent
(
new
BigDecimal
(
yellow
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"yellowPercent"
,
getPercent
(
new
BigDecimal
(
yellowToGreen
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"yellow
ToGreen
Percent"
,
getPercent
(
new
BigDecimal
(
yellowToGreen
),
new
BigDecimal
(
countAll
)));
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
...
@@ -217,7 +217,7 @@ public class PersonQrCodeController extends BaseController {
...
@@ -217,7 +217,7 @@ public class PersonQrCodeController extends BaseController {
* @return 百分比
* @return 百分比
*/
*/
private
double
getPercent
(
BigDecimal
numerator
,
BigDecimal
denominator
)
{
private
double
getPercent
(
BigDecimal
numerator
,
BigDecimal
denominator
)
{
BigDecimal
multiply
=
numerator
.
divide
(
denominator
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
?
denominator
:
new
BigDecimal
(
1
),
4
,
BigDecimal
.
ROUND_
DOWN
).
multiply
(
new
BigDecimal
(
100
));
BigDecimal
multiply
=
numerator
.
divide
(
denominator
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
?
denominator
:
new
BigDecimal
(
1
),
4
,
BigDecimal
.
ROUND_
HALF_UP
).
multiply
(
new
BigDecimal
(
100
));
return
Math
.
abs
(
multiply
.
doubleValue
());
return
Math
.
abs
(
multiply
.
doubleValue
());
}
}
...
...
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