From 86b665167e7d5dd4184720cd44f30bf80c46153f Mon Sep 17 00:00:00 2001 From: lichao <326994889@qq.com> Date: Mon, 18 Dec 2023 16:10:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=BB=E7=90=86=E4=BA=BA=E5=91=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/CustomerCommunityManageUserDTO.java | 2 ++ .../result/CustomerGridManageUserListDTO.java | 2 ++ .../CustomerCommunityManageUserServiceImpl.java | 4 ++++ .../impl/CustomerGridManageUserServiceImpl.java | 16 +++++++++++----- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerCommunityManageUserDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerCommunityManageUserDTO.java index 83f4278c1a..d9b0c0867d 100755 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerCommunityManageUserDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerCommunityManageUserDTO.java @@ -76,4 +76,6 @@ public class CustomerCommunityManageUserDTO implements Serializable { */ private Date updatedTime; + private String agencyName; + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridManageUserListDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridManageUserListDTO.java index 505ad8024d..4690ab048a 100755 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridManageUserListDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridManageUserListDTO.java @@ -82,4 +82,6 @@ public class CustomerGridManageUserListDTO implements Serializable { */ private Date updatedTime; + private String agencyName; + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerCommunityManageUserServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerCommunityManageUserServiceImpl.java index 5c0137ca93..f082883a67 100755 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerCommunityManageUserServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerCommunityManageUserServiceImpl.java @@ -86,6 +86,10 @@ public class CustomerCommunityManageUserServiceImpl extends BaseServiceImpl list = baseDao.selectList(resultLQ); PageInfo resultPage = new PageInfo<>(list); List result = ConvertUtils.sourceToTarget(list,CustomerCommunityManageUserDTO.class); + result.forEach(user->{ + CustomerAgencyEntity agency = customerAgencyDao.selectById(user.getCommunityId()); + user.setAgencyName(agency.getAllParentName()+"-"+agency.getOrganizationName()); + }); return new PageData<>(result,resultPage.getTotal()); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridManageUserServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridManageUserServiceImpl.java index a881a1c40c..24d55eb069 100755 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridManageUserServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridManageUserServiceImpl.java @@ -8,10 +8,7 @@ import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.dao.CustomerGridDao; -import com.epmet.dao.CustomerGridManageUserDao; -import com.epmet.dao.CustomerStaffAgencyDao; -import com.epmet.dao.CustomerStaffGridDao; +import com.epmet.dao.*; import com.epmet.dto.CustomerCommunityManageUserDTO; import com.epmet.dto.CustomerGridManageUserDTO; import com.epmet.dto.CustomerStaffAgencyDTO; @@ -19,6 +16,7 @@ import com.epmet.dto.form.CustomerGridManageUserListFormDTO; import com.epmet.dto.result.CustomerGridManageUserListDTO; import com.epmet.dto.result.CustomerGridStatisticsReulstDTO; import com.epmet.dto.result.GridByStaffResultDTO; +import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.CustomerCommunityManageUserEntity; import com.epmet.entity.CustomerGridEntity; import com.epmet.entity.CustomerGridManageUserEntity; @@ -50,6 +48,8 @@ public class CustomerGridManageUserServiceImpl extends BaseServiceImpl list = baseDao.selectList(lambdaQueryWrapper); PageInfo customerGridManageUserEntityPageInfo = new PageInfo<>(list); List result = ConvertUtils.sourceToTarget(list,CustomerGridManageUserListDTO.class); - + result.forEach( + user->{ + CustomerGridEntity grid = customerGridDao.selectById(user.getGridId()); + CustomerAgencyEntity agency = customerAgencyDao.selectById(grid.getPid()); + user.setAgencyName(agency.getAllParentName()+"-"+agency.getOrganizationName()+"-"+grid.getGridName()); + } + ); return new PageData<>(result,customerGridManageUserEntityPageInfo.getTotal()); } return new PageData<>();