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
0b989985
Commit
0b989985
authored
Nov 29, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'order_received_statistics' into dev
parents
73576906
2312e958
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
OrderVehicleServiceStatisticsBiz.java
.../platform/order/biz/OrderVehicleServiceStatisticsBiz.java
+7
-4
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleServiceStatisticsBiz.java
View file @
0b989985
...
@@ -53,6 +53,7 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
...
@@ -53,6 +53,7 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
param
.
put
(
"status"
,
1
);
param
.
put
(
"status"
,
1
);
List
<
OrderPageVO
>
orderPageVOS
=
baseOrderBiz
.
selectAllRentVehicleOrder
(
param
);
List
<
OrderPageVO
>
orderPageVOS
=
baseOrderBiz
.
selectAllRentVehicleOrder
(
param
);
if
(
orderPageVOS
!=
null
&&
orderPageVOS
.
size
()
>
0
)
{
if
(
orderPageVOS
!=
null
&&
orderPageVOS
.
size
()
>
0
)
{
log
.
info
(
timeStr
+
"所有订单: list = {}"
,
orderPageVOS
);
orderPageVOS
.
parallelStream
().
forEach
(
result
->
{
orderPageVOS
.
parallelStream
().
forEach
(
result
->
{
if
(
result
.
getOrderRentVehicleDetail
()
!=
null
)
{
if
(
result
.
getOrderRentVehicleDetail
()
!=
null
)
{
Map
<
String
,
Integer
>
dateNumMap
=
mapMap
.
getOrDefault
(
result
.
getOrderRentVehicleDetail
().
getStartCompanyId
(),
new
HashMap
<>());
Map
<
String
,
Integer
>
dateNumMap
=
mapMap
.
getOrDefault
(
result
.
getOrderRentVehicleDetail
().
getStartCompanyId
(),
new
HashMap
<>());
...
@@ -71,7 +72,7 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
...
@@ -71,7 +72,7 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
=
new
OrderVehicleCrosstownDto
();
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
=
new
OrderVehicleCrosstownDto
();
orderVehicleCrosstownDto
.
setOrderId
(
result
.
getId
());
orderVehicleCrosstownDto
.
setOrderId
(
result
.
getId
());
List
<
OrderVehicleCrosstownDto
>
list
=
orderVehicleCrosstownBiz
.
selectByOrderId
(
orderVehicleCrosstownDto
);
List
<
OrderVehicleCrosstownDto
>
list
=
orderVehicleCrosstownBiz
.
selectByOrderId
(
orderVehicleCrosstownDto
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
list
.
parallelStream
().
forEach
(
order
->
{
list
.
parallelStream
().
forEach
(
order
->
{
//获取还车时间
//获取还车时间
if
(
order
.
getType
()
==
CrosstownTypeEnum
.
ARRIVE
.
getCode
()
||
order
.
getType
()
==
CrosstownTypeEnum
.
FIXED_LOSS
.
getCode
()
||
order
.
getType
()
==
CrosstownTypeEnum
.
FIXED_LOSS_NOW
.
getCode
())
{
if
(
order
.
getType
()
==
CrosstownTypeEnum
.
ARRIVE
.
getCode
()
||
order
.
getType
()
==
CrosstownTypeEnum
.
FIXED_LOSS
.
getCode
()
||
order
.
getType
()
==
CrosstownTypeEnum
.
FIXED_LOSS_NOW
.
getCode
())
{
...
@@ -85,6 +86,8 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
...
@@ -85,6 +86,8 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
}
else
{
//还车记录不存在,异常数据
}
else
{
//还车记录不存在,异常数据
log
.
info
(
"还车记录不存在,异常数据, {}"
,
result
.
toString
());
log
.
info
(
"还车记录不存在,异常数据, {}"
,
result
.
toString
());
}
}
}
else
if
(
bookDays
-
actualUsedDays
<
0
)
{
//如果实际使用时间大于预定时间,还车时租车天数为多出的天数
dateNumMap
.
put
(
timeStr
,
dateNumMap
.
getOrDefault
(
timeStr
,
0
)
+
(
actualUsedDays
-
bookDays
));
}
}
}
}
mapMap
.
put
(
result
.
getOrderRentVehicleDetail
().
getStartCompanyId
(),
dateNumMap
);
mapMap
.
put
(
result
.
getOrderRentVehicleDetail
().
getStartCompanyId
(),
dateNumMap
);
...
@@ -109,7 +112,7 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
...
@@ -109,7 +112,7 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
OrderVehicleServiceStatistics
orderVehicleServiceStatistics
=
new
OrderVehicleServiceStatistics
();
OrderVehicleServiceStatistics
orderVehicleServiceStatistics
=
new
OrderVehicleServiceStatistics
();
log
.
info
(
result
.
toString
());
log
.
info
(
result
.
toString
());
BeanUtil
.
copyProperties
(
result
,
orderVehicleServiceStatistics
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
BeanUtil
.
copyProperties
(
result
,
orderVehicleServiceStatistics
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
String
dateStr
=
result
.
getCountYear
()
+
"-"
+
result
.
getCountMonth
()
+
"-"
+
result
.
getCountDay
();
String
dateStr
=
result
.
getCountYear
()
+
"-"
+
result
.
getCountMonth
()
+
"-"
+
result
.
getCountDay
();
DateTime
date
=
DateTime
.
parse
(
dateStr
);
DateTime
date
=
DateTime
.
parse
(
dateStr
);
orderVehicleServiceStatistics
.
setCountDate
(
date
.
toDate
());
orderVehicleServiceStatistics
.
setCountDate
(
date
.
toDate
());
orderVehicleServiceStatistics
.
setCountMonth
(
result
.
getCountYear
()
+
result
.
getCountMonth
());
orderVehicleServiceStatistics
.
setCountMonth
(
result
.
getCountYear
()
+
result
.
getCountMonth
());
...
@@ -120,7 +123,7 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
...
@@ -120,7 +123,7 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
}
}
public
void
add
(
OrderVehicleServiceStatistics
orderVehicleServiceStatistics
)
{
public
void
add
(
OrderVehicleServiceStatistics
orderVehicleServiceStatistics
)
{
if
(
orderVehicleServiceStatistics
!=
null
)
{
if
(
orderVehicleServiceStatistics
!=
null
)
{
OrderVehicleServiceStatistics
oldValue
=
mapper
.
selectByCompanyIdAndDate
(
orderVehicleServiceStatistics
);
OrderVehicleServiceStatistics
oldValue
=
mapper
.
selectByCompanyIdAndDate
(
orderVehicleServiceStatistics
);
if
(
oldValue
==
null
)
{
if
(
oldValue
==
null
)
{
insertSelectiveRe
(
orderVehicleServiceStatistics
);
insertSelectiveRe
(
orderVehicleServiceStatistics
);
...
@@ -143,7 +146,7 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
...
@@ -143,7 +146,7 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
//添加记录
//添加记录
public
void
addAll
()
{
public
void
addAll
()
{
DateTime
dateTime
=
DateTime
.
parse
(
"2019-08-01"
);
DateTime
dateTime
=
DateTime
.
parse
(
"2019-08-01"
);
for
(
DateTime
curDate
=
dateTime
.
plusDays
(
1
);
curDate
.
compareTo
(
DateTime
.
now
())
<
0
;
curDate
=
curDate
.
plusDays
(
1
))
{
for
(
DateTime
curDate
=
dateTime
.
plusDays
(
1
);
curDate
.
compareTo
(
DateTime
.
now
())
<
0
;
curDate
=
curDate
.
plusDays
(
1
))
{
countVehicleServiceNum
(
curDate
);
countVehicleServiceNum
(
curDate
);
getAllOrder
(
curDate
);
getAllOrder
(
curDate
);
}
}
...
...
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