|
|
|
@ -237,8 +237,19 @@ public class CoreTreeService implements ICoreTreeService {
|
|
|
|
|
@Override
|
|
|
|
|
@ApiOperation(value = "父节点检查",notes = "检查组织的父节点是否是当前节点的子节点")
|
|
|
|
|
public void doValidatorSysOrganizeParentId(SysOrganize organize) {
|
|
|
|
|
findSysOrganizeChildrenTreePack(organize,0);
|
|
|
|
|
validatorSysOrganizeParentId(organize.getChildList(),organize.getParentId());
|
|
|
|
|
if(organize != null){
|
|
|
|
|
if(organize.getParentId().longValue() == organize.getId().longValue()){
|
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
|
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
|
|
|
|
|
.setErrorDetail("上级组织不能为当前组织")
|
|
|
|
|
.setErrorSolution("请重新操作")
|
|
|
|
|
.build();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
findSysOrganizeChildrenTreePack(organize,0);
|
|
|
|
|
validatorSysOrganizeParentId(organize.getChildList(),organize.getParentId());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|