| 
						
						
							
								
							
						
						
					 | 
					@ -198,41 +198,49 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //2.1:查询组织下部门列表
 | 
					 | 
					 | 
					        //2.1:查询组织下部门列表
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<DepartmentListResultDTO> listDept = customerDepartmentDao.selectDepartmentList(canTick.getAgencyId()); | 
					 | 
					 | 
					        List<DepartmentListResultDTO> listDept = customerDepartmentDao.selectDepartmentList(canTick.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<DeptListResultDTO> departmentList = ConvertUtils.sourceToTarget(listDept, DeptListResultDTO.class); | 
					 | 
					 | 
					        List<DeptListResultDTO> departmentList = ConvertUtils.sourceToTarget(listDept, DeptListResultDTO.class); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        //2.2:查询每一个部门下人员列表
 | 
					 | 
					 | 
					        List<CustomerStaffDepartmentDTO> deptStaffs = new ArrayList<>(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<String> deptIdList = departmentList.stream().map(DeptListResultDTO::getDepartmentId).collect(Collectors.toList()); | 
					 | 
					 | 
					        if (null != departmentList && departmentList.size() > NumConstant.ZERO) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<CustomerStaffDepartmentDTO> deptStaffs  = customerStaffDepartmentDao.selectDeptStaffs(deptIdList); | 
					 | 
					 | 
					            //2.2:查询每一个部门下人员列表
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        departmentList.forEach(dept->{ | 
					 | 
					 | 
					            List<String> deptIdList = departmentList.stream().map(DeptListResultDTO::getDepartmentId).collect(Collectors.toList()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            List<StaffListResultDTO> departmentStaffList = new ArrayList<>(); | 
					 | 
					 | 
					            deptStaffs = customerStaffDepartmentDao.selectDeptStaffs(deptIdList); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            deptStaffs.forEach(ds->{ | 
					 | 
					 | 
					            List<CustomerStaffDepartmentDTO> finalDeptStaffs = deptStaffs; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                if (dept.getDepartmentId().equals(ds.getDepartmentId())) { | 
					 | 
					 | 
					            departmentList.forEach(dept->{ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    if (!"project".equals(canTick.getType()) || "".equals(canTick.getDeptOrGridId()) || !dept.getDepartmentId().equals(canTick.getDeptOrGridId())) { | 
					 | 
					 | 
					                List<StaffListResultDTO> departmentStaffList = new ArrayList<>(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        StaffListResultDTO sf = new StaffListResultDTO(); | 
					 | 
					 | 
					                finalDeptStaffs.forEach(ds->{ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        sf.setStaffId(ds.getUserId()); | 
					 | 
					 | 
					                    if (dept.getDepartmentId().equals(ds.getDepartmentId())) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        departmentStaffList.add(sf); | 
					 | 
					 | 
					                        if (!"project".equals(canTick.getType()) || "".equals(canTick.getDeptOrGridId()) || !dept.getDepartmentId().equals(canTick.getDeptOrGridId())) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            StaffListResultDTO sf = new StaffListResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            sf.setStaffId(ds.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            departmentStaffList.add(sf); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    } | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                } | 
					 | 
					 | 
					                }); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                dept.setDepartmentStaffList(departmentStaffList); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }); | 
					 | 
					 | 
					            }); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            dept.setDepartmentStaffList(departmentStaffList); | 
					 | 
					 | 
					        } | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        }); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        //3:根据组织Id查询该组织下网格、人员列表
 | 
					 | 
					 | 
					        //3:根据组织Id查询该组织下网格、人员列表
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //3.1:查询组织下网格列表
 | 
					 | 
					 | 
					        //3.1:查询组织下网格列表
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<GridListResultDTO> gridList = customerGridDao.selectGridList(canTick.getAgencyId()); | 
					 | 
					 | 
					        List<GridListResultDTO> gridList = customerGridDao.selectGridList(canTick.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        //3.2:查询每一个网格下人员列表
 | 
					 | 
					 | 
					        List<CustomerStaffGridDTO> gridStaffs = new ArrayList<>(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<String> gridIdList = gridList.stream().map(GridListResultDTO::getGridId).collect(Collectors.toList()); | 
					 | 
					 | 
					        if (null != gridList && gridList.size() > NumConstant.ZERO) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        List<CustomerStaffGridDTO> gridStaffs  = customerStaffGridDao.selectGridStaffs(gridIdList); | 
					 | 
					 | 
					            //3.2:查询每一个网格下人员列表
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        gridList.forEach(grid->{ | 
					 | 
					 | 
					            List<String> gridIdList = gridList.stream().map(GridListResultDTO::getGridId).collect(Collectors.toList()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            List<StaffListResultDTO> gridStaffList = new ArrayList<>(); | 
					 | 
					 | 
					            gridStaffs  = customerStaffGridDao.selectGridStaffs(gridIdList); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            gridStaffs.forEach(gs->{ | 
					 | 
					 | 
					            List<CustomerStaffGridDTO> finalGridStaffs = gridStaffs; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                if(grid.getGridId().equals(gs.getGridId())){ | 
					 | 
					 | 
					            gridList.forEach(grid->{ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    if (!"project".equals(canTick.getType()) || "".equals(canTick.getDeptOrGridId()) || !grid.getGridId().equals(canTick.getDeptOrGridId())) { | 
					 | 
					 | 
					                List<StaffListResultDTO> gridStaffList = new ArrayList<>(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        StaffListResultDTO sf = new StaffListResultDTO(); | 
					 | 
					 | 
					                finalGridStaffs.forEach(gs->{ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        sf.setStaffId(gs.getUserId()); | 
					 | 
					 | 
					                    if(grid.getGridId().equals(gs.getGridId())){ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        gridStaffList.add(sf); | 
					 | 
					 | 
					                        if (!"project".equals(canTick.getType()) || "".equals(canTick.getDeptOrGridId()) || !grid.getGridId().equals(canTick.getDeptOrGridId())) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            StaffListResultDTO sf = new StaffListResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            sf.setStaffId(gs.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            gridStaffList.add(sf); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    } | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                } | 
					 | 
					 | 
					                }); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                grid.setGridStaffList(gridStaffList); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }); | 
					 | 
					 | 
					            }); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            grid.setGridStaffList(gridStaffList); | 
					 | 
					 | 
					        } | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        }); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        //4:汇总组织下人员、组织下部门下人员、组织下网格下人员Id集合,调用epmet-user服务查询工作人员基本信息
 | 
					 | 
					 | 
					        //4:汇总组织下人员、组织下部门下人员、组织下网格下人员Id集合,调用epmet-user服务查询工作人员基本信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<String> staffIdList1 = agencyStaffList.stream().map(StaffListResultDTO::getStaffId).collect(Collectors.toList()); | 
					 | 
					 | 
					        List<String> staffIdList1 = agencyStaffList.stream().map(StaffListResultDTO::getStaffId).collect(Collectors.toList()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<String> staffIdList2 = deptStaffs.stream().map(CustomerStaffDepartmentDTO::getUserId).collect(Collectors.toList()); | 
					 | 
					 | 
					        List<String> staffIdList2 = deptStaffs.stream().map(CustomerStaffDepartmentDTO::getUserId).collect(Collectors.toList()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |