laozt 1 year ago
commit 7e7a597724

@ -254,7 +254,7 @@
<if test="riskLevel != null and riskLevel != ''"> <if test="riskLevel != null and riskLevel != ''">
and s.RISK_LEVEL in and s.RISK_LEVEL in
<foreach item="item" index="index" collection="riskLevel.split(',')" open="(" separator="," close=")"> <foreach item="item" index="index" collection="riskLevel.split(',')" open="(" separator="," close=")">
#{riskLevel} #{item}
</foreach> </foreach>
</if> </if>
<if test="standLevel != null and standLevel != ''">and s.STAND_LEVEL = #{standLevel}</if> <if test="standLevel != null and standLevel != ''">and s.STAND_LEVEL = #{standLevel}</if>

@ -274,7 +274,7 @@
MAX(law_sort) AS sort, MAX(law_sort) AS sort,
COUNT(law_areas) AS count, COUNT(law_areas) AS count,
SUM(CASE WHEN check_status = 1 THEN 1 ELSE 0 END) AS completed, SUM(CASE WHEN check_status = 1 THEN 1 ELSE 0 END) AS completed,
100 * SUM(CASE WHEN check_status = 1 THEN 1 ELSE 0 END) / COUNT(law_areas) AS completion_rate ROUND(100 * SUM(CASE WHEN check_status = 1 THEN 1 ELSE 0 END) / COUNT(law_areas)) AS completion_rate
FROM b_plan_enterprise FROM b_plan_enterprise
<where> <where>
<if test="req.plannedYear !=null and req.plannedYear!='' "> <if test="req.plannedYear !=null and req.plannedYear!='' ">
@ -302,7 +302,7 @@
MAX(law_sort) AS sort, MAX(law_sort) AS sort,
COUNT(law_areas) AS count, COUNT(law_areas) AS count,
SUM(CASE WHEN check_status = 1 THEN 1 ELSE 0 END) AS completed, SUM(CASE WHEN check_status = 1 THEN 1 ELSE 0 END) AS completed,
100 * SUM(CASE WHEN check_status = 1 THEN 1 ELSE 0 END) / COUNT(law_areas) AS completion_rate ROUND(100 * SUM(CASE WHEN check_status = 1 THEN 1 ELSE 0 END) / COUNT(law_areas)) AS completion_rate
FROM b_plan_enterprise FROM b_plan_enterprise
<where> <where>
<if test="req.plannedYear !=null and req.plannedYear!='' "> <if test="req.plannedYear !=null and req.plannedYear!='' ">

Loading…
Cancel
Save