Пример #1
0
        /// <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);
        }
Пример #2
0
        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);
        }
Пример #3
0
 /// <summary>
 /// 获取成员信息分页
 /// </summary>
 /// <param name="employeePageRequestDto"></param>
 public async Task <PageData> GetListPagedOriginal(EmployeePageOriginalRequestDto input)
 {
     return(await _employeeDomainService.GetListPagedOriginal(input));
 }
Пример #4
0
        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);
        }