Пример #1
0
        public async Task <PagedResultDto <DoctorParaSet> > DoctorParaSetPage(DoctorParaSetIn DoctorParaSetInfo)
        {
            //初步过滤
            var query = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(DoctorParaSetInfo.Expression);
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage         = tasksCount / DoctorParaSetInfo.MaxResultCount;
            var DoctorParaSetList = await query.PageBy(DoctorParaSetInfo.SkipTotal, DoctorParaSetInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <DoctorParaSet>(tasksCount, DoctorParaSetList.MapTo <List <DoctorParaSet> >()));
        }
Пример #2
0
        public async Task <List <DoctorParaSet> > DoctorParaSetList(DoctorParaSetIn DoctorParaSetInfo)
        {
            var DoctorParaSets = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(DoctorParaSetInfo.Expression);

            return(await DoctorParaSets.ToListAsync());
        }
Пример #3
0
        public async Task <ObjectResultModule> TencentCosAccessTokenType([FromBody] SecretModel file)
        {
            if (!Commons.CheckSecret(file.Secret))
            {
                this.ObjectResultModule.StatusCode = 422;
                this.ObjectResultModule.Message    = "Wrong Secret";
                this.ObjectResultModule.Object     = "";
                return(this.ObjectResultModule);
            }
            var param = new SystemParameterIn()
            {
                Type = "ConfigPar"
            };

            param.AndAlso(t => !t.IsDelete);
            var Totaltypelist = await _systemParameterService.ParameterList(param);

            //var param = new SystemParameterIn() { Type = "ConfigPar" };
            //  param.AndAlso(t => !t.IsDelete && t.SystemCode == "UploadType");
            var typelist = Totaltypelist.FindAll(t => t.SystemCode == "UploadType");

            //var mediaparam = new SystemParameterIn() { Type = "ConfigPar" };
            //mediaparam.AndAlso(t => !t.IsDelete && t.SystemCode == "MediaType");
            var medialist = Totaltypelist.FindAll(t => t.SystemCode == "MediaType");

            //var detailparam = new SystemParameterIn() { Type = "ConfigPar" };
            //detailparam.AndAlso(t => !t.IsDelete && t.SystemCode == "FileTypeDetail");
            var detaillist = Totaltypelist.FindAll(t => t.SystemCode == "FileTypeDetail");

            //var documentparam = new SystemParameterIn() { Type = "ConfigPar" };
            //documentparam.AndAlso(t => !t.IsDelete && t.SystemCode == "DocumentsUse");
            var documentlist = Totaltypelist.FindAll(t => t.SystemCode == "DocumentsUse");

            var imagethumnaillist = Totaltypelist.FindAll(t => t.SystemCode == "ImageThumNail");

            var coderesult = new List <CodeList>();

            foreach (var item in typelist)
            {
                var newcode = new CodeList()
                {
                    Code = item.Code, Value = item.Name, Type = item.SystemType, TypeCode = item.SystemCode
                };
                coderesult.Add(newcode);
            }
            var mediatype = new List <CodeList>();

            foreach (var item in medialist)
            {
                var mediacode = new CodeList()
                {
                    Code = item.Code, Value = item.Name, Type = item.SystemType, TypeCode = item.SystemCode
                };
                mediatype.Add(mediacode);
            }
            var typedetail = new List <CodeList>();

            foreach (var item in detaillist)
            {
                var detailcode = new CodeList()
                {
                    Code = item.Code, Value = item.Name, Type = item.SystemType, TypeCode = item.SystemCode
                };
                typedetail.Add(detailcode);
            }
            var documentdetail = new List <CodeList>();

            foreach (var item in documentlist)
            {
                var detailcode = new CodeList()
                {
                    Code = item.Code, Value = item.Name, Type = item.SystemType, TypeCode = item.SystemCode
                };
                documentdetail.Add(detailcode);
            }
            var imagethumnail = new List <CodeList>();

            foreach (var item in imagethumnaillist)
            {
                var detailcode = new CodeList()
                {
                    Code = item.Code, Value = item.ItemValue, Type = item.SystemType, TypeCode = item.SystemCode
                };
                imagethumnail.Add(detailcode);
            }

            var param1 = new DoctorParaSetIn();

            param1.AndAlso(t => !t.IsDelete);
            var Totalpara = await _doctorParaSetService.DoctorParaSetList(param1);

            //var paramlen = new SystemParameterIn() { SystemType = "ConsultationReplyLength" };
            //var paramlenlist = await _systemParameterService.ParameterList(paramlen);
            var maxReplyLength = int.Parse(Totalpara.Find(t => t.DoctorParaSetCode == "ConsultationReplyLength").ItemValue);//最大追问数

            //var paramlen1 = new SystemParameterIn() { SystemType = "ConsultationContentLength" };
            //var paramlenlist1 = await _systemParameterService.ParameterList(paramlen1);
            var maxConsultationLength = int.Parse(Totalpara.Find(t => t.DoctorParaSetCode == "ConsultationContentLength").ItemValue); //最大咨询数

            var maxReplyMaxLength = int.Parse(Totalpara.Find(t => t.DoctorParaSetCode == "ReplyMaxLength").ItemValue);                //最大回复字数
            //paramlen1 = new SystemParameterIn() { SystemType = "ConsultationImageCount" };
            //paramlenlist1 = await _systemParameterService.ParameterList(paramlen1);
            var ConsultationImageCount = int.Parse(Totalpara.Find(t => t.DoctorParaSetCode == "ConsultationImageCount").ItemValue);//咨询上传图片数

            //paramlen1 = new SystemParameterIn() { SystemType = "ConsultationImagesize" };
            //paramlenlist1 = await _systemParameterService.ParameterList(paramlen1);
            var ConsultationImagesize = double.Parse(Totalpara.Find(t => t.DoctorParaSetCode == "ConsultationImagesize").ItemValue);//图片大小

            //paramlen1 = new SystemParameterIn() { SystemType = "VideoCount" };
            //paramlenlist1 = await _systemParameterService.ParameterList(paramlen1);
            var VideoCount = int.Parse(Totalpara.Find(t => t.DoctorParaSetCode == "VideoCount").ItemValue);//视频数

            //paramlen1 = new SystemParameterIn() { SystemType = "VideoSize" };
            //paramlenlist1 = await _systemParameterService.ParameterList(paramlen1);
            var VideoSize = double.Parse(Totalpara.Find(t => t.DoctorParaSetCode == "VideoSize").ItemValue);//视频大小


            this.ObjectResultModule.Object     = new FileAllType(coderesult, mediatype, typedetail, documentdetail, imagethumnail, maxReplyLength, maxConsultationLength, maxReplyMaxLength, ConsultationImageCount, ConsultationImagesize, VideoCount, VideoSize);
            this.ObjectResultModule.StatusCode = 200;
            this.ObjectResultModule.Message    = "";
            return(this.ObjectResultModule);
        }