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
75e38ead
Commit
75e38ead
authored
Dec 09, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-delay-add' into dev
parents
e5ec4776
20cade21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
35 deletions
+25
-35
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+25
-35
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
75e38ead
...
@@ -29,6 +29,7 @@ import com.xxfc.platform.order.pojo.mq.OrderMQDTO;
...
@@ -29,6 +29,7 @@ import com.xxfc.platform.order.pojo.mq.OrderMQDTO;
import
com.xxfc.platform.order.pojo.order.VehicleItemDTO
;
import
com.xxfc.platform.order.pojo.order.VehicleItemDTO
;
import
com.xxfc.platform.order.pojo.price.CancelStartedVO
;
import
com.xxfc.platform.order.pojo.price.CancelStartedVO
;
import
com.xxfc.platform.order.pojo.price.CostDetailExtend
;
import
com.xxfc.platform.order.pojo.price.CostDetailExtend
;
import
com.xxfc.platform.order.pojo.price.DelayAddPriceVO
;
import
com.xxfc.platform.universal.constant.DictionaryKey
;
import
com.xxfc.platform.universal.constant.DictionaryKey
;
import
com.xxfc.platform.universal.entity.Dictionary
;
import
com.xxfc.platform.universal.entity.Dictionary
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
...
@@ -447,7 +448,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -447,7 +448,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
csv
.
setViolateDesc
(
""
);
csv
.
setViolateDesc
(
""
);
//处理更改之后的违约金及描述
//处理更改之后的违约金及描述
handleCrosstownDetail
(
crosstown
,
oad
,
csv
);
handleCrosstownDetail
(
crosstown
,
oad
,
csv
);
handleCrosstownDelayDetail
(
crosstown
,
oad
,
csv
);
handleCrosstownDelayDetail
(
crosstown
,
oad
);
if
(
StrUtil
.
isBlank
(
csv
.
getViolateDesc
()))
{
if
(
StrUtil
.
isBlank
(
csv
.
getViolateDesc
()))
{
csv
.
setViolateDesc
(
inProgressVO
.
getViolateDesc
());
csv
.
setViolateDesc
(
inProgressVO
.
getViolateDesc
());
...
@@ -593,7 +594,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -593,7 +594,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}
}
}
}
private
void
handleCrosstownDelayDetail
(
OrderVehicleCrosstown
crosstown
,
OrderAccountDetail
oad
,
CancelStartedVO
csv
)
{
private
void
handleCrosstownDelayDetail
(
OrderVehicleCrosstown
crosstown
,
OrderAccountDetail
oad
)
{
try
{
try
{
if
(
null
!=
crosstown
.
getDelayVehicleDetail
())
{
if
(
null
!=
crosstown
.
getDelayVehicleDetail
())
{
//修改代码
//修改代码
...
@@ -601,7 +602,28 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -601,7 +602,28 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
for
(
DedDetailDTO
vio
:
vios
)
{
for
(
DedDetailDTO
vio
:
vios
)
{
if
(
OrderViolateEnum
.
DELAY_VEHICLE
.
getCode
().
equals
(
vio
.
getType
()))
{
if
(
OrderViolateEnum
.
DELAY_VEHICLE
.
getCode
().
equals
(
vio
.
getType
()))
{
handleDelayDetail
(
DeductionTypeEnum
.
OTHER_DELAY_SAFE
,
oad
,
vio
,
csv
);
Boolean
flag
=
Boolean
.
FALSE
;
for
(
OrderAccountDeduction
deduction
:
oad
.
getDeductions
())
{
if
(
DeductionTypeEnum
.
OTHER_DELAY_SAFE
.
getCode
().
equals
(
deduction
.
getType
()))
{
deduction
.
setName
(
vio
.
getDeductions
());
BigDecimal
diff
=
vio
.
getCost
().
subtract
(
deduction
.
getAmount
());
//修改归还押金金额
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
diff
));
deduction
.
setAmount
(
vio
.
getCost
());
flag
=
Boolean
.
TRUE
;
break
;
}
}
//如果没有修改,则添加
if
(
Boolean
.
FALSE
.
equals
(
flag
))
{
OrderAccountDeduction
oadNew
=
initDeduction
(
vio
.
getCost
(),
vio
.
getDeductions
(),
DeductionTypeEnum
.
OTHER_DELAY_SAFE
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
oad
.
getDeductions
().
add
(
oadNew
);
//修改归还押金金额
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
oadNew
.
getAmount
()));
}
}
}
}
}
}
}
...
@@ -641,38 +663,6 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -641,38 +663,6 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}
}
}
}
private
void
handleDelayDetail
(
DeductionTypeEnum
dte
,
OrderAccountDetail
oad
,
DedDetailDTO
vio
,
CancelStartedVO
csv
)
{
Boolean
flag
=
Boolean
.
FALSE
;
for
(
OrderAccountDeduction
deduction
:
oad
.
getDeductions
())
{
if
(
dte
.
getCode
().
equals
(
deduction
.
getType
()))
{
deduction
.
setName
(
vio
.
getDeductions
());
BigDecimal
diff
=
vio
.
getCost
().
subtract
(
deduction
.
getAmount
());
//修改归还押金金额
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
diff
));
deduction
.
setAmount
(
vio
.
getCost
());
// //设置订单明细参数
// csv.setViolateAmount(csv.getViolateAmount().add(diff));
// csv.setViolateDesc(csv.getViolateDesc()+ deduction.getName());
flag
=
Boolean
.
TRUE
;
break
;
}
}
//如果没有修改,则添加
if
(
Boolean
.
FALSE
.
equals
(
flag
))
{
OrderAccountDeduction
oadNew
=
initDeduction
(
vio
.
getCost
(),
vio
.
getDeductions
(),
dte
,
OrderAccountDeduction
.
ORIGIN_DEPOSIT
);
oad
.
getDeductions
().
add
(
oadNew
);
//修改归还押金金额
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
oadNew
.
getAmount
()));
// //设置订单明细参数
// csv.setViolateAmount(csv.getViolateAmount().add(oadNew.getAmount()));
// csv.setViolateDesc(csv.getViolateDesc()+ oadNew.getName());
}
}
/**
/**
* 获取每日订单账目,用于统计
* 获取每日订单账目,用于统计
* @param term
* @param term
...
...
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