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

fix: BUG#21844 业务管理>消防巡查>二级页面,巡查用时数据不一致

parent e609bf0f
...@@ -1786,7 +1786,17 @@ ...@@ -1786,7 +1786,17 @@
IFNULL(SUM( t.point_num ), 0) AS allCount, IFNULL(SUM( t.point_num ), 0) AS allCount,
IFNULL(SUM(IF(t.finish_status = 3, t.point_num, 0)), 0) AS missPointCount, IFNULL(SUM(IF(t.finish_status = 3, t.point_num, 0)), 0) AS missPointCount,
IFNULL(SUM(IF(t.finish_status = 2, t.point_num, 0)), 0) AS finishCount, IFNULL(SUM(IF(t.finish_status = 2, t.point_num, 0)), 0) AS finishCount,
IFNULL((SELECT SUM(TIMESTAMPDIFF(MINUTE, t.begin_time, d.executor_date)) FROM p_plan_task_detail d where d.task_no = t.id and t.org_code LIKE LEFT(t.org_code, 18)), 0) AS totalTime IFNULL(
(
SELECT
SUM(TIMESTAMPDIFF(MINUTE, t.begin_time, d.executor_date))
FROM
p_plan_task t
LEFT JOIN p_plan_task_detail d ON d.task_no = t.id
WHERE
t.finish_status = 2 AND org_code LIKE LEFT(t.org_code, 18)
AND DATE_FORMAT( t.check_date, '%Y-%m-%d' ) = #{date}
), 0) AS totalTime
FROM FROM
p_plan_task t p_plan_task t
LEFT JOIN cb_org_usr u on u.biz_org_code = left(t.org_code, 18) LEFT JOIN cb_org_usr u on u.biz_org_code = left(t.org_code, 18)
......
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