From be7521315e010652cfdb8fa18fd0d8cd4e9466ed Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 30 Dec 2021 14:26:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E5=85=9A=E5=BB=BA=E7=9B=B8?= =?UTF-8?q?=E5=85=B3bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/IcPartyUnitService.java | 9 ++++++++ .../impl/IcPartyActivityServiceImpl.java | 2 +- .../service/impl/IcPartyUnitServiceImpl.java | 21 ++++++++++++++++++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index 490e19bee6..b844a95bf6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -114,6 +114,15 @@ public interface IcPartyUnitService extends BaseService { */ List option(IcPartyUnitDTO dto); + /** + * @Description 获取组织以及下级单位列表 + * @Param dto + * @Return {@link List< OptionDTO>} + * @Author zhaoqifeng + * @Date 2021/11/22 14:35 + */ + List options(IcPartyUnitDTO dto); + /** * 导入数据 * @Param tokenDto diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index 4057d1ba41..966060878c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -366,7 +366,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + Map option = icPartyUnitService.options(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取服务事项字典 SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); codeFormDTO.setCustomerId(tokenDto.getCustomerId()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index ab96c7c68b..8c11573fdf 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -193,7 +193,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl options(IcPartyUnitDTO dto) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.and(wp -> wp.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId()).or(). + like(IcPartyUnitEntity::getPids, dto.getAgencyId())); + wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); + wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter()); + List list = baseDao.selectList(wrapper); + if (CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return list.stream().map(item -> { + OptionDTO option = new OptionDTO(); + option.setValue(item.getId()); + option.setLabel(item.getUnitName()); + return option; + }).collect(Collectors.toList()); + } + /** * 导入数据 *