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
4d7c161f
Commit
4d7c161f
authored
Nov 29, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'order_received_statistics' into dev
parents
09d70be7
e5d253dd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
12 deletions
+13
-12
StatisticsStatusEnum.java
...latform/order/contant/enumerate/StatisticsStatusEnum.java
+1
-0
OrderDTO.java
.../main/java/com/xxfc/platform/order/pojo/dto/OrderDTO.java
+2
-2
BaseOrderMapper.xml
...rder-server/src/main/resources/mapper/BaseOrderMapper.xml
+2
-2
OrderAccountMapper.xml
...r-server/src/main/resources/mapper/OrderAccountMapper.xml
+1
-1
OrderReceivedStatisticsMapper.xml
...c/main/resources/mapper/OrderReceivedStatisticsMapper.xml
+1
-1
ServiceTest.java
xx-order/xx-order-server/src/test/java/ServiceTest.java
+6
-6
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/contant/enumerate/StatisticsStatusEnum.java
View file @
4d7c161f
...
@@ -137,6 +137,7 @@ public enum StatisticsStatusEnum {
...
@@ -137,6 +137,7 @@ public enum StatisticsStatusEnum {
feeTypeBo
.
setNoDeductibleAmount
(
feeTypeBo
.
getNoDeductibleAmount
().
add
(
dameSafeAmount
));
feeTypeBo
.
setNoDeductibleAmount
(
feeTypeBo
.
getNoDeductibleAmount
().
add
(
dameSafeAmount
));
}
}
//订单金额(不包含免赔和押金)
//订单金额(不包含免赔和押金)
feeTypeBo
.
setTotalAmount
(
feeTypeBo
.
getTotalAmount
().
add
(
accountDetailEntity
.
getOrderAmount
()).
subtract
(
feeTypeBo
.
getNoDeductibleAmount
()));
feeTypeBo
.
setTotalAmount
(
feeTypeBo
.
getTotalAmount
().
add
(
accountDetailEntity
.
getOrderAmount
()).
subtract
(
feeTypeBo
.
getNoDeductibleAmount
()));
}
else
{
}
else
{
//退款订单押金
//退款订单押金
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/dto/OrderDTO.java
View file @
4d7c161f
...
@@ -41,7 +41,7 @@ public class OrderDTO {
...
@@ -41,7 +41,7 @@ public class OrderDTO {
/**
/**
* 费用其他明细 租车使用
* 费用其他明细 租车使用
*/
*/
protected
String
costDetail
Extend
;
protected
String
costDetail
;
/**
/**
* 会员相关
* 会员相关
*/
*/
...
@@ -55,6 +55,6 @@ public class OrderDTO {
...
@@ -55,6 +55,6 @@ public class OrderDTO {
}
}
public
JSONObject
getData
()
{
public
JSONObject
getData
()
{
return
StringUtils
.
hasText
(
costDetail
Extend
)?
JSONUtil
.
parseObj
(
costDetailExtend
):
new
JSONObject
();
return
StringUtils
.
hasText
(
costDetail
)?
JSONUtil
.
parseObj
(
costDetail
):
new
JSONObject
();
}
}
}
}
xx-order/xx-order-server/src/main/resources/mapper/BaseOrderMapper.xml
View file @
4d7c161f
...
@@ -441,7 +441,7 @@
...
@@ -441,7 +441,7 @@
<select
id=
"selectOrdersByTypeAndTime"
resultType=
"com.xxfc.platform.order.pojo.dto.OrderDTO"
>
<select
id=
"selectOrdersByTypeAndTime"
resultType=
"com.xxfc.platform.order.pojo.dto.OrderDTO"
>
select bo.id,bo.type,bo.status,bo.order_amount,bo.real_amount,bo.order_origin,bo.parent_user_id as `userId`,bo.parent_position_id as `postionId`,
select bo.id,bo.type,bo.status,bo.order_amount,bo.real_amount,bo.order_origin,bo.parent_user_id as `userId`,bo.parent_position_id as `postionId`,
bo.has_pay,bo.pay_way,omd.memberLevel,IFNULL(IFNULL(orvd.start_company_id,otd.start_company_id),`parent_user_company_id`) AS `companyId`,
bo.has_pay,bo.pay_way,omd.memberLevel,IFNULL(IFNULL(orvd.start_company_id,otd.start_company_id),`parent_user_company_id`) AS `companyId`,
orvd.deposit,orvd.cost_detail
_extend AS `costDetailExtend
`
orvd.deposit,orvd.cost_detail
AS `costDetail
`
from (select * from `base_order` where 1=1
from (select * from `base_order` where 1=1
<if
test=
"hasPay!=null"
>
<if
test=
"hasPay!=null"
>
and `has_pay`=#{hasPay}
and `has_pay`=#{hasPay}
...
@@ -452,7 +452,7 @@
...
@@ -452,7 +452,7 @@
separator=
","
>
separator=
","
>
#{type}
#{type}
</foreach>
) AS `bo`
</foreach>
) AS `bo`
LEFT JOIN (select `order_id`,`start_company_id`,`deposit`,`cost_detail
_extend
` from `order_rent_vehicle_detail`) AS `orvd` ON
LEFT JOIN (select `order_id`,`start_company_id`,`deposit`,`cost_detail` from `order_rent_vehicle_detail`) AS `orvd` ON
orvd.order_id=bo.id
orvd.order_id=bo.id
LEFT JOIN (select `order_id`,`start_company_id` from `order_tour_detail`) AS `otd` ON otd.order_id=bo.id
LEFT JOIN (select `order_id`,`start_company_id` from `order_tour_detail`) AS `otd` ON otd.order_id=bo.id
LEFT JOIN (select `order_id`,`member_level` AS `memberLevel` from `order_member_detail`) AS `omd` ON
LEFT JOIN (select `order_id`,`member_level` AS `memberLevel` from `order_member_detail`) AS `omd` ON
...
...
xx-order/xx-order-server/src/main/resources/mapper/OrderAccountMapper.xml
View file @
4d7c161f
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
bo.pay_way,
bo.pay_way,
bo.has_pay,
bo.has_pay,
IFNULL(brvd.start_company_id,IFNULL(otd.start_company_id,bo.parent_user_company_id)) AS `companyId`,
IFNULL(brvd.start_company_id,IFNULL(otd.start_company_id,bo.parent_user_company_id)) AS `companyId`,
brvd.cost_detail
_extend AS `costDetailExtend
`,
brvd.cost_detail
AS `costDetail
`,
brvd.damage_safe AS `damageSafe`,
brvd.damage_safe AS `damageSafe`,
omd.member_level AS `memberLevel`
omd.member_level AS `memberLevel`
...
...
xx-order/xx-order-server/src/main/resources/mapper/OrderReceivedStatisticsMapper.xml
View file @
4d7c161f
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
SELECT
SELECT
ors.*,
ors.*,
IFNULL(ovss.departureNum,0) as `departureNum`,
IFNULL(ovss.departureNum,0) as `departureNum`,
IFNULL(ovss.rentDays,0) as `
departureNum
`,
IFNULL(ovss.rentDays,0) as `
rentDays
`,
IFNULL(ovss.arrivalNum,0) as `arrivalNum`
IFNULL(ovss.arrivalNum,0) as `arrivalNum`
FROM
FROM
(
(
...
...
xx-order/xx-order-server/src/test/java/ServiceTest.java
View file @
4d7c161f
...
@@ -107,7 +107,7 @@ public class ServiceTest {
...
@@ -107,7 +107,7 @@ public class ServiceTest {
@Test
@Test
public
void
testRentVehicleStatistics
(){
public
void
testRentVehicleStatistics
(){
Date
date
=
DateTime
.
parse
(
"2019-11-
15
"
).
toDate
();
Date
date
=
DateTime
.
parse
(
"2019-11-
29
"
).
toDate
();
Date
startDate
=
DateUtil
.
beginOfDay
(
date
).
toJdkDate
();
Date
startDate
=
DateUtil
.
beginOfDay
(
date
).
toJdkDate
();
Date
endDate
=
DateUtil
.
endOfDay
(
date
).
toJdkDate
();
Date
endDate
=
DateUtil
.
endOfDay
(
date
).
toJdkDate
();
Map
<
Integer
,
String
>
companyMap
=
vehicleFeign
.
findCompanyMap
();
Map
<
Integer
,
String
>
companyMap
=
vehicleFeign
.
findCompanyMap
();
...
@@ -126,17 +126,17 @@ public class ServiceTest {
...
@@ -126,17 +126,17 @@ public class ServiceTest {
@Test
@Test
@SneakyThrows
@SneakyThrows
public
void
testOrderReceivedStatisticsJobHandler
(){
public
void
testOrderReceivedStatisticsJobHandler
(){
cn
.
hutool
.
core
.
date
.
DateTime
dateTime
=
DateUtil
.
parse
(
"2019-1
0-01
"
,
"yyyy-MM-dd"
);
cn
.
hutool
.
core
.
date
.
DateTime
dateTime
=
DateUtil
.
parse
(
"2019-1
1-29
"
,
"yyyy-MM-dd"
);
cn
.
hutool
.
core
.
date
.
DateTime
offset
=
DateUtil
.
offset
(
dateTime
,
DateField
.
DAY_OF_MONTH
,
1
);
//
cn.hutool.core.date.DateTime offset = DateUtil.offset(dateTime, DateField.DAY_OF_MONTH, 1);
orderReceivedStatisticsJobHandler
.
execute
(
"2019-11-29"
);
LocalDate
startLocalDate
=
LocalDate
.
of
(
2019
,
10
,
1
);
/*
LocalDate startLocalDate = LocalDate.of(2019, 10, 1);
LocalDate endLocalDate = LocalDate.of(2019,11,29);
LocalDate endLocalDate = LocalDate.of(2019,11,29);
while (startLocalDate.isBefore(endLocalDate)){
while (startLocalDate.isBefore(endLocalDate)){
String dateStr = startLocalDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
String dateStr = startLocalDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
startLocalDate = startLocalDate.plusDays(1);
startLocalDate = startLocalDate.plusDays(1);
orderReceivedStatisticsJobHandler.execute(dateStr);
orderReceivedStatisticsJobHandler.execute(dateStr);
}
}
*/
}
}
}
}
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