Merge pull request '组织架构图分权BUG修复' (#232) from feature/dxf into develop

Reviewed-on: #232
pull/233/head
dxfeng 1 year ago
commit 2d46b33600

@ -1310,9 +1310,11 @@ public class ChartServiceImpl extends Service implements ChartService {
// 一级分部数据分权处理
if (isRealTime && user.getUID() != 1 && isRealDimension) {
DetachUtil detachUtil = new DetachUtil(user);
if(detachUtil.isDETACH()) {
String ids = detachUtil.getJclRoleLevels();
sql = sql + " and a.id in (" + ids + ")";
}
}
break;
case "1":
if (hasVirtualFields) {

@ -69,9 +69,11 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
boolean isRealTime = StringUtils.isBlank(id) || "0".equals(id);
if (isRealTime && user.getUID() != 1 && isRealDimension) {
DetachUtil detachUtil = new DetachUtil(user);
if(detachUtil.isDETACH()) {
String ids = detachUtil.getJclRoleLevels();
sql = sql + " and id in (" + ids + ")";
}
}
rs.executeQuery(sql);
while (rs.next()) {
@ -106,11 +108,13 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
judgeTreeLeafSql = sql;
if (isRealTime && user.getUID() != 1 && isRealDimension) {
DetachUtil detachUtil = new DetachUtil(user);
if (detachUtil.isDETACH()) {
String ids = detachUtil.getJclRoleLevels();
if ("0".equals(subcompany)) {
sql = sql + " and id in (" + ids + ")";
}
}
}
if (StringUtils.isNotBlank(fclass) && !"0".equals(fclass)) {
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(new RecordSet().getDBType()).ifNull("supsubcomid", "0") + " = ? and companyid = '" + fclass + "'";
}

Loading…
Cancel
Save