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
626738d6
Commit
626738d6
authored
Nov 21, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆信息统计
parent
902edcc8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
13 deletions
+25
-13
BranchCompanyVehicleCountBiz.java
...fc/platform/vehicle/biz/BranchCompanyVehicleCountBiz.java
+2
-1
VehicleInformationDownloadBiz.java
...c/platform/vehicle/biz/VehicleInformationDownloadBiz.java
+23
-12
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/BranchCompanyVehicleCountBiz.java
View file @
626738d6
...
@@ -31,6 +31,7 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
...
@@ -31,6 +31,7 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
}
}
public
ObjectRestResponse
<
PageDataVO
<
BranchCompanyVehicleCount
>>
findAll
(
BranchCompanyVehicleCountDTO
branchCompanyVehicleCountDTO
)
{
public
ObjectRestResponse
<
PageDataVO
<
BranchCompanyVehicleCount
>>
findAll
(
BranchCompanyVehicleCountDTO
branchCompanyVehicleCountDTO
)
{
vehicleInformationDownloadBiz
.
addAll
();
Integer
pageNo
=
branchCompanyVehicleCountDTO
.
getPage
()
==
null
?
1
:
branchCompanyVehicleCountDTO
.
getPage
();
Integer
pageNo
=
branchCompanyVehicleCountDTO
.
getPage
()
==
null
?
1
:
branchCompanyVehicleCountDTO
.
getPage
();
Integer
pageSize
=
branchCompanyVehicleCountDTO
.
getLimit
()
==
null
?
10
:
branchCompanyVehicleCountDTO
.
getLimit
();
Integer
pageSize
=
branchCompanyVehicleCountDTO
.
getLimit
()
==
null
?
10
:
branchCompanyVehicleCountDTO
.
getLimit
();
Integer
type
=
branchCompanyVehicleCountDTO
.
getType
()
==
null
?
1
:
branchCompanyVehicleCountDTO
.
getType
();
Integer
type
=
branchCompanyVehicleCountDTO
.
getType
()
==
null
?
1
:
branchCompanyVehicleCountDTO
.
getType
();
...
@@ -46,7 +47,7 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
...
@@ -46,7 +47,7 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
}
}
Query
query
=
new
Query
(
branchCompanyVehicleCountDTO
);
Query
query
=
new
Query
(
branchCompanyVehicleCountDTO
);
PageDataVO
<
BranchCompanyVehicleCount
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getAllByParam
(
query
.
getSuper
()));
PageDataVO
<
BranchCompanyVehicleCount
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getAllByParam
(
query
.
getSuper
()));
return
ObjectRestResponse
.
succ
(
pageDataVO
);
return
ObjectRestResponse
.
succ
();
}
}
public
int
getCurrentMonthLastDay
()
{
public
int
getCurrentMonthLastDay
()
{
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleInformationDownloadBiz.java
View file @
626738d6
...
@@ -11,6 +11,7 @@ import com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo;
...
@@ -11,6 +11,7 @@ import com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo;
import
com.xxfc.platform.vehicle.pojo.ResultVehicleVo
;
import
com.xxfc.platform.vehicle.pojo.ResultVehicleVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleExcelVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleExcelVo
;
import
com.xxfc.platform.vehicle.pojo.VehiclePageQueryVo
;
import
com.xxfc.platform.vehicle.pojo.VehiclePageQueryVo
;
import
com.xxfc.platform.vehicle.util.DateUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.beanutils.BeanUtilsBean
;
import
org.apache.commons.beanutils.BeanUtilsBean
;
import
org.apache.commons.beanutils.PropertyUtils
;
import
org.apache.commons.beanutils.PropertyUtils
;
...
@@ -99,25 +100,35 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
...
@@ -99,25 +100,35 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
}
}
public
List
<
BranchCompanyVehicleCountVo
>
getAllVehicleInfo
()
{
public
void
getAllVehicleInfo
()
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"
"
,
DateTime
.
now
(
).
toString
(
DEFAULT_DATE_TIME_FORMATTER
));
map
.
put
(
"
startTime"
,
DateTime
.
now
().
withMillis
(
DateUtils
.
getStartOfDay
()
).
toString
(
DEFAULT_DATE_TIME_FORMATTER
));
map
.
put
(
"
"
,
DateTime
.
now
(
).
toString
(
DEFAULT_DATE_TIME_FORMATTER
));
map
.
put
(
"
endTime"
,
DateTime
.
now
().
withMillis
(
DateUtils
.
getEndOfDay
()
).
toString
(
DEFAULT_DATE_TIME_FORMATTER
));
return
vehicleBiz
.
getAllVehicleInfo
(
map
);
add
(
map
);
}
}
public
void
addAll
()
{
DateTime
dateTime
=
DateTime
.
parse
(
"2019-10-01 00:00:00"
,
DEFAULT_DATE_TIME_FORMATTER
);
DateTime
dateTime1
=
DateTime
.
parse
(
"2019-10-01 23:59:59"
,
DEFAULT_DATE_TIME_FORMATTER
);
for
(
int
i
=
0
;
i
<
52
;
i
++)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"startTime"
,
dateTime
.
plusDays
(
i
).
toString
(
DEFAULT_DATE_TIME_FORMATTER
));
map
.
put
(
"endTime"
,
dateTime1
.
plusDays
(
i
).
toString
(
DEFAULT_DATE_TIME_FORMATTER
));
add
(
map
);
}
}
public
void
add
(
Map
<
String
,
Object
>
param
)
{
public
void
add
(
Map
<
String
,
Object
>
param
)
{
List
<
BranchCompanyVehicleCountVo
>
branchCompanyVehicleCountVos
=
vehicleBiz
.
getAllVehicleInfo
(
param
);
List
<
BranchCompanyVehicleCountVo
>
branchCompanyVehicleCountVos
=
vehicleBiz
.
getAllVehicleInfo
(
param
);
branchCompanyVehicleCountVos
.
parallelStream
().
forEach
(
result
->{
branchCompanyVehicleCountVos
.
forEach
(
result
->{
try
{
try
{
BranchCompanyVehicleCount
branchCompanyVehicleCount
=
new
BranchCompanyVehicleCount
();
if
(
result
!=
null
)
{
branchCompanyVehicleCount
.
setCompanyName
(
result
.
getParkBranchCompanyName
()
);
BranchCompanyVehicleCount
branchCompanyVehicleCount
=
new
BranchCompanyVehicleCount
(
);
branchCompanyVehicleCount
.
setVehicleNum
(
result
.
getCount
());
branchCompanyVehicleCount
.
setCompanyName
(
result
.
getParkBranchCompanyName
());
DateTime
dateTime
=
DateTime
.
now
(
);
branchCompanyVehicleCount
.
setVehicleNum
(
result
.
getCount
()
);
String
dateStr
=
dateTime
.
toString
(
DATE_TIME_FORMATTER
);
branchCompanyVehicleCount
.
setCountDate
(
DateTime
.
parse
(
param
.
get
(
"startTime"
).
toString
().
split
(
" "
)[
0
]).
toDate
()
);
branchCompanyVehicleCount
.
setCountDate
(
DateTime
.
parse
(
dateStr
).
toDate
()
);
branchCompanyVehicleCountBiz
.
add
(
branchCompanyVehicleCount
);
branchCompanyVehicleCountBiz
.
add
(
branchCompanyVehicleCount
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
}
}
...
...
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