Exemplo n.º 1
0
        public async Task <PagedResultDto <RefundManage> > RefundManagePage(RefundManageIn RefundManageInfo)
        {
            //初步过滤
            var query1 = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(RefundManageInfo.Expression);
            var cons   = _consrepository.GetAll().Where(t => !t.IsDelete);

            if (string.IsNullOrEmpty(RefundManageInfo.RefundType))
            {
                //获取总数
                var tasksCount = query1.Count();
                //获取总数
                var totalpage        = tasksCount / RefundManageInfo.MaxResultCount;
                var RefundManageList = await query1.PageBy(RefundManageInfo.SkipTotal, RefundManageInfo.MaxResultCount).ToListAsync();

                return(new PagedResultDto <RefundManage>(tasksCount, RefundManageList.MapTo <List <RefundManage> >()));
            }
            else
            {
                var query = from a in query1
                            join b in cons on a.ConsultNumber equals b.ConsultNumber
                            where b.RefundType == RefundManageInfo.RefundType
                            select a;

                //获取总数
                var tasksCount = query.Count();
                //获取总数
                var totalpage        = tasksCount / RefundManageInfo.MaxResultCount;
                var RefundManageList = await query.PageBy(RefundManageInfo.SkipTotal, RefundManageInfo.MaxResultCount).ToListAsync();

                return(new PagedResultDto <RefundManage>(tasksCount, RefundManageList.MapTo <List <RefundManage> >()));
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 输出模型
 /// </summary>
 /// <param name="RefundManageDto"></param>
 /// <param name="RefundManageInfo"></param>
 public RefundManageOut(PagedResultDto <RefundManage> RefundManageDto, RefundManageIn RefundManageInfo)
 {
     Items          = RefundManageDto.Items;
     TotalCount     = RefundManageDto.TotalCount;
     TotalPage      = RefundManageDto.TotalCount / RefundManageInfo.MaxResultCount;
     SkipCount      = RefundManageInfo.SkipCount;
     MaxResultCount = RefundManageInfo.MaxResultCount;
 }
Exemplo n.º 3
0
        public async Task <List <RefundManage> > PayCheckRefundManageList(RefundManageIn RefundManageInfo)
        {
            var datetime      = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd"));
            var RefundManages = _repository.GetAll().Where(RefundManageInfo.Expression);

            var consul = _consrepository.GetAll().Where(t => t.IsDelete == false && t.DoctorID == RefundManageInfo.DoctorID && t.ServiceMoneyListId == RefundManageInfo.ServiceID);
            var query  = from a in RefundManages
                         join b in consul on a.ConsultNumber equals b.ConsultNumber
                         select a;

            return(await query.ToListAsync());
        }
Exemplo n.º 4
0
        public async Task <PagedResultDto <RefundManage> > CheckRefundManagePage(RefundManageIn RefundManageInfo)
        {
            //初步过滤
            var query1 = _repository.GetAll().OrderByDescending(a => a.CreatedOn).OrderByDescending(t => t.CheckState).Where(RefundManageInfo.Expression);
            //获取总数
            var tasksCount = query1.Count();
            //获取总数
            var totalpage        = tasksCount / RefundManageInfo.MaxResultCount;
            var RefundManageList = await query1.PageBy(RefundManageInfo.SkipTotal, RefundManageInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <RefundManage>(tasksCount, RefundManageList.MapTo <List <RefundManage> >()));
        }
Exemplo n.º 5
0
        public async Task <IList <RefundManage> > RefundManageList(RefundManageIn RefundManageInfo)
        {
            var RefundManages = await _repository.GetAllListAsync(RefundManageInfo.Expression);

            return(RefundManages.ToList());
        }