diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index 454a1aee4f..0750b27c27 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -248,12 +248,15 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl staffIdList = new ArrayList<>(); staffIdList.addAll(staffIdList1); staffIdList.addAll(staffIdList2); staffIdList.addAll(staffIdList3); staffIdList = new ArrayList(new LinkedHashSet<>(staffIdList));staffIdList.removeAll(Collections.singleton("")); - Result userList = epmetUserFeignClient.getCustomerStaffList(staffIdList); - if(!userList.success()||null==userList.getData()){ - throw new RenException(CustomerAgencyConstant.SELECT_USER_EXCEPTION); + CustomerStaffListResultDTO dto = new CustomerStaffListResultDTO(); + if (null != staffIdList || staffIdList.size() > NumConstant.ZERO) { + Result userList = epmetUserFeignClient.getCustomerStaffList(staffIdList); + if (!userList.success() || null == userList.getData()) { + throw new RenException(CustomerAgencyConstant.SELECT_USER_EXCEPTION); + } + dto = userList.getData(); } //5:循环数据,将人员数据放到对应数据结构下 - CustomerStaffListResultDTO dto = userList.getData(); List staffList = dto.getStaffList(); List roleList = dto.getRoleList(); //有时间再优化成jdk8的遍历方式