透视图分权、部门负责人展示

jcgj
dxfeng 2 years ago
parent 5bdade63f1
commit 02186c67bb

@ -158,7 +158,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
whereSql += " and t.ftype = 3 and fobjid = '" + bmfzr + "' ";
bmfzr = String.valueOf(200000000 + Integer.parseInt(bmfzr));
} else {
whereSql += " and t.fparentid = " + id.split("_")[0] + " and ((t.ftype =2 and t.fobjid in(" + detachUtil.getDepartmentIds() + ")) or (t.ftype = 3 ))";
whereSql += " and t.fparentid = " + id.split("_")[0] + " and ((t.ftype =1 and t.fobjid in(" + detachUtil.getCompanyIds() + ")) or (t.ftype =2 and t.fobjid in(" + detachUtil.getDepartmentIds() + ")) or (t.ftype = 3 ))";
}
}
} else {
@ -440,14 +440,16 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
manageDeptId = id;
id = id.split("_")[0];
//sql += " and ftype = 3 ";
sql += " and t.id != '" + id.split("_")[1] + "'";
if (manageDeptId.contains("_")) {
sql += " and t.id != '" + manageDeptId.split("_")[1] + "'";
}
}
DetachUtil detachUtil = new DetachUtil(user);
if (detachUtil.isDetach()) {
if ("0".equals(id)) {
sql += " and t.ftype = 1 and t.fobjid in(" + detachUtil.getCompanyIds() + ")";
sql += " and t.ftype = 1 and t.fparentid = " + id + " and t.fobjid in(" + detachUtil.getCompanyIds() + ")";
} else {
if (StringUtils.isNotBlank(bmfzr)) {
bmfzr = bmfzr.split(",")[0];
@ -455,7 +457,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
sql += " and t.ftype = 3 and fobjid = '" + bmfzr + "' ";
bmfzr = String.valueOf(200000000 + Integer.parseInt(bmfzr));
} else {
sql += " and t.fparentid = " + id + " and ((t.ftype =2 and t.fobjid in(" + detachUtil.getDepartmentIds() + ")) or (t.ftype = 3 ))";
sql += " and t.fparentid = " + id + " and ((t.ftype =1 and t.fobjid in(" + detachUtil.getCompanyIds() + ")) or (t.ftype =2 and t.fobjid in(" + detachUtil.getDepartmentIds() + ")) or (t.ftype = 3 ))";
}
}
} else {

@ -101,6 +101,9 @@ public class DetachUtil {
List<String> ids = Arrays.asList(allSupCompany.split(","));
companyIds.addAll(ids);
}
ArrayList<String> childCompIds = new ArrayList<>();
new SubCompanyComInfo().getSubCompanyLists(companyId, childCompIds);
companyIds.addAll(childCompIds);
companyIds.add(companyId);
}
}

Loading…
Cancel
Save