diff --git a/src/com/engine/junchuang/service/OrgChartServiceImpl.java b/src/com/engine/junchuang/service/OrgChartServiceImpl.java index 2264435..751c401 100644 --- a/src/com/engine/junchuang/service/OrgChartServiceImpl.java +++ b/src/com/engine/junchuang/service/OrgChartServiceImpl.java @@ -39,9 +39,8 @@ public class OrgChartServiceImpl extends Service implements OrgChartService { DetachUtil detachUtil = new DetachUtil(user); if (detachUtil.isDetach()) { String companyIds = detachUtil.getCompanyIds(); - String departmentIds = detachUtil.getDepartmentIds(); - if (StringUtils.isNotBlank(departmentIds)) { - sql = "select id, fnumber, fname, ftype from junc_org_map where (ftype = 0 or (ftype = 1 and fobjid in(" + companyIds + ")) or (ftype = 2 and fobjid in(" + departmentIds + "))) "; + if (StringUtils.isNotBlank(companyIds)) { + sql = "select id, fnumber, fname, ftype from junc_org_map where (ftype = 0 or (ftype = 1 and fobjid in(" + companyIds + "))) "; } else { sql = "select id, fnumber, fname, ftype from junc_org_map where ftype = 0 "; }