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
77f2433e
Commit
77f2433e
authored
Nov 27, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
总业绩统计
parent
3b7de943
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
TotalPerformanceBiz.java
...java/com/xxfc/platform/order/biz/TotalPerformanceBiz.java
+27
-4
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/TotalPerformanceBiz.java
View file @
77f2433e
package
com
.
xxfc
.
platform
.
order
.
biz
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.github.pagehelper.PageInfo
;
import
com.google.common.collect.Lists
;
import
com.xxfc.platform.order.contant.enumerate.AccountTypeEnum
;
...
...
@@ -95,19 +96,41 @@ public class TotalPerformanceBiz {
return
Lists
.
newArrayList
();
}
//拆分明细
splitReturnOrderAmountList
(
returnOrderAmounts
,
queryCriteria
);
return
splitReturnOrderAmountList
(
returnOrderAmounts
,
queryCriteria
);
}
//拆分明细
private
List
<
ReturnOrderAmount
>
splitReturnOrderAmountList
(
List
<
ReturnOrderAmount
>
returnOrderAmounts
,
QueryCriteria
queryCriteria
)
{
ArrayList
<
ReturnOrderAmount
>
arrayList
=
Lists
.
newArrayList
();
//进行遍历拆分出压惊、订单和违章
for
(
ReturnOrderAmount
returnOrderAmount
:
returnOrderAmounts
)
{
OrderAccountDetail
accountDetailStr
=
returnOrderAmount
.
getAccountDetailStr
();
if
(
AccountTypeEnum
.
OUT_RESIDUE_DEPOSIT
.
getCode
().
equals
(
returnOrderAmount
.
getAccountType
()))
{
//押金退还金额
BigDecimal
depositAmount
=
accountDetailStr
.
getDepositAmount
();
//订单退还
BigDecimal
orderAmount
=
accountDetailStr
.
getOrderAmount
();
//判断押金退还是否大于0
if
(
depositAmount
.
compareTo
(
BigDecimal
.
ZERO
)>
0
)
{
ReturnOrderAmount
returnOrderAmountClone
=
ObjectUtil
.
clone
(
returnOrderAmount
);
//判断是违章还是租车
if
(
AccountTypeEnum
.
OUT_RESIDUE_DEPOSIT
.
getCode
().
equals
(
returnOrderAmount
.
getAccountType
()))
{
returnOrderAmountClone
.
setRefundInstruction
(
"违章押金"
);
returnOrderAmountClone
.
setRefundAmount
(
accountDetailStr
.
getDepositAmount
());
}
else
{
returnOrderAmountClone
.
setRefundInstruction
(
"租车押金"
);
returnOrderAmountClone
.
setRefundAmount
(
accountDetailStr
.
getDepositAmount
());
}
arrayList
.
add
(
returnOrderAmountClone
);
}
//判断订单退款是否大于0
if
(
orderAmount
.
compareTo
(
BigDecimal
.
ZERO
)>
0
)
{
ReturnOrderAmount
returnOrderAmountClone
=
ObjectUtil
.
clone
(
returnOrderAmount
);
returnOrderAmountClone
.
setRefundInstruction
(
"订单退款"
);
returnOrderAmountClone
.
setRefundAmount
(
accountDetailStr
.
getOrderAmount
());
}
}
return
arrayList
;
}
...
...
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