分权BUG修复

This commit is contained in:
dxfeng 2022-11-03 16:51:56 +08:00
parent 31645b34fe
commit df0d688e6f
1 changed files with 6 additions and 1 deletions

View File

@ -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<Map<String, Object>> companylist = new ArrayList<>();