From 94dae325bbe4e23d1a5ebc08788b7d5a7e39a029 Mon Sep 17 00:00:00 2001 From: liyj <15602261488@163.com> Date: Mon, 14 Oct 2024 18:03:09 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/gzdyh_test' into gzdyh_test --- dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java index 1595bb1..36af820 100644 --- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java +++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java @@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.annotations.Param; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -655,9 +656,11 @@ */ public CtUnitDTO getParentZzzx(String unitId){ try{ - CtUnit loginCtUnit = mapper.selectById(unitId); // 查询当前单位的上级综治中心 QueryWrapper<CtUnit> ctUnitQueryWrapper = new QueryWrapper<>(); + ctUnitQueryWrapper.eq("id", unitId).select("parent_id"); + CtUnit loginCtUnit = mapper.selectOne(ctUnitQueryWrapper); + ctUnitQueryWrapper.clear(); ctUnitQueryWrapper.eq("id", loginCtUnit.getParentId()).eq("unit_type", UserBaseConsts.UNIT_TYPE_1); CtUnit zzzxCtUnit = mapper.selectOne(ctUnitQueryWrapper); CtUnitDTO ctUnitDTO = new CtUnitDTO(); @@ -694,4 +697,8 @@ throw new ServiceException("CtUnitService.getParentZzzx", e); } } + + public CtUnit selectUnitByGridId(String gridUnitId){ + return mapper.selectUnitByGridId(gridUnitId); + } } -- Gitblit v1.8.0