中远重工正式员工岗位建模表调整 图像调整

上海中远重工组织架构图
Chengliang 1 year ago
parent d6aec4d72d
commit ad8a8bed37

@ -34,13 +34,14 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
Map<String, Object> dataMap = new HashMap<>(4); Map<String, Object> dataMap = new HashMap<>(4);
List<ResourceListColumns> resourceListColumns = getTableColumns(); List<ResourceListColumns> resourceListColumns = getTableColumns();
List<Integer> allSupDepartment = getAllSupDepartment(param.getDepartmentId()); List<Integer> allSupDepartment = getAllSupDepartment(param.getDepartmentId());
List<ResourceChartPO> resourceChartPOS = new ArrayList<>();
resourceChartPOS.addAll(selectNbPerson(allSupDepartment)); List<ResourceChartPO> resourceChartNb = new ArrayList<>(selectNbPerson(allSupDepartment));
resourceChartPOS.addAll(selectWbPerson(allSupDepartment)); List<ResourceChartVO> resourceChartVOS = convertToVO(resourceChartNb,"1");
List<ResourceChartPO> resourceChartWb = new ArrayList<>(selectWbPerson(allSupDepartment));
resourceChartVOS.addAll(convertToVO(resourceChartWb,"2"));
List<ResourceChartVO> resourceChartVOS = convertToVO(resourceChartPOS);
dataMap.put("columns", resourceListColumns); dataMap.put("columns", resourceListColumns);
dataMap.put("dataSource", resourceChartVOS); dataMap.put("dataSource", resourceChartVOS);
return dataMap; return dataMap;
@ -75,10 +76,11 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
//人员 //人员
List<Integer> allSupDepartment = getAllSupDepartment(param.getDepartmentId()); List<Integer> allSupDepartment = getAllSupDepartment(param.getDepartmentId());
List<ResourceChartPO> resourceChartPOS = new ArrayList<>(); List<ResourceChartPO> resourceChartNb = new ArrayList<>(selectNbPerson(allSupDepartment));
resourceChartPOS.addAll(selectNbPerson(allSupDepartment)); List<ResourceChartVO> resourceChartVOS = convertToVO(resourceChartNb,"1");
resourceChartPOS.addAll(selectWbPerson(allSupDepartment));
List<ResourceChartVO> resourceChartVOS = convertToVO(resourceChartPOS); List<ResourceChartPO> resourceChartWb = new ArrayList<>(selectWbPerson(allSupDepartment));
resourceChartVOS.addAll(convertToVO(resourceChartWb,"2"));
resourceChartVOS.forEach(item -> { resourceChartVOS.forEach(item -> {
ChartPO chartPO = getResourceChartPO(item,departmentChartPO.getId()); ChartPO chartPO = getResourceChartPO(item,departmentChartPO.getId());
@ -209,7 +211,7 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
* @return * @return
*/ */
@SneakyThrows @SneakyThrows
private List<ResourceChartVO> convertToVO(List<ResourceChartPO> resourceChartPOS) { private List<ResourceChartVO> convertToVO(List<ResourceChartPO> resourceChartPOS,String type) {
List<ResourceChartVO> resourceChartVOS = new ArrayList<>(); List<ResourceChartVO> resourceChartVOS = new ArrayList<>();
DepartmentComInfo departmentComInfo = new DepartmentComInfo(); DepartmentComInfo departmentComInfo = new DepartmentComInfo();
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo(); SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
@ -224,7 +226,7 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
resourceChartVO.setSex("1".equals(item.getSex()) ? "女" : "男"); resourceChartVO.setSex("1".equals(item.getSex()) ? "女" : "男");
resourceChartVO.setDepartmentName(departmentComInfo.getDepartmentName(departmentId)); resourceChartVO.setDepartmentName(departmentComInfo.getDepartmentName(departmentId));
resourceChartVO.setSubcompanyName(subCompanyname); resourceChartVO.setSubcompanyName(subCompanyname);
resourceChartVO.setJobTitle(getJobBrowserName(item.getJobBrowser())); resourceChartVO.setJobTitle(getJobBrowserName(item.getJobBrowser(),type));
resourceChartVO.setStatus(item.getStatus()); resourceChartVO.setStatus(item.getStatus());
resourceChartVO.setMobile(item.getMobile()); resourceChartVO.setMobile(item.getMobile());
resourceChartVOS.add(resourceChartVO); resourceChartVOS.add(resourceChartVO);
@ -236,14 +238,23 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
/** /**
* *
* @param code * @param code
* @param code
* @return * @return
*/ */
private String getJobBrowserName(String code){ private String getJobBrowserName(String code,String type){
String gwmc;
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
if ("1".equals(type)) {
rs.executeQuery("select gwmc from uf_zsyggwbd where id = ?",code);
rs.next();
gwmc = Util.null2String(rs.getString("gwmc"));
}else {
rs.executeQuery("select gwmc from uf_gwmc where gwbm = ?",code); rs.executeQuery("select gwmc from uf_gwmc where gwbm = ?",code);
rs.next(); rs.next();
return Util.null2String(rs.getString("gwmc")); gwmc = Util.null2String(rs.getString("gwmc"));
}
return gwmc;
} }
/** /**
@ -285,11 +296,24 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
chartPO.setExpand("1"); chartPO.setExpand("1");
chartPO.setHasChildren("0"); chartPO.setHasChildren("0");
try { try {
chartPO.setFleaderimg(new ResourceComInfo().getMessagerUrls(chartPO.getId())); String resourceId = getResourceIdByWorkCode(item.getWorkCode());
chartPO.setFleaderimg(new ResourceComInfo().getMessagerUrls(resourceId));
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
return chartPO; return chartPO;
} }
/**
* id
* @param workCode
* @return
*/
private String getResourceIdByWorkCode(String workCode) {
RecordSet rs = new RecordSet();
rs.executeQuery("select id from hrmresource where workcode = ?",workCode);
rs.next();
return Util.null2String(rs.getString("id"));
}
} }

Loading…
Cancel
Save