Commit 9052e771 authored by hezhen's avatar hezhen

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform into base-modify

parents 73e9499b 9d02043c
......@@ -16,7 +16,7 @@ spring:
cloud:
nacos:
config:
server-addr: 127.0.0.1:8848
server-addr: 127.0.0.1:8848,10.1.37.166:8848
#共用配置,暂定一个
shared-dataids: common-dev.yaml,mongodb-log-dev.yaml
---
......
......@@ -69,3 +69,5 @@ public class DictionaryController {
return ObjectRestResponse.succ();
}
}
......@@ -54,6 +54,9 @@ public class UsableVeicleDTO extends PageParam {
@ApiModelProperty(hidden = true)
Boolean yearNo4Where;
@ApiModelProperty(hidden = true)
Integer withoutRecordWhere = 1;
public void setStartDateTamp(Long startDateTamp) {
this.startDateTamp = startDateTamp;
this.startDate = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(startDateTamp), ZoneOffset.ofHours(8)));
......
......@@ -23,7 +23,7 @@ spring:
cloud:
nacos:
config:
server-addr: 127.0.0.1:8848
server-addr: 127.0.0.1:8848,10.1.37.166:8848
#共用配置,暂定一个
shared-dataids: common-dev.yaml,mongodb-log-dev.yaml
......
......@@ -522,11 +522,17 @@
</if>
<!-- yearNo4Where 标识时间参数不用于where条件,用于select部分 -->
<if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">
,max(
,(max(
<foreach collection="yearMonthAndParam" index="yearMonth" item="andOperation" separator="and">
<include refid="yearMonthAndParamSql"></include>
</foreach>
) as hasVehicle
<!-- 租车列表 不过滤前后预约记录不符的车辆 但是合并标示车型是否有车 即 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})
</if>
)
)as hasVehicle
</if>
<if test="lon != null and lat != null">
,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance
......@@ -557,7 +563,7 @@
) > 0
</if>
)
<!-- union 所有车型 -->
<!-- union 所有下架车型 -->
<if test="startCompanyId != null or parkBranchCompanyId != null ">
union
(select vm.id as model_id, bc.id as company_id
......@@ -635,15 +641,16 @@
</foreach>
</if>
<!-- 若需根据预定日期条件查询,针对换为位操作 -->
<!-- yearNo4Where 标识时间参数是否用于where条件 -->
<!-- 根据前后record 过滤车辆 -->
<if test="startCompanyId != null and endCompanyId != null ">
<if test="withoutRecordWhere == 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})
)
</if>
</if>
<if test=" modelId != null ">
and v.model_id = #{modelId}
</if>
......
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