diff --git a/src/com/engine/organization/service/impl/OrgChartServiceImpl.java b/src/com/engine/organization/service/impl/OrgChartServiceImpl.java index 22c644f1..7e43d71b 100644 --- a/src/com/engine/organization/service/impl/OrgChartServiceImpl.java +++ b/src/com/engine/organization/service/impl/OrgChartServiceImpl.java @@ -55,7 +55,12 @@ public class OrgChartServiceImpl extends Service implements OrgChartService { // 分部分权过滤 DetachUtil detachUtil = new DetachUtil(user.getUID()); if (detachUtil.isDETACH()) { - sql = "select distinct id, fnumber, fname, ftype from jcl_org_map where (ftype = 0 or (ftype = 1 and fobjid in(" + detachUtil.getJclRoleLevels() + "))) order by ftype , id"; + String jclRoleLevels = detachUtil.getJclRoleLevels(); + if (StringUtils.isNotBlank(jclRoleLevels)) { + sql = "select distinct id, fnumber, fname, ftype from jcl_org_map where (ftype = 0 or (ftype = 1 and fobjid in(" + jclRoleLevels + "))) order by ftype , id"; + } else { + sql = "select distinct id, fnumber, fname, ftype from jcl_org_map where ftype = 0 order by ftype , id"; + } } rs.executeQuery(sql); List> companylist = new ArrayList<>();