@ -221,7 +221,6 @@ public class DanikorOrgChartManager {
"(case when t.supdepid != 0 and (select COUNT(id) from "+departmentTableName+" where id = t.supdepid)=0 then 0 else 1 end) as isExist"+
"(case when t.supdepid != 0 and (select COUNT(id) from "+departmentTableName+" where id = t.supdepid)=0 then 0 else 1 end) as isExist"+
hasNextSql+",t.tlevel from "+departmentTableName+" t where "+checkSupdepid+appendSql+" and (t.canceled IS NULL OR t.canceled !='1') and (t.canceled IS NULL OR t.canceled !='1') "+syncSearchSql+" order by t.subcompanyid1 asc , t.supdepid asc , t.showorder asc, t.departmentname asc";
hasNextSql+",t.tlevel from "+departmentTableName+" t where "+checkSupdepid+appendSql+" and (t.canceled IS NULL OR t.canceled !='1') and (t.canceled IS NULL OR t.canceled !='1') "+syncSearchSql+" order by t.subcompanyid1 asc , t.supdepid asc , t.showorder asc, t.departmentname asc";
sql="select a.id, a.managerid , a.lastname , b.jobtitlename, ( select count(1) from HrmResource_back where managerid = a.id and sync_date = '"+syncDate+"') subordinate from HrmResource_back a left join HrmJobTitles b on a.jobtitle = b.id where sync_date = '"+syncDate+"'";
}else{
sql="select a.id, a.managerid , a.lastname , b.jobtitlename, ( select count(1) from HrmResource where managerid = a.id) subordinate from HrmResource a left join HrmJobTitles b on a.jobtitle = b.id";