/// <summary> /// 分页获取 /// </summary> /// <param name="employeePageRequestDto"></param> /// <returns></returns> public async Task <PageData> GetListPagedOriginalAsync(EmployeePageOriginalRequestDto employeePageOriginalRequestDto) { var pageData = new PageData(employeePageOriginalRequestDto.PageIndex, employeePageOriginalRequestDto.PageSize); var list = await _employeeRespository.WherePaged(pageData, employeePageOriginalRequestDto.GetEmployeeOriginalExpression(), e => e.CreateDate, false); pageData.Data = list.MapToList <Employee, EmployeeQueryDto>().ToList(); return(pageData); }
public async Task <PageData> GetListPagedOriginal(EmployeePageOriginalRequestDto employeePageOriginalRequestDto) { var pageData = await _employeeAppService.GetListPagedOriginalAsync(employeePageOriginalRequestDto); var employeeDtos = pageData.Data as List <EmployeeQueryDto>; await GetRoleAndOrgName(employeeDtos); pageData.Data = employeeDtos; return(pageData); }
/// <summary> /// 获取成员信息分页 /// </summary> /// <param name="employeePageRequestDto"></param> public async Task <PageData> GetListPagedOriginal(EmployeePageOriginalRequestDto input) { return(await _employeeDomainService.GetListPagedOriginal(input)); }
public static Expression <Func <Employee, bool> > GetEmployeeOriginalExpression(this EmployeePageOriginalRequestDto employeeQueryRequest) { var empty = string.Empty; Expression <Func <Employee, bool> > employeeExpressionAnd = m => m.Id.ToString() != empty && m.IsDelete == false; if (!string.IsNullOrEmpty(employeeQueryRequest.QueryKey)) { employeeExpressionAnd = employeeExpressionAnd.And(m => m.Name.Contains(employeeQueryRequest.QueryKey) || m.Mobile.Contains(employeeQueryRequest.QueryKey), employeeQueryRequest.QueryKey); } return(employeeExpressionAnd); }