From da9a41d85f564a099db0b899c31454f709dfaef0 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 28 Jun 2022 10:26:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=96=AB=E8=8B=97=E6=8E=A5=E7=A7=8D=E7=82=B9?= =?UTF-8?q?=EF=BC=8C=E6=A0=B8=E9=85=B8=E6=A3=80=E6=B5=8B=E7=82=B9=20pc=20?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/AgencyController.java | 14 +++++++++++++- .../main/java/com/epmet/dao/CustomerAgencyDao.java | 2 ++ .../main/java/com/epmet/service/AgencyService.java | 11 ++++++++++- .../com/epmet/service/impl/AgencyServiceImpl.java | 10 +++++++++- .../main/resources/mapper/CustomerAgencyDao.xml | 11 +++++++++++ 5 files changed, 45 insertions(+), 3 deletions(-) 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},'%') + + +