|
@@ -269,9 +269,8 @@ public class OrgServiceImpl implements OrgService {
|
|
|
throw new StatusException("E-001004", "该机构非子机构");
|
|
|
}
|
|
|
Long rootId = orgEntity.getRootId();
|
|
|
- Long parentId = orgEntity.getParentId();
|
|
|
|
|
|
- if (0 < orgRepo.countByRootIdAndParentId(rootId, parentId)) {
|
|
|
+ if (0 < orgRepo.countByRootIdAndParentId(rootId, orgEntity.getId())) {
|
|
|
throw new StatusException("E-001004", "该机构有子机构");
|
|
|
}
|
|
|
|