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
a231cd6e
Commit
a231cd6e
authored
Sep 19, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
e123b96e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
8 deletions
+22
-8
CostDetailExtend.java
.../com/xxfc/platform/order/pojo/price/CostDetailExtend.java
+1
-1
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+13
-5
OrderCancelBiz.java
...ava/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
+2
-0
RentDepositJobHandler.java
...xxfc/platform/order/jobhandler/RentDepositJobHandler.java
+0
-1
OrderTourService.java
...ava/com/xxfc/platform/order/service/OrderTourService.java
+6
-1
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/price/CostDetailExtend.java
View file @
a231cd6e
...
...
@@ -17,7 +17,7 @@ public class CostDetailExtend {
private
String
costDetail
=
""
;
/**
* type:1--取消违约金;2--取消费用明细;3--提前还车费用明细;4--延期还车费用明细
* type:1--取消违约金;2--取消费用明细;3--提前还车费用明细;4--延期还车费用明细
5--订单按时还车
*/
protected
Integer
type
;
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
a231cd6e
...
...
@@ -273,6 +273,9 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
if
(
RefundStatusEnum
.
NONE
.
getCode
().
equals
(
orderMQDTO
.
getRefundStatus
()))
{
Integer
crosstownTypeEnum
;
DepositRefundStatus
depositRefundRecordStatus
;
//生成额外的费用明细
CancelStartedVO
csv
=
new
CancelStartedVO
();
//判断是否定损过
if
(
SYS_TRUE
.
equals
(
orderMQDTO
.
getOrderRentVehicleDetail
().
getFixedLossStatus
()))
{
crosstownTypeEnum
=
CrosstownTypeEnum
.
FIXED_LOSS
.
getCode
();
...
...
@@ -307,10 +310,16 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
oad
.
getDeductions
().
add
(
initDeduction
(
illegalReserve
,
"违章保证金"
,
DeductionTypeEnum
.
VIOLATE_TRAFFIC_KEEP
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
)
);
//设置定损金额
csv
.
setDamagesAmount
(
crosstown
.
getDeductionCost
());
if
(
crosstown
.
getDeductionCost
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
oad
.
getDeductions
().
add
(
initDeduction
(
crosstown
.
getDeductionCost
(),
"定损赔偿金"
,
DeductionTypeEnum
.
DAMAGES
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
)
);
//剩余押金 -
}
//剩余押金 = 押金 - 违章保证金 - 定损金额
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
illegalReserve
).
subtract
(
crosstown
.
getDeductionCost
()));
handleCrosstownDetail
(
crosstown
,
oad
);
BigDecimal
refundAmont
=
crosstown
.
getRestDeposit
().
subtract
(
illegalReserve
);
...
...
@@ -323,7 +332,6 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
orderDepositRefundRecordBiz
.
completeRecordStatus
(
crosstown
.
getId
(),
depositRefundRecordStatus
);
//生成额外的费用明细
CancelStartedVO
csv
=
new
CancelStartedVO
();
csv
.
setConsumeAmount
(
inProgressVO
.
getConsumeAmount
());
csv
.
setModelAmount
(
orderItem
.
getUnitPrice
());
csv
.
setUsedAmount
(
inProgressVO
.
getUsedAmount
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
View file @
a231cd6e
...
...
@@ -158,6 +158,8 @@ public class OrderCancelBiz {
Long
beginOfStartDay
=
DateUtil
.
beginOfDay
(
DateUtil
.
date
(
orvd
.
getStartTime
())).
getTime
();
//计算:使用天数 当前时间 - 开始时间的0时0分0秒
Long
useTimeLag
=
System
.
currentTimeMillis
()
-
beginOfStartDay
;
log
.
info
(
"useTimeLag {}"
,
new
BigDecimal
(
useTimeLag
+
""
));
log
.
info
(
"divide {}"
,
new
BigDecimal
((
24
*
60
*
60
*
1000
)+
""
));
Integer
useDays
=
new
BigDecimal
(
useTimeLag
+
""
).
divide
(
new
BigDecimal
((
24
*
60
*
60
*
1000
)+
""
)).
setScale
(
0
,
BigDecimal
.
ROUND_UP
).
intValue
();
inProgressVO
=
orderCalculateBiz
.
calculateOrderComplete
(
baseOrder
,
orvd
,
oad
,
orderItem
,
useDays
);
//结合
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/jobhandler/RentDepositJobHandler.java
View file @
a231cd6e
...
...
@@ -126,7 +126,6 @@ public class RentDepositJobHandler extends IJobHandler {
}
OrderAccountDetail
oad
=
new
OrderAccountDetail
();
orderAccountBiz
.
refundTrigger
(
baseOrder
,
orvd
,
BigDecimal
.
ZERO
,
orvd
.
getReturnPayResidue
(),
refundAmont
,
refundDesc
,
RefundStatusEnum
.
REFUND_DEPOSIT
.
getCode
(),
AccountTypeEnum
.
OUT_RESIDUE_DEPOSIT
,
oad
);
//orderRefundBiz.refundTrigger(baseOrder, orvd, BigDecimal.ZERO, orvd.getReturnPayResidue(), refundAmont, refundDesc, RefundStatusEnum.REFUND_DEPOSIT.getCode(), RefundTypeEnum.RESIDUE_DEPOSIT);
orderDepositRefundRecordBiz
.
completeRecordStatus
(
crosstown
.
getId
(),
DepositRefundStatus
.
VIOLATIONARRIVAL
);
orderMsgBiz
.
handelMsgDeposit
(
orvd
,
baseOrder
,
userFeign
.
userDetailById
(
baseOrder
.
getUserId
()).
getData
());
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderTourService.java
View file @
a231cd6e
...
...
@@ -3,6 +3,8 @@ package com.xxfc.platform.order.service;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.lang.Dict
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
...
...
@@ -314,9 +316,12 @@ public class OrderTourService extends AbstractOrderHandle<OrderTourDetailBiz, To
OrderTemplate
template
=
orderTemplateBiz
.
selectByCode
(
OrderCostEnum
.
RENT_VEHICLE
.
getCode
());
template
.
setTemplate
(
orderTemplateBiz
.
result
(
template
.
getTemplate
(),
new
HashMap
(){{
put
(
"children"
,
children
);
put
(
"paramJson"
,
vo
.
getParamJson
()
);
put
(
"paramJson"
,
""
);
}}));
String
result
=
orderTemplateBiz
.
result
(
template
,
Dict
.
parse
(
vo
));
JSONObject
jsonObject
=
JSONUtil
.
parseObj
(
result
);
jsonObject
.
put
(
"paramJson"
,
vo
.
getParamJson
());
result
=
JSONUtil
.
toJsonStr
(
jsonObject
);
vo
.
setCostDetail
(
result
);
}
}
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