Exemplo n.º 1
0
        public async Task <PagedResultDto <OrderManageDetail> > TotalOrderManagePage(ConsultationIn consultationIn)
        {
            //初步过滤
            var consul      = _yaeherConsultationrepository.GetAll().Where(consultationIn.Expression);
            var query       = _repository.GetAll().Where(t => t.IsDelete == false && t.DoctorID == consultationIn.DoctorID);
            var orderdetail = _orderdetailrepository.GetAll().Where(t => t.IsDelete == false && t.PayMoney > 0);
            var querydetail = from c in consul
                              join b in query on c.ConsultNumber equals b.ConsultNumber
                              join a in orderdetail on b.OrderNumber equals a.OrderNumber
                              select new OrderManageDetail
            {
                OrderNumber       = b.OrderNumber,
                ConsultNumber     = b.ConsultNumber,
                ConsultID         = b.ConsultID,
                ConsultType       = b.ConsultType,
                ConsultantID      = b.ConsultantID,
                ConsultantName    = b.ConsultantName,
                PatientID         = b.PatientID,
                PatientName       = b.PatientName,
                DoctorName        = b.DoctorName,
                DoctorID          = b.DoctorID,
                OrderCurrency     = b.OrderCurrency,
                OrderMoney        = a.PayMoney,
                ReceivablesType   = b.ReceivablesType,
                ReceivablesNumber = b.ReceivablesNumber,
                ServiceID         = b.ServiceID,
                ServiceName       = b.ServiceName,
                SellerMoneyID     = b.SellerMoneyID,
                TradeType         = b.TradeType,
                CreatedOn         = a.CreatedOn,
                Id = b.Id,
            };
            //获取总数
            var tasksCount = querydetail.Count();
            //获取总数
            var totalpage       = tasksCount / consultationIn.MaxResultCount;
            var OrderManageList = await querydetail.OrderByDescending(t => t.CreatedBy).PageBy(consultationIn.SkipTotal, consultationIn.MaxResultCount).ToListAsync();

            return(new PagedResultDto <OrderManageDetail>(tasksCount, OrderManageList.MapTo <List <OrderManageDetail> >()));
        }
Exemplo n.º 2
0
 /// <summary>
 /// 输出模型
 /// </summary>
 /// <param name="OrderManageDto"></param>
 /// <param name="OrderTradeRecordInfo"></param>
 public OrderManageTotalOut(PagedResultDto <OrderManageDetail> OrderManageDto, ConsultationIn OrderTradeRecordInfo)
 {
     Items          = OrderManageDto.Items;
     TotalCount     = OrderManageDto.TotalCount;
     TotalPage      = OrderManageDto.TotalCount / OrderTradeRecordInfo.MaxResultCount;
     SkipCount      = OrderTradeRecordInfo.SkipCount;
     MaxResultCount = OrderTradeRecordInfo.MaxResultCount;
 }
Exemplo n.º 3
0
        public async Task <IList <YaeherConsultation> > YaeherConsultationList(ConsultationIn YaeherConsultationInfo)
        {
            var YaeherConsultations = await _repository.GetAllListAsync(YaeherConsultationInfo.Expression);

            return(YaeherConsultations.ToList());
        }
Exemplo n.º 4
0
        public async Task <PagedResultDto <QualityConsultationPage> > QualityRefundYaeherConsultationPage(ConsultationIn YaeherConsultationInfo)
        {
            //初步过滤
            var query1 = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(YaeherConsultationInfo.Expression);
            var doctor = _doctorrepository.GetAll().OrderByDescending(a => a.CreatedOn).Where(t => !t.IsDelete);
            var refund = _refundrepository.GetAll().Where(t => !t.IsDelete);
            var user   = _userrepository.GetAll().Where(t => !t.IsDelete);
            var eva    = _evarepository.GetAll();
            var query  = from a in query1
                         join doc in doctor on a.DoctorID equals doc.Id
                         join c in user on doc.UserID equals c.Id
                         join b in refund on a.ConsultNumber equals b.ConsultNumber
                         join d in eva on a.Id equals d.ConsultID
                         where b.CreatedBy == YaeherConsultationInfo.CreatedBy
                         select new QualityConsultationPage
            {
                ConsultNumber       = a.ConsultNumber,
                ConsultantID        = a.ConsultantID,
                ConsultantName      = a.ConsultantName,
                DoctorName          = a.DoctorName,
                DoctorID            = a.DoctorID,
                PatientID           = a.PatientID,
                PatientName         = a.PatientName,
                ConsultType         = a.ConsultType,
                IIInessType         = a.IIInessType,
                PhoneNumber         = a.PhoneNumber,
                PatientCity         = a.PatientCity,
                IIInessDescription  = a.IIInessDescription,
                InquiryTimes        = a.InquiryTimes,
                ConsultState        = a.ConsultState,
                OvertimeRemindTimes = a.OvertimeRemindTimes,
                Overtime            = a.Overtime,
                RefundBy            = a.RefundBy,
                RefundTime          = a.RefundTime,
                RefundType          = a.RefundType,
                RefundNumber        = a.RefundNumber,
                RefundState         = a.RefundState,
                RefundReason        = b.RefundReason,
                RefundRemarks       = b.RefundRemarks,
                RecommendDoctorID   = a.RecommendDoctorID,
                RecommendDoctorName = a.RecommendDoctorName,
                HasReply            = a.HasReply,
                Age = a.Age,
                ServiceMoneyListId = a.ServiceMoneyListId,
                HasInquiryTimes    = a.HasInquiryTimes,
                IsReturnVisit      = a.IsReturnVisit,
                IsEvaluate         = a.IsEvaluate,
                ReturnVisit        = a.ReturnVisit,
                ReturnVisitTime    = a.ReturnVisitTime,
                Completetime       = a.Completetime,
                PatientJSON        = a.PatientJSON,
                Id        = a.Id,
                UserImage = c.UserImage,
                CreatedOn = a.CreatedOn,
                // IsQuality = d.IsQuality,
                //   QualityReason = d.QualityReason,
                QualityLevel = d.QualityLevel,
                //   EvaluateLevel = d.EvaluateLevel,
                //   EvaluateReason = d.EvaluateReason,
                //   EvaluateContent = d.EvaluateContent,
                RefundCheckState = b.CheckState
            };
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage = tasksCount / YaeherConsultationInfo.MaxResultCount;
            var YaeherConsultationList = await query.OrderByDescending(t => t.CreatedOn).PageBy(YaeherConsultationInfo.SkipTotal, YaeherConsultationInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <QualityConsultationPage>(tasksCount, YaeherConsultationList.MapTo <List <QualityConsultationPage> >()));
        }
Exemplo n.º 5
0
        public async Task <PagedResultDto <YaeherConsultation> > YaeherConsultationPage(ConsultationIn YaeherConsultationInfo)
        {
            //初步过滤
            var query = _repository.GetAll().Where(YaeherConsultationInfo.Expression).OrderByDescending(a => a.CreatedOn);
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage = tasksCount / YaeherConsultationInfo.MaxResultCount;
            var YaeherConsultationList = await query.OrderByDescending(t => t.CreatedOn).PageBy(YaeherConsultationInfo.SkipTotal, YaeherConsultationInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <YaeherConsultation>(tasksCount, YaeherConsultationList.MapTo <List <YaeherConsultation> >()));
        }