From 09700ffc93210a33ce624d1f97208175ecc4447d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 26 May 2021 14:08:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=BB=84=E7=BB=87=E6=9C=BA?= =?UTF-8?q?=E6=9E=84=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=B7=9F=E7=BB=84=E7=BB=87=E7=BA=A7=E5=88=AB?= =?UTF-8?q?=E8=BF=94=E5=8F=82=E7=94=A8=E4=BA=8E=E6=95=B0=E6=8D=AE=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=B2=BB=E7=90=86=E5=AE=9E=E5=86=B5=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/AgencysResultDTO.java | 5 +++++ .../java/com/epmet/controller/AgencyController.java | 5 +++-- .../com/epmet/service/impl/AgencyServiceImpl.java | 13 +++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java index 175fe56674..b9cbcdc232 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java @@ -96,4 +96,9 @@ public class AgencysResultDTO implements Serializable { * 组织区划的名称 */ private String areaName; + + /** + * 当前组织对应客户根组织级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province) + */ + private String rootlevel; } \ No newline at end of file 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 b0ec95dfd2..263fe905e7 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 @@ -151,8 +151,9 @@ public class AgencyController { * @Description 组织首页-获取组织机构信息 */ @PostMapping("agencydetail") - @RequirePermission(requirePermission = RequirePermissionEnum.ORG_AGENCY_TRACE) - public Result agencyDetail(@LoginUser TokenDto tokenDTO, @RequestBody AgencydetailFormDTO formDTO) { + //@RequirePermission(requirePermission = RequirePermissionEnum.ORG_AGENCY_TRACE) + //public Result agencyDetail(@LoginUser TokenDto tokenDTO, @RequestBody AgencydetailFormDTO formDTO) { + public Result agencyDetail(@RequestBody AgencydetailFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AgencydetailFormDTO.AddUserInternalGroup.class); return agencyService.agencyDetail(formDTO); } 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 e83b78ba77..2324c7d1d2 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 @@ -237,6 +237,19 @@ public class AgencyServiceImpl implements AgencyService { agencysResultDTO = ConvertUtils.sourceToTarget(entity, AgencysResultDTO.class); agencysResultDTO.setAgencyId(entity.getId()); agencysResultDTO.setAgencyName(entity.getOrganizationName()); + //2021.5.26 sun 添加当前组织对应客户的根组织级别返参 start + if (null != entity) { + if (null == entity.getPids() || "".equals(entity.getPids())) { + agencysResultDTO.setRootlevel(entity.getLevel()); + } else { + String id = Arrays.asList(entity.getPids().split(":")).get(0); + CustomerAgencyEntity rootEntity = customerAgencyDao.selectById(id); + if (null != rootEntity) { + agencysResultDTO.setRootlevel(rootEntity.getLevel()); + } + } + } + //2021.5.26 sun 添加当前组织对应客户的根组织级别返参 end //2:查询本机关的所有上级机关,按自上而下层级顺序 if (null == entity.getPids()) { agencysResultDTO.setParentList(parentList);