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'";
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());
}
result.put("api_status",true);
result.put("fclasslist",fclasslist);
result.put("companyTree",companyTree);
@ -116,7 +114,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
sql="select id as id, id as value, subcompanyname as title, supsubcomid as pId from hrmsubcompanyvirtual where (canceled is null or canceled != '1') and " +DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = ? and companyid = '"+fclass+"'";
sql="select id as id, id as value, subcompanyname as title, supsubcomid as pId,showorder from hrmsubcompanyvirtual where (canceled is null or canceled != '1') and " +DBType.get(newRecordSet().getDBType()).ifNull("supsubcomid","0")+" = ? and companyid = '"+fclass+"'";
}
}else{
sql="select subcompanyid as id, id as value, subcompanyname as title, supsubcompanyid as pId from jcl_chart_subcompany where (canceled is null or canceled != '1') and "+DBType.get(newRecordSet().getDBType()).ifNull("supsubcompanyid","0")+" = ? ";
@ -129,7 +127,8 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {