Commit 66a84822 authored by 韩桐桐's avatar 韩桐桐

fix(cyl):某个企业充装次数及累计充装量统计默认当前31天

parent dd5a1ffa
......@@ -393,11 +393,12 @@
</select>
<select id="countFillingTimesAndQuantityByCompany" resultType="java.util.Map">
SELECT COUNT(1) AS fillingTimes, SUM(filling_quantity) AS fillingQuantity
SELECT COUNT(1) AS fillingTimes, ifnull(SUM(filling_quantity),0) AS fillingQuantity
FROM tz_cylinder_filling_record AS tcfr
<where>
tcfr."filling_endtime" <![CDATA[>=]]> (CURRENT_DATE - INTERVAL '31 days')
<if test="companyId != null and companyId != ''">
tcfr."app_id" = #{companyId}
AND tcfr."app_id" = #{companyId}
</if>
<if test="startTime != null">
AND DATE_FORMAT(tcfr."filling_starttime",'%Y-%m-%d') <![CDATA[>=]]> #{startTime}
......
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