分部、部门联调。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()) .subCompanyName(0 == e.getSubCompanyId1() ? "" : MapperProxyFactory.getProxy(CompMapper.class).listById(e.getSubCompanyId1()).getSubCompanyName())
.supDepId(e.getSupDepId()) .supDepId(e.getSupDepId())
.supDepName(null == poMaps.get(e.getSupDepId()) ? "" : poMaps.get(e.getSupDepId()).getDepartmentName()) .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()) .showOrder(null == e.getShowOrder() ? 0 : e.getShowOrder())
.canceled(null == e.getCanceled() ? 0 : e.getCanceled()) .canceled(null == e.getCanceled() ? 0 : e.getCanceled())
.build()).collect(Collectors.toList()); .build()).collect(Collectors.toList());
@ -82,6 +82,7 @@ public class DepartmentBO {
return DepartmentPO return DepartmentPO
.builder() .builder()
.id(param.getId() == null ? 0 : param.getId()) .id(param.getId() == null ? 0 : param.getId())
.departmentId(param.getDepartmentId())
.departmentMark(param.getDepartmentMark()) .departmentMark(param.getDepartmentMark())
.departmentName(param.getDepartmentName()) .departmentName(param.getDepartmentName())
.subCompanyId1(param.getSubCompanyId1()) .subCompanyId1(param.getSubCompanyId1())
@ -152,8 +153,12 @@ public class DepartmentBO {
return MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptNameById(id); return MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptNameById(id);
} }
public static String getEmployeeNameById(Long id) { public static String getEmployeeNameById(Integer id) {
return MapperProxyFactory.getProxy(EmployeeMapper.class).getEmployeeNameById(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; private Integer supDepId;
///** /**
// * 部门负责人 *
// */ */
//@TableTitle(title = "部门负责人", dataIndex = "deptPrincipal", key = "deptPrincipal") @TableTitle(title = "部门负责人", dataIndex = "deptPrincipal", key = "deptPrincipal")
//private String deptPrincipal; private String deptPrincipal;
/** /**
* *

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

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

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

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

@ -367,7 +367,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
itemList.add(searchConditionItem); itemList.add(searchConditionItem);
} }
groupList.add(new SearchConditionGroup(SystemEnv.getHtmlLabelNames(groupLabel, user.getLanguage()), true, itemList)); 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); isCheckItem.setDetailtype(2);
SearchConditionItem copySubDeptItem = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, "复制子部门信息", "copySubDept"); SearchConditionItem copySubDeptItem = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, "复制子部门信息", "copySubDept");
copySubDeptItem.setDetailtype(2); 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(compBrowserItem);
condition.add(isCheckItem); condition.add(isCheckItem);
condition.add(copySubDeptItem); condition.add(copySubDeptItem);
condition.add(copySubJob);
addGroups.add(new SearchConditionGroup("", true, condition)); addGroups.add(new SearchConditionGroup("", true, condition));
return addGroups; return addGroups;
} }
@ -693,7 +692,8 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
return !(StringUtil.isEmpty(departmentPO.getDepartmentCode()) return !(StringUtil.isEmpty(departmentPO.getDepartmentCode())
&& StringUtil.isEmpty(departmentPO.getDepartmentName()) && StringUtil.isEmpty(departmentPO.getDepartmentName())
&& null == departmentPO.getSubCompanyId1() && 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")); String id = Util.null2String(params.get("id"));
int viewAttr = Util.getIntValue(Util.null2String(params.get("viewattr")), 1); int viewAttr = Util.getIntValue(Util.null2String(params.get("viewattr")), 1);
String nodeType = Util.null2String(params.get("type"));
String addType = Util.null2String(params.get("addType")); String addType = Util.null2String(params.get("addType"));
DepartmentComInfo departmentComInfo = new DepartmentComInfo(); String subcompanyid1 = Util.null2String(params.get("subcompanyid1"));
String subcompanyid1 = ""; String supDepId = Util.null2String(params.get("departmentid"));
String supDepId = ""; if (StringUtils.isNotBlank(supDepId)) {
subcompanyid1 = new DepartmentComInfo().getSubcompanyid1(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;
} }
HrmFieldGroupComInfo HrmFieldGroupComInfo = new HrmFieldGroupComInfo(); HrmFieldGroupComInfo HrmFieldGroupComInfo = new HrmFieldGroupComInfo();
HrmFieldComInfo HrmFieldComInfo = new HrmFieldComInfo(); HrmFieldComInfo HrmFieldComInfo = new HrmFieldComInfo();
HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo = new HrmFieldSearchConditionComInfo(); 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(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; return groupList;
} }

Loading…
Cancel
Save