diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java index b6a6ec5ec4..1ff1bc303c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java @@ -468,7 +468,19 @@ public class AgencyController { } /** - * Desc: 查询工作人员所属组织下的所有街道社区 + * Desc: 查询客户下的所有社区 + * + * @param tokenDto + * @author wgf + * @date 2022/6/23 09:13 + */ + @PostMapping("communityListByCustomerId") + public Result> communityListByCustomerId(@LoginUser TokenDto tokenDto) { + return new Result>().ok(agencyService.communityListByCustomerId(tokenDto)); + } + + /** + * Desc: 查询客户下的所有街道社区 * * @param tokenDto * @author wgf diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index 0a6875acbc..bd271cd2f0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -320,6 +320,8 @@ public interface CustomerAgencyDao extends BaseDao { */ List getCommunityList(@Param("customerId") String customerId, @Param("agencyId") String agencyId); + List communityListByCustomerId(@Param("customerId") String customerId); + List selectSubOrg(String agencyId); /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java index 34bd0c7b55..4ae4672647 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java @@ -151,7 +151,16 @@ public interface AgencyService { List getCommunityList(TokenDto tokenDto); /** - * Desc: 查询工作人员所属组织下的所有街道社区 + * Desc: 查询客户下的所有社区 + * + * @param tokenDto + * @author wgf + * @date 2022/6/23 09:13 + */ + List communityListByCustomerId(TokenDto tokenDto); + + /** + * Desc: 查询客户下的所有街道社区 * * @param tokenDto * @author wgf diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index aff8e76bb3..cf2016de58 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -870,10 +870,18 @@ public class AgencyServiceImpl implements AgencyService { return customerAgencyDao.getCommunityList(tokenDto.getCustomerId(), agencyId); } + @Override + public List communityListByCustomerId(TokenDto tokenDto) { + if (null == tokenDto.getCustomerId()) { + throw new EpmetException("未查询到客户信息"); + } + return customerAgencyDao.communityListByCustomerId(tokenDto.getCustomerId()); + } + @Override public List getOrgTreeListByCustomerId(TokenDto tokenDto) { if (null == tokenDto.getCustomerId()) { - throw new EpmetException("未查询到工作人员信息"); + throw new EpmetException("未查询到客户信息"); } List list = customerAgencyDao.getOrgTreeListByCustomerId(tokenDto.getCustomerId()); return NodeTreeUtils.build(list); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index a167a9e803..45b5b066a7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -756,6 +756,17 @@ AND CUSTOMER_ID = #{customerId} AND CONCAT(PIDS,':',ID) LIKE CONCAT('%',#{agencyId},'%') + + +