|
|
@ -1473,7 +1473,7 @@ public class GovOrgServiceImpl implements GovOrgService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String customerId, String agencyId) { |
|
|
|
public ScreenAgencyOrGridListDTO getSubAgencyOrGridList(String customerId, String agencyId, Boolean isGetSubAllGrid) { |
|
|
|
ScreenAgencyOrGridListDTO resultDTO = new ScreenAgencyOrGridListDTO(); |
|
|
|
List<ScreenAgencyOrGridListDTO.AgencyGrid> agencyGridList = new ArrayList<>(); |
|
|
|
//1.查询组织信息
|
|
|
@ -1485,10 +1485,22 @@ public class GovOrgServiceImpl implements GovOrgService { |
|
|
|
//2.根据组织级别判断查询直属组织或网格列表
|
|
|
|
List<ScreenCustomerAgencyDTO> agencyList = new ArrayList<>(); |
|
|
|
List<ScreenCustomerGridDTO> gridList = new ArrayList<>(); |
|
|
|
//组织级别为街道的查询下级所有网格
|
|
|
|
if (isGetSubAllGrid && (OrgLevelEnum.STREET.getCode().equals(dto.getLevel()))) { |
|
|
|
gridList = customerGridDao.getSubGridList(customerId, agencyId); |
|
|
|
List<ScreenAgencyOrGridListDTO.AgencyGrid> allGridList = new ArrayList<>(); |
|
|
|
gridList.forEach(gr -> { |
|
|
|
ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid(); |
|
|
|
org.setOrgId(gr.getGridId()); |
|
|
|
org.setOrgName(gr.getGridName()); |
|
|
|
allGridList.add(org); |
|
|
|
}); |
|
|
|
resultDTO.setAllGridList(allGridList); |
|
|
|
} |
|
|
|
if (!"community".equals(dto.getLevel())) { |
|
|
|
//2-1.直属下级组织列表
|
|
|
|
agencyList = customerAgencyDao.getSubAgencyListByAgency(customerId, agencyId); |
|
|
|
agencyList.forEach(gr->{ |
|
|
|
agencyList.forEach(gr -> { |
|
|
|
ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid(); |
|
|
|
org.setOrgId(gr.getAgencyId()); |
|
|
|
org.setOrgName(gr.getAgencyName()); |
|
|
@ -1497,7 +1509,7 @@ public class GovOrgServiceImpl implements GovOrgService { |
|
|
|
} else { |
|
|
|
//2-2.直属下级网格列表
|
|
|
|
gridList = customerGridDao.getSubGridList(customerId, agencyId); |
|
|
|
gridList.forEach(gr->{ |
|
|
|
gridList.forEach(gr -> { |
|
|
|
ScreenAgencyOrGridListDTO.AgencyGrid org = new ScreenAgencyOrGridListDTO.AgencyGrid(); |
|
|
|
org.setOrgId(gr.getGridId()); |
|
|
|
org.setOrgName(gr.getGridName()); |
|
|
|