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
075be5f7
Commit
075be5f7
authored
Nov 06, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'holiday-price' into dev
parents
5defc385
59a63bb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
VehicleModelCalendarPriceBiz.java
...fc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
+20
-1
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
View file @
075be5f7
...
@@ -196,7 +196,26 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
...
@@ -196,7 +196,26 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
* @return
* @return
*/
*/
public
List
<
VehicleModelCalendarPriceDTO
>
findVehicleModelCalendarPriceByDateAndVehilceIdAndUserId
(
Date
startDate
,
Date
endDate
,
Integer
vehicleModelId
,
Integer
userId
)
{
public
List
<
VehicleModelCalendarPriceDTO
>
findVehicleModelCalendarPriceByDateAndVehilceIdAndUserId
(
Date
startDate
,
Date
endDate
,
Integer
vehicleModelId
,
Integer
userId
)
{
return
findVehicleModelCalendarPrice
(
startDate
,
endDate
,
vehicleModelId
,
userId
);
LocalDate
startLocalDate
=
DateUtils
.
dateToLocalDate
(
startDate
);
LocalDate
endLocalDate
=
DateUtils
.
dateToLocalDate
(
endDate
);
Integer
days
=
getIncludeDays
(
startDate
.
getTime
(),
endDate
.
getTime
());
boolean
isSelect
=
false
;
List
<
VehicleModelCalendarPriceDTO
>
vehicleModelCalendarPrice
=
findVehicleModelCalendarPrice
(
startDate
,
endDate
,
vehicleModelId
,
userId
);
for
(
int
i
=
0
,
y
=
0
;
i
<
vehicleModelCalendarPrice
.
size
();
i
++)
{
VehicleModelCalendarPriceDTO
vehicleModelCalendarPriceDTO
=
vehicleModelCalendarPrice
.
get
(
i
);
LocalDate
current_date
=
DateUtils
.
dateToLocalDate
(
vehicleModelCalendarPriceDTO
.
getDate
());
if
(
y
==
0
)
{
isSelect
=
(
current_date
.
isAfter
(
startLocalDate
)
&&
current_date
.
isBefore
(
endLocalDate
))
||
current_date
.
isEqual
(
startLocalDate
)
||
current_date
.
isEqual
(
endLocalDate
);
}
if
(
isSelect
)
{
if
(
y
<
days
)
{
vehicleModelCalendarPriceDTO
.
setIsSelect
(
isSelect
?
true
:
false
);
y
++;
}
}
}
return
vehicleModelCalendarPrice
.
stream
().
filter
(
x
->
Objects
.
nonNull
(
x
.
getIsSelect
())).
collect
(
Collectors
.
toList
());
}
}
/**
/**
...
...
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