diff --git a/src/com/engine/organization/entity/chart/ChartPO.java b/src/com/engine/organization/entity/chart/ChartPO.java index 89bf1860..cca64fba 100644 --- a/src/com/engine/organization/entity/chart/ChartPO.java +++ b/src/com/engine/organization/entity/chart/ChartPO.java @@ -38,6 +38,8 @@ public class ChartPO { private String belongto; // 人员工龄 private String companyWorkYear; + // 人员头像 + private String fleaderimg; private String id; private String key; diff --git a/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml b/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml index e7d48fa6..3bbc0605 100644 --- a/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml +++ b/src/com/engine/organization/mapper/resource/HrmResourceMapper.xml @@ -445,7 +445,7 @@ \ 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 283fd751..e8b32363 100644 --- a/src/com/engine/organization/service/impl/ChartServiceImpl.java +++ b/src/com/engine/organization/service/impl/ChartServiceImpl.java @@ -12,6 +12,7 @@ import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import weaver.conn.RecordSet; import weaver.general.Util; +import weaver.hrm.resource.ResourceComInfo; import java.util.*; import java.util.stream.Collectors; @@ -212,6 +213,11 @@ public class ChartServiceImpl extends Service implements ChartService { chartPO.setHasChildren("0"); chartPO.setBelongto(Util.null2String(rs.getString("belongto"))); chartPO.setCompanyWorkYear(rs.getString("companyworkyear")); + try { + chartPO.setFleaderimg(new ResourceComInfo().getMessagerUrls(chartPO.getId())); + } catch (Exception e) { + throw new RuntimeException(e); + } resourceList.add(chartPO); jobTitleSet.add(jobTitle); @@ -243,7 +249,11 @@ public class ChartServiceImpl extends Service implements ChartService { } } // 查询部门本身 - sql = "select a.id,a.departmentname as 'name',b.bmfzr from " + DEPARTMENT_TABLE + " a left join hrmdepartmentdefined b on a.id = b.deptid where a.id = '" + departmentId + "'"; + if(hasVirtualFields){ + sql = "select a.id,a.departmentname as 'name',b.bmfzr,b.bmlx as 'isvitual' from " + DEPARTMENT_TABLE + " a left join hrmdepartmentdefined b on a.id = b.deptid where a.id = '" + departmentId + "'"; + }else { + sql = "select a.id,a.departmentname as 'name',b.bmfzr from " + DEPARTMENT_TABLE + " a left join hrmdepartmentdefined b on a.id = b.deptid where a.id = '" + departmentId + "'"; + } rs.executeQuery(sql); if(rs.next()){ String fLeader = Util.null2String(rs.getString("bmfzr")); @@ -256,6 +266,7 @@ public class ChartServiceImpl extends Service implements ChartService { chartPO.setExpand("1"); chartPO.setHasChildren(CollectionUtils.isNotEmpty(dataList) ? "1" : "0"); chartPO.setFonjob(departmentOnJob); + chartPO.setFisvitual(rs.getString("isvitual")); // 部门负责人 chartPO.setFleader(getDepartmentLeader(fLeader));