From ba45a241594bfc52e650692c8a9c198f776c1323 Mon Sep 17 00:00:00 2001 From: YUJT Date: Sat, 23 Apr 2022 11:16:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B9=E6=B3=95=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../power/modules/axis/dao/PowerAxisStructDao.java | 10 +++++----- .../axis/service/impl/PowerAxisStructServiceImpl.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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(), "同一组织下不允许存在重名的节点"); } }