Browse Source

Merge branch 'master_bugfix'

dev_shibei_match
sunyuchao 5 years ago
parent
commit
31d22e1622
  1. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -581,8 +581,11 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
agencyList.setAgencyName(entity.getOrganizationName()); agencyList.setAgencyName(entity.getOrganizationName());
processorList.setAgencyList(agencyList); processorList.setAgencyList(agencyList);
//2:查询当前组织的上两级组织,按层级排序 //2:查询当前组织的上两级组织,按层级排序
String[] args = new String[]{};
if (StringUtils.isNotBlank(entity.getPids())) {
String pids = entity.getPids(); String pids = entity.getPids();
String[] args = pids.split(":"); args = pids.split(":");
}
List<String> agencyIdList = new ArrayList<>(); List<String> agencyIdList = new ArrayList<>();
if (args.length < NumConstant.ONE) { if (args.length < NumConstant.ONE) {
processorList.setParentAgencyList(parentAgencyList); processorList.setParentAgencyList(parentAgencyList);
@ -594,7 +597,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
agencyIdList.add(args[args.length - NumConstant.ONE]); agencyIdList.add(args[args.length - NumConstant.ONE]);
} }
List<CustomerAgencyDTO> parentList = baseDao.selectAgencyListByIds(agencyIdList); List<CustomerAgencyDTO> parentList = baseDao.selectAgencyListByIds(agencyIdList);
parentList.forEach(parent->{ parentList.forEach(parent -> {
AgencyResultDTO agency = new AgencyResultDTO(); AgencyResultDTO agency = new AgencyResultDTO();
agency.setAgencyId(parent.getId()); agency.setAgencyId(parent.getId());
agency.setAgencyName(parent.getOrganizationName()); agency.setAgencyName(parent.getOrganizationName());
@ -603,7 +606,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
processorList.setParentAgencyList(parentAgencyList); processorList.setParentAgencyList(parentAgencyList);
} }
//3:迭代查询当前组织的所有下级组织列表 //3:迭代查询当前组织的所有下级组织列表
List<AgencySubResultDTO> subAgencyList = getDepartmentList(entity.getPids() + ":" + entity.getId()); List<AgencySubResultDTO> subAgencyList = getDepartmentList(("".equals(entity.getPids()) ? "" : entity.getPids() + ":") + entity.getId());
processorList.setSubAgencyList(subAgencyList); processorList.setSubAgencyList(subAgencyList);
return processorList; return processorList;

Loading…
Cancel
Save