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
888aed62
Commit
888aed62
authored
Nov 28, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加时间条件
parent
b8b5890d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
RentVehicleBookDTO.java
...va/com/xxfc/platform/vehicle/pojo/RentVehicleBookDTO.java
+15
-0
RentVehicleController.java
...com/xxfc/platform/vehicle/rest/RentVehicleController.java
+3
-0
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+9
-0
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/RentVehicleBookDTO.java
View file @
888aed62
...
@@ -51,6 +51,18 @@ public class RentVehicleBookDTO extends PageParam {
...
@@ -51,6 +51,18 @@ public class RentVehicleBookDTO extends PageParam {
@ApiModelProperty
(
"预定目标时间(结束)"
)
@ApiModelProperty
(
"预定目标时间(结束)"
)
private
String
bookEndDateTime
;
private
String
bookEndDateTime
;
/**
* 预定目标日期(开始)时间戳
*/
@ApiModelProperty
(
"预定目标时间(开始)"
)
private
Long
bookStartDateTimestamp
;
/**
* 预定目标日期(结束)时间戳
*/
@ApiModelProperty
(
"预定目标时间(结束)"
)
private
Long
bookEndDateTimestamp
;
/**
/**
* 提车地点
* 提车地点
...
@@ -143,6 +155,9 @@ public class RentVehicleBookDTO extends PageParam {
...
@@ -143,6 +155,9 @@ public class RentVehicleBookDTO extends PageParam {
@ApiModelProperty
(
hidden
=
true
)
@ApiModelProperty
(
hidden
=
true
)
Boolean
recordIntersection
;
Boolean
recordIntersection
;
@ApiModelProperty
(
hidden
=
true
)
Boolean
timeUse
;
@ApiModelProperty
(
"城市"
)
@ApiModelProperty
(
"城市"
)
Integer
addrCity
;
Integer
addrCity
;
@ApiModelProperty
(
"经度"
)
@ApiModelProperty
(
"经度"
)
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/RentVehicleController.java
View file @
888aed62
...
@@ -252,10 +252,13 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
...
@@ -252,10 +252,13 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
rbd
.
setBookEndDate
(
dto
.
getEndDate
());
rbd
.
setBookEndDate
(
dto
.
getEndDate
());
rbd
.
setBookStartDateTime
(
dto
.
getStartDateTime
());
rbd
.
setBookStartDateTime
(
dto
.
getStartDateTime
());
rbd
.
setBookEndDateTime
(
dto
.
getEndDateTime
());
rbd
.
setBookEndDateTime
(
dto
.
getEndDateTime
());
rbd
.
setBookStartDateTimestamp
(
dto
.
getStartDateTamp
());
rbd
.
setBookEndDateTimestamp
(
dto
.
getEndDateTamp
());
rbd
.
setCatas2
(
dto
.
getCatas
());
rbd
.
setCatas2
(
dto
.
getCatas
());
rbd
.
setGoodsType
(
dto
.
getGoodsType
());
rbd
.
setGoodsType
(
dto
.
getGoodsType
());
rbd
.
setRecordIntersection
(
Boolean
.
FALSE
);
rbd
.
setRecordIntersection
(
Boolean
.
FALSE
);
rbd
.
setYearNo4Where
(
Boolean
.
FALSE
);
rbd
.
setYearNo4Where
(
Boolean
.
FALSE
);
rbd
.
setTimeUse
(
Boolean
.
TRUE
);
//查询可车辆信息
//查询可车辆信息
PageDataVO
<
UsableVeicleVO
>
pageDataVO
=
vehicleBiz
.
searchUsableVehicle
(
rbd
);
PageDataVO
<
UsableVeicleVO
>
pageDataVO
=
vehicleBiz
.
searchUsableVehicle
(
rbd
);
if
(
CollUtil
.
isNotEmpty
(
pageDataVO
.
getData
()))
{
if
(
CollUtil
.
isNotEmpty
(
pageDataVO
.
getData
()))
{
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
888aed62
...
@@ -1190,6 +1190,9 @@
...
@@ -1190,6 +1190,9 @@
left join vehicle_model vm on v.model_id = vm.id
left join vehicle_model vm on v.model_id = vm.id
left join branch_company bc on v.park_branch_company_id = bc.id
left join branch_company bc on v.park_branch_company_id = bc.id
left join branch_company bcm on v.manage_company_id = bcm.id
left join branch_company bcm on v.manage_company_id = bcm.id
<if
test=
"timeUse != null and timeUse == true"
>
left join vehicle_use_time vut on v.id = vut.vehicle_id and vut.status = 1
</if>
<!-- <if test="startCompanyId != null and endCompanyId != null ">-->
<!-- <if test="startCompanyId != null and endCompanyId != null ">-->
<!--
<!--
* 原(大于预约结束时间,小于预约开始时间的预约记录)
* 原(大于预约结束时间,小于预约开始时间的预约记录)
...
@@ -1213,6 +1216,12 @@
...
@@ -1213,6 +1216,12 @@
left join (select vehicle_id,GROUP_CONCAT(cata_id) as catas from vehicle_extension where is_del = 0 group by vehicle_id) vc on v.id = vc.vehicle_id
left join (select vehicle_id,GROUP_CONCAT(cata_id) as catas from vehicle_extension where is_del = 0 group by vehicle_id) vc on v.id = vc.vehicle_id
</if>
</if>
<where>
<where>
<if
test=
"timeUse != null and timeUse == true"
>
<if
test=
"startCompanyId != null and endCompanyId != null"
>
and (vut.company_id = #{startCompanyId} and vut.company_id = #{endCompanyId})
</if>
and (vut.vehicle_id is null or (#{bookStartDateTimestamp}
>
vut.start_time and #{bookEndDateTimestamp}
<
vut.end_time) )
</if>
<!-- 若需根据预定日期条件查询,针对换为位操作 -->
<!-- 若需根据预定日期条件查询,针对换为位操作 -->
<!-- yearNo4Where 标识时间参数是否用于where条件 -->
<!-- yearNo4Where 标识时间参数是否用于where条件 -->
<if
test=
" yearMonthAndParam !=null and yearMonthAndParam != null and (yearNo4Where == null or yearNo4Where != true)"
>
<if
test=
" yearMonthAndParam !=null and yearMonthAndParam != null and (yearNo4Where == null or yearNo4Where != 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