kgdxpr 2 years ago
commit 4a7a7e0204

@ -43,7 +43,14 @@
#sql("viewJobList")
select t1.*,t2.forward_time,t2.status_code,t2.deadline_time,t2.target_id,
(select count(1) from t_collect_job_target as t3 where t3.job_id=t2.job_id and t3.bureau_id=t2.target_id) as child_count, -- 下发子任务数
(select count(1) from t_collect_job_target as t3 where t3.job_id=t2.job_id and t3.bureau_id=t2.target_id and t3.status_code in (1122,2122,2132,2232)) as child_reply_count
(select count(1) from t_collect_job_target as t3 where t3.job_id=t2.job_id and t3.bureau_id=t2.target_id
-- 1111: 单位 市 填报 已填报
-- 1211: 单位 县 填报 已填报
-- 1122: 单位 市 转发 已反馈
-- 2122人员 市 转发下级 已反馈
-- 2132: 人员 市 转发给单位 已反馈
-- 2232: 人员 县 转发本单位 已反馈
and t3.status_code in (1111,1211,1122,2122,2132,2232)) as child_reply_count
from t_collect_job as t1
inner join t_collect_job_target as t2 on t1.job_id=t2.job_id
where t2.target_id = #para(bureau_id)

Loading…
Cancel
Save