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 1ff1bc303c..aaf004290a 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 @@ -505,4 +505,19 @@ public class AgencyController { List dto = agencyService.getAddressTree(name, customerId); return new Result>().ok(dto); } + + /** + * 获取区域编码下级的所有客户信息 + * + * @param areaCode + * @return com.epmet.commons.tools.utils.Result> + * @author zhy + * @date 2022/7/7 10:12 + */ + @GetMapping("/areasubagency/{areaCode}") + public Result> getAreaSubAgency(@PathVariable String areaCode) { + List dto = agencyService.getAreaSubAgency(areaCode); + return new Result>().ok(dto); + } + } 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 1c4aa9394c..89e7070789 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 @@ -353,5 +353,16 @@ public interface CustomerAgencyDao extends BaseDao { CommunityInfoResultDTO getCommunityInfo(OrgInfoPointFormDTO formDTO); CommunityInfoResultDTO getCommunityInfoByUserId(@Param("userId") String userId); + + /** + * 获取区域编码下级的所有客户信息 + * + * @param areaCode + * @return com.epmet.commons.tools.utils.Result> + * @author zhy + * @date 2022/7/7 10:12 + */ + List getAreaSubAgency(@Param("areaCode") String areaCode); + } 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 4ae4672647..697f581a69 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 @@ -178,4 +178,15 @@ public interface AgencyService { * @date 2022/5/16 10:43 */ List getAddressTree(String name, String customerId); + + /** + * 获取区域编码下级的所有客户信息 + * + * @param areaCode + * @return com.epmet.commons.tools.utils.Result> + * @author zhy + * @date 2022/7/7 10:12 + */ + List getAreaSubAgency(String areaCode); + } 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 cf2016de58..aa9273ac6a 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 @@ -902,6 +902,11 @@ public class AgencyServiceImpl implements AgencyService { return NodeTreeUtils.build(list); } + @Override + public List getAreaSubAgency(String areaCode) { + return customerAgencyDao.getAreaSubAgency(areaCode); + } + private CustomerAgencyEntity constructInsertEntity(AddAgencyV2FormDTO formDTO, CustomerAgencyDTO parent) { CustomerAgencyEntity insertEntity = ConvertUtils.sourceToTarget(formDTO, CustomerAgencyEntity.class); insertEntity.setOrganizationName(formDTO.getAgencyName()); 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 136341dc18..802006e573 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 @@ -930,4 +930,24 @@ limit 1 + +