分部、部门联调。BUG修复

pull/88/head
dxfeng 3 years ago
parent a1f2c9d1ac
commit f89ebdb965

@ -38,7 +38,7 @@ public class DepartmentBO {
.subCompanyName(0 == e.getSubCompanyId1() ? "" : MapperProxyFactory.getProxy(CompMapper.class).listById(e.getSubCompanyId1()).getSubCompanyName())
.supDepId(e.getSupDepId())
.supDepName(null == poMaps.get(e.getSupDepId()) ? "" : poMaps.get(e.getSupDepId()).getDepartmentName())
// .deptPrincipal(getEmployeeNameById(e.getDeptPrincipal()))
.deptPrincipal(getEmployeeNameById(e.getId()))
.showOrder(null == e.getShowOrder() ? 0 : e.getShowOrder())
.canceled(null == e.getCanceled() ? 0 : e.getCanceled())
.build()).collect(Collectors.toList());
@ -82,6 +82,7 @@ public class DepartmentBO {
return DepartmentPO
.builder()
.id(param.getId() == null ? 0 : param.getId())
.departmentId(param.getDepartmentId())
.departmentMark(param.getDepartmentMark())
.departmentName(param.getDepartmentName())
.subCompanyId1(param.getSubCompanyId1())
@ -152,8 +153,12 @@ public class DepartmentBO {
return MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptNameById(id);
}
public static String getEmployeeNameById(Long id) {
return MapperProxyFactory.getProxy(EmployeeMapper.class).getEmployeeNameById(id);
public static String getEmployeeNameById(Integer id) {
Long departmentPrincipal = MapperProxyFactory.getProxy(DepartmentMapper.class).getDepartmentPrincipal(id);
if (null == departmentPrincipal) {
return "";
}
return MapperProxyFactory.getProxy(EmployeeMapper.class).getEmployeeNameById(departmentPrincipal);
}

@ -63,11 +63,11 @@ public class DepartmentListDTO {
private Integer supDepId;
///**
// * 部门负责人
// */
//@TableTitle(title = "部门负责人", dataIndex = "deptPrincipal", key = "deptPrincipal")
//private String deptPrincipal;
/**
*
*/
@TableTitle(title = "部门负责人", dataIndex = "deptPrincipal", key = "deptPrincipal")
private String deptPrincipal;
/**
*

@ -26,6 +26,7 @@ public class DeptSearchParam extends BaseQueryParam {
private Boolean canceled;
private String departmentCode;
private Integer coadjutant;
private String departmentId;
private String uuid;
private Double showOrder;

@ -27,6 +27,7 @@ public class DepartmentPO {
private Integer canceled;
private String departmentCode;
private Integer coadjutant;
private String departmentId;
private Date created;
private Integer creater;

@ -96,4 +96,6 @@ public interface DepartmentMapper {
String getIdByDepartmentCode(@Param("departmentCode") String departmentCode);
Long getDepartmentPrincipal(@Param("deptId") Integer deptId);
}

@ -59,6 +59,9 @@
<if test=" departmentPO.supDepId != null ">
and t.supDepId = #{departmentPO.supDepId}
</if>
<if test=" departmentPO.departmentId != null ">
and t.id = #{departmentPO.departmentId}
</if>
order by ${orderSql}
</select>
@ -144,6 +147,11 @@
from hrmdepartment
where departmentcode = #{departmentCode}
</select>
<select id="getDepartmentPrincipal" resultType="java.lang.Long">
select bmfzr
from hrmdepartmentdefined
where deptid = #{deptId}
</select>
<sql id="likeSQL">
<if test=" departmentPO.departmentCode != null and departmentPO.departmentCode != '' ">

@ -321,7 +321,9 @@ public class CompServiceImpl extends Service implements CompService {
}
groupList.add(new SearchConditionGroup(SystemEnv.getHtmlLabelNames(groupLabel, user.getLanguage()), true, itemList));
groupList.add(new SearchConditionGroup("拓展信息", true, extendItemList));
if (CollectionUtils.isNotEmpty(extendItemList)) {
groupList.add(new SearchConditionGroup("拓展信息", true, extendItemList));
}
}
}
HashMap<String, Object> buttonsMap = new HashMap<>();
@ -542,7 +544,9 @@ public class CompServiceImpl extends Service implements CompService {
}
}
groupList.add(new SearchConditionGroup(SystemEnv.getHtmlLabelNames(groupLabel, user.getLanguage()), true, itemList));
groupList.add(new SearchConditionGroup("拓展信息", true, extendItemList));
if (CollectionUtils.isNotEmpty(extendItemList)) {
groupList.add(new SearchConditionGroup("拓展信息", true, extendItemList));
}
}
return groupList;
}

@ -367,7 +367,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
itemList.add(searchConditionItem);
}
groupList.add(new SearchConditionGroup(SystemEnv.getHtmlLabelNames(groupLabel, user.getLanguage()), true, itemList));
groupList.add(new SearchConditionGroup("拓展信息", true, extendItemList));
if (CollectionUtils.isNotEmpty(extendItemList)) {
groupList.add(new SearchConditionGroup("拓展信息", true, extendItemList));
}
}
}
@ -411,12 +413,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
isCheckItem.setDetailtype(2);
SearchConditionItem copySubDeptItem = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, "复制子部门信息", "copySubDept");
copySubDeptItem.setDetailtype(2);
SearchConditionItem copySubJob = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, "复制子部门岗位信息", "copySubJob");
copySubJob.setDetailtype(2);
condition.add(compBrowserItem);
condition.add(isCheckItem);
condition.add(copySubDeptItem);
condition.add(copySubJob);
addGroups.add(new SearchConditionGroup("", true, condition));
return addGroups;
}
@ -693,7 +692,8 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
return !(StringUtil.isEmpty(departmentPO.getDepartmentCode())
&& StringUtil.isEmpty(departmentPO.getDepartmentName())
&& null == departmentPO.getSubCompanyId1()
&& null == departmentPO.getSupDepId());
&& null == departmentPO.getSupDepId()
&& null == departmentPO.getDepartmentId());
}
@ -880,32 +880,14 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
String id = Util.null2String(params.get("id"));
int viewAttr = Util.getIntValue(Util.null2String(params.get("viewattr")), 1);
String nodeType = Util.null2String(params.get("type"));
String addType = Util.null2String(params.get("addType"));
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
String subcompanyid1 = "";
String supDepId = "";
switch (addType) {
case "normal":
if ("subcompany".equals(nodeType)) {
subcompanyid1 = id;
} else {
subcompanyid1 = departmentComInfo.getSubcompanyid1(id);
}
break;
case "sibling":
subcompanyid1 = departmentComInfo.getSubcompanyid1(id);
supDepId = departmentComInfo.getDepartmentsupdepid(id);
break;
case "child":
subcompanyid1 = departmentComInfo.getSubcompanyid1(id);
supDepId = id;
break;
default:
break;
String subcompanyid1 = Util.null2String(params.get("subcompanyid1"));
String supDepId = Util.null2String(params.get("departmentid"));
if (StringUtils.isNotBlank(supDepId)) {
subcompanyid1 = new DepartmentComInfo().getSubcompanyid1(supDepId);
}
HrmFieldGroupComInfo HrmFieldGroupComInfo = new HrmFieldGroupComInfo();
HrmFieldComInfo HrmFieldComInfo = new HrmFieldComInfo();
HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo = new HrmFieldSearchConditionComInfo();
@ -1018,7 +1000,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
}
}
groupList.add(new SearchConditionGroup(SystemEnv.getHtmlLabelNames(grouplabel, user.getLanguage()), true, itemList));
groupList.add(new SearchConditionGroup("拓展信息", true, extendItemList));
if (CollectionUtils.isNotEmpty(extendItemList)) {
groupList.add(new SearchConditionGroup("拓展信息", true, extendItemList));
}
}
return groupList;
}

Loading…
Cancel
Save