Commit 52677956 authored by jiaorz's avatar jiaorz

添加

parent 4ba206b8
...@@ -13,18 +13,17 @@ ...@@ -13,18 +13,17 @@
</resultMap> </resultMap>
<select id="getAllByParam" parameterType="Map" resultType="com.xxfc.platform.vehicle.entity.BranchCompanyVehicleCount"> <select id="getAllByParam" parameterType="Map" resultType="com.xxfc.platform.vehicle.entity.BranchCompanyVehicleCount">
select *, CEILING( SELECT company_name, CEILING((
( CASE
CASE WHEN #{type} = 1 THEN
WHEN #{type} = 1 THEN sum(vehicle_num) / #{dayNum}
vehicle_num / #{dayNum} WHEN #{type} = 2 THEN
WHEN #{type} = 2 THEN sum(vehicle_num) / #{dayNum}
vehicle_num / #{dayNum} WHEN #{type} = 3 THEN
WHEN #{type} = 3 THEN sum(vehicle_num) / #{dayNum}
vehicle_num / #{dayNum} END
END ))
) AS vehicleNum from branch_company_vehicle_count
) AS vehicleNum from branch_company_vehicle_count
<where> <where>
<if test="companyName != null and companyName != ''"> <if test="companyName != null and companyName != ''">
and company_name like concat('%', #{companyName}, '%') and company_name like concat('%', #{companyName}, '%')
...@@ -32,7 +31,7 @@ ...@@ -32,7 +31,7 @@
<if test="startTime != null and startTime != ''"> <if test="startTime != null and startTime != ''">
and count_date &gt; #{startTime} and count_date &lt; #{endTime} and count_date &gt; #{startTime} and count_date &lt; #{endTime}
</if> </if>
</where> </where>
GROUP BY company_name
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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