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
3495649d
Commit
3495649d
authored
Nov 19, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
租车日历价格
parent
6ed0c570
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
17 deletions
+18
-17
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+2
-2
OrderRentVehicleReceivedStatisticsBiz.java
...form/order/biz/OrderRentVehicleReceivedStatisticsBiz.java
+1
-1
OrderAccountMapper.java
...va/com/xxfc/platform/order/mapper/OrderAccountMapper.java
+11
-10
OrderAccountMapper.xml
...r-server/src/main/resources/mapper/OrderAccountMapper.xml
+2
-2
ServiceTest.java
xx-order/xx-order-server/src/test/java/ServiceTest.java
+2
-2
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
3495649d
...
@@ -627,8 +627,8 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -627,8 +627,8 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
* @param endDate
* @param endDate
* @return
* @return
*/
*/
public
List
<
OrderAccountBo
>
selectBy
Date
(
Date
startDate
,
Date
endDate
)
{
public
List
<
OrderAccountBo
>
selectBy
TypeAndDate
(
Integer
orderType
,
Date
startDate
,
Date
endDate
)
{
List
<
OrderAccountBo
>
accountBos
=
mapper
.
selectOrderAccountBy
StartTimeAndEndTime
(
startDate
.
getTime
(),
endDate
.
getTime
());
List
<
OrderAccountBo
>
accountBos
=
mapper
.
selectOrderAccountBy
OrderTypeAndStartTimeAndEndTime
(
orderType
,
startDate
.
getTime
(),
endDate
.
getTime
());
return
CollectionUtils
.
isEmpty
(
accountBos
)?
Collections
.
EMPTY_LIST
:
accountBos
;
return
CollectionUtils
.
isEmpty
(
accountBos
)?
Collections
.
EMPTY_LIST
:
accountBos
;
}
}
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderRentVehicleReceivedStatisticsBiz.java
View file @
3495649d
...
@@ -66,7 +66,7 @@ public class OrderRentVehicleReceivedStatisticsBiz extends BaseBiz<OrderRentVehi
...
@@ -66,7 +66,7 @@ public class OrderRentVehicleReceivedStatisticsBiz extends BaseBiz<OrderRentVehi
.
collect
(
Collectors
.
partitioningBy
(
x
->
Objects
.
nonNull
(
x
.
getPayWay
()),
Collectors
.
groupingBy
(
OrderDTO:
:
getStateGroup
,
Collectors
.
toList
())));
.
collect
(
Collectors
.
partitioningBy
(
x
->
Objects
.
nonNull
(
x
.
getPayWay
()),
Collectors
.
groupingBy
(
OrderDTO:
:
getStateGroup
,
Collectors
.
toList
())));
//订单账目信息
//订单账目信息
List
<
OrderAccountBo
>
orderAccountBoList
=
orderAccountBiz
.
selectBy
Date
(
startDate
,
endDate
);
List
<
OrderAccountBo
>
orderAccountBoList
=
orderAccountBiz
.
selectBy
TypeAndDate
(
StatisticsStatusEnum
.
ORDER_RENT_VEHICLE_TYPE
,
startDate
,
endDate
);
//账目数据处理 状态组合
//账目数据处理 状态组合
Map
<
String
,
List
<
OrderAccountBo
>>
ordersMap
=
orderAccountBoList
.
stream
().
peek
(
x
->
{
Map
<
String
,
List
<
OrderAccountBo
>>
ordersMap
=
orderAccountBoList
.
stream
().
peek
(
x
->
{
x
.
setStateGroup
(
String
.
format
(
"%d-%d-%d-%d"
,
x
.
getCompanyId
(),
x
.
getOrderOrigin
(),
x
.
getPayWay
()
==
null
?
StatisticsStatusEnum
.
NO_PAY_WAY
:
x
.
getPayWay
(),
x
.
getHasPay
()));
x
.
setStateGroup
(
String
.
format
(
"%d-%d-%d-%d"
,
x
.
getCompanyId
(),
x
.
getOrderOrigin
(),
x
.
getPayWay
()
==
null
?
StatisticsStatusEnum
.
NO_PAY_WAY
:
x
.
getPayWay
(),
x
.
getHasPay
()));
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/mapper/OrderAccountMapper.java
View file @
3495649d
package
com
.
xxfc
.
platform
.
order
.
mapper
;
package
com
.
xxfc
.
platform
.
order
.
mapper
;
import
com.xxfc.platform.order.entity.OrderAccount
;
import
com.xxfc.platform.order.entity.OrderAccount
;
import
com.xxfc.platform.order.pojo.Term
;
import
com.xxfc.platform.order.pojo.Term
;
import
com.xxfc.platform.order.pojo.account.OrderAccountBo
;
import
com.xxfc.platform.order.pojo.account.OrderAccountBo
;
import
com.xxfc.platform.order.pojo.account.OrderAccountDTO
;
import
com.xxfc.platform.order.pojo.account.OrderAccountDTO
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 订单帐目
* 订单帐目
*
*
* @author zhoujw
* @author zhoujw
* @email 18178966185@163.com
* @email 18178966185@163.com
* @date 2019-09-09 15:51:16
* @date 2019-09-09 15:51:16
...
@@ -21,6 +21,7 @@ public interface OrderAccountMapper extends Mapper<OrderAccount> {
...
@@ -21,6 +21,7 @@ public interface OrderAccountMapper extends Mapper<OrderAccount> {
List
<
OrderAccountDTO
>
getOrderAccountByOrderType
(
Term
term
);
List
<
OrderAccountDTO
>
getOrderAccountByOrderType
(
Term
term
);
List
<
OrderAccountBo
>
selectOrderAccountByStartTimeAndEndTime
(
@Param
(
"startTime"
)
long
startTime
,
List
<
OrderAccountBo
>
selectOrderAccountByOrderTypeAndStartTimeAndEndTime
(
@Param
(
"orderType"
)
Integer
orderType
,
@Param
(
"endTime"
)
long
endTime
);
@Param
(
"startTime"
)
long
startTime
,
@Param
(
"endTime"
)
long
endTime
);
}
}
xx-order/xx-order-server/src/main/resources/mapper/OrderAccountMapper.xml
View file @
3495649d
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
</select>
</select>
<select
id=
"selectOrderAccountByStartTimeAndEndTime"
<select
id=
"selectOrderAccountBy
OrderTypeAnd
StartTimeAndEndTime"
resultType=
"com.xxfc.platform.order.pojo.account.OrderAccountBo"
>
resultType=
"com.xxfc.platform.order.pojo.account.OrderAccountBo"
>
SELECT
SELECT
oa.*,
oa.*,
...
@@ -67,6 +67,6 @@
...
@@ -67,6 +67,6 @@
`order_account` AS `oa`
`order_account` AS `oa`
INNER JOIN `base_order` AS `bo` ON bo.id = oa.order_id
INNER JOIN `base_order` AS `bo` ON bo.id = oa.order_id
INNER JOIN `order_rent_vehicle_detail` AS `brvd` ON brvd.order_id=oa.order_id
INNER JOIN `order_rent_vehicle_detail` AS `brvd` ON brvd.order_id=oa.order_id
WHERE oa.`crt_time` BETWEEN #{startTime} AND #{endTime}
WHERE
bo.type=#{orderType} AND
oa.`crt_time` BETWEEN #{startTime} AND #{endTime}
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
xx-order/xx-order-server/src/test/java/ServiceTest.java
View file @
3495649d
...
@@ -46,13 +46,13 @@ public class ServiceTest {
...
@@ -46,13 +46,13 @@ public class ServiceTest {
@Test
@Test
public
void
testMemberStatisticsInsert
(){
public
void
testMemberStatisticsInsert
(){
Date
date
=
cn
.
hutool
.
core
.
date
.
DateTime
.
of
(
"2019-11-1
7
"
,
"yyyy-MM-dd"
).
toJdkDate
();
Date
date
=
cn
.
hutool
.
core
.
date
.
DateTime
.
of
(
"2019-11-1
6
"
,
"yyyy-MM-dd"
).
toJdkDate
();
//orderMemberReceivedStatisticsBiz.orderMemberReceivedStatistics(date);
//orderMemberReceivedStatisticsBiz.orderMemberReceivedStatistics(date);
}
}
@Test
@Test
public
void
testRentvehicleStatistics
(){
public
void
testRentvehicleStatistics
(){
Date
date
=
cn
.
hutool
.
core
.
date
.
DateTime
.
of
(
"2019-11-1
8
"
,
"yyyy-MM-dd"
).
toJdkDate
();
Date
date
=
cn
.
hutool
.
core
.
date
.
DateTime
.
of
(
"2019-11-1
5
"
,
"yyyy-MM-dd"
).
toJdkDate
();
Date
startDate
=
DateUtil
.
beginOfDay
(
date
).
toJdkDate
();
Date
startDate
=
DateUtil
.
beginOfDay
(
date
).
toJdkDate
();
Date
endDate
=
DateUtil
.
endOfDay
(
date
).
toJdkDate
();
Date
endDate
=
DateUtil
.
endOfDay
(
date
).
toJdkDate
();
orderRentVehicleReceivedStatisticsBiz
.
orderRentVehicleReceivedStatistics
(
startDate
,
endDate
);
orderRentVehicleReceivedStatisticsBiz
.
orderRentVehicleReceivedStatistics
(
startDate
,
endDate
);
...
...
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