Commit 846e0c12 authored by hezhen's avatar hezhen

Merge branch 'dev-chw' of http://113.105.137.151:22280/youjj/cloud-platform into dev-chw

parents 727e682f 421b2809
......@@ -17,6 +17,7 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.github.wxiaoqi.security.common.vo.PageParam;
import com.xxfc.platform.order.biz.OrderRentVehicleBiz;
import com.xxfc.platform.order.biz.SpecialRentBiz;
import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.SpecialRent;
import com.xxfc.platform.order.mqhandler.RabbitProduct;
import com.xxfc.platform.order.pojo.order.RentVehicleBO;
......@@ -176,14 +177,11 @@ public class SpecialRentController extends BaseController<SpecialRentBiz, Specia
//正式下单
dto.setVehicleId(specialRent.getVehicleId());
dto.setStartTime(specialRent.getStartTime());
dto.setEndTime(specialRent.getEndTime());
dto.setStartCompanyId(specialRent.getStartCompanyId());
dto.setEndCompanyId(specialRent.getEndCompanyId());
RentVehicleBO bo = orderRentVehicleBiz.initRentVehicleBO(dto);
// bo.setSpecialOrderSign(SYS_TRUE);
bo.setOrderSign(BaseOrder.ORDER_SIGN_SPECIAL);
bo.setAppUserDTO(getAppUser());
// orderRentVehicleService.applyCreateOrder(bo, specialRent.getOrderNo());
orderRentVehicleService.createOrder(bo);
baseBiz.updateSelectiveById(new SpecialRent(){{
setId(specialRent.getId());
......
......@@ -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