diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java index e46547b..a3b81a3 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java @@ -58,10 +58,10 @@ public interface PowerAxisStructDao extends BaseDao { /** * 查询同组织下是否有同名的节点 * - * @param customerId 客户ID - * @param name 节点名 - * @param agencyId 组织ID - * @param categoryCode 节点级别编码 + * @param customerId 客户ID + * @param name 节点名 + * @param agencyId 组织ID + * @param pid 上级节点 * @return int * @author work@yujt.net.cn * @date 2022/4/23/0023 11:00 @@ -69,7 +69,7 @@ public interface PowerAxisStructDao extends BaseDao { int countRepeatStructByName(@Param("customerId") String customerId, @Param("name") String name, @Param("agencyId") String agencyId, - @Param("categoryCode") String categoryCode); + @Param("pid") String pid); /** * 查询同组织下是否有同级的节点 (主要用于一级节点判重) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java index ca00f70..998f71b 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java @@ -152,7 +152,7 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + if (baseDao.countRepeatStructByName(customerId, structDto.getName(), agencyId, structDto.getPid()) > NumConstant.ZERO) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "同一组织下不允许存在重名的节点"); } }