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
ae4d5372
Commit
ae4d5372
authored
Nov 25, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆服务次数统计
parent
ef568a27
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
OrderVehicleServiceStatisticsBiz.java
.../platform/order/biz/OrderVehicleServiceStatisticsBiz.java
+29
-0
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleServiceStatisticsBiz.java
View file @
ae4d5372
...
@@ -18,6 +18,7 @@ import org.apache.commons.collections.MapUtils;
...
@@ -18,6 +18,7 @@ import org.apache.commons.collections.MapUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.joda.time.DateTime
;
import
org.joda.time.DateTime
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -167,4 +168,32 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
...
@@ -167,4 +168,32 @@ public class OrderVehicleServiceStatisticsBiz extends BaseBiz<OrderVehicleServic
}
}
mapMap
.
clear
();
mapMap
.
clear
();
}
}
//添加记录
@Scheduled
(
cron
=
"0 0 2 * * *"
)
public
void
add
()
{
countVehicleServiceNum
(
DateTime
.
now
());
getAllOrder
(
DateTime
.
now
());
if
(
MapUtils
.
isNotEmpty
(
mapMap
))
{
for
(
Map
.
Entry
<
Integer
,
Map
<
String
,
Integer
>>
entry
:
mapMap
.
entrySet
())
{
if
(
MapUtils
.
isNotEmpty
(
entry
.
getValue
()))
{
OrderVehicleServiceStatistics
orderVehicleServiceStatistics
=
new
OrderVehicleServiceStatistics
();
orderVehicleServiceStatistics
.
setCompanyId
(
entry
.
getKey
());
for
(
Map
.
Entry
<
String
,
Integer
>
values
:
entry
.
getValue
().
entrySet
())
{
if
(
StringUtils
.
isNotBlank
(
values
.
getKey
())
&&
StringUtils
.
isNotBlank
(
values
.
getValue
()
+
""
))
{
DateTime
dateTime1
=
DateTime
.
parse
(
values
.
getKey
());
orderVehicleServiceStatistics
.
setCountDate
(
dateTime1
.
toDate
());
orderVehicleServiceStatistics
.
setRentNum
(
values
.
getValue
());
orderVehicleServiceStatistics
.
setCountYear
(
dateTime1
.
getYear
()
+
""
);
orderVehicleServiceStatistics
.
setCountMonth
(
dateTime1
.
getYear
()
+
""
+
dateTime1
.
getMonthOfYear
()
+
""
);
orderVehicleServiceStatistics
.
setCountWeek
(
dateTime1
.
getYear
()
+
""
+
dateTime1
.
getWeekOfWeekyear
()
+
""
);
add
(
orderVehicleServiceStatistics
);
}
}
}
}
}
mapMap
.
clear
();
}
}
}
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