Commit 4ed88dee authored by 周健威's avatar 周健威

添加model相关修改

parent 043b816d
......@@ -520,7 +520,28 @@
and vm.id is not null
and vm.status = 1
and vm.isdel = 0
and bc.id is not null)
and bc.id is not null
GROUP BY model_id, company_id
<if test="lon != null and lat != null">, distance</if>
<!--<if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">, hasVehicle</if>-->
<!-- 循环 相同父级 数据做并集, 不同父级做或集 -->
<if test=" catas != null ">
having ( 1
<foreach collection="catas" 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>
)
<!-- union 所有车型 -->
<if test="startCompanyId != null or parkBranchCompanyId != null ">
union
(select id as model_id,
......@@ -543,26 +564,6 @@
</if>
from vehicle_model where vehicle_model.isdel = 0)
</if>
GROUP BY model_id, company_id
<if test="lon != null and lat != null">, distance</if>
<!--<if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">, hasVehicle</if>-->
<!-- 循环 相同父级 数据做并集, 不同父级做或集 -->
<if test=" catas != null ">
having ( 1
<foreach collection="catas" 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
<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