main
黄海 2 years ago
parent d3e56768ff
commit 5d7f060d05

@ -2,10 +2,10 @@
-- 获取任务列表
#sql("getJobList")
select t1.*,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.status_code in (1111,1211,2311,2132)) as finish_count,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.status_code in (1110,1111,1210,1211,2310,2311,2130,2131,2132)) as total_count,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.status_code in (1120,1121,1122,2120,2121,2122)) as forward_count, --
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.status_code in (1122,2122)) as forward_finish_count, --
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.bureau_id=t1.bureau_id and t2.status_code in (1111,1211,2311,2132)) as finish_count,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.bureau_id=t1.bureau_id and t2.status_code in (1110,1111,1210,1211,2310,2311,2130,2131,2132)) as total_count,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.bureau_id=t1.bureau_id and t2.status_code in (1120,1121,1122,2120,2121,2122)) as forward_count, --
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.bureau_id=t1.bureau_id and t2.status_code in (1122,2122)) as forward_finish_count, --
(select count(1) from t_collect_job_sheet as t2 where t2.job_id=t1.job_id and t2.is_check=1) as already_check_sheet,
(select count(1) from t_collect_job_sheet as t2 where t2.job_id=t1.job_id) as all_sheet,
(select t2.deadline_time from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.bureau_id=t1.bureau_id limit 1) as deadline_time

Loading…
Cancel
Save