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
c8a33c86
Commit
c8a33c86
authored
Nov 19, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台导出车辆信息
parent
728fc0dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
20 deletions
+6
-20
BranchCompanyVehicleCountBiz.java
...fc/platform/vehicle/biz/BranchCompanyVehicleCountBiz.java
+5
-17
VehicleInformationDownloadBiz.java
...c/platform/vehicle/biz/VehicleInformationDownloadBiz.java
+1
-3
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/BranchCompanyVehicleCountBiz.java
View file @
c8a33c86
...
...
@@ -11,30 +11,18 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Iterator
;
import
java.util.List
;
@Service
@Slf4j
public
class
BranchCompanyVehicleCountBiz
extends
BaseBiz
<
BranchCompanyVehicleCountMapper
,
BranchCompanyVehicleCount
>
{
@Autowired
VehicleInformationDownloadBiz
vehicleInformationDownloadBiz
;
public
ObjectRestResponse
add
(
List
<
BranchCompanyVehicleCount
>
branchCompanyVehicleCounts
)
{
if
(
branchCompanyVehicleCount
s
==
null
)
{
public
ObjectRestResponse
add
(
BranchCompanyVehicleCount
branchCompanyVehicleCount
)
{
if
(
branchCompanyVehicleCount
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
Iterator
<
BranchCompanyVehicleCount
>
iterator
=
branchCompanyVehicleCounts
.
iterator
();
while
(
iterator
.
hasNext
())
{
BranchCompanyVehicleCount
newValue
=
iterator
.
next
();
if
(
newValue
!=
null
)
{
BranchCompanyVehicleCount
oldValue
=
selectOne
(
newValue
);
if
(
oldValue
!=
null
)
{
iterator
.
remove
();
}
}
}
if
(
branchCompanyVehicleCounts
!=
null
&&
branchCompanyVehicleCounts
.
size
()
>
0
)
{
insertMultiSelective
(
branchCompanyVehicleCounts
);
BranchCompanyVehicleCount
oldValue
=
selectOne
(
branchCompanyVehicleCount
);
if
(
oldValue
==
null
)
{
insertSelectiveRe
(
branchCompanyVehicleCount
);
}
return
ObjectRestResponse
.
succ
();
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleInformationDownloadBiz.java
View file @
c8a33c86
...
...
@@ -109,7 +109,6 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
@Scheduled
(
cron
=
"0 0 */2 * * *"
)
public
void
add
()
{
ArrayList
<
BranchCompanyVehicleCount
>
arrayList
=
Lists
.
newArrayList
();
List
<
BranchCompanyVehicleCountVo
>
branchCompanyVehicleCountVos
=
vehicleBiz
.
getAllVehicleInfo
();
branchCompanyVehicleCountVos
.
parallelStream
().
forEach
(
result
->{
try
{
...
...
@@ -119,12 +118,11 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
DateTime
dateTime
=
DateTime
.
now
();
String
dateStr
=
dateTime
.
toString
(
DATE_TIME_FORMATTER
);
branchCompanyVehicleCount
.
setCountDate
(
DateTime
.
parse
(
dateStr
).
toDate
());
arrayList
.
add
(
branchCompanyVehicleCount
);
branchCompanyVehicleCountBiz
.
add
(
branchCompanyVehicleCount
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
}
});
branchCompanyVehicleCountBiz
.
add
(
arrayList
);
}
}
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