diff --git a/src/com/engine/organization/entity/chart/ChartPO.java b/src/com/engine/organization/entity/chart/ChartPO.java index 5495144b..46055172 100644 --- a/src/com/engine/organization/entity/chart/ChartPO.java +++ b/src/com/engine/organization/entity/chart/ChartPO.java @@ -28,7 +28,11 @@ public class ChartPO { private String fisvitual; private String hasChildren; + // 在岗数 + private Integer fonjob; + private String id; + private String key; public String getId() { if (StringUtils.isNotBlank(ftype)) { @@ -52,4 +56,8 @@ public class ChartPO { public String getFisvitual() { return StringUtils.isBlank(fisvitual) ? "0" : fisvitual; } + + public String getKey() { + return getId(); + } } diff --git a/src/com/engine/organization/entity/hrmresource/po/ResourceChartPO.java b/src/com/engine/organization/entity/hrmresource/po/ResourceChartPO.java index 63868f50..48b68d96 100644 --- a/src/com/engine/organization/entity/hrmresource/po/ResourceChartPO.java +++ b/src/com/engine/organization/entity/hrmresource/po/ResourceChartPO.java @@ -26,11 +26,11 @@ public class ResourceChartPO { private String sex; - private Integer departmentId; + private String departmentId; - private Integer subcompanyid1; + private String subcompanyid1; - private Integer jobTitle; + private String jobTitle; private Integer status; diff --git a/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml b/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml index e7d48fa6..56208857 100644 --- a/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml +++ b/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml @@ -444,8 +444,22 @@ \ No newline at end of file diff --git a/src/com/engine/organization/service/impl/ChartServiceImpl.java b/src/com/engine/organization/service/impl/ChartServiceImpl.java index 006e5580..ea2203c7 100644 --- a/src/com/engine/organization/service/impl/ChartServiceImpl.java +++ b/src/com/engine/organization/service/impl/ChartServiceImpl.java @@ -186,6 +186,7 @@ public class ChartServiceImpl extends Service implements ChartService { List dataList = new ArrayList<>(); List resourceList = new ArrayList<>(); Set jobTitleSet = new HashSet<>(); + int departmentOnJob = 0; RecordSet rs = new RecordSet(); // TODO 查询当前实际的数据 String sql; @@ -201,6 +202,7 @@ public class ChartServiceImpl extends Service implements ChartService { ChartPO chartPO = new ChartPO(); chartPO.setFtype("4"); chartPO.setFobjid(rs.getString("id")); + chartPO.setId(chartPO.getFobjid()); chartPO.setFname(rs.getString("name")); // 岗位处理后的ID chartPO.setParentId(departmentId + "_" + jobTitle); @@ -231,6 +233,8 @@ public class ChartServiceImpl extends Service implements ChartService { List chartPOS = resourceMap.get(chartPO.getId()); if (CollectionUtils.isNotEmpty(chartPOS)) { dataList.addAll(chartPOS); + chartPO.setFonjob(chartPOS.size()); + departmentOnJob += chartPO.getFonjob(); } } } @@ -246,6 +250,7 @@ public class ChartServiceImpl extends Service implements ChartService { // 岗位处理后的ID chartPO.setExpand("1"); chartPO.setHasChildren(CollectionUtils.isNotEmpty(dataList) ? "1" : "0"); + chartPO.setFonjob(departmentOnJob); dataList.add(chartPO); } diff --git a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java index 1680200d..c7d054eb 100644 --- a/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java +++ b/src/com/engine/organization/service/impl/HrmResourceServiceImpl.java @@ -438,7 +438,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic list.add(ResourceListColumns.builder().title("姓名").dataIndex("lastName").key("lastName").build()); list.add(ResourceListColumns.builder().title("性别").dataIndex("sex").key("sex").build()); list.add(ResourceListColumns.builder().title("部门").dataIndex("departmentId").key("departmentId").build()); - list.add(ResourceListColumns.builder().title("分部").dataIndex("subcompamyid1").key("subcompamyid1").build()); + list.add(ResourceListColumns.builder().title("分部").dataIndex("subcompanyid1").key("subcompanyid1").build()); list.add(ResourceListColumns.builder().title("岗位").dataIndex("jobTitle").key("jobTitle").build()); //list.add(ResourceListColumns.builder().title("状态").dataIndex("status").key("status").build()); list.add(ResourceListColumns.builder().title("手机号").dataIndex("mobile").key("mobile").build());