|  | @@ -108,6 +108,9 @@ public class PatrolInspectionPersonnelServiceImpl extends AbstractCrudService<Pa
 | 
	
		
			
				|  |  |          if (id != 0 && id != null) {
 | 
	
		
			
				|  |  |              queryWrapper.eq(PatrolInspectionPersonnel::getId, id);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        if (areaId != 0 && areaId != null) {
 | 
	
		
			
				|  |  | +            queryWrapper.eq(PatrolInspectionPersonnel::getAreaId, areaId);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          List<PatrolInspectionPersonnel> list = this.list(queryWrapper);
 | 
	
		
			
				|  |  |          List<PatrolInspectionPersonnelVo> list1 = new ArrayList<>();
 | 
	
		
			
				|  |  |          if (list.size() > 0) {
 | 
	
	
		
			
				|  | @@ -196,4 +199,46 @@ public class PatrolInspectionPersonnelServiceImpl extends AbstractCrudService<Pa
 | 
	
		
			
				|  |  |          return patrolInspectionAreaVoListOne;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Override
 | 
	
		
			
				|  |  | +    public List<PatrolInspectionPersonnelVo> patrolInspectionPersonnelSelect(Integer areaId) {
 | 
	
		
			
				|  |  | +        LoginUser loginUser = SecurityUtils.getLoginUser();
 | 
	
		
			
				|  |  | +        String userType = null;
 | 
	
		
			
				|  |  | +        if (loginUser != null && !"".equals(loginUser)) {
 | 
	
		
			
				|  |  | +            userType = loginUser.getUserType();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        LambdaQueryWrapper<PatrolInspectionPersonnel> queryWrapper = Wrappers.lambdaQuery();
 | 
	
		
			
				|  |  | +        queryWrapper.eq(PatrolInspectionPersonnel::getEnable, 1)
 | 
	
		
			
				|  |  | +                .eq(PatrolInspectionPersonnel::getTenantId, SecurityUtils.getTenantId());
 | 
	
		
			
				|  |  | +        if ("00".equals(userType)) {
 | 
	
		
			
				|  |  | +            queryWrapper.eq(PatrolInspectionPersonnel::getCreator, SecurityUtils.getUsername());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (areaId != 0 && areaId != null) {
 | 
	
		
			
				|  |  | +            queryWrapper.eq(PatrolInspectionPersonnel::getAreaId, areaId);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        List<PatrolInspectionPersonnel> list = this.list(queryWrapper);
 | 
	
		
			
				|  |  | +        List<PatrolInspectionPersonnelVo> list1 = new ArrayList<>();
 | 
	
		
			
				|  |  | +        if (list.size() > 0) {
 | 
	
		
			
				|  |  | +            ApiResult<List<SysUser>> userApi = remoteUserService.userList();
 | 
	
		
			
				|  |  | +            List<SysUser> userList = userApi.getData();
 | 
	
		
			
				|  |  | +            for (int i = 0; i < list.size(); i++) {
 | 
	
		
			
				|  |  | +                PatrolInspectionPersonnelVo patrolInspectionPersonnelVo = new PatrolInspectionPersonnelVo();
 | 
	
		
			
				|  |  | +                patrolInspectionPersonnelVo.setCreator(list.get(i).getCreator());
 | 
	
		
			
				|  |  | +                patrolInspectionPersonnelVo.setCompanyId(list.get(i).getCompanyId());
 | 
	
		
			
				|  |  | +                patrolInspectionPersonnelVo.setEnable(list.get(i).getEnable());
 | 
	
		
			
				|  |  | +                patrolInspectionPersonnelVo.setCreateTime(list.get(i).getCreateTime());
 | 
	
		
			
				|  |  | +                patrolInspectionPersonnelVo.setId(list.get(i).getId());
 | 
	
		
			
				|  |  | +                patrolInspectionPersonnelVo.setTenantId(list.get(i).getTenantId());
 | 
	
		
			
				|  |  | +                patrolInspectionPersonnelVo.setAreaId(list.get(i).getAreaId());
 | 
	
		
			
				|  |  | +                patrolInspectionPersonnelVo.setUserId(list.get(i).getUserId());
 | 
	
		
			
				|  |  | +                for (int j = 0; j <userList.size(); j++) {
 | 
	
		
			
				|  |  | +                    if (list.get(i).getUserId().longValue()==userList.get(j).getUserId()){
 | 
	
		
			
				|  |  | +                        patrolInspectionPersonnelVo.setName(userList.get(j).getNickName());
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                list1.add(patrolInspectionPersonnelVo);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return list1;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  }
 |