Uat_Study
he 2023-01-10 14:20:13 +08:00
parent d78e5469b2
commit 88b7b4d2f6
2 changed files with 4 additions and 71 deletions

View File

@ -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;

View File

@ -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<WorkLoadAndAgreementDTO>(doctorSearchModel.PageIndex,
// doctorSearchModel.PageSize, count, intoGroupList);
}
/// <summary>