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
494ea5de
Commit
494ea5de
authored
Nov 08, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
650e988d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
129 additions
and
65 deletions
+129
-65
VehicleItemDTO.java
...va/com/xxfc/platform/order/pojo/order/VehicleItemDTO.java
+101
-39
OrderCalculateBiz.java
.../com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
+28
-26
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/VehicleItemDTO.java
View file @
494ea5de
...
@@ -23,6 +23,9 @@ public class VehicleItemDTO extends OrderItem {
...
@@ -23,6 +23,9 @@ public class VehicleItemDTO extends OrderItem {
//已抵消天数
//已抵消天数
private
Integer
offsetNum
=
0
;
private
Integer
offsetNum
=
0
;
//免费金额
private
BigDecimal
freeAmount
;
//标记是否单价一样
//标记是否单价一样
private
Integer
sameUnitPrice
=
1
;
private
Integer
sameUnitPrice
=
1
;
...
@@ -101,31 +104,76 @@ public class VehicleItemDTO extends OrderItem {
...
@@ -101,31 +104,76 @@ public class VehicleItemDTO extends OrderItem {
}
}
public
BigDecimal
getUsedAmount
(
Integer
useDays
)
{
public
BigDecimal
getUsedAmount
(
Integer
useDays
)
{
List
<
VMCalendarPriceCostDTO
>
vmcpds
=
getVehicleDetail
();
if
(
CollUtil
.
isEmpty
(
vmcpds
)){
if
(
useDays
>
getTotalNum
())
{
useDays
=
getTotalNum
();
}
return
getUnitPrice
().
multiply
(
new
BigDecimal
(
useDays
+
""
));
return
getUnitPrice
().
multiply
(
new
BigDecimal
(
useDays
+
""
));
}
}
public
BigDecimal
getFreeAmount
(
Integer
freeDays
)
{
BigDecimal
usedAmount
=
BigDecimal
.
ZERO
;
for
(
VMCalendarPriceCostDTO
vmcpcd
:
vmcpds
)
{
usedAmount
.
add
(
vmcpcd
.
getPrice
());
}
return
usedAmount
;
}
//由于免费天数可以抵消不是完整的天数,所以处理比较不同
public
BigDecimal
getFreeAmount
(
Integer
offsetDay
)
{
List
<
VMCalendarPriceCostDTO
>
vmcpds
=
getVehicleDetail
();
List
<
VMCalendarPriceCostDTO
>
vmcpds
=
getVehicleDetail
();
if
(
CollUtil
.
isEmpty
(
vmcpds
)){
if
(
CollUtil
.
isEmpty
(
vmcpds
)){
return
getUnitPrice
().
multiply
(
new
BigDecimal
(
freeDays
+
""
));
if
(
null
==
offsetDay
)
{
return
getUnitPrice
().
multiply
(
new
BigDecimal
(
getCutNum
()+
""
));
}
else
{
return
getUnitPrice
().
multiply
(
new
BigDecimal
(
offsetDay
+
""
));
}
}
}
BigDecimal
freeAmount
=
BigDecimal
.
ZERO
;
BigDecimal
freeAmount
=
BigDecimal
.
ZERO
;
for
(
int
i
=
0
;
i
<
getBuyNum
();
i
++)
{
if
(
null
==
offsetDay
)
{
freeAmount
=
freeAmount
.
add
(
vmcpds
.
get
(
i
).
getPrice
());
for
(
int
i
=
0
;
i
<
offsetDay
;
i
++)
{
freeAmount
.
add
(
vmcpds
.
get
(
i
).
getFreeAmount
());
}
}
else
{
for
(
VMCalendarPriceCostDTO
vmcpcd
:
vmcpds
)
{
freeAmount
.
add
(
vmcpcd
.
getFreeAmount
());
}
}
}
return
freeAmount
;
return
freeAmount
;
}
}
// public Integer getActualNum() {
public
Integer
mapFreeDays
(
Integer
userDays
)
{
//
List
<
VMCalendarPriceCostDTO
>
vmcpds
=
getVehicleDetail
();
// }
if
(
userDays
<
getTotalNum
())
{
userDays
=
getTotalNum
();
}
if
(
CollUtil
.
isEmpty
(
vmcpds
)){
return
userDays
;
}
Integer
mapFreeDays
=
0
;
for
(
int
i
=
0
;
i
<
userDays
;
i
++)
{
mapFreeDays
+=
vmcpds
.
get
(
i
).
getFreeDays
();
}
return
mapFreeDays
;
}
public
void
initDetail
(
Integer
ableFreeDays
)
{
public
void
initDetail
(
Integer
ableFreeDays
)
{
if
(
StrUtil
.
isNotBlank
(
getDetail
()))
{
if
(
StrUtil
.
isNotBlank
(
getDetail
()))
{
List
<
VehicleModelCalendarPriceDTO
>
metaList
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
getDetail
()),
VehicleModelCalendarPriceDTO
.
class
);
List
<
VehicleModelCalendarPriceDTO
>
metaList
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
getDetail
()),
VehicleModelCalendarPriceDTO
.
class
);
//计算消费金额
//计算消费金额
List
<
VMCalendarPriceCostDTO
>
list
=
Convert
.
toList
(
VMCalendarPriceCostDTO
.
class
,
metaList
);
List
<
VMCalendarPriceCostDTO
>
list
=
Convert
.
toList
(
VMCalendarPriceCostDTO
.
class
,
metaList
);
ParamDTO
paramDTO
=
initParam
(
ableFreeDays
,
list
);
this
.
sameUnitPrice
=
paramDTO
.
getSameUnitPrice
();
setCutNum
(
paramDTO
.
getFreeNum
());
setOffsetNum
(
paramDTO
.
getOffsetNum
());
setDetail
(
JSONUtil
.
parseArray
(
list
).
toString
());
}
}
public
ParamDTO
initParam
(
Integer
ableFreeDays
,
List
<
VMCalendarPriceCostDTO
>
list
)
{
ParamDTO
paramDTO
=
new
ParamDTO
();
//循环价格列表 获得对应消耗的免费天数
//循环价格列表 获得对应消耗的免费天数
//循环已标记的已使用免费天数
//循环已标记的已使用免费天数
Integer
cycleNum
=
0
;
Integer
cycleNum
=
0
;
...
@@ -134,10 +182,10 @@ public class VehicleItemDTO extends OrderItem {
...
@@ -134,10 +182,10 @@ public class VehicleItemDTO extends OrderItem {
if
(
null
==
tempUnitPrice
)
{
if
(
null
==
tempUnitPrice
)
{
tempUnitPrice
=
dto
.
getPrice
();
tempUnitPrice
=
dto
.
getPrice
();
}
else
if
(
!
tempUnitPrice
.
equals
(
dto
.
getPrice
()))
{
}
else
if
(
!
tempUnitPrice
.
equals
(
dto
.
getPrice
()))
{
this
.
sameUnitPrice
=
0
;
paramDTO
.
setSameUnitPrice
(
0
)
;
}
}
if
(
ableFreeDays
>
cycleNum
&&
cycleNum
+
dto
.
getFreeDays
()
>
ableFreeDays
)
{
//本次累加天数 大于 可用免费天数
if
(
ableFreeDays
>
cycleNum
&&
cycleNum
+
dto
.
getFreeDays
()
>
ableFreeDays
)
{
//本次累加天数 大于 可用免费天数
setCut
Num
(
ableFreeDays
);
paramDTO
.
setFree
Num
(
ableFreeDays
);
Integer
up
=
(
ableFreeDays
-
cycleNum
);
Integer
up
=
(
ableFreeDays
-
cycleNum
);
Integer
down
=
dto
.
getFreeDays
();
Integer
down
=
dto
.
getFreeDays
();
...
@@ -145,19 +193,33 @@ public class VehicleItemDTO extends OrderItem {
...
@@ -145,19 +193,33 @@ public class VehicleItemDTO extends OrderItem {
dto
.
setFreeAndConsumeAmount
(
dto
.
getPrice
(),
dto
.
getPrice
().
multiply
(
dto
.
setFreeAndConsumeAmount
(
dto
.
getPrice
(),
dto
.
getPrice
().
multiply
(
new
BigDecimal
(
up
+
""
).
divide
(
new
BigDecimal
(
down
+
""
),
2
,
RoundingMode
.
HALF_UP
))
new
BigDecimal
(
up
+
""
).
divide
(
new
BigDecimal
(
down
+
""
),
2
,
RoundingMode
.
HALF_UP
))
.
setScale
(
2
,
RoundingMode
.
HALF_UP
));
.
setScale
(
2
,
RoundingMode
.
HALF_UP
));
paramDTO
.
setFreeAmount
(
paramDTO
.
getFreeAmount
().
add
(
dto
.
getFreeAmount
()));
}
else
if
(
ableFreeDays
>
cycleNum
){
//本次累加天数 小于等于 可用免费天数
}
else
if
(
ableFreeDays
>
cycleNum
){
//本次累加天数 小于等于 可用免费天数
setCutNum
(
getCut
Num
()+
dto
.
getFreeDays
());
paramDTO
.
setFreeNum
(
paramDTO
.
getFree
Num
()+
dto
.
getFreeDays
());
//直接设置价格
//直接设置价格
dto
.
setFreeAndConsumeAmount
(
dto
.
getPrice
(),
dto
.
getPrice
());
dto
.
setFreeAndConsumeAmount
(
dto
.
getPrice
(),
dto
.
getPrice
());
this
.
offsetNum
+=
1
;
paramDTO
.
offsetNum
+=
1
;
}
else
{
//上次累加天数 大于 可用天数
}
else
{
//上次累加天数 大于 可用天数
//直接设置价格
//直接设置价格
dto
.
setFreeAndConsumeAmount
(
dto
.
getPrice
(),
BigDecimal
.
ZERO
);
dto
.
setFreeAndConsumeAmount
(
dto
.
getPrice
(),
BigDecimal
.
ZERO
);
}
}
cycleNum
+=
dto
.
getFreeDays
();
cycleNum
+=
dto
.
getFreeDays
();
}
}
return
paramDTO
;
setDetail
(
JSONUtil
.
parseArray
(
list
).
toString
());
}
}
@Data
public
class
ParamDTO
{
//已抵消天数
private
Integer
offsetNum
=
0
;
//标记是否单价一样
private
Integer
sameUnitPrice
=
1
;
//免费数量
private
Integer
freeNum
;
//免费金额
private
BigDecimal
freeAmount
;
}
}
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
View file @
494ea5de
...
@@ -84,16 +84,22 @@ public class OrderCalculateBiz {
...
@@ -84,16 +84,22 @@ public class OrderCalculateBiz {
@Autowired
@Autowired
BaseOrderBiz
baseOrderBiz
;
BaseOrderBiz
baseOrderBiz
;
public
InProgressVO
inProgressCalculate
(
BaseOrder
baseOrder
,
VehicleItemDTO
vehicleItemDTO
,
Integer
freeDays
,
Integer
useDays
,
OrderAccountDetail
oad
,
Boolean
isCancel
)
{
public
InProgressVO
inProgressCalculate
(
BaseOrder
baseOrder
,
VehicleItemDTO
vehicleItemDTO
,
Integer
useDays
,
OrderAccountDetail
oad
,
Boolean
isCancel
)
{
BigDecimal
refundAmount
=
BigDecimal
.
ZERO
;
BigDecimal
refundAmount
=
BigDecimal
.
ZERO
;
BigDecimal
consumeAmount
=
BigDecimal
.
ZERO
;
BigDecimal
consumeAmount
=
BigDecimal
.
ZERO
;
BigDecimal
topViolateAmount
=
BigDecimal
.
ZERO
;
BigDecimal
topViolateAmount
=
BigDecimal
.
ZERO
;
BigDecimal
itemChangeAmount
=
BigDecimal
.
ZERO
;
BigDecimal
itemChangeAmount
=
BigDecimal
.
ZERO
;
//免费天数
Integer
freeDays
=
(
null
==
vehicleItemDTO
.
getCutNum
())?
0
:
vehicleItemDTO
.
getCutNum
();
//融入日期价格
//融入日期价格
List
<
VehicleModelCalendarPriceDTO
>
vmcpds
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
vehicleItemDTO
.
getDetail
()),
VehicleModelCalendarPriceDTO
.
class
);
List
<
VMCalendarPriceCostDTO
>
vmcpds
=
vehicleItemDTO
.
getVehicleDetail
();
VehicleItemDTO
.
ParamDTO
paramDTO
=
vehicleItemDTO
.
initParam
(
freeDays
,
vmcpds
);
List
<
VMCalendarPriceCostDTO
>
useAmountList
=
CollUtil
.
newArrayList
();
List
<
VMCalendarPriceCostDTO
>
useAmountList
=
CollUtil
.
newArrayList
();
//抵消的天数
Integer
offsetDays
=
paramDTO
.
getOffsetNum
();
//商品真实价格
//商品真实价格
BigDecimal
goodsRealAmount
=
baseOrder
.
getGoodsAmount
().
subtract
(
baseOrder
.
getCouponAmount
());
BigDecimal
goodsRealAmount
=
baseOrder
.
getGoodsAmount
().
subtract
(
baseOrder
.
getCouponAmount
());
//其他消费金额 = 商品真实价格 - 主要商品真实价格 = (商品价格 - 优惠价格)- 主要商品真实价格
//其他消费金额 = 商品真实价格 - 主要商品真实价格 = (商品价格 - 优惠价格)- 主要商品真实价格
...
@@ -103,24 +109,28 @@ public class OrderCalculateBiz {
...
@@ -103,24 +109,28 @@ public class OrderCalculateBiz {
inProgressVO
.
setUsedDays
(
useDays
);
inProgressVO
.
setUsedDays
(
useDays
);
inProgressVO
.
setUsedAmount
(
vehicleItemDTO
.
getUsedAmount
(
useDays
));
inProgressVO
.
setUsedAmount
(
vehicleItemDTO
.
getUsedAmount
(
useDays
));
//使用的天数对应的免费天数
Integer
useDaysMapFreeDays
=
vehicleItemDTO
.
mapFreeDays
(
useDays
);
//计算:剩余免费天数
//计算:剩余免费天数
Integer
backFreeDays
=
freeDays
-
useDays
;
Integer
backFreeDays
=
freeDays
-
useDays
MapFreeDays
;
//待返还的
免费天数
//待返还的
优惠券编号
List
<
String
>
backCouponNos
=
Lists
.
newArrayList
();
List
<
String
>
backCouponNos
=
Lists
.
newArrayList
();
//剩余天数
//剩余天数
Integer
residueDays
=
vehicleItemDTO
.
getTotalNum
()
-
useDays
;
Integer
residueDays
=
vehicleItemDTO
.
getTotalNum
()
-
useDays
;
//过了出发时间取消订单 ,优先使用免费天数
//过了出发时间取消订单 ,优先使用免费天数
if
(
backFreeDays
<=
0
)
{
if
(
backFreeDays
<=
0
)
{
//设置免费天数
//设置免费天数
inProgressVO
.
setUsedfreeDays
(
freeDays
);
inProgressVO
.
setUsedfreeDays
(
freeDays
);
inProgressVO
.
setUsedFreeDaysAmount
(
vehicleItemDTO
.
getFreeAmount
(
freeDays
));
inProgressVO
.
setUsedFreeDaysAmount
(
vehicleItemDTO
.
getFreeAmount
(
null
));
//消费天数
//消费天数
Integer
consumeDays
=
useDays
-
free
Days
;
Integer
consumeDays
=
useDays
-
offset
Days
;
//如果使用天数 大于 总天数
//如果使用天数 大于 总天数
if
(
useDays
>
vehicleItemDTO
.
getTotalNum
())
{
if
(
useDays
>
vehicleItemDTO
.
getTotalNum
())
{
//消费天数
//消费天数
consumeDays
=
vehicleItemDTO
.
getTotalNum
()
-
free
Days
;
consumeDays
=
vehicleItemDTO
.
getTotalNum
()
-
offset
Days
;
}
}
//需要扣除订单费用
//需要扣除订单费用
...
@@ -128,8 +138,8 @@ public class OrderCalculateBiz {
...
@@ -128,8 +138,8 @@ public class OrderCalculateBiz {
//计算使用天数的费用
//计算使用天数的费用
//融入日期价格
//融入日期价格
//consumeAmount = orderItem.getUnitPrice().multiply(new BigDecimal(consumeDays+""));
//consumeAmount = orderItem.getUnitPrice().multiply(new BigDecimal(consumeDays+""));
for
(
int
i
=
freeDays
;
i
<
(
free
Days
+
consumeDays
);
i
++)
{
for
(
int
i
=
offsetDays
;
i
<
(
offset
Days
+
consumeDays
);
i
++)
{
consumeAmount
=
consumeAmount
.
add
(
vmcpds
.
get
(
i
).
get
Price
());
consumeAmount
=
consumeAmount
.
add
(
vmcpds
.
get
(
i
).
get
ConsumeAmount
());
}
}
if
(
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
()))
{
if
(
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
()))
{
...
@@ -149,14 +159,14 @@ public class OrderCalculateBiz {
...
@@ -149,14 +159,14 @@ public class OrderCalculateBiz {
}
}
}
}
//设置消费金额
//设置消费金额
,添加租车以外的消费金额
consumeAmount
=
consumeAmount
.
add
(
otherItemRealAmount
);
consumeAmount
=
consumeAmount
.
add
(
otherItemRealAmount
);
inProgressVO
.
setConsumeAmount
(
consumeAmount
);
inProgressVO
.
setConsumeAmount
(
consumeAmount
);
refundAmount
=
handleConsumeAmount
(
oad
,
refundAmount
,
consumeAmount
,
goodsRealAmount
,
inProgressVO
);
refundAmount
=
handleConsumeAmount
(
oad
,
refundAmount
,
consumeAmount
,
goodsRealAmount
,
inProgressVO
);
}
else
{
}
else
{
//设置免费天数
//设置免费天数
inProgressVO
.
setUsedfreeDays
(
useDays
);
inProgressVO
.
setUsedfreeDays
(
useDays
MapFreeDays
);
inProgressVO
.
setUsedFreeDaysAmount
(
vehicleItemDTO
.
getFreeAmount
(
useDays
));
inProgressVO
.
setUsedFreeDaysAmount
(
vehicleItemDTO
.
getFreeAmount
(
useDays
));
//返回剩余免费天数,返回优惠券,订单款
//返回剩余免费天数,返回优惠券,订单款
...
@@ -165,27 +175,21 @@ public class OrderCalculateBiz {
...
@@ -165,27 +175,21 @@ public class OrderCalculateBiz {
// inProgressVO.setBackFreeDays(backFreeDays);
// inProgressVO.setBackFreeDays(backFreeDays);
//融入日期价格
//融入日期价格
Integer
trueBackFreeDays
=
0
;
Integer
trueBackFreeDays
=
backFreeDays
;
for
(
int
i
=
(
freeDays
-
backFreeDays
);
i
<
freeDays
;
i
++)
{
trueBackFreeDays
+=
vmcpds
.
get
(
i
).
getFreeDays
();
}
inProgressVO
.
setBackFreeDays
(
trueBackFreeDays
);
inProgressVO
.
setBackFreeDays
(
trueBackFreeDays
);
//返回优惠券
//返回优惠券
if
(
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
()))
{
if
(
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
()))
{
//返回所有优惠券
//
没有租车消费金额,所以
返回所有优惠券
inProgressVO
.
setBackCoupons
(
StrUtil
.
split
(
baseOrder
.
getCouponTickerNos
(),
','
));
inProgressVO
.
setBackCoupons
(
StrUtil
.
split
(
baseOrder
.
getCouponTickerNos
(),
','
));
}
}
//设置消费金额
由于返回了优惠券,所以添加优惠券之前减免的
金额
//设置消费金额
,添加租车以外的消费
金额
consumeAmount
=
consumeAmount
.
add
(
otherItemRealAmount
);
consumeAmount
=
consumeAmount
.
add
(
otherItemRealAmount
);
//修改bug,消费金额不需要添加优惠券金额
//.add(baseOrder.getCouponAmount());
inProgressVO
.
setConsumeAmount
(
consumeAmount
);
inProgressVO
.
setConsumeAmount
(
consumeAmount
);
refundAmount
=
handleConsumeAmount
(
oad
,
refundAmount
,
consumeAmount
,
goodsRealAmount
,
inProgressVO
);
refundAmount
=
handleConsumeAmount
(
oad
,
refundAmount
,
consumeAmount
,
goodsRealAmount
,
inProgressVO
);
}
}
inProgressVO
.
setRefundOrderAmount
(
refundAmount
);
inProgressVO
.
setRefundOrderAmount
(
refundAmount
);
...
@@ -268,12 +272,11 @@ public class OrderCalculateBiz {
...
@@ -268,12 +272,11 @@ public class OrderCalculateBiz {
setType
(
ItemTypeEnum
.
VEHICLE_MODEL
.
getCode
());
setType
(
ItemTypeEnum
.
VEHICLE_MODEL
.
getCode
());
setOrderId
(
baseOrder
.
getId
());
setOrderId
(
baseOrder
.
getId
());
}}),
VehicleItemDTO
.
class
);
}}),
VehicleItemDTO
.
class
);
Integer
freeDays
=
(
null
==
vehicleItemDTO
.
getCutNum
())?
0
:
vehicleItemDTO
.
getCutNum
();
return
inProgressCalculate
(
baseOrder
,
vehicleItemDTO
,
useDays
,
new
OrderAccountDetail
(),
Boolean
.
FALSE
);
return
inProgressCalculate
(
baseOrder
,
vehicleItemDTO
,
freeDays
,
useDays
,
new
OrderAccountDetail
(),
Boolean
.
FALSE
);
}
}
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
,
vehicleItemDTO
.
getCutNum
(),
useDays
,
oad
,
isCancel
);
InProgressVO
inProgressVO
=
inProgressCalculate
(
baseOrder
,
vehicleItemDTO
,
useDays
,
oad
,
isCancel
);
//定金 - (额外消费金额 + 违约金)
//定金 - (额外消费金额 + 违约金)
oad
.
setDepositAmount
(
orvd
.
getDeposit
().
subtract
(
inProgressVO
.
getExtraAmount
().
add
(
inProgressVO
.
getViolateAmount
())));
oad
.
setDepositAmount
(
orvd
.
getDeposit
().
subtract
(
inProgressVO
.
getExtraAmount
().
add
(
inProgressVO
.
getViolateAmount
())));
...
@@ -345,8 +348,7 @@ public class OrderCalculateBiz {
...
@@ -345,8 +348,7 @@ public class OrderCalculateBiz {
if
(
timeLag
<
0
)
{
if
(
timeLag
<
0
)
{
Integer
useDays
=
getIncludeDays
(
orderPageVO
.
getOrderRentVehicleDetail
().
getStartTime
(),
DateTime
.
now
().
getMillis
());
Integer
useDays
=
getIncludeDays
(
orderPageVO
.
getOrderRentVehicleDetail
().
getStartTime
(),
DateTime
.
now
().
getMillis
());
OrderAccountDetail
oad
=
new
OrderAccountDetail
();
OrderAccountDetail
oad
=
new
OrderAccountDetail
();
Integer
freeDays
=
(
null
==
vehicleItemDTO
.
getCutNum
())?
0
:
vehicleItemDTO
.
getCutNum
();
inProgressVO
=
inProgressCalculate
(
orderPageVO
,
vehicleItemDTO
,
useDays
,
new
OrderAccountDetail
(),
Boolean
.
FALSE
);
inProgressVO
=
inProgressCalculate
(
orderPageVO
,
vehicleItemDTO
,
freeDays
,
useDays
,
new
OrderAccountDetail
(),
Boolean
.
FALSE
);
topAmount
=
vehicleItemDTO
.
getTopAmount
(
useDays
);
topAmount
=
vehicleItemDTO
.
getTopAmount
(
useDays
);
totalDeductAmount
=
oad
.
realTotalDeduct
();
totalDeductAmount
=
oad
.
realTotalDeduct
();
...
...
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