Commit 953d5a9c authored by 周健威's avatar 周健威

修改车辆相关

parent e262d26f
...@@ -59,6 +59,9 @@ public class UsableVeicleDTO extends PageParam { ...@@ -59,6 +59,9 @@ public class UsableVeicleDTO extends PageParam {
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
Boolean yearNo4Where; Boolean yearNo4Where;
@ApiModelProperty(hidden = true)
Integer withoutRecordWhere;
/** /**
* 是否根据预订记录(相交叉)查询 * 是否根据预订记录(相交叉)查询
* 原(大于预约结束时间,小于预约开始时间的预约记录) * 原(大于预约结束时间,小于预约开始时间的预约记录)
......
...@@ -132,7 +132,8 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements ...@@ -132,7 +132,8 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
dto.setCatas(vehiclePlatCataBiz.groupCatasByParent(dto.getCatasStr())); dto.setCatas(vehiclePlatCataBiz.groupCatasByParent(dto.getCatasStr()));
} }
//设置显示是否有车(通过把时间与位比较从where移动到select) //设置显示是否有车(通过把时间与位比较从where移动到select)
dto.setYearNo4Where(Boolean.TRUE); //dto.setYearNo4Where(Boolean.TRUE);
//dto.setWithoutRecordWhere(SYS_TRUE);
//匹配相交叉的预约记录 //匹配相交叉的预约记录
dto.setRecordIntersection(Boolean.TRUE); dto.setRecordIntersection(Boolean.TRUE);
PageDataVO<UsableVehicleModelVO> uvmvpdvs = vehicleBiz.searchUsableModel(dto); PageDataVO<UsableVehicleModelVO> uvmvpdvs = vehicleBiz.searchUsableModel(dto);
......
...@@ -915,8 +915,13 @@ ...@@ -915,8 +915,13 @@
ifnull(vbi.bit_str = #{yearMonthAndParamBitStr}, false) ifnull(vbi.bit_str = #{yearMonthAndParamBitStr}, false)
<!-- 租车列表 不过滤前后预约记录不符的车辆 但是合并标示车型是否有车 即 hasVehicle--> <!-- 租车列表 不过滤前后预约记录不符的车辆 但是合并标示车型是否有车 即 hasVehicle-->
<if test="withoutRecordWhere != null and withoutRecordWhere = 1 and startCompanyId != null and endCompanyId != null "> <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_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_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> </if>
) )
) as hasVehicle ) as hasVehicle
...@@ -952,32 +957,32 @@ ...@@ -952,32 +957,32 @@
</if> </if>
) )
<!-- union 所有下架车型 --> <!-- union 所有下架车型 -->
<!-- -->
<!-- <if test="startCompanyId != null or parkBranchCompanyId != null ">--> <if test="startCompanyId != null or parkBranchCompanyId != null ">
<!-- union--> union
<!-- (select vm.id as model_id, bc.id as company_id--> (select vm.id as model_id, bc.id as company_id
<!-- <if test=" catas != null ">--> <if test=" catas != null ">
<!-- ,null as catas--> ,null as catas
<!-- </if>--> </if>
<!-- <if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">--> <if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">
<!-- ,0 as hasVehicle--> ,0 as hasVehicle
<!-- </if>--> </if>
<!-- <if test="lon != null and lat != null">--> <if test="lon != null and lat != null">
<!-- &lt;!&ndash; 处理距离 &ndash;&gt;--> <!-- 处理距离 -->
<!-- ,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance--> ,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance
<!-- </if>--> </if>
<!-- from vehicle_model vm--> from vehicle_model vm
<!-- left join branch_company bc on--> left join branch_company bc on
<!-- <choose>--> <choose>
<!-- <when test="startCompanyId != null">--> <when test="startCompanyId != null">
<!-- bc.id = #{startCompanyId}--> bc.id = #{startCompanyId}
<!-- </when>--> </when>
<!-- <otherwise>--> <otherwise>
<!-- bc.id = #{parkBranchCompanyId}--> bc.id = #{parkBranchCompanyId}
<!-- </otherwise>--> </otherwise>
<!-- </choose>--> </choose>
<!-- where vm.isdel = 0 and vm.status = 0 and vm.app_show = 1)--> where vm.isdel = 0 and vm.status = 1 and vm.app_show = 1)
<!-- </if>--> </if>
<if test="lon != null and lat != null"> <if test="lon != null and lat != null">
order by order by
<if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true"> <if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment