|
|
|
@ -238,7 +238,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
|
params.put("parent_dept", jclDepartmentId.getId());
|
|
|
|
|
// 部门不为空,自动指定所属分部
|
|
|
|
|
params.put("parent_comp", jclDepartmentId.getParentComp());
|
|
|
|
|
params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(jclDepartmentId.getParentComp() + ""));
|
|
|
|
|
params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(Util.null2String(jclDepartmentId.getParentComp())));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -293,7 +293,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
|
params.put("parent_dept", jclDepartmentId.getId());
|
|
|
|
|
// 部门不为空,自动指定所属分部
|
|
|
|
|
params.put("parent_comp", jclDepartmentId.getParentComp());
|
|
|
|
|
params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(jclDepartmentId.getParentComp() + ""));
|
|
|
|
|
params.put("ec_company", EcHrmRelationUtil.getEcCompanyId(Util.null2String(jclDepartmentId.getParentComp())));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
@ -558,7 +558,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
|
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
|
|
|
|
// 被合并部门
|
|
|
|
|
Long ecParamDepartment = mergeParam.getDepartment();
|
|
|
|
|
DepartmentPO targetDepartment = EcHrmRelationUtil.getJclDepartmentId(ecParamDepartment + "");
|
|
|
|
|
DepartmentPO targetDepartment = EcHrmRelationUtil.getJclDepartmentId( Util.null2String(ecParamDepartment));
|
|
|
|
|
|
|
|
|
|
// 断言判断
|
|
|
|
|
OrganizationAssert.isFalse(null == targetDepartment, "被合并部门数据有误,暂时无法合并");
|
|
|
|
@ -668,11 +668,11 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
|
Long company = moveParam.getCompany();
|
|
|
|
|
OrganizationAssert.notNull(company, "请选择要转移到的分部");
|
|
|
|
|
deptById.setEcCompany(company);
|
|
|
|
|
deptById.setParentComp(Objects.requireNonNull(EcHrmRelationUtil.getJclCompanyId(company + "")).getId());
|
|
|
|
|
deptById.setParentComp(Objects.requireNonNull(EcHrmRelationUtil.getJclCompanyId( Util.null2String(company))).getId());
|
|
|
|
|
deptById.setParentDept(null);
|
|
|
|
|
} else if ("1".equals(moveParam.getMoveType())) {
|
|
|
|
|
Long department = moveParam.getDepartment();
|
|
|
|
|
Long departmentId = Objects.requireNonNull(EcHrmRelationUtil.getJclDepartmentId(department + "")).getId();
|
|
|
|
|
Long departmentId = Objects.requireNonNull(EcHrmRelationUtil.getJclDepartmentId( Util.null2String(department))).getId();
|
|
|
|
|
OrganizationAssert.notNull(departmentId, "请选择要转移到的部门");
|
|
|
|
|
List<DepartmentPO> deptListByPId = getDepartmentMapper().getDeptListByPId(moveParam.getId());
|
|
|
|
|
Set<Long> disableIds = new HashSet<>();
|
|
|
|
|