Browse Source

程序优化

dev_shibei_match
sunyuchao 6 years ago
parent
commit
6c5b867fc9
  1. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

11
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<CustomerAgencyDao
List<String> staffIdList = new ArrayList<>();
staffIdList.addAll(staffIdList1); staffIdList.addAll(staffIdList2); staffIdList.addAll(staffIdList3);
staffIdList = new ArrayList<String>(new LinkedHashSet<>(staffIdList));staffIdList.removeAll(Collections.singleton(""));
Result<CustomerStaffListResultDTO> 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<CustomerStaffListResultDTO> 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<StaffListResultDTO> staffList = dto.getStaffList();
List<CustomerStaffRoleResultDTO> roleList = dto.getRoleList();
//有时间再优化成jdk8的遍历方式

Loading…
Cancel
Save