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
953d5a9c
Commit
953d5a9c
authored
Sep 08, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改车辆相关
parent
e262d26f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
29 deletions
+38
-29
UsableVeicleDTO.java
.../java/com/xxfc/platform/vehicle/pojo/UsableVeicleDTO.java
+3
-0
RentVehicleController.java
...com/xxfc/platform/vehicle/rest/RentVehicleController.java
+2
-1
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+33
-28
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/UsableVeicleDTO.java
View file @
953d5a9c
...
...
@@ -59,6 +59,9 @@ public class UsableVeicleDTO extends PageParam {
@ApiModelProperty
(
hidden
=
true
)
Boolean
yearNo4Where
;
@ApiModelProperty
(
hidden
=
true
)
Integer
withoutRecordWhere
;
/**
* 是否根据预订记录(相交叉)查询
* 原(大于预约结束时间,小于预约开始时间的预约记录)
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/RentVehicleController.java
View file @
953d5a9c
...
...
@@ -132,7 +132,8 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
dto
.
setCatas
(
vehiclePlatCataBiz
.
groupCatasByParent
(
dto
.
getCatasStr
()));
}
//设置显示是否有车(通过把时间与位比较从where移动到select)
dto
.
setYearNo4Where
(
Boolean
.
TRUE
);
//dto.setYearNo4Where(Boolean.TRUE);
//dto.setWithoutRecordWhere(SYS_TRUE);
//匹配相交叉的预约记录
dto
.
setRecordIntersection
(
Boolean
.
TRUE
);
PageDataVO
<
UsableVehicleModelVO
>
uvmvpdvs
=
vehicleBiz
.
searchUsableModel
(
dto
);
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
953d5a9c
...
...
@@ -915,8 +915,13 @@
ifnull(vbi.bit_str = #{yearMonthAndParamBitStr}, false)
<!-- 租车列表 不过滤前后预约记录不符的车辆 但是合并标示车型是否有车 即 hasVehicle-->
<if
test=
"withoutRecordWhere != null and withoutRecordWhere = 1 and startCompanyId != null and endCompanyId != null "
>
and (abr.to_lift_company is null or abr.to_lift_company = #{startCompanyId})
and (abr.to_return_company is null or abr.to_return_company = #{endCompanyId})
<!-- and (abr.to_lift_company is null or abr.to_lift_company = #{startCompanyId})-->
<!-- and (abr.to_return_company is null or abr.to_return_company = #{endCompanyId})-->
and (
(IFNULL(abr.to_lift_company, v.park_branch_company_id) = #{startCompanyId})
and
(abr.to_return_company is null or abr.to_return_company = #{endCompanyId})
)
</if>
)
) as hasVehicle
...
...
@@ -952,32 +957,32 @@
</if>
)
<!-- union 所有下架车型 -->
<!-- -->
<!-- <if test="startCompanyId != null or parkBranchCompanyId != null ">--
>
<!-- union-->
<!-- (select vm.id as model_id, bc.id as company_id-->
<!-- <if test=" catas != null ">--
>
<!-- ,null as catas-->
<!-- </if>--
>
<!-- <if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">--
>
<!-- ,0 as hasVehicle-->
<!-- </if>--
>
<!-- <if test="lon != null and lat != null">--
>
<!-- <!– 处理距离 –>
-->
<!-- ,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance-->
<!-- </if>--
>
<!-- from vehicle_model vm-->
<!-- left join branch_company bc on-->
<!-- <choose>--
>
<!-- <when test="startCompanyId != null">--
>
<!-- bc.id = #{startCompanyId}-->
<!-- </when>--
>
<!-- <otherwise>--
>
<!-- bc.id = #{parkBranchCompanyId}-->
<!-- </otherwise>--
>
<!-- </choose>--
>
<!-- where vm.isdel = 0 and vm.status = 0 and vm.app_show = 1)-->
<!-- </if>--
>
<if
test=
"startCompanyId != null or parkBranchCompanyId != null "
>
union
(select vm.id as model_id, bc.id as company_id
<if
test=
" catas != null "
>
,null as catas
</if
>
<if
test=
" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true"
>
,0 as hasVehicle
</if
>
<if
test=
"lon != null and lat != null"
>
<!-- 处理距离
-->
,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance
</if
>
from vehicle_model vm
left join branch_company bc on
<choose
>
<when
test=
"startCompanyId != null"
>
bc.id = #{startCompanyId}
</when
>
<otherwise
>
bc.id = #{parkBranchCompanyId}
</otherwise
>
</choose
>
where vm.isdel = 0 and vm.status = 1 and vm.app_show = 1)
</if
>
<if
test=
"lon != null and lat != null"
>
order by
<if
test=
" yearMonthAndParam !=null and yearNo4Where != null and 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