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
4627d011
Commit
4627d011
authored
Nov 19, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加退款方法
parent
72036fd3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
AccountTypeEnum.java
...xfc/platform/order/contant/enumerate/AccountTypeEnum.java
+1
-0
DeductionTypeEnum.java
...c/platform/order/contant/enumerate/DeductionTypeEnum.java
+1
-0
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+26
-0
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/contant/enumerate/AccountTypeEnum.java
View file @
4627d011
...
...
@@ -11,6 +11,7 @@ public enum AccountTypeEnum {
OUT_DEPOSIT
(
202
,
"所有押金"
),
OUT_PART_DEPOSIT
(
203
,
"部分押金(扣除该扣除的 + 保留违章预备金)"
),
OUT_RESIDUE_DEPOSIT
(
204
,
"剩余押金(扣除该扣除的)"
),
OUT_RESIDUE_ORDER
(
205
,
"部分订单退款"
),
;
/**
* 编码
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/contant/enumerate/DeductionTypeEnum.java
View file @
4627d011
...
...
@@ -18,6 +18,7 @@ public enum DeductionTypeEnum {
VIOLATE_TRAFFIC_DEDUCT
(
401
,
"违章扣款"
),
VIOLATE_TRAFFIC_KEEP
(
402
,
"违章扣款保留金"
),
OTHER_DELAY_SAFE
(
501
,
"其他费用-延迟用车不记免赔"
),
OTHER_PUBLISH_REJECTED
(
502
,
"其他费用-申请调车接单被拒绝退款"
),
;
/**
* 编码
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
4627d011
...
...
@@ -47,6 +47,7 @@ import java.util.*;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_FALSE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
import
static
com
.
xxfc
.
platform
.
order
.
contant
.
enumerate
.
AccountTypeEnum
.
OUT_RESIDUE_ORDER
;
import
static
com
.
xxfc
.
platform
.
order
.
pojo
.
account
.
OrderAccountDeduction
.
ORIGIN_DEPOSIT
;
import
static
com
.
xxfc
.
platform
.
order
.
pojo
.
account
.
OrderAccountDeduction
.
ORIGIN_ORDER_DEPOSIT
;
import
static
com
.
xxfc
.
platform
.
order
.
pojo
.
pay
.
NotifyUrlDTO
.
PAY_WAY_ALI
;
...
...
@@ -218,6 +219,31 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
return
refundAmount
;
}
/**
* 调车发布 退款流程
* @param baseOrder 基础订单信息
* @param refundDesc 退款描述
* @param originalRefundAmount 原退款金额
* @param deductAmount 扣除金额
*/
public
void
publishRefundProcess
(
BaseOrder
baseOrder
,
String
refundDesc
,
BigDecimal
originalRefundAmount
,
BigDecimal
deductAmount
)
{
BigDecimal
refundAmount
=
BigDecimal
.
ZERO
.
add
(
originalRefundAmount
);
if
(
null
!=
deductAmount
)
{
refundAmount
=
originalRefundAmount
.
subtract
(
deductAmount
);
}
BigDecimal
finalRefundAmount
=
refundAmount
;
OrderAccountDetail
oad
=
new
OrderAccountDetail
(){{
setOriginOrderAmount
(
originalRefundAmount
);
setOrderAmount
(
finalRefundAmount
);
}};
OrderAccountDeduction
violateDeduction
=
initDeduction
(
deductAmount
,
refundDesc
,
DeductionTypeEnum
.
OTHER_PUBLISH_REJECTED
,
OrderAccountDeduction
.
ORIGIN_ORDER
);
oad
.
getDeductions
().
add
(
violateDeduction
);
refundSubProcess
(
baseOrder
,
refundDesc
,
originalRefundAmount
,
refundAmount
,
OUT_RESIDUE_ORDER
.
getCode
(),
RefundStatusEnum
.
ALL
.
getCode
(),
oad
);
}
/**
* 退款子流程
* @param baseOrder 基础订单信息
...
...
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