From df0d688e6f3feda16a1f0cf03ed422a18891687f Mon Sep 17 00:00:00 2001 From: dxfeng Date: Thu, 3 Nov 2022 16:51:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E6=9D=83BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/service/impl/OrgChartServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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<>();