|
|
@ -147,7 +147,7 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl<PowerAxisStructD |
|
|
|
|
|
|
|
int structLevel = powerAxisTagService.selectStructLevelByCode(customerId, PowerTagCategoryEnum.STRUCT.category(), categoryCode); |
|
|
|
if (PowerTagLevelEnum.ROOT.level() == structLevel) { |
|
|
|
if (baseDao.countRepeatStructByCategory(customerId, agencyId, categoryCode) > NumConstant.ZERO) { |
|
|
|
if (baseDao.countRepeatStructByCategory(customerId, agencyId, categoryCode, structDto.getId()) > NumConstant.ZERO) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "同一组织下只允许存在一个顶级节点"); |
|
|
|
} |
|
|
|
} |
|
|
|