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
87d731ec
Commit
87d731ec
authored
Jun 04, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
851636f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
VehicleController.java
...ava/com/xxfc/platform/vehicle/rest/VehicleController.java
+12
-12
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleController.java
View file @
87d731ec
...
...
@@ -283,20 +283,20 @@ public class VehicleController extends BaseController<VehicleBiz> {
public
ObjectRestResponse
<
PageDataVO
<
UsableVehicleModelVO
>>
rentUsableVehicle
(
UsableVeicleDTO
dto
)
throws
Exception
{
//根据时间 获得 可用车辆
//结合车型
List
<
Integer
>
catasIds
=
Pattern
.
compile
(
","
).
splitAsStream
(
dto
.
getCatasStr
()).
map
((
s
)->
Integer
.
parseInt
(
s
)).
collect
(
Collectors
.
toList
());
List
<
VehiclePlatCata
>
catas
=
vehiclePlatCataBiz
.
selectByExample
(
new
Example
.
Builder
(
VehiclePlatCata
.
class
)
.
where
(
WeekendSqls
.<
VehiclePlatCata
>
custom
().
andIn
(
VehiclePlatCata:
:
getId
,
catasIds
)).
build
());
Map
<
Integer
,
List
<
VehiclePlatCata
>>
vpcMap
=
new
HashMap
<
Integer
,
List
<
VehiclePlatCata
>>();
for
(
VehiclePlatCata
vpc
:
catas
)
{
List
<
VehiclePlatCata
>
vpcs
=
vpcMap
.
get
(
vpc
.
getParentId
());
if
(
null
==
vpcs
)
{
vpcs
=
new
ArrayList
<
VehiclePlatCata
>();
if
(
StringUtils
.
isNotBlank
(
dto
.
getCatasStr
()))
{
List
<
Integer
>
catasIds
=
Pattern
.
compile
(
","
).
splitAsStream
(
dto
.
getCatasStr
()).
map
((
s
)->
Integer
.
parseInt
(
s
)).
collect
(
Collectors
.
toList
());
List
<
VehiclePlatCata
>
catas
=
vehiclePlatCataBiz
.
selectByExample
(
new
Example
.
Builder
(
VehiclePlatCata
.
class
)
.
where
(
WeekendSqls
.<
VehiclePlatCata
>
custom
().
andIn
(
VehiclePlatCata:
:
getId
,
catasIds
)).
build
());
Map
<
Integer
,
List
<
VehiclePlatCata
>>
vpcMap
=
new
HashMap
<
Integer
,
List
<
VehiclePlatCata
>>();
for
(
VehiclePlatCata
vpc
:
catas
)
{
List
<
VehiclePlatCata
>
vpcs
=
vpcMap
.
get
(
vpc
.
getParentId
());
if
(
null
==
vpcs
)
{
vpcs
=
new
ArrayList
<
VehiclePlatCata
>();
}
vpcs
.
add
(
vpc
);
vpcMap
.
put
(
vpc
.
getParentId
(),
vpcs
);
}
vpcs
.
add
(
vpc
);
vpcMap
.
put
(
vpc
.
getParentId
(),
vpcs
);
}
if
(
StringUtils
.
isNotBlank
(
dto
.
getCatasStr
()))
{
dto
.
setCatas
(
vpcMap
);
}
return
new
ObjectRestResponse
<>().
data
(
vehicleBiz
.
searchUsableModel
(
dto
)).
rel
(
true
);
...
...
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