Commit b8c20be5 authored by 周健威's avatar 周健威

修改租车流程

parent 2fd68774
......@@ -154,6 +154,8 @@ public class RentVehicleBookDTO extends PageParam {
String catasStr;
@ApiModelProperty(value = "分类列表", hidden = true)
Map<Integer, List<VehiclePlatCata>> catas;
@ApiModelProperty(value = "分类列表", hidden = true)
Map<Integer, List<VehiclePlatCata>> catas2;
public void setBookStartDate(String bookStartDate) {
this.bookStartDate = bookStartDate;
......
......@@ -47,6 +47,7 @@ public class UsableVeicleDTO extends PageParam {
String catasStr;
@ApiModelProperty(value = "分类列表", hidden = true)
Map<Integer, List<VehiclePlatCata>> catas;
@ApiModelProperty("停靠公司")
Integer parkBranchCompanyId;
......
......@@ -252,7 +252,7 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
rbd.setBookEndDate(dto.getEndDate());
rbd.setBookStartDateTime(dto.getStartDateTime());
rbd.setBookEndDateTime(dto.getEndDateTime());
rbd.setCatas(dto.getCatas());
rbd.setCatas2(dto.getCatas());
rbd.setGoodsType(dto.getGoodsType());
rbd.setRecordIntersection(Boolean.TRUE);
rbd.setYearNo4Where(Boolean.TRUE);
......
......@@ -1121,6 +1121,9 @@
<if test="lon != null and lat != null">
,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance
</if>
<if test=" catas2 != null ">
,vc.catas as catas
</if>
<!-- <if test=" yearMonthAndParam !=null ">-->
<!-- ,ifnull(vbi.booked_date,0) as booked_date-->
<!-- </if>-->
......@@ -1141,6 +1144,23 @@
<if test="categoryId != null ">
and category_id = #{categoryId}
</if>
<!-- 循环 相同父级 数据做并集, 不同父级做或集 -->
<if test=" catas2 != null ">
and ( 1
<foreach collection="catas2" index="key" item="cataList">
&amp; (
<foreach collection="cataList" index="cIndex" item="cata">
<if test=" cIndex != 0">
|
</if>
(case when FIND_IN_SET(#{cata.id},catas) > 0 then 1 else 0 end)
</foreach>
)
</foreach>
) > 0
</if>
<if test="lon != null and lat != null">
order by
distance asc
......@@ -1186,6 +1206,9 @@
<if test=" catas != null ">
left join vehicle_cata vc on vm.id = vc.vehicle_model_id
</if>
<if test=" catas2 != null ">
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>
<where>
<!-- 若需根据预定日期条件查询,针对换为位操作 -->
<!-- yearNo4Where 标识时间参数是否用于where条件 -->
......
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