Merge pull request '组织架构图,不展示手机、地址、部门' (#40) from feature/dxf into develop

Reviewed-on: http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization/pulls/40
This commit is contained in:
dxfeng 2022-11-03 14:55:45 +08:00
commit 7988cf6c2a
1 changed files with 14 additions and 17 deletions

View File

@ -322,23 +322,20 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
currentList.add(item);
}
for (Map<String, Object> stringObjectMap : currentList) {
if ("4".equals(stringObjectMap.get("ftype"))) { // 员工信息
rs.executeQuery("select id, mobile, homeaddress from hrmresource where id = ? ", stringObjectMap.get("fnumber"));
if (rs.next()) {
stringObjectMap.put("mobile", rs.getString("mobile"));
stringObjectMap.put("address", rs.getString("homeaddress"));
}
rs.executeQuery("select departmentname from hrmresource hrm \n" +
"left join hrmdepartment d\n" +
"on hrm.departmentid = d.id\n" +
"where hrm.id = ? ", stringObjectMap.get("fnumber"));
if (rs.next()) {
stringObjectMap.put("department", rs.getString("departmentname"));
}
}
}
//for (Map<String, Object> stringObjectMap : currentList) {
// if ("4".equals(stringObjectMap.get("ftype"))) { // 员工信息
// rs.executeQuery("select id, mobile, home_address from jcl_org_hrmresource where id = ? ", stringObjectMap.get("fobjid"));
// if (rs.next()) {
// stringObjectMap.put("mobile", rs.getString("mobile"));
// stringObjectMap.put("address", rs.getString("home_address"));
// }
// rs.executeQuery("select dept_name from jcl_org_hrmresource hrm left join jcl_org_dept d on hrm.department_id = d.id where hrm.id =? ", stringObjectMap.get("fobjid"));
// if (rs.next()) {
// stringObjectMap.put("department", rs.getString("dept_name"));
// }
//
// }
//}
Map<String, Object> result = new HashMap<>();
result.put("api_status", true);