Browse Source

修改方法参数

dev_power_axis
YUJT 3 years ago
parent
commit
ba45a24159
  1. 4
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java
  2. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java

4
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java

@ -61,7 +61,7 @@ public interface PowerAxisStructDao extends BaseDao<PowerAxisStructEntity> {
* @param customerId 客户ID
* @param name 节点名
* @param agencyId 组织ID
* @param categoryCode 节点级别编码
* @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<PowerAxisStructEntity> {
int countRepeatStructByName(@Param("customerId") String customerId,
@Param("name") String name,
@Param("agencyId") String agencyId,
@Param("categoryCode") String categoryCode);
@Param("pid") String pid);
/**
* 查询同组织下是否有同级的节点 主要用于一级节点判重

2
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<PowerAxisStructD
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "同一组织下只允许存在一个顶级节点");
}
}
if (baseDao.countRepeatStructByName(customerId, structDto.getName(), agencyId, categoryCode) > NumConstant.ZERO) {
if (baseDao.countRepeatStructByName(customerId, structDto.getName(), agencyId, structDto.getPid()) > NumConstant.ZERO) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "同一组织下不允许存在重名的节点");
}
}

Loading…
Cancel
Save