Commit eaef1c40 authored by 李秀明's avatar 李秀明

巡检漏查点位计算错误

parent 9a78b109
......@@ -1508,17 +1508,20 @@
UNION ALL
SELECT
ifnull( sum( p_plan_task.point_num ), 0 ) AS value,
COUNT(1) AS value,
'今日漏查点位' AS name,
'JRLCDW' AS code
FROM
p_plan_task
p_plan_task_detail ptd
<where>
finish_status = 3
AND DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if test="bizOrgCode != null and bizOrgCode != ''">
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
ptd.task_no IN (
SELECT id FROM p_plan_task pt WHERE
DATE_FORMAT( pt.check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if test="bizOrgCode != null and bizOrgCode != ''">
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
)
AND ptd.is_finish != 1
</where>
UNION ALL
......@@ -1570,17 +1573,20 @@
UNION ALL
SELECT
ifnull( sum( p_plan_task.point_num ), 0 ) AS value,
'今日漏查点位' AS name,
'JRLCDW' AS code
count(1) AS value,
'今日漏查点位' AS name,
'JRLCDW' AS code
FROM
p_plan_task
p_plan_task_detail ptd
<where>
finish_status = 3
AND DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if test="bizOrgCode != null and bizOrgCode != ''">
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
ptd.task_no IN (
SELECT id FROM p_plan_task pt WHERE
DATE_FORMAT( pt.check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if test="bizOrgCode != null and bizOrgCode != ''">
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
)
AND ptd.is_finish != 1
</where>
</select>
......
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