修复组织架构图跳转问题

pull/217/MERGE^2
Chengliang 3 years ago
parent 14778fefae
commit 31ab137195

@ -144,7 +144,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
} }
private void findCompanyItemByParantId(String id, int currentLevel, String level, RecordSet rs, List<Map<String, Object>> list, String whereSql, boolean expand) { private void findCompanyItemByParantId(String id, int currentLevel, String level, RecordSet rs, List<Map<String, Object>> list, String whereSql, boolean expand) {
rs.executeQuery("select id, fname, ftype, fparentid, fnumber from jcl_org_map " + whereSql + " and fparentid = " + id); rs.executeQuery("select id, fname, ftype, fparentid,fobjid,fecid,fnumber from jcl_org_map " + whereSql + " and fparentid = " + id);
List<Map<String, Object>> currentList = new ArrayList<>(); List<Map<String, Object>> currentList = new ArrayList<>();
while (rs.next()) { while (rs.next()) {
Map<String, Object> item = new HashMap<>(); Map<String, Object> item = new HashMap<>();
@ -153,6 +153,8 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
item.put("ftype", rs.getString("ftype")); item.put("ftype", rs.getString("ftype"));
item.put("parentId", rs.getString("fparentid")); item.put("parentId", rs.getString("fparentid"));
item.put("fnumber", rs.getString("fnumber")); item.put("fnumber", rs.getString("fnumber"));
item.put("fobjid", rs.getString("fobjid"));
item.put("fecid", rs.getString("fecid"));
item.put("expand", expand ? "1" : "0"); item.put("expand", expand ? "1" : "0");
item.put("hasChildren", hasChildren(rs.getString("id"), true)); item.put("hasChildren", hasChildren(rs.getString("id"), true));
currentList.add(item); currentList.add(item);
@ -203,7 +205,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
@Override @Override
public Map<String, Object> getUserData(Map<String, Object> request2Map, User user) { public Map<String, Object> getUserData(Map<String, Object> request2Map, User user) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
boolean hasRight = HasRightUtil.hasRight(user, USER_RIGHT, true); boolean hasRight = HasRightUtil.hasRight(user, USER_RIGHT, true);
result.put("hasRight", hasRight); result.put("hasRight", hasRight);
if (!hasRight) { if (!hasRight) {
return result; return result;
@ -244,6 +246,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
item.put("expand", "1"); item.put("expand", "1");
item.put("fnumber", rs.getString("fnumber")); item.put("fnumber", rs.getString("fnumber"));
item.put("fleader", rs.getString("fleader")); item.put("fleader", rs.getString("fleader"));
item.put("fobjid",rs.getString("fobjid"));
list.add(item); list.add(item);
} }
@ -337,7 +340,7 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
private void findUserItemByParantId(String id, int currentLevel, String level, RecordSet rs, List<Map<String, Object>> list, String whereSql, boolean expand) { private void findUserItemByParantId(String id, int currentLevel, String level, RecordSet rs, List<Map<String, Object>> list, String whereSql, boolean expand) {
rs.executeQuery("select t.id, t.fname, t.ftype, t.fparentid, t.fleadername, t.fleaderimg, t.fleaderjob, t.fplan, t.fonjob, t.fnumber from jcl_org_map t " + whereSql + " and t.fparentid = " + id); rs.executeQuery("select t.id, t.fname, t.ftype, t.fparentid, t.fleadername, t.fleaderimg, t.fleaderjob, t.fplan, t.fonjob, t.fnumber,t.fobjid,fecid from jcl_org_map t " + whereSql + " and t.fparentid = " + id);
List<Map<String, Object>> currentList = new ArrayList<>(); List<Map<String, Object>> currentList = new ArrayList<>();
while (rs.next()) { while (rs.next()) {
Map<String, Object> item = new HashMap<>(); Map<String, Object> item = new HashMap<>();
@ -352,6 +355,8 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
item.put("fonjob", rs.getString("fonjob")); item.put("fonjob", rs.getString("fonjob"));
item.put("fnumber", rs.getString("fnumber")); item.put("fnumber", rs.getString("fnumber"));
item.put("expand", expand ? "1" : "0"); item.put("expand", expand ? "1" : "0");
item.put("fobjid", rs.getString("fobjid"));
item.put("fecid", rs.getString("fecid"));
item.put("hasChildren", hasChildren(rs.getString("id"), false)); item.put("hasChildren", hasChildren(rs.getString("id"), false));
currentList.add(item); currentList.add(item);
} }

Loading…
Cancel
Save