コード例 #1
0
        public async Task <IList <QualityCommitteeRegister> > QualityCommitteeRegisterList(QualityCommitteeRegisterIn QualityCommitteeRegisterInfo)
        {
            var query = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(QualityCommitteeRegisterInfo.Expression);

            if (!string.IsNullOrEmpty(QualityCommitteeRegisterInfo.ClinicName))
            {
                query = query.Where(a => a.ClinicName.Contains(QualityCommitteeRegisterInfo.ClinicName));
            }
            if (!string.IsNullOrEmpty(QualityCommitteeRegisterInfo.DoctorName))
            {
                query = query.Where(a => a.DoctorName.Contains(QualityCommitteeRegisterInfo.DoctorName));
            }
            var QualityCommitteeRegisters = await _repository.GetAllListAsync(QualityCommitteeRegisterInfo.Expression);

            return(await query.OrderByDescending(t => t.CreatedOn).ToListAsync());
        }
コード例 #2
0
        public async Task <PagedResultDto <QualityCommitteeRegister> > QualityCommitteeRegisterPage(QualityCommitteeRegisterIn QualityCommitteeRegisterInfo)
        {
            //初步过滤
            var query = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(a => a.IsDelete == false);

            if (!string.IsNullOrEmpty(QualityCommitteeRegisterInfo.ClinicName))
            {
                query = query.Where(a => a.ClinicName.Contains(QualityCommitteeRegisterInfo.ClinicName));
            }
            if (!string.IsNullOrEmpty(QualityCommitteeRegisterInfo.DoctorName))
            {
                query = query.Where(a => a.DoctorName.Contains(QualityCommitteeRegisterInfo.DoctorName));
            }
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage = tasksCount / QualityCommitteeRegisterInfo.MaxResultCount;
            var QualityCommitteeRegisterList = await query.PageBy(QualityCommitteeRegisterInfo.SkipTotal, QualityCommitteeRegisterInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <QualityCommitteeRegister>(tasksCount, QualityCommitteeRegisterList.MapTo <List <QualityCommitteeRegister> >()));
        }
コード例 #3
0
        public async Task <PagedResultDto <QualityManager> > QualityDoctorRegisterInformation(QualityCommitteeRegisterIn clinic, IList <DoctorRelation> rel)
        {
            var doc      = _docrepository.GetAll().Where(t => !t.IsDelete);
            var user     = _userrepository.GetAll().Where(t => !t.IsDelete);
            var register = _repository.GetAll().Where(clinic.Expression);

            var query = from a in doc
                        join b in user on a.UserID equals b.Id
                        join d in register on a.Id equals d.DoctorID
                        where  a.CheckRes == "success" && a.AuthCheckRes == "success"
                        select new QualityManager
            {
                UserImage                  = b.UserImage,
                DoctorName                 = a.DoctorName,
                DoctorLevel                = "4.1",
                UserID                     = b.Id,
                HospitalName               = a.HospitalName,
                Department                 = a.Department,
                Title                      = a.Title,
                Status                     = "1",
                Id                         = a.Id,
                QualityControlId           = d.Id,
                CreatedOn                  = d.CreatedOn,
                CheckState                 = d.CheckState,
                QualityCommitteeRegisterId = d.Id
            };

            query = query.OrderBy(a => a.CheckState).ThenByDescending(a => a.QualityControlId);
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage            = tasksCount / clinic.MaxResultCount;
            var ClinicInfomationList = await query.PageBy(clinic.SkipTotal, clinic.MaxResultCount).ToListAsync();

            return(new PagedResultDto <QualityManager>(tasksCount, ClinicInfomationList.MapTo <List <QualityManager> >()));
        }
コード例 #4
0
 /// <summary>
 /// 输出模型
 /// </summary>
 /// <param name="ClinicInfomationDto"></param>
 /// <param name="ClinicInfomationInfo"></param>
 public QualityDoctorInfoOut(PagedResultDto <QualityManager> ClinicInfomationDto, QualityCommitteeRegisterIn ClinicInfomationInfo)
 {
     Items          = ClinicInfomationDto.Items;
     TotalCount     = ClinicInfomationDto.TotalCount;
     TotalPage      = ClinicInfomationDto.TotalCount / ClinicInfomationInfo.MaxResultCount;
     SkipCount      = ClinicInfomationInfo.SkipCount;
     MaxResultCount = ClinicInfomationInfo.MaxResultCount;
 }