Commit a43d629b authored by tianbo's avatar tianbo

气瓶充装检验超期率查询错误修改

parent 66a84822
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<select id="getInspectionExpiredRate" resultType="java.util.Map"> <select id="getInspectionExpiredRate" resultType="java.util.Map">
SELECT SELECT
CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((COUNT(CASE WHEN ci.next_inspection_date > now() THEN 1 END) * 100.0 / COUNT(*)), 2) END AS expiredRate CASE WHEN COUNT(*) = 0 THEN 0 ELSE ROUND((COUNT(CASE WHEN ci.next_inspection_date <![CDATA[<]]> now() THEN 1 END) * 100.0 / COUNT(*)), 2) END AS expiredRate
FROM FROM
"tz_cylinder_inspection" ci "tz_cylinder_inspection" ci
LEFT JOIN tz_cylinder_unit cu on ci.app_id = cu.app_id LEFT JOIN tz_cylinder_unit cu on ci.app_id = cu.app_id
......
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