@ -1298,6 +1298,13 @@ public class ChartServiceImpl extends Service implements ChartService {
}else{
sql="select a.id,a.subcompanyname as name,'1' as type,b.on_job_num,b.staff_num from "+SUB_COMPANY_TABLE+" a left join jcl_org_onjob b on a.id=b.data_id and b.type=1 where (a.canceled is null or a.canceled != '1') and (a.supsubcomid is null or a.supsubcomid = '0') and a.companyid = '"+fObjId+"'";
sql="select id, fnumber, fname, ftype from jcl_org_map where (ftype = 0 or (ftype = 1 and fobjid in("+jclRoleLevels+"))) ";
}else{
sql="select id, fnumber, fname, ftype from jcl_org_map where ftype = 0 ";
}
}
rs.executeQuery(sql+" and fdateend > "+DBType.get(newRecordSet().getDBType()).currentDate()+" order by ftype , id,fdateend desc ");
Set<OrgSelectItem>companySet=newHashSet<>();
intckey=0;
while(rs.next()){
OrgSelectItemitem=newOrgSelectItem();
item.setKey(ckey++);
item.setId(rs.getString("id"));
item.setFnumber(rs.getString("fnumber"));
item.setFname(rs.getString("fname"));
companySet.add(item);
List<CompanyTreePO>companyTree=newArrayList<>();
Stringsql="select id as id, id as value, subcompanyname as title, supsubcomid as pId from hrmsubcompany where (canceled is null or canceled != '1') and "+DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = '0'";
sql="select id as id, id as value, subcompanyname as title, supsubcomid as pId from hrmsubcompany where (canceled is null or canceled != '1') and "+DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = '0'";
rs.executeQuery(sql);
while(rs.next()){
companyTree.add(CompanyTreePO.builder().id(rs.getString("id")).pId(rs.getString("pId")).value(rs.getString("value")).title(rs.getString("title")).isLeaf(judgeTreeLeaf("select id from hrmsubcompany where (canceled is null or canceled != '1') and supsubcomid = ?",rs.getString("id"))).build());