组织架构图,人员头像
This commit is contained in:
parent
14135f0e47
commit
7809f9ad3c
|
|
@ -38,6 +38,8 @@ public class ChartPO {
|
|||
private String belongto;
|
||||
// 人员工龄
|
||||
private String companyWorkYear;
|
||||
// 人员头像
|
||||
private String fleaderimg;
|
||||
|
||||
private String id;
|
||||
private String key;
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@
|
|||
|
||||
<select id="selectByDepartmentId" resultType="com.engine.organization.entity.hrmresource.po.ResourceChartPO">
|
||||
select id,workcode,lastname,sex,departmentid,subcompanyid1,jobtitle,status,mobile
|
||||
from hrmresource where departmentid = #{departmentId} and status < 4
|
||||
from hrmresource where departmentid = #{departmentId} and status < 4 order by id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue