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
d861e6f5
Commit
d861e6f5
authored
Nov 14, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员与租车订单统计
parent
942b22a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
StatisticsStatusEnum.java
...latform/order/contant/enumerate/StatisticsStatusEnum.java
+22
-11
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/contant/enumerate/StatisticsStatusEnum.java
View file @
d861e6f5
...
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.order.contant.enumerate;
import
cn.hutool.core.date.DateField
;
import
cn.hutool.core.date.DateTime
;
import
com.xxfc.platform.order.entity.OrderReceivedStatisticsBase
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.assertj.core.util.Lists
;
import
java.util.ArrayList
;
...
...
@@ -34,24 +35,34 @@ public enum StatisticsStatusEnum {
orderPayWays
=
Lists
.
newArrayList
(
"1"
,
"2"
);
}
public
static
List
<
String
>
statisticsSateGroup
(
List
<
Integer
>
companyIdList
){
public
static
List
<
String
>
statisticsSateGroup
WithCompanys
(
List
<
Integer
>
companyIdList
){
List
<
String
>
orderStatisticsStateGroups
=
new
ArrayList
<>();
for
(
Integer
companyId
:
companyIdList
)
{
for
(
String
orderOrigin
:
orderOrigins
)
{
for
(
String
orderPayWay
:
orderPayWays
)
{
for
(
String
orderState
:
orderStates
)
{
// 公司id-订单来源-支付方式-订单状态
orderStatisticsStateGroups
.
add
(
String
.
format
(
"%d-%s-%s-%s"
,
companyId
,
orderOrigin
,
orderPayWay
,
orderState
));
}
List
<
String
>
stateGroup
=
statisticsStateGroup
();
for
(
String
stgp
:
stateGroup
)
{
for
(
Integer
companyId
:
companyIdList
)
{
// 公司id-订单来源-支付方式-订单状态
orderStatisticsStateGroups
.
add
(
String
.
format
(
"%d-%s"
,
companyId
,
stgp
));
}
}
return
orderStatisticsStateGroups
;
}
public
static
List
<
String
>
statisticsStateGroup
(){
List
<
String
>
orderStatisticsStateGroups
=
new
ArrayList
<>();
for
(
String
orderOrigin
:
orderOrigins
)
{
for
(
String
orderPayWay
:
orderPayWays
)
{
for
(
String
orderState
:
orderStates
)
{
//订单来源-支付方式-订单状态
orderStatisticsStateGroups
.
add
(
String
.
format
(
"%s-%s-%s"
,
orderOrigin
,
orderPayWay
,
orderState
));
}
}
}
return
orderStatisticsStateGroups
;
}
public
static
List
<
String
>
getOtherStatisticsStateGroup
(
List
<
Integer
>
companyIdList
,
List
<
String
>
statisticsStates
){
List
<
String
>
s
ateGroup
=
statisticsSateGroup
(
companyIdList
);
s
ateGroup
.
retainAll
(
statisticsStates
);
return
s
ateGroup
;
List
<
String
>
s
tateGroupList
=
CollectionUtils
.
isEmpty
(
companyIdList
)?
statisticsStateGroup
():
statisticsSateGroupWithCompanys
(
companyIdList
);
s
tateGroupList
.
retainAll
(
statisticsStates
);
return
s
tateGroupList
;
}
public
static
<
T
extends
OrderReceivedStatisticsBase
>
T
wrapStatisticsObject
(
Date
date
,
String
stateGroup
,
T
targetObj
){
...
...
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