コード例 #1
0
        public async Task <List <DoctorClinicApply> > DoctorClinicApplyList(DoctorClinicApplyIn DoctorClinicApplyInfo)
        {
            var DoctorClinicApplys = await _repository.GetAllListAsync(DoctorClinicApplyInfo.Expression);

            return(DoctorClinicApplys.ToList());
        }
コード例 #2
0
        public async Task <List <DoctorClinicApplyOutDetail> > DoctorClinicApplyOutDetailList(DoctorClinicApplyIn DoctorClinicApplyInfo)
        {
            //初步过滤
            var query1      = _repository.GetAll().Where(DoctorClinicApplyInfo.Expression).OrderByDescending(t => t.CreatedOn);
            var syspara     = _pararepository.GetAll().Where(t => !t.IsDelete && t.SystemCode == "CheckType");
            var clinicquery = _clinicrepository.GetAll().Where(t => !t.IsDelete);
            var query       = from a in query1
                              join b in syspara on a.CheckRes equals b.Code
                              join c in clinicquery on a.ClinicID equals c.Id
                              select new DoctorClinicApplyOutDetail
            {
                DoctorName   = a.DoctorName,
                DoctorID     = a.DoctorID,
                ApplyType    = a.ApplyType,
                ClinicID     = a.ClinicID,
                ClinicName   = a.ClinicName,
                ApplyRemark  = a.ApplyRemark,
                CheckTime    = a.CheckTime,
                CheckRemark  = a.CheckRemark,
                ClinicType   = c.ClinicType,
                Id           = a.Id,
                CreatedOn    = a.CreatedOn,
                CheckResCode = a.CheckRes,
                CheckRes     = b.Name,
            };

            return(await query.ToListAsync());
        }
コード例 #3
0
        public async Task <PagedResultDto <DoctorClinicApplyOutDetail> > DoctorClinicApplyOutDetailPage(DoctorClinicApplyIn DoctorClinicApplyInfo)
        {
            //初步过滤
            var query1  = _repository.GetAll().Where(DoctorClinicApplyInfo.Expression).OrderByDescending(t => t.CreatedOn);
            var syspara = _pararepository.GetAll().Where(t => !t.IsDelete && t.SystemCode == "CheckType");
            var user    = _userrepository.GetAll().Where(t => !t.IsDelete);
            var doctor  = _doctorrepository.GetAll().Where(t => !t.IsDelete);
            var query   = from a in query1
                          join b in syspara on a.CheckRes equals b.Code
                          join c in doctor on a.DoctorID equals c.Id
                          join d in user on c.UserID equals d.Id
                          select new DoctorClinicApplyOutDetail
            {
                DoctorName   = a.DoctorName,
                DoctorID     = a.DoctorID,
                ApplyType    = a.ApplyType,
                ClinicID     = a.ClinicID,
                ClinicName   = a.ClinicName,
                ApplyRemark  = a.ApplyRemark,
                CheckTime    = a.CheckTime,
                CheckRemark  = a.CheckRemark,
                Id           = a.Id,
                CreatedOn    = a.CreatedOn,
                CheckResCode = a.CheckRes,
                CheckRes     = b.Name,
                UserImage    = d.UserImage,
            };
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage             = tasksCount / DoctorClinicApplyInfo.MaxResultCount;
            var DoctorClinicApplyList = await query.PageBy(DoctorClinicApplyInfo.SkipTotal, DoctorClinicApplyInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <DoctorClinicApplyOutDetail>(tasksCount, DoctorClinicApplyList.MapTo <List <DoctorClinicApplyOutDetail> >()));
        }