Commit 52677956 authored by jiaorz's avatar jiaorz

添加

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