diff --git a/src/com/engine/organization/entity/chart/ChartPO.java b/src/com/engine/organization/entity/chart/ChartPO.java index c4fd3cea..c4bc9e47 100644 --- a/src/com/engine/organization/entity/chart/ChartPO.java +++ b/src/com/engine/organization/entity/chart/ChartPO.java @@ -58,6 +58,14 @@ public class ChartPO { // 编制数 private int staffNum; + //是否关键岗 + private Integer keyJob; + + //bk人员 + private String bkPerson; + + + public String getId() { if (StringUtils.isNotBlank(ftype)) { switch (ftype) { diff --git a/src/com/engine/organization/service/impl/ChartServiceImpl.java b/src/com/engine/organization/service/impl/ChartServiceImpl.java index 957a0852..7cee7924 100644 --- a/src/com/engine/organization/service/impl/ChartServiceImpl.java +++ b/src/com/engine/organization/service/impl/ChartServiceImpl.java @@ -218,6 +218,7 @@ public class ChartServiceImpl extends Service implements ChartService { return result; } + @SneakyThrows @Override public Map getDepartmentDetail(Map params) { String rootId = Util.null2String(params.get("rootId")); @@ -303,7 +304,7 @@ public class ChartServiceImpl extends Service implements ChartService { // 查询部门下的岗位 if (isRealTime) { String subcompanyid1 = new DepartmentComInfo().getSubcompanyid1(departmentId); - sql = "select a.id,a.jobtitlename as name from hrmjobtitles a inner join jcl_org_job b on a.id = b.ec_jobtitle and (b.delete_type is null or b.delete_type = 0) where b.ec_department = '" + departmentId + "' and b.ec_company='" + subcompanyid1 + "'"; + sql = "select a.id,a.jobtitlename as name,b.bkhrm,b.is_key from hrmjobtitles a inner join jcl_org_job b on a.id = b.ec_jobtitle and (b.delete_type is null or b.delete_type = 0) where b.ec_department = '" + departmentId + "' and b.ec_company='" + subcompanyid1 + "'"; } else { rs.executeQuery("select subcompanyid from jcl_chart_department where departmentid = '" + departmentId + "' and versionid = " + versionId); rs.next(); @@ -311,6 +312,9 @@ public class ChartServiceImpl extends Service implements ChartService { sql = "select jobid as id ,jobname as name from jcl_chart_job where departmentid = '" + departmentId + "' and subcompanyid = '" + subcompanyid + "' and versionid = " + versionId; } rs.executeQuery(sql); + + ResourceComInfo rc = new ResourceComInfo(); + while (rs.next()) { ChartPO chartPO = new ChartPO(); chartPO.setFtype("3"); @@ -321,6 +325,11 @@ public class ChartServiceImpl extends Service implements ChartService { chartPO.setParentId(rootId); chartPO.setExpand("1"); chartPO.setHasChildren("1"); + if (isRealTime) { + chartPO.setKeyJob(Util.getIntValue(rs.getString("is_key"))); + chartPO.setBkPerson(rc.getLastname(Util.null2String(rs.getString("bkhrm")))); + } + jobTitleList.add(chartPO); }