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
146d899f
Commit
146d899f
authored
Nov 06, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改押金扣款问题
parent
785659d5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
InProgressVO.java
.../com/xxfc/platform/order/pojo/calculate/InProgressVO.java
+9
-0
OrderCalculateBiz.java
.../com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
+17
-4
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/calculate/InProgressVO.java
View file @
146d899f
...
@@ -11,6 +11,15 @@ import java.util.List;
...
@@ -11,6 +11,15 @@ import java.util.List;
@Data
@Data
public
class
InProgressVO
{
public
class
InProgressVO
{
public
static
final
int
VIOLATE_TYPE_NOT
=
0
;
public
static
final
int
VIOLATE_TYPE_ADVANCE
=
1
;
public
static
final
int
VIOLATE_TYPE_DELAY
=
2
;
/**
* 违约类型 0--没违约;1--提前还车;2--延期还车
*/
Integer
violateType
=
0
;
/**
/**
* 违约金
* 违约金
*/
*/
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
View file @
146d899f
...
@@ -46,6 +46,8 @@ import java.util.List;
...
@@ -46,6 +46,8 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
import
static
com
.
xxfc
.
platform
.
order
.
pojo
.
calculate
.
InProgressVO
.
VIOLATE_TYPE_ADVANCE
;
import
static
com
.
xxfc
.
platform
.
order
.
pojo
.
calculate
.
InProgressVO
.
VIOLATE_TYPE_DELAY
;
import
static
com
.
xxfc
.
platform
.
universal
.
constant
.
DictionaryKey
.*;
import
static
com
.
xxfc
.
platform
.
universal
.
constant
.
DictionaryKey
.*;
/**
/**
...
@@ -278,9 +280,11 @@ public class OrderCalculateBiz implements CalculateInterface {
...
@@ -278,9 +280,11 @@ public class OrderCalculateBiz implements CalculateInterface {
violateDesc
+=
StrUtil
.
format
(
"(封顶{}元)"
,
residueAmount
);
violateDesc
+=
StrUtil
.
format
(
"(封顶{}元)"
,
residueAmount
);
}
}
inProgressVO
.
setViolateType
(
VIOLATE_TYPE_ADVANCE
);
inProgressVO
.
setViolateAmount
(
residueAmount
);
inProgressVO
.
setViolateAmount
(
residueAmount
);
inProgressVO
.
setViolateDesc
(
" 提前还车违约金:"
+
violateDesc
);
inProgressVO
.
setViolateDesc
(
" 提前还车违约金:"
+
violateDesc
);
OrderAccountDeduction
violateDeduction
=
orderAccountBiz
.
initDeduction
(
inProgressVO
.
getViolateAmount
(),
violateDesc
,
DeductionTypeEnum
.
VIOLATE_ADVANCE
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
//提前还车 修改ORIGIN_DEPOSIT 为 ORIGIN_ORDER_DEPOSIT
OrderAccountDeduction
violateDeduction
=
orderAccountBiz
.
initDeduction
(
inProgressVO
.
getViolateAmount
(),
violateDesc
,
DeductionTypeEnum
.
VIOLATE_ADVANCE
,
OrderAccountDeduction
.
ORIGIN_ORDER_DEPOSIT
);
oad
.
getDeductions
().
add
(
violateDeduction
);
oad
.
getDeductions
().
add
(
violateDeduction
);
}
else
if
(
realResidueDays
.
equals
(
0
))
{
//准时还车
}
else
if
(
realResidueDays
.
equals
(
0
))
{
//准时还车
//设置消耗费用列表
//设置消耗费用列表
...
@@ -301,6 +305,7 @@ public class OrderCalculateBiz implements CalculateInterface {
...
@@ -301,6 +305,7 @@ public class OrderCalculateBiz implements CalculateInterface {
.
map
(
VMCalendarPriceCostDTO:
:
getPrice
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
).
multiply
(
new
BigDecimal
(
2
+
""
));
.
map
(
VMCalendarPriceCostDTO:
:
getPrice
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
).
multiply
(
new
BigDecimal
(
2
+
""
));
//超过的天数 价格 * 200%
//超过的天数 价格 * 200%
inProgressVO
.
setViolateType
(
VIOLATE_TYPE_DELAY
);
inProgressVO
.
setViolateAmount
(
overAmount
);
inProgressVO
.
setViolateAmount
(
overAmount
);
inProgressVO
.
setViolateDesc
(
" 延期还车违约金:"
+
violateDesc
);
inProgressVO
.
setViolateDesc
(
" 延期还车违约金:"
+
violateDesc
);
inProgressVO
.
setOverAmountList
(
overAmountList
);
inProgressVO
.
setOverAmountList
(
overAmountList
);
...
@@ -349,9 +354,17 @@ public class OrderCalculateBiz implements CalculateInterface {
...
@@ -349,9 +354,17 @@ public class OrderCalculateBiz implements CalculateInterface {
public
InProgressVO
calculateOrderComplete
(
BaseOrder
baseOrder
,
OrderRentVehicleDetail
orvd
,
OrderAccountDetail
oad
,
VehicleItemDTO
vehicleItemDTO
,
Integer
useDays
,
Boolean
isCancel
)
{
public
InProgressVO
calculateOrderComplete
(
BaseOrder
baseOrder
,
OrderRentVehicleDetail
orvd
,
OrderAccountDetail
oad
,
VehicleItemDTO
vehicleItemDTO
,
Integer
useDays
,
Boolean
isCancel
)
{
InProgressVO
inProgressVO
=
inProgressCalculate
(
baseOrder
,
vehicleItemDTO
,
orvd
,
useDays
,
oad
,
isCancel
);
InProgressVO
inProgressVO
=
inProgressCalculate
(
baseOrder
,
vehicleItemDTO
,
orvd
,
useDays
,
oad
,
isCancel
);
//后修改为提前还车 订单款扣,延期还车 押金扣
if
(
InProgressVO
.
VIOLATE_TYPE_ADVANCE
==
inProgressVO
.
getViolateType
())
{
//定金 - (额外消费金额)
oad
.
setDepositAmount
(
orvd
.
getDeposit
().
subtract
(
inProgressVO
.
getExtraAmount
()));
//订单款 - 违约金
oad
.
setOrderAmount
(
inProgressVO
.
getRefundOrderAmount
().
subtract
(
inProgressVO
.
getViolateAmount
()));
}
else
{
//定金 - (额外消费金额 + 违约金)
//定金 - (额外消费金额 + 违约金)
oad
.
setDepositAmount
(
orvd
.
getDeposit
().
subtract
(
inProgressVO
.
getExtraAmount
().
add
(
inProgressVO
.
getViolateAmount
())));
oad
.
setDepositAmount
(
orvd
.
getDeposit
().
subtract
(
inProgressVO
.
getExtraAmount
().
add
(
inProgressVO
.
getViolateAmount
())));
oad
.
setOrderAmount
(
inProgressVO
.
getRefundOrderAmount
());
oad
.
setOrderAmount
(
inProgressVO
.
getRefundOrderAmount
());
}
oad
.
setOriginDepositAmount
(
orvd
.
getDeposit
());
oad
.
setOriginDepositAmount
(
orvd
.
getDeposit
());
oad
.
setOriginOrderAmount
(
baseOrder
.
getGoodsAmount
().
subtract
(
baseOrder
.
getCouponAmount
()));
oad
.
setOriginOrderAmount
(
baseOrder
.
getGoodsAmount
().
subtract
(
baseOrder
.
getCouponAmount
()));
return
inProgressVO
;
return
inProgressVO
;
...
...
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