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
678ab118
Commit
678ab118
authored
Dec 21, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-zjw' into dev
parents
d951f9fe
f36c5638
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
9 deletions
+32
-9
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+31
-8
OrderRefundBiz.java
.../java/com/xxfc/platform/universal/biz/OrderRefundBiz.java
+1
-1
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
678ab118
...
...
@@ -47,6 +47,8 @@ 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
.
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
;
import
static
com
.
xxfc
.
platform
.
universal
.
constant
.
DictionaryKey
.
APP_ORDER
;
...
...
@@ -200,7 +202,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
originType
=
OrderAccountDeduction
.
ORIGIN_ORDER
;
}
else
{
stringBuilder
=
depositRefundDescBuilder
;
originType
=
O
rderAccountDeduction
.
O
RIGIN_DEPOSIT
;
originType
=
ORIGIN_DEPOSIT
;
}
oad
.
getDeductions
().
add
(
initDeduction
(
totalDeductAmount
,
stringBuilder
.
toString
(),
DeductionTypeEnum
.
VIOLATE_CANCEL
,
originType
));
}
...
...
@@ -436,13 +438,13 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
handleDedRefundDesc
=
handleDed
(
crosstown
,
handleDedRefundDesc
,
csv
);
if
(
csv
.
getDamagesAmount
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
oad
.
getDeductions
().
add
(
initDeduction
(
csv
.
getDamagesAmount
(),
handleDedRefundDesc
,
DeductionTypeEnum
.
DAMAGES
,
O
rderAccountDeduction
.
O
RIGIN_DEPOSIT
)
initDeduction
(
csv
.
getDamagesAmount
(),
handleDedRefundDesc
,
DeductionTypeEnum
.
DAMAGES
,
ORIGIN_DEPOSIT
)
);
}
//还车扣除款 剩余的 钱,再减去违章预备金
oad
.
getDeductions
().
add
(
initDeduction
(
illegalReserve
,
"违章保证金"
,
DeductionTypeEnum
.
VIOLATE_TRAFFIC_KEEP
,
O
rderAccountDeduction
.
O
RIGIN_DEPOSIT
)
initDeduction
(
illegalReserve
,
"违章保证金"
,
DeductionTypeEnum
.
VIOLATE_TRAFFIC_KEEP
,
ORIGIN_DEPOSIT
)
);
//剩余押金 = 押金 - 违章保证金 - 定损金额
...
...
@@ -618,7 +620,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
//如果没有修改,则添加
if
(
Boolean
.
FALSE
.
equals
(
flag
))
{
OrderAccountDeduction
oadNew
=
initDeduction
(
vio
.
getCost
(),
vio
.
getDeductions
(),
DeductionTypeEnum
.
OTHER_DELAY_SAFE
,
O
rderAccountDeduction
.
O
RIGIN_DEPOSIT
);
OrderAccountDeduction
oadNew
=
initDeduction
(
vio
.
getCost
(),
vio
.
getDeductions
(),
DeductionTypeEnum
.
OTHER_DELAY_SAFE
,
ORIGIN_DEPOSIT
);
oad
.
getDeductions
().
add
(
oadNew
);
//修改归还押金金额
resetDeposit
(
oad
);
...
...
@@ -634,8 +636,29 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
private
void
resetDeposit
(
OrderAccountDetail
oad
)
{
//修改归还押金金额
BigDecimal
toDeduction
=
oad
.
getDeductions
().
parallelStream
().
map
(
OrderAccountDeduction:
:
getAmount
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
oad
.
setDepositAmount
(
oad
.
getOriginDepositAmount
().
subtract
(
toDeduction
));
//扣费(押金源)
BigDecimal
toDeduction
=
oad
.
getDeductions
().
parallelStream
().
filter
(
oadTemp
->
(
Integer
.
valueOf
(
ORIGIN_DEPOSIT
).
equals
(
oadTemp
.
getOrigin
()))
).
map
(
OrderAccountDeduction:
:
getAmount
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
//扣费(订单_押金源)
BigDecimal
toOdDeduction
=
oad
.
getDeductions
().
parallelStream
().
filter
(
oadTemp
->
(
Integer
.
valueOf
(
ORIGIN_ORDER_DEPOSIT
).
equals
(
oadTemp
.
getOrigin
()))
).
map
(
OrderAccountDeduction:
:
getAmount
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
toExtendDeduction
=
oad
.
getOriginOrderAmount
().
subtract
(
toOdDeduction
);
//如果订单原款 - 扣费 小于零,则押金有额外扣费
if
(
toExtendDeduction
.
compareTo
(
BigDecimal
.
ZERO
)
<
0
)
{
//置反
toExtendDeduction
=
BigDecimal
.
ZERO
.
subtract
(
toExtendDeduction
);
}
else
{
//否则 则置为零
toExtendDeduction
=
BigDecimal
.
ZERO
;
}
oad
.
setDepositAmount
(
oad
.
getOriginDepositAmount
().
subtract
(
toDeduction
).
subtract
(
toExtendDeduction
));
}
private
void
handleViolateDetail
(
DeductionTypeEnum
dte
,
OrderAccountDetail
oad
,
DedDetailDTO
vio
,
CancelStartedVO
csv
)
{
...
...
@@ -658,7 +681,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
//如果没有修改,则添加
if
(
Boolean
.
FALSE
.
equals
(
flag
))
{
OrderAccountDeduction
oadNew
=
initDeduction
(
vio
.
getCost
(),
vio
.
getDeductions
(),
dte
,
O
rderAccountDeduction
.
O
RIGIN_DEPOSIT
);
OrderAccountDeduction
oadNew
=
initDeduction
(
vio
.
getCost
(),
vio
.
getDeductions
(),
dte
,
ORIGIN_DEPOSIT
);
oad
.
getDeductions
().
add
(
oadNew
);
//修改归还押金金额
resetDeposit
(
oad
);
...
...
@@ -692,7 +715,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
if
(
null
!=
orderViolation
)
{
//设置扣款项
oad
.
getDeductions
().
add
(
initDeduction
(
orderViolation
.
getPrice
(),
DeductionTypeEnum
.
VIOLATE_TRAFFIC_DEDUCT
.
getDesc
(),
DeductionTypeEnum
.
VIOLATE_TRAFFIC_DEDUCT
,
O
rderAccountDeduction
.
O
RIGIN_DEPOSIT
)
initDeduction
(
orderViolation
.
getPrice
(),
DeductionTypeEnum
.
VIOLATE_TRAFFIC_DEDUCT
.
getDesc
(),
DeductionTypeEnum
.
VIOLATE_TRAFFIC_DEDUCT
,
ORIGIN_DEPOSIT
)
);
//还车扣除款 剩余的 钱,再减去违章预备金
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderRefundBiz.java
View file @
678ab118
...
...
@@ -71,7 +71,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper, OrderRefund> {
String
refundDesc
=
StringUtils
.
isNotBlank
(
orderRefundVo
.
getRefundDesc
())
?
orderRefundVo
.
getRefundDesc
()
:
"审核通过,退款"
;
String
out_refund_no
=
Snowflake
.
build
()
+
""
;
if
(
StringUtils
.
isBlank
(
order_no
)
||
StringUtils
.
isBlank
(
appid
)
||
StringUtils
.
isBlank
(
mchId
)
||
StringUtils
.
isBlank
(
partnerKey
)
||
payAmount
==
null
||
payAmount
==
0
||
refundAmount
==
null
||
refundAmount
==
0
)
{
||
payAmount
==
null
||
payAmount
==
0
||
(
refundAmount
==
null
&&
orderRefundVo
.
getFreeze2PayAmount
()
==
null
)
||
(
refundAmount
==
0
&&
orderRefundVo
.
getFreeze2PayAmount
()
==
0
)
)
{
log
.
error
(
"-----参数为空-----------"
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数为空"
);
}
...
...
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