left join jcl_org_job b ON a.JOBTITLE = b.ec_jobTitle
left join jcl_org_job b ON a.JOBTITLE = b.ec_jobTitle and a.subcompanyid1=b.ec_company and a.departmentid=b.ec_department
left join HrmJobTitles c on b.ec_jobTitle = c.id
left join cus_fielddata d on a.id = d.id and d.scope='HrmCustomFieldByInfoType' and d.scopeid=3
left join jcl_org_level e on d.field3=e.id
@ -189,8 +189,11 @@
where plan_id in (select id from JCL_ORG_STAFFPLAN
where time_start<=TO_DATE(to_char(SYSDATE,'yyyy-MM-dd'),'yyyy-MM-dd') and time_end>TO_DATE(to_char(SYSDATE,'yyyy-MM-dd'),'yyyy-MM-dd')) and delete_type=0
group by job_id) e on a.id=e.job_id
left join (select jobtitle,count(1) fcnt from hrmresource group by jobtitle) f
on f.JOBTITLE=a.ec_jobTitle
left join ( select c.id,count(1) fcnt from hrmresource a
left join Hrmjobtitles b on a.jobtitle=b.id
left join jcl_org_job c on b.id=c.ec_jobtitle and a.subcompanyid1=c.ec_company and a.departmentid=c.ec_department
group by c.id) f
on f.id=a.id
left join HrmJobTitles g on a.ec_jobTitle = g.id
where nvl(a.delete_type,0) <> 1 and nvl(a.forbidden_tag,0) <> 1