From 6c5b8d3d242997a45e21a73b0d78929037a69763 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 27 Aug 2021 18:31:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E4=BA=BAbugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/CustomerStaffAgencyServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java index c30abd4025..b79418b280 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java @@ -39,6 +39,7 @@ import com.epmet.service.CustomerDepartmentService; import com.epmet.service.CustomerGridService; import com.epmet.service.CustomerStaffAgencyService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -241,9 +242,9 @@ public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl queryOrgStaffs(OrgStaffFormDTO formDTO) { - Set agencyUserIds=customerStaffAgencyDao.selectAgencyStaffs(formDTO.getCustomerId(),formDTO.getAgencyIds()); - Set deptUserIds=customerStaffAgencyDao.selectDeptStaffs(formDTO.getCustomerId(),formDTO.getDeptIds()); - Set gridUserIds=customerStaffAgencyDao.selectGridStaffs(formDTO.getCustomerId(),formDTO.getGridIds()); + Set agencyUserIds= CollectionUtils.isNotEmpty(formDTO.getAgencyIds())?customerStaffAgencyDao.selectAgencyStaffs(formDTO.getCustomerId(),formDTO.getAgencyIds()):new HashSet<>(); + Set deptUserIds=CollectionUtils.isNotEmpty(formDTO.getDeptIds())?customerStaffAgencyDao.selectDeptStaffs(formDTO.getCustomerId(),formDTO.getDeptIds()):new HashSet<>(); + Set gridUserIds=CollectionUtils.isNotEmpty(formDTO.getGridIds())?customerStaffAgencyDao.selectGridStaffs(formDTO.getCustomerId(),formDTO.getGridIds()):new HashSet<>(); Set result=new LinkedHashSet(); result.addAll(agencyUserIds); result.addAll(deptUserIds);