|
|
|
@ -165,8 +165,18 @@ public class CoreTreeService implements ICoreTreeService {
|
|
|
|
|
@Override
|
|
|
|
|
@ApiOperation(value = "父节点检查",notes = "检查部门的父节点是否是当前节点的子节点")
|
|
|
|
|
public void doValidatorSysDepartmentParentId(SysDepartment department) {
|
|
|
|
|
findSysDepartmentChildrenTreePack(department,0);
|
|
|
|
|
validatorSysDepartmentParentId(department.getChildList(),department.getParentId());
|
|
|
|
|
if(department != null){
|
|
|
|
|
if(department.getParentId().longValue() == department.getId().longValue()){
|
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
|
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
|
|
|
|
|
.setErrorDetail("上级部门不能为当前部门")
|
|
|
|
|
.setErrorSolution("请重新操作")
|
|
|
|
|
.build();
|
|
|
|
|
}
|
|
|
|
|
findSysDepartmentChildrenTreePack(department,0);
|
|
|
|
|
validatorSysDepartmentParentId(department.getChildList(),department.getParentId());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|