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