中远组织架构图新增需求开发

上海中远重工组织架构图
Chengliang 2 months ago
parent a0675f89a3
commit 4c6527a7c0

@ -61,6 +61,15 @@ public class ChartPO {
//岗位名称
private String jobTitle;
//部门类型 0部门 1科室
private Integer deptType;
//卡片跳转链接
private String pcUrl;
//用工性质
private String personType;
public String getId() {
if (StringUtils.isNotBlank(ftype)) {
switch (ftype) {

@ -26,6 +26,7 @@ public class ModeHrmResourceParam {
private String versionId;
private String deptLevel;
}

@ -30,6 +30,8 @@ public class ResourceChartPO {
private Integer subcompanyid1;
private Integer deptType;
private Integer jobTitle;
private String jobBrowser;
@ -38,4 +40,8 @@ public class ResourceChartPO {
private String mobile;
private String pcUrl;
private String personType;
}

@ -28,6 +28,8 @@ public class ResourceChartVO {
private String departmentName;
private Integer deptType;
private String subcompanyName;
private String jobTitle;
@ -38,6 +40,10 @@ public class ResourceChartVO {
private Long key;
private String pcUrl;
private String personType;
public Long getKey() {
return id;
}

@ -383,9 +383,7 @@ public class ChartServiceImpl extends Service implements ChartService {
String nbValue = Util.null2String(params.get("nbValue"));
String wbValue = Util.null2String(params.get("wbValue"));
String versionId = Util.null2String(params.get("versionId"));
String deptLevel = Util.null2String(params.get("deptLevel"));
String departmentId = rootId.split("_")[1];
@ -394,6 +392,7 @@ public class ChartServiceImpl extends Service implements ChartService {
.wbValue(wbValue)
.departmentId(departmentId)
.versionId(versionId)
.deptLevel(deptLevel)
.build();
String detauleType = Util.null2String(params.get("detailType"));

@ -11,6 +11,7 @@ import com.engine.organization.entity.hrmresource.vo.ResourceChartVO;
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
import com.engine.organization.service.ModeHrmResourceService;
import com.engine.organization.util.db.MapperProxyFactory;
import com.weaver.general.BaseBean;
import lombok.SneakyThrows;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
@ -38,7 +39,7 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
List<Integer> allSupDepartment = getAllSupDepartment(param.getDepartmentId());
List<ResourceChartVO> resourceChartVOS = new ArrayList<>();
if ("0".equals(param.getVersionId())) {
List<ResourceChartPO> resourceChartNb = new ArrayList<>(selectNbPerson(allSupDepartment,param.getNbValue()));
List<ResourceChartPO> resourceChartNb = new ArrayList<>(selectNbPerson(allSupDepartment,param.getNbValue(),param.getDeptLevel(),param.getDepartmentId()));
resourceChartVOS.addAll(convertToVO(resourceChartNb,"1"));
List<ResourceChartPO> resourceChartWb = new ArrayList<>(selectWbPerson(allSupDepartment,param.getWbValue()));
resourceChartVOS.addAll(convertToVO(resourceChartWb,"2"));
@ -128,7 +129,7 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
//人员
List<Integer> allSupDepartment = getAllSupDepartment(param.getDepartmentId());
List<ResourceChartPO> resourceChartNb = new ArrayList<>(selectNbPerson(allSupDepartment,param.getNbValue()));
List<ResourceChartPO> resourceChartNb = new ArrayList<>(selectNbPerson(allSupDepartment,param.getNbValue(),param.getDeptLevel(),param.getDepartmentId()));
List<ResourceChartVO> resourceChartVOS = convertToVO(resourceChartNb,"1");
List<ResourceChartPO> resourceChartWb = new ArrayList<>(selectWbPerson(allSupDepartment,param.getWbValue()));
@ -156,7 +157,7 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
RecordSet rs = new RecordSet();
int totalCount = 0;
rs.executeQuery("select count(1) as total_count from uf_zsygrzbdd where zt < 4 and bm in ("+departmentIds+")");
rs.executeQuery("select count(1) as total_count from uf_zsygrzbdd where zt = 1 and bm in ("+departmentIds+")");
if (rs.next()) {
totalCount = Util.getIntValue(rs.getString("total_count"));
}
@ -175,9 +176,10 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
List<DetailConditionVO> nbCondition = new ArrayList<>();
List<String> nbValue = new ArrayList<>();
List<DetailConditionVO> wbCondition = new ArrayList<>();
List<String> wbValue = new ArrayList<>();
//内部职工
rs.executeQuery("select mc,bh from uf_ygxz where sfqy = 0 and syfw = 0");
rs.executeQuery("select mc,bh from uf_ygxz where sfqy = 0 and syfw = 0 and sfxsss = 1");
while (rs.next()) {
String mc = Util.null2String(rs.getString("mc"));
String bh = Util.null2String(rs.getString("bh"));
@ -186,17 +188,21 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
}
//外部人员
rs.executeQuery("select mc,bh from uf_ygxz where sfqy = 0 and syfw = 1");
rs.executeQuery("select mc,bh from uf_ygxz where sfqy = 0 and syfw = 1 and sfxsss = 1");
while (rs.next()) {
String mc = Util.null2String(rs.getString("mc"));
String bh = Util.null2String(rs.getString("bh"));
wbCondition.add(DetailConditionVO.builder().label(mc).value(bh).build());
wbValue.add(bh);
}
Map<String,Object> datas = new HashMap<>(4);
datas.put("nbCondition",nbCondition);
datas.put("nbValue",nbValue);
datas.put("wbCondition",wbCondition);
datas.put("wbValue",wbValue);
return datas;
}
@ -206,7 +212,7 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
* @param allSupDepartment
* @return
*/
private List<ResourceChartPO> selectNbPerson(Collection<Integer> allSupDepartment,String workType) {
private List<ResourceChartPO> selectNbPerson(Collection<Integer> allSupDepartment,String workType,String depetLevel,String departmentId) {
List<ResourceChartPO> resourceChartPOS = new ArrayList<>();
if (StringUtils.isEmpty(workType)){
return resourceChartPOS;
@ -216,19 +222,35 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
.map(s -> "'" + s + "'")
.collect(Collectors.joining(","));
BaseBean bb = new BaseBean();
String modeId = bb.getPropValue("hrmOrganization", "nbmodeId");
String formId = bb.getPropValue("hrmOrganization", "nbformId");
String customid = bb.getPropValue("hrmOrganization", "nbcustomid");
RecordSet rs = new RecordSet();
String join = CollectionUtil.join(allSupDepartment, ",");
String sql = "select id,gh,xm,xb,bm,ks,gw,sjhm,ygxz from uf_zsygrzbdd where zt = 1 and zgzt = 1 and bm = "+departmentId+" and ygxz in ("+workType+")";
//非一级部门情况下使用科室字段
if (!"0".equals(depetLevel)) {
sql = "select id,gh,xm,xb,bm,ks,gw,sjhm,ygxz from uf_zsygrzbdd where zt = 1 and zgzt = 1 and ks in ("+join+") and ygxz in ("+workType+")";
}
rs.executeQuery("select id,gh,xm,xb,bm,gw,sjhm from uf_zsygrzbdd where zt < 4 and bm in ("+join+") and ygxz in ("+workType+")");
rs.executeQuery(sql);
while (rs.next()) {
int bm = Util.getIntValue(rs.getString("bm"));
int ks = Util.getIntValue(rs.getString("ks"));
int id = Util.getIntValue(rs.getString("id"));
ResourceChartPO build = ResourceChartPO.builder()
.id((long) Util.getIntValue(rs.getString("id")))
.id((long) id)
.workCode(Util.null2String(rs.getString("gh")))
.lastName(Util.null2String(rs.getString("xm")))
.sex(Util.null2String(rs.getString("xb")))
.departmentId(Util.getIntValue(rs.getString("bm")))
.departmentId(ks != -1 ? ks : bm)
.deptType(ks != -1 ? 1 : 0)
.jobBrowser(Util.null2String(rs.getString("gw")))
.mobile(Util.null2String(rs.getString("sjhm")))
.pcUrl(String.format("/spa/cube/index.html#/main/cube/card?type=0&modeId={}&formId={}&billid={}&opentype=0&customid={}&viewfrom=fromsearchlist",modeId,formId,id,customid))
.personType(Util.null2String(rs.getString("ygxz")))
.build();
resourceChartPOS.add(build);
}
@ -251,18 +273,27 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
.map(s -> "'" + s + "'")
.collect(Collectors.joining(","));
BaseBean bb = new BaseBean();
String modeId = bb.getPropValue("hrmOrganization", "wbmodeId");
String formId = bb.getPropValue("hrmOrganization", "wbformId");
String customid = bb.getPropValue("hrmOrganization", "wbcustomid");
RecordSet rs = new RecordSet();
String join = CollectionUtil.join(allSupDepartment, ",");
rs.executeQuery("select id,gh,xm,xb,bmbz,gw,lxfs from uf_qlwbrydngljmb where zt < 4 and bmbz in ("+join+") and ygxz in ("+workType+")");
rs.executeQuery("select id,gh,xm,xb,bmbz,gw,lxfs,ks,ygxz from uf_qlwbrydngljmb where zt < 4 and ks in ("+join+") and ygxz in ("+workType+")");
while (rs.next()) {
int id = Util.getIntValue(rs.getString("id"));
ResourceChartPO build = ResourceChartPO.builder()
.id((long) Util.getIntValue(rs.getString("id")))
.id((long) id)
.workCode(Util.null2String(rs.getString("gh")))
.lastName(Util.null2String(rs.getString("xm")))
.sex(Util.null2String(rs.getString("xb")))
.departmentId(Util.getIntValue(rs.getString("bmbz")))
.departmentId(Util.getIntValue(rs.getString("ks")))
.deptType(1)
.jobBrowser(Util.null2String(rs.getString("gw")))
.mobile(Util.null2String(rs.getString("lxfs")))
.pcUrl(String.format("/spa/cube/index.html#/main/cube/card?type=0&modeId={}&formId={}&billid={}&opentype=0&customid={}&viewfrom=fromsearchlist",modeId,formId,id,customid))
.personType(Util.null2String(rs.getString("ygxz")))
.build();
resourceChartPOS.add(build);
}
@ -330,7 +361,11 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
resourceChartVO.setJobTitle(getJobBrowserName(item.getJobBrowser(),type));
resourceChartVO.setStatus(item.getStatus());
resourceChartVO.setMobile(item.getMobile());
resourceChartVO.setDeptType(item.getDeptType());
resourceChartVO.setPcUrl(item.getPcUrl());
resourceChartVO.setPersonType(item.getPersonType());
resourceChartVOS.add(resourceChartVO);
}
return resourceChartVOS;
}
@ -405,6 +440,9 @@ public class ModeHrmResourceServiceImpl extends Service implements ModeHrmResour
chartPO.setJobTitle(item.getJobTitle());
chartPO.setExpand("1");
chartPO.setHasChildren("false");
chartPO.setDeptType(item.getDeptType());
chartPO.setPcUrl(item.getPcUrl());
chartPO.setPersonType(item.getPersonType());
try {
String resourceId = getResourceIdByWorkCode(item.getWorkCode());
chartPO.setFleaderimg(new ResourceComInfo().getMessagerUrls(resourceId));

Loading…
Cancel
Save