From 88b7b4d2f68966f1ff55953455cb7e46df4b84db Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 10 Jan 2023 14:20:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GeneralCalculateService.cs | 4 +- .../Service/WorkLoad/DoctorWorkloadService.cs | 71 +------------------ 2 files changed, 4 insertions(+), 71 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/GeneralCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/GeneralCalculateService.cs index 47587676..65200809 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/GeneralCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/GeneralCalculateService.cs @@ -167,10 +167,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate IsBaseLine = x.SourceSubjectVisit.IsBaseLine, VisitTaskId = x.Id, TaskName = x.TaskName, - LatestScanDate= x.SourceSubjectVisit==null?x.SourceSubjectVisit.LatestScanDate:null, + LatestScanDate= x.SourceSubjectVisit!=null?x.SourceSubjectVisit.LatestScanDate : null, VisitTaskNum = x.VisitTaskNum, IsCurrentTask = x.Id == visitTaskId, - + }).ToListAsync(); return taskInfoList; diff --git a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs index cd3d1ed2..742a14f1 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs @@ -199,26 +199,7 @@ namespace IRaCIS.Application.Services join allocateRule in _taskAllocationRuleRepository.AsQueryable() on intoGroup.Id equals allocateRule.EnrollId join doctor in _doctorRepository.AsQueryable() on intoGroup.DoctorId equals doctor.Id join attachmentItem in _attachmentRepository.AsQueryable() on intoGroup.AttachmentId equals attachmentItem.Id into cc - from attachment in cc.DefaultIfEmpty() - //join doctorWorkLoad in _doctorWorkloadRepository.Where(t => t.TrialId == trialId && t.DataFrom == (int)WorkLoadFromStatus.FinalConfirm).GroupBy(t => t.DoctorId).Select( - // g => new - // { - // DoctorId = g.Key, - - // Training = g.Sum(t => t.Training), - // Downtime = g.Sum(t => t.Downtime), - // Timepoint = g.Sum(t => t.Timepoint), - // TimepointIn24H = g.Sum(t => t.TimepointIn24H), - // TimepointIn48H = g.Sum(t => t.TimepointIn48H), - // Global = g.Sum(t => t.Global), - // Adjudication = g.Sum(t => t.Adjudication), - // AdjudicationIn24H = g.Sum(t => t.AdjudicationIn24H), - // AdjudicationIn48H = g.Sum(t => t.AdjudicationIn48H), - // RefresherTraining = g.Sum(t => t.RefresherTraining) - // } - - //) on intoGroup.DoctorId equals doctorWorkLoad.DoctorId into tt //连接为了得到入组时间 - //from doctorWorkLoad in tt.DefaultIfEmpty()//不是每个医生都有工作量 + from attachment in cc.DefaultIfEmpty() select new WorkLoadAndAgreementDTO() { @@ -243,61 +224,13 @@ namespace IRaCIS.Application.Services ReviewerReadingType = intoGroup.ReviewerReadingType, AgreementPath = attachment.Path, - //Timepoint = doctorWorkLoad.Timepoint, - //TimepointIn24H = doctorWorkLoad.TimepointIn24H, - //TimepointIn48H = doctorWorkLoad.TimepointIn48H, - //Adjudication = doctorWorkLoad.Adjudication, - //AdjudicationIn24H = doctorWorkLoad.AdjudicationIn24H, - //AdjudicationIn48H = doctorWorkLoad.AdjudicationIn48H, - - //Global = doctorWorkLoad.Global, - - //RefresherTraining = doctorWorkLoad.RefresherTraining, - //TrainingTimes = doctorWorkLoad.Training, - //Downtime = doctorWorkLoad.Downtime }; return await doctorIntoGroupQueryable.ToPagedListAsync(doctorSearchModel.PageIndex, doctorSearchModel.PageSize, doctorSearchModel.SortField == "" ? "EnrollTime" : doctorSearchModel.SortField, doctorSearchModel.Asc); - //var count = await doctorIntoGroupQueryable.CountAsync(); - - //if (string.IsNullOrWhiteSpace(doctorSearchModel.SortField)) - //{ - // doctorIntoGroupQueryable = doctorIntoGroupQueryable.OrderByDescending("EnrollTime").ThenBy(u => u.Code); - //} - //else - //{ - // if (doctorSearchModel.SortField == "FirstName" || doctorSearchModel.SortField == "LastName") - // { - // if (doctorSearchModel.Asc) - // { - // doctorIntoGroupQueryable = doctorIntoGroupQueryable.OrderBy("LastName").ThenBy(u => u.FirstName); - // } - // else - // { - // doctorIntoGroupQueryable = doctorIntoGroupQueryable.OrderByDescending("LastName").ThenByDescending(u => u.FirstName); - // } - // } - // else - // { - // var propName = doctorSearchModel.SortField == "" ? "EnrollTime" : doctorSearchModel.SortField; - // doctorIntoGroupQueryable = doctorSearchModel.Asc - // ? doctorIntoGroupQueryable.OrderBy(propName) - // : doctorIntoGroupQueryable.OrderBy(propName + " desc"); - // } - //} - ////分页 - //doctorIntoGroupQueryable = doctorIntoGroupQueryable - // .Skip((doctorSearchModel.PageIndex - 1) * doctorSearchModel.PageSize) - // .Take(doctorSearchModel.PageSize); - ////从数据库提取数据 - //var intoGroupList = doctorIntoGroupQueryable.ToList(); - - //return new PageOutput(doctorSearchModel.PageIndex, - // doctorSearchModel.PageSize, count, intoGroupList); - + } ///