Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
680f4f66
Commit
680f4f66
authored
May 14, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.11-见分进元
parent
98a18d6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
Common.java
.../com/yifu/cloud/plus/v1/yifu/common/core/util/Common.java
+5
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/Common.java
View file @
680f4f66
...
@@ -492,7 +492,6 @@ public class Common {
...
@@ -492,7 +492,6 @@ public class Common {
* @Date 2019-09-26
* @Date 2019-09-26
**/
**/
public
static
BigDecimal
formatMoneyForFund
(
BigDecimal
money
,
int
type
)
{
public
static
BigDecimal
formatMoneyForFund
(
BigDecimal
money
,
int
type
)
{
DecimalFormat
formater
=
new
DecimalFormat
(
"#0.#"
);
if
(
type
==
1
)
{
//四舍五入取整
if
(
type
==
1
)
{
//四舍五入取整
return
BigDecimal
.
valueOf
(
money
.
doubleValue
()).
setScale
(
0
,
RoundingMode
.
HALF_UP
);
return
BigDecimal
.
valueOf
(
money
.
doubleValue
()).
setScale
(
0
,
RoundingMode
.
HALF_UP
);
}
}
...
@@ -508,6 +507,11 @@ public class Common {
...
@@ -508,6 +507,11 @@ public class Common {
if
(
type
==
5
)
{
//保留一位小数
if
(
type
==
5
)
{
//保留一位小数
return
BigDecimal
.
valueOf
(
money
.
doubleValue
()).
setScale
(
1
,
RoundingMode
.
HALF_UP
);
return
BigDecimal
.
valueOf
(
money
.
doubleValue
()).
setScale
(
1
,
RoundingMode
.
HALF_UP
);
}
}
if
(
type
==
6
)
{
//见分进元
return
BigDecimal
.
valueOf
(
Math
.
ceil
(
BigDecimal
.
valueOf
(
money
.
doubleValue
())
.
setScale
(
2
,
RoundingMode
.
HALF_DOWN
).
doubleValue
()))
.
setScale
(
0
,
BigDecimal
.
ROUND_UP
);
}
return
money
;
return
money
;
}
}
...
...
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