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
0bc4958d
Commit
0bc4958d
authored
Oct 23, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取违约金 获取
parent
d3137c3e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 deletions
+23
-8
DeductionTypeEnum.java
...c/platform/order/contant/enumerate/DeductionTypeEnum.java
+1
-0
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+22
-8
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/contant/enumerate/DeductionTypeEnum.java
View file @
0bc4958d
...
@@ -8,6 +8,7 @@ public enum DeductionTypeEnum {
...
@@ -8,6 +8,7 @@ public enum DeductionTypeEnum {
VIOLATE_CANCEL
(
101
,
"提前取消违约金"
),
VIOLATE_CANCEL
(
101
,
"提前取消违约金"
),
VIOLATE_ADVANCE
(
102
,
"提前还车违约金"
),
VIOLATE_ADVANCE
(
102
,
"提前还车违约金"
),
VIOLATE_DELAY
(
103
,
"延迟还车违约金"
),
VIOLATE_DELAY
(
103
,
"延迟还车违约金"
),
VIOLATE_CHANGE_C
(
104
,
"更换还车公司费用"
),
CONSUME
(
201
,
"消费金额"
),
CONSUME
(
201
,
"消费金额"
),
DAMAGES
(
301
,
"赔偿金(定损)"
),
DAMAGES
(
301
,
"赔偿金(定损)"
),
VIOLATE_TRAFFIC_DEDUCT
(
401
,
"违章扣款"
),
VIOLATE_TRAFFIC_DEDUCT
(
401
,
"违章扣款"
),
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
0bc4958d
...
@@ -478,12 +478,18 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -478,12 +478,18 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
private
void
handleCrosstownDetail
(
OrderVehicleCrosstown
crosstown
,
OrderAccountDetail
oad
,
CancelStartedVO
csv
)
{
private
void
handleCrosstownDetail
(
OrderVehicleCrosstown
crosstown
,
OrderAccountDetail
oad
,
CancelStartedVO
csv
)
{
try
{
try
{
if
(
null
!=
crosstown
.
getViolateDetail
())
{
if
(
null
!=
crosstown
.
getViolateDetail
())
{
DedDetailDTO
vio
=
JSONUtil
.
toBean
(
crosstown
.
getViolateDetail
(),
DedDetailDTO
.
class
);
//修改代码
List
<
DedDetailDTO
>
vios
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
crosstown
.
getViolateDetail
()),
DedDetailDTO
.
class
);
//DedDetailDTO vio = JSONUtil.toBean(crosstown.getViolateDetail(), DedDetailDTO.class);
for
(
DedDetailDTO
vio
:
vios
)
{
if
(
OrderViolateEnum
.
BEFORE
.
getCode
().
equals
(
vio
.
getType
()))
{
if
(
OrderViolateEnum
.
BEFORE
.
getCode
().
equals
(
vio
.
getType
()))
{
handleViolateDetail
(
DeductionTypeEnum
.
VIOLATE_ADVANCE
,
oad
,
vio
,
csv
);
handleViolateDetail
(
DeductionTypeEnum
.
VIOLATE_ADVANCE
,
oad
,
vio
,
csv
);
}
else
if
(
OrderViolateEnum
.
AFTER
.
getCode
().
equals
(
vio
.
getType
()))
{
}
else
if
(
OrderViolateEnum
.
AFTER
.
getCode
().
equals
(
vio
.
getType
()))
{
handleViolateDetail
(
DeductionTypeEnum
.
VIOLATE_DELAY
,
oad
,
vio
,
csv
);
handleViolateDetail
(
DeductionTypeEnum
.
VIOLATE_DELAY
,
oad
,
vio
,
csv
);
}
else
if
(
OrderViolateEnum
.
CHANGE
.
getCode
().
equals
(
vio
.
getType
()))
{
handleViolateDetail
(
DeductionTypeEnum
.
VIOLATE_CHANGE_C
,
oad
,
vio
,
csv
);
}
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -492,6 +498,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -492,6 +498,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}
}
private
void
handleViolateDetail
(
DeductionTypeEnum
dte
,
OrderAccountDetail
oad
,
DedDetailDTO
vio
,
CancelStartedVO
csv
)
{
private
void
handleViolateDetail
(
DeductionTypeEnum
dte
,
OrderAccountDetail
oad
,
DedDetailDTO
vio
,
CancelStartedVO
csv
)
{
Boolean
flag
=
Boolean
.
FALSE
;
for
(
OrderAccountDeduction
deduction
:
oad
.
getDeductions
())
{
for
(
OrderAccountDeduction
deduction
:
oad
.
getDeductions
())
{
if
(
dte
.
getCode
().
equals
(
deduction
.
getType
()))
{
if
(
dte
.
getCode
().
equals
(
deduction
.
getType
()))
{
deduction
.
setName
(
vio
.
getDeductions
());
deduction
.
setName
(
vio
.
getDeductions
());
...
@@ -501,10 +508,17 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -501,10 +508,17 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
deduction
.
setAmount
(
vio
.
getCost
());
deduction
.
setAmount
(
vio
.
getCost
());
//设置订单明细参数
//设置订单明细参数
csv
.
setViolateAmount
(
deduction
.
getAmount
());
csv
.
setViolateAmount
(
csv
.
getViolateAmount
().
add
(
diff
));
csv
.
setViolateDesc
(
deduction
.
getName
());
csv
.
setViolateDesc
(
csv
.
getViolateDesc
()+
deduction
.
getName
());
flag
=
Boolean
.
TRUE
;
break
;
}
}
}
}
//如果没有修改,则添加
if
(
Boolean
.
FALSE
.
equals
(
flag
))
{
oad
.
getDeductions
().
add
(
initDeduction
(
vio
.
getCost
(),
vio
.
getDeductions
(),
dte
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
));
}
}
}
...
...
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