|
|
|
@ -41,18 +41,21 @@
|
|
|
|
|
-- 任务列表
|
|
|
|
|
#sql("viewJobList")
|
|
|
|
|
select t1.*,t2.is_finish,t2.forward_progress_xiaji,t2.forward_progress_bendanwei,t2.forward_time,
|
|
|
|
|
(select t3.job_id from t_collect_job as t3 where t1.job_id=t3.parent_id and t3.bureau_id=t2.target_id limit 1) as child_job_id, -- 按道理说只有1条
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if(current_target_type_id1)
|
|
|
|
|
(select count(1) from t_collect_job_target as t3 where t3.parent_id=t1.job_id and t3.bureau_id=t2.target_id and t3.current_target_type_id=1) as forward_count, -- 县区教育局转发给了多少个单位
|
|
|
|
|
(select count(1) from t_collect_job_target as t3 where t3.parent_id=t1.job_id and t3.bureau_id=t2.target_id and t3.is_finish=1
|
|
|
|
|
and t3.current_target_type_id=1) as forward_fill_count
|
|
|
|
|
#if(current_target_type_id1)
|
|
|
|
|
(select t3.job_id from t_collect_job as t3 inner join t_collect_job_target as t2 on t3.job_id=t2.job_id where t3.parent_id=t1.job_id
|
|
|
|
|
and t2.current_target_type_id=1 limit 1) as child_job_id,
|
|
|
|
|
(select count(1) from t_collect_job_target as t3 where t3.parent_id=t1.job_id and t3.bureau_id=t2.target_id and t3.current_target_type_id=1) as forward_count, -- 县区教育局转发给了多少个单位
|
|
|
|
|
(select count(1) from t_collect_job_target as t3 where t3.parent_id=t1.job_id and t3.bureau_id=t2.target_id and t3.is_finish=1
|
|
|
|
|
and t3.current_target_type_id=1) as forward_fill_count
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
|
|
#if(current_target_type_id2)
|
|
|
|
|
(select count(1) from t_collect_job_target as t3 where t3.parent_id=t1.job_id and t3.bureau_id=t2.target_id and t3.current_target_type_id=2) as forward_count, -- 县区教育局转发给了多少个单位
|
|
|
|
|
(select count(1) from t_collect_job_target as t3 where t3.parent_id=t1.job_id and t3.bureau_id=t2.target_id and t3.is_finish=1
|
|
|
|
|
and t3.current_target_type_id=2) as forward_fill_count
|
|
|
|
|
(select t3.job_id from t_collect_job as t3 inner join t_collect_job_target as t2 on t3.job_id=t2.job_id where t3.parent_id=t1.job_id
|
|
|
|
|
and t2.current_target_type_id=2 limit 1) as child_job_id,
|
|
|
|
|
(select count(1) from t_collect_job_target as t3 where t3.parent_id=t1.job_id and t3.bureau_id=t2.target_id and t3.current_target_type_id=2) as forward_count, -- 县区教育局转发给了多少个单位
|
|
|
|
|
(select count(1) from t_collect_job_target as t3 where t3.parent_id=t1.job_id and t3.bureau_id=t2.target_id and t3.is_finish=1
|
|
|
|
|
and t3.current_target_type_id=2) as forward_fill_count
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
|
|
-- 县区教育局转发给的单位完成了多少个填报工作
|
|
|
|
|