Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
e7124fb1
Commit
e7124fb1
authored
Dec 10, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-delay-add' into dev
parents
5d542c2e
3e60dad6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+24
-4
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
e7124fb1
...
@@ -608,7 +608,14 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -608,7 +608,14 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
deduction
.
setName
(
vio
.
getDeductions
());
deduction
.
setName
(
vio
.
getDeductions
());
BigDecimal
diff
=
vio
.
getCost
().
subtract
(
deduction
.
getAmount
());
BigDecimal
diff
=
vio
.
getCost
().
subtract
(
deduction
.
getAmount
());
//修改归还押金金额
//修改归还押金金额
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
diff
));
BigDecimal
toBeDeposit
=
oad
.
getDepositAmount
().
subtract
(
diff
);
// if(BigDecimal.ZERO.compareTo(toBeDeposit) > 0) {
// toBeDeposit = BigDecimal.ZERO;
// } else
if
(
oad
.
getOriginDepositAmount
().
compareTo
(
toBeDeposit
)
<
0
){
toBeDeposit
=
BigDecimal
.
ZERO
.
add
(
oad
.
getOriginDepositAmount
());
}
oad
.
setDepositAmount
(
toBeDeposit
);
deduction
.
setAmount
(
vio
.
getCost
());
deduction
.
setAmount
(
vio
.
getCost
());
flag
=
Boolean
.
TRUE
;
flag
=
Boolean
.
TRUE
;
...
@@ -621,7 +628,12 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -621,7 +628,12 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
OrderAccountDeduction
oadNew
=
initDeduction
(
vio
.
getCost
(),
vio
.
getDeductions
(),
DeductionTypeEnum
.
OTHER_DELAY_SAFE
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
OrderAccountDeduction
oadNew
=
initDeduction
(
vio
.
getCost
(),
vio
.
getDeductions
(),
DeductionTypeEnum
.
OTHER_DELAY_SAFE
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
oad
.
getDeductions
().
add
(
oadNew
);
oad
.
getDeductions
().
add
(
oadNew
);
//修改归还押金金额
//修改归还押金金额
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
oadNew
.
getAmount
()));
BigDecimal
toBeDeposit
=
oad
.
getDepositAmount
().
subtract
(
oadNew
.
getAmount
());
if
(
oad
.
getOriginDepositAmount
().
compareTo
(
toBeDeposit
)
<
0
){
toBeDeposit
=
BigDecimal
.
ZERO
.
add
(
oad
.
getOriginDepositAmount
());
}
//修改归还押金金额
oad
.
setDepositAmount
(
toBeDeposit
);
}
}
}
}
...
@@ -639,7 +651,11 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -639,7 +651,11 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
deduction
.
setName
(
vio
.
getDeductions
());
deduction
.
setName
(
vio
.
getDeductions
());
BigDecimal
diff
=
vio
.
getCost
().
subtract
(
deduction
.
getAmount
());
BigDecimal
diff
=
vio
.
getCost
().
subtract
(
deduction
.
getAmount
());
//修改归还押金金额
//修改归还押金金额
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
diff
));
BigDecimal
toBeDeposit
=
oad
.
getDepositAmount
().
subtract
(
diff
);
if
(
oad
.
getOriginDepositAmount
().
compareTo
(
toBeDeposit
)
<
0
){
toBeDeposit
=
BigDecimal
.
ZERO
.
add
(
oad
.
getOriginDepositAmount
());
}
oad
.
setDepositAmount
(
toBeDeposit
);
deduction
.
setAmount
(
vio
.
getCost
());
deduction
.
setAmount
(
vio
.
getCost
());
//设置订单明细参数
//设置订单明细参数
...
@@ -655,7 +671,11 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -655,7 +671,11 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
OrderAccountDeduction
oadNew
=
initDeduction
(
vio
.
getCost
(),
vio
.
getDeductions
(),
dte
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
OrderAccountDeduction
oadNew
=
initDeduction
(
vio
.
getCost
(),
vio
.
getDeductions
(),
dte
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
oad
.
getDeductions
().
add
(
oadNew
);
oad
.
getDeductions
().
add
(
oadNew
);
//修改归还押金金额
//修改归还押金金额
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
oadNew
.
getAmount
()));
BigDecimal
toBeDeposit
=
oad
.
getDepositAmount
().
subtract
(
oadNew
.
getAmount
());
if
(
oad
.
getOriginDepositAmount
().
compareTo
(
toBeDeposit
)
<
0
){
toBeDeposit
=
BigDecimal
.
ZERO
.
add
(
oad
.
getOriginDepositAmount
());
}
oad
.
setDepositAmount
(
toBeDeposit
);
//设置订单明细参数
//设置订单明细参数
csv
.
setViolateAmount
(
csv
.
getViolateAmount
().
add
(
oadNew
.
getAmount
()));
csv
.
setViolateAmount
(
csv
.
getViolateAmount
().
add
(
oadNew
.
getAmount
()));
...
...
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