Пример #1
0
        public async Task <List <YaeherDoctorInfo> > DoctorInfoList()
        {
            List <YaeherDoctorInfo> yaeherDoctorInfos = new List <YaeherDoctorInfo>();
            // 查询医生基本信息
            List <YaeherDoctor> yaeherDoctors = await _Doctorrepository.GetAllListAsync(t => t.IsDelete == false);

            if (yaeherDoctors.Count() > 0)
            {
                foreach (var DoctorInfo in yaeherDoctors)
                {
                    YaeherDoctorInfo yaeherDoctorInfo = new YaeherDoctorInfo();
                    yaeherDoctorInfo.DoctorInfo = DoctorInfo;
                    var UserId = DoctorInfo.UserID;
                    // 用户基本信息
                    yaeherDoctorInfo.YaeherUserInfo = _repository.FirstOrDefault(t => t.Id == UserId && t.IsDelete == false);
                    // 医生与标签关系
                    yaeherDoctorInfo.DoctorRelationList = _DoctorRelationrepository.GetAll().Where(a => a.IsDelete == false && a.DoctorID == DoctorInfo.Id).ToList();
                    // 医生提供服务
                    yaeherDoctorInfo.ServiceMoneyLists = _ServiceMoneyListrepository.GetAll().Where(a => a.IsDelete == false && a.DoctorID == DoctorInfo.Id).ToList();
                    // 医生支付方式
                    yaeherDoctorInfo.YaeherUserPayment = _YaeherUserPaymentrepository.GetAll().Where(a => a.IsDelete == false && a.UserID == UserId).ToList();
                    // 标签 疾病类型
                    yaeherDoctorInfo.LableManageList = _LableManagerepository.GetAll().Where(a => a.IsDelete == false).ToList();
                    // 医生基础参数配置
                    var DoctorParaSetList = _DoctorParaSetrepository.GetAll().Where(a => a.IsDelete == false);
                    List <SystemParameter> SystemParameterList = new List <SystemParameter>();
                    if (DoctorParaSetList.Count() > 0)
                    {
                        foreach (var DoctorParInfo in DoctorParaSetList)
                        {
                            SystemParameter systemParameter = new SystemParameter();
                            systemParameter.SystemType = DoctorParInfo.DoctorParaSetCode;
                            systemParameter.SystemCode = DoctorParInfo.DoctorParaSetCode;
                            systemParameter.Code       = DoctorParInfo.DoctorParaSetCode;
                            systemParameter.Name       = DoctorParInfo.DoctorParaSetName;
                            systemParameter.ItemValue  = DoctorParInfo.ItemValue;
                            systemParameter.Remark     = DoctorParInfo.DoctorParaSetName;
                            SystemParameterList.Add(systemParameter);
                        }
                    }
                    if (SystemParameterList.Count() > 0)
                    {
                        yaeherDoctorInfo.InquiryMaxCount        = SystemParameterList.FirstOrDefault(a => a.SystemCode == "InquiryMaxCount");
                        yaeherDoctorInfo.WxPayBusinessId        = SystemParameterList.FirstOrDefault(a => a.SystemCode == "WxPayBusinessId");
                        yaeherDoctorInfo.ConsultationSucessTime = SystemParameterList.FirstOrDefault(a => a.SystemCode == "ConsultationSucessTime");
                        yaeherDoctorInfo.ReplyMinutesTime       = SystemParameterList.FirstOrDefault(a => a.SystemCode == "ReplyMinutesTime");
                    }
                    yaeherDoctorInfos.Add(yaeherDoctorInfo);
                }
            }
            return(yaeherDoctorInfos);
        }
Пример #2
0
        public YaeherDoctorInfo DoctorInformation(int DoctorID)
        {
            YaeherDoctorInfo yaeherDoctorInfo = new YaeherDoctorInfo();

            // 查询医生基本信息
            yaeherDoctorInfo.DoctorInfo = _Doctorrepository.FirstOrDefault(t => t.Id == DoctorID && t.IsDelete == false);
            var UserId = yaeherDoctorInfo.DoctorInfo.UserID;

            // 用户基本信息
            yaeherDoctorInfo.YaeherUserInfo = _repository.FirstOrDefault(t => t.Id == UserId && t.IsDelete == false);
            // 医生与标签关系
            yaeherDoctorInfo.DoctorRelationList = _DoctorRelationrepository.GetAll().Where(a => a.IsDelete == false && a.DoctorID == DoctorID).ToList();
            // 医生提供服务
            yaeherDoctorInfo.ServiceMoneyLists = _ServiceMoneyListrepository.GetAll().Where(a => a.IsDelete == false && a.DoctorID == DoctorID).ToList();
            // 医生支付方式
            yaeherDoctorInfo.YaeherUserPayment = _YaeherUserPaymentrepository.GetAll().Where(a => a.IsDelete == false && a.UserID == UserId).ToList();
            // 标签 疾病类型
            yaeherDoctorInfo.LableManageList = _LableManagerepository.GetAll().Where(a => a.IsDelete == false).ToList();
            // 医生上下线信息
            yaeherDoctorInfo.DoctorOnlineRecord = _DoctorOnlineRecordrepository.GetAll().Where(a => a.IsDelete == false && a.DoctorID == DoctorID).OrderByDescending(a => a.CreatedOn).FirstOrDefault();

            // 基础参数配置
            //var SystemParameterList = _SystemParameterrepository.GetAll().Where(a => a.IsDelete == false);
            // 医生基础参数配置
            var DoctorParaSetList = _DoctorParaSetrepository.GetAll().Where(a => a.IsDelete == false);
            List <SystemParameter> SystemParameterList = new List <SystemParameter>();

            if (DoctorParaSetList.Count() > 0)
            {
                foreach (var DoctorParInfo in DoctorParaSetList)
                {
                    SystemParameter systemParameter = new SystemParameter();
                    systemParameter.SystemType = DoctorParInfo.DoctorParaSetCode;
                    systemParameter.SystemCode = DoctorParInfo.DoctorParaSetCode;
                    systemParameter.Code       = DoctorParInfo.DoctorParaSetCode;
                    systemParameter.Name       = DoctorParInfo.DoctorParaSetName;
                    systemParameter.ItemValue  = DoctorParInfo.ItemValue;
                    systemParameter.Remark     = DoctorParInfo.DoctorParaSetName;
                    SystemParameterList.Add(systemParameter);
                }
            }
            if (SystemParameterList.Count() > 0)
            {
                yaeherDoctorInfo.InquiryMaxCount        = SystemParameterList.FirstOrDefault(a => a.SystemCode == "InquiryMaxCount");
                yaeherDoctorInfo.WxPayBusinessId        = SystemParameterList.FirstOrDefault(a => a.SystemCode == "WxPayBusinessId");
                yaeherDoctorInfo.ConsultationSucessTime = SystemParameterList.FirstOrDefault(a => a.SystemCode == "ConsultationSucessTime");
                yaeherDoctorInfo.ReplyMinutesTime       = SystemParameterList.FirstOrDefault(a => a.SystemCode == "ReplyMinutesTime");
            }

            return(yaeherDoctorInfo);
        }