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

添加model相关修改

parent 043b816d
......@@ -520,29 +520,7 @@
and vm.id is not null
and vm.status = 1
and vm.isdel = 0
and bc.id is not null)
<if test="startCompanyId != null or parkBranchCompanyId != null ">
union
(select id as model_id,
<choose>
<when test="startCompanyId != null">
#{startCompanyId} as company_id,
</when>
<otherwise>
#{parkBranchCompanyId} as company_id,
</otherwise>
</choose>
<if test=" catas != null ">
null as catas,
</if>
<if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">
0 as hasVehicle,
</if>
<if test="lon != null and lat != null">
0 as distance
</if>
from vehicle_model where vehicle_model.isdel = 0)
</if>
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>-->
......@@ -562,7 +540,30 @@
</foreach>
) > 0
</if>
)
<!-- union 所有车型 -->
<if test="startCompanyId != null or parkBranchCompanyId != null ">
union
(select id as model_id,
<choose>
<when test="startCompanyId != null">
#{startCompanyId} as company_id,
</when>
<otherwise>
#{parkBranchCompanyId} as company_id,
</otherwise>
</choose>
<if test=" catas != null ">
null as catas,
</if>
<if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">
0 as hasVehicle,
</if>
<if test="lon != null and lat != null">
0 as distance
</if>
from vehicle_model where vehicle_model.isdel = 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