|
|
|
@ -724,6 +724,14 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
|
refreshJobComp(deptById.getId(), deptById.getParentComp());
|
|
|
|
|
List<DepartmentPO> deptList = getDepartmentMapper().getDeptListByPId(deptById.getId());
|
|
|
|
|
String ecCompanyId = EcHrmRelationUtil.getEcCompanyId(Util.null2String(deptById.getParentComp()));
|
|
|
|
|
// 更新当前部门下的人员
|
|
|
|
|
List<Long> hrmResourceIds = getSystemDataMapper().getHrmResourceIdsByDept(deptById.getId().toString());
|
|
|
|
|
String ecDepartmentId = EcHrmRelationUtil.getEcDepartmentId(deptById.getId().toString());
|
|
|
|
|
new RecordSet().executeUpdate("update hrmresource set SUBCOMPANYID1 =? where DEPARTMENTID =?", ecCompanyId, ecDepartmentId);
|
|
|
|
|
// 更新人员组织架构图
|
|
|
|
|
for (Long hrmResourceId : hrmResourceIds) {
|
|
|
|
|
new Thread(new HrmResourceTriggerRunnable(hrmResourceId)).start();
|
|
|
|
|
}
|
|
|
|
|
forbiddenChildTag(deptById.getParentComp(), ecCompanyId, deptList);
|
|
|
|
|
// 递归更新下级部门、岗位
|
|
|
|
|
return updateBaseDept;
|
|
|
|
@ -878,7 +886,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
|
jobPO.setEcCompany(parentCompId);
|
|
|
|
|
CompPO jclCompanyId = EcHrmRelationUtil.getJclCompanyId(Util.null2String(parentCompId));
|
|
|
|
|
if (null != jclCompanyId) {
|
|
|
|
|
jobPO.setParentComp(parentCompId);
|
|
|
|
|
jobPO.setParentComp(jclCompanyId.getId());
|
|
|
|
|
}
|
|
|
|
|
// 指定上级岗位
|
|
|
|
|
jobPO.setParentJob(currentParentJobId);
|
|
|
|
|