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
d6c5a390
Commit
d6c5a390
authored
Nov 13, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'holiday-price' into dev
parents
9516871e
fc72588d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
20 deletions
+59
-20
InProgressVO.java
.../com/xxfc/platform/order/pojo/calculate/InProgressVO.java
+5
-0
CancelStartedVO.java
...a/com/xxfc/platform/order/pojo/price/CancelStartedVO.java
+8
-19
CostDetailExtend.java
.../com/xxfc/platform/order/pojo/price/CostDetailExtend.java
+32
-1
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+3
-0
OrderCalculateBiz.java
.../com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
+3
-0
OrderCancelBiz.java
...ava/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
+8
-0
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/calculate/InProgressVO.java
View file @
d6c5a390
...
...
@@ -81,4 +81,9 @@ public class InProgressVO {
* 延期 详情列表
*/
List
<
VMCalendarPriceCostDTO
>
overAmountList
=
CollUtil
.
newArrayList
();
/**
* 违约金 费用详情列表
*/
List
<
VMCalendarPriceCostDTO
>
violateAmountList
=
CollUtil
.
newArrayList
();
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/price/CancelStartedVO.java
View file @
d6c5a390
package
com
.
xxfc
.
platform
.
order
.
pojo
.
price
;
import
cn.hutool.core.collection.CollUtil
;
import
com.xxfc.platform.order.pojo.account.OrderAccountDeduction
;
import
com.xxfc.platform.vehicle.pojo.dto.order.VMCalendarPriceCostDTO
;
import
lombok.Data
;
...
...
@@ -24,6 +25,11 @@ public class CancelStartedVO extends CostDetailExtend {
*/
private
Integer
usedDayNum
=
0
;
/**
* 允许使用天数
*/
private
Integer
ableUsedDayNum
=
0
;
/**
* 使用金额
*/
...
...
@@ -69,34 +75,17 @@ public class CancelStartedVO extends CostDetailExtend {
*/
private
BigDecimal
damagesAmount
=
BigDecimal
.
ZERO
;
private
List
<
OrderAccountDeduction
>
deductionList
=
CollUtil
.
newArrayList
();
/**
* 延期 详情列表
*/
List
<
VMCalendarPriceCostDTO
>
overAmountList
=
CollUtil
.
newArrayList
();
//标记是否单价一样
private
Integer
sameUseUnitPrice
=
1
;
//标记是否单价一样
private
Integer
sameOverUnitPrice
=
1
;
public
void
setSameUseUnitPriceFromList
(
List
<
VMCalendarPriceCostDTO
>
useAmountList
)
{
this
.
sameUseUnitPrice
=
judgeSame
(
useAmountList
);
}
public
void
setSameOverUnitPriceFromList
(
List
<
VMCalendarPriceCostDTO
>
overAmountList
)
{
this
.
sameOverUnitPrice
=
judgeSame
(
overAmountList
);
}
private
Integer
judgeSame
(
List
<
VMCalendarPriceCostDTO
>
useAmountList
)
{
BigDecimal
tempUnitPrice
=
null
;
for
(
VMCalendarPriceCostDTO
vmcpcd
:
useAmountList
)
{
if
(
null
==
tempUnitPrice
)
{
tempUnitPrice
=
vmcpcd
.
getPrice
();
}
else
if
(!
tempUnitPrice
.
equals
(
vmcpcd
.
getPrice
()))
{
return
0
;
}
}
return
1
;
}
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/price/CostDetailExtend.java
View file @
d6c5a390
...
...
@@ -42,7 +42,38 @@ public class CostDetailExtend {
/**
* 使用(消耗)详情列表
*/
List
<
VMCalendarPriceCostDTO
>
useAmountList
=
CollUtil
.
newArrayList
();;
List
<
VMCalendarPriceCostDTO
>
useAmountList
=
CollUtil
.
newArrayList
();
/**
* 违约金 费用详情列表
*/
List
<
VMCalendarPriceCostDTO
>
violateAmountList
=
CollUtil
.
newArrayList
();
//标记是否单价一样
private
Integer
sameUseUnitPrice
=
1
;
//标记是否单价一样
private
Integer
sameViolateUnitPrice
=
1
;
public
void
setSameUseUnitPriceFromList
(
List
<
VMCalendarPriceCostDTO
>
useAmountList
)
{
this
.
sameUseUnitPrice
=
judgeSame
(
useAmountList
);
}
public
void
setSameViolateUnitPriceFromList
(
List
<
VMCalendarPriceCostDTO
>
violateAmountList
)
{
this
.
sameViolateUnitPrice
=
judgeSame
(
violateAmountList
);
}
protected
Integer
judgeSame
(
List
<
VMCalendarPriceCostDTO
>
useAmountList
)
{
BigDecimal
tempUnitPrice
=
null
;
for
(
VMCalendarPriceCostDTO
vmcpcd
:
useAmountList
)
{
if
(
null
==
tempUnitPrice
)
{
tempUnitPrice
=
vmcpcd
.
getPrice
();
}
else
if
(!
tempUnitPrice
.
equals
(
vmcpcd
.
getPrice
()))
{
return
0
;
}
}
return
1
;
}
public
void
initParamJson
()
{
paramJson
=
JSONUtil
.
toJsonStr
(
this
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
d6c5a390
...
...
@@ -483,6 +483,8 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
csv
.
setUsedfreeDayNum
(
inProgressVO
.
getUsedfreeDays
());
csv
.
setUsedFreeAmount
(
inProgressVO
.
getUsedFreeDaysAmount
());
csv
.
setHadConpon
((
StrUtil
.
isNotBlank
(
orderMQDTO
.
getCouponTickerNos
())?
Boolean
.
TRUE
:
Boolean
.
FALSE
));
csv
.
setAbleUsedDayNum
(
inProgressVO
.
getUseAmountList
().
size
());
csv
.
setSameUseUnitPriceFromList
(
inProgressVO
.
getUseAmountList
());
csv
.
setSameOverUnitPriceFromList
(
inProgressVO
.
getOverAmountList
());
csv
.
setUseAmountList
(
inProgressVO
.
getUseAmountList
());
...
...
@@ -499,6 +501,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}
csv
.
setDeductionList
(
oad
.
getDeductions
());
csv
.
initParamJson
();
//设置明细
orderRentVehicleBiz
.
updateSelectiveByIdRe
(
new
OrderRentVehicleDetail
(){{
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
View file @
d6c5a390
...
...
@@ -214,6 +214,7 @@ public class OrderCalculateBiz {
residueAmount
=
BigDecimal
.
ZERO
;
for
(
int
i
=
useDays
;
i
<
(
useDays
+
residueDays
);
i
++)
{
residueAmount
=
residueAmount
.
add
(
vmcpds
.
get
(
i
).
getPrice
());
inProgressVO
.
getViolateAmountList
().
add
(
vmcpds
.
get
(
i
));
}
violateDesc
+=
StrUtil
.
format
(
"(封顶{}元)"
,
residueAmount
);
}
...
...
@@ -240,6 +241,8 @@ public class OrderCalculateBiz {
inProgressVO
.
setViolateAmount
(
overAmount
);
inProgressVO
.
setViolateDesc
(
" 延期还车违约金:"
+
violateDesc
);
inProgressVO
.
setOverAmountList
(
overAmountList
);
inProgressVO
.
setViolateAmountList
(
overAmountList
);
OrderAccountDeduction
violateDeduction
=
orderAccountBiz
.
initDeduction
(
inProgressVO
.
getViolateAmount
(),
violateDesc
,
DeductionTypeEnum
.
VIOLATE_DELAY
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
oad
.
getDeductions
().
add
(
violateDeduction
);
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
View file @
d6c5a390
...
...
@@ -175,6 +175,8 @@ public class OrderCancelBiz {
csv
.
setHadConpon
((
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
())?
Boolean
.
TRUE
:
Boolean
.
FALSE
));
csv
.
setViolateAmount
(
BigDecimal
.
ZERO
);
csv
.
setViolateDesc
(
""
);
csv
.
setAbleUsedDayNum
(
inProgressVO
.
getUseAmountList
().
size
());
csv
.
setSameUseUnitPriceFromList
(
inProgressVO
.
getUseAmountList
());
csv
.
setSameOverUnitPriceFromList
(
inProgressVO
.
getOverAmountList
());
csv
.
setUseAmountList
(
inProgressVO
.
getUseAmountList
());
...
...
@@ -194,6 +196,8 @@ public class OrderCancelBiz {
baseOrder
.
setViolateAmount
(
csv
.
getViolateAmount
());
baseOrder
.
setExtraAmount
(
inProgressVO
.
getExtraAmount
());
//最后设置DeductionList
csv
.
setDeductionList
(
oad
.
getDeductions
());
csv
.
initParamJson
();
//orderTemplateBiz.handleCostDetailExtend(csv);
orvd
.
handelCostDetailExtend
(
csv
);
...
...
@@ -226,6 +230,10 @@ public class OrderCancelBiz {
CancelNoStartVO
cnsv
=
new
CancelNoStartVO
(){{
setViolateAmount
(
deduction
.
getAmount
());
setViolateDesc
(
deduction
.
getName
());
//设置违约金日期费用列表
setViolateAmountList
(
vehicleItemDTO
.
getVehicleDetail
());
setSameViolateUnitPriceFromList
(
vehicleItemDTO
.
getVehicleDetail
());
}};
//设置订单数据
...
...
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