diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs index 1e65c8118..ed5e05f00 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs @@ -55,31 +55,23 @@ namespace IRaCIS.Core.Application.Service // 单审有序 if (medicalReviewInfo.IsReadingTaskViewInOrder) { - switch (medicalReviewInfo.ReadingType) + medicalReviewInfo.TaskList = await _visitTaskRepository.Where(x => x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId + && x.DoctorUserId == taskInfo.DoctorUserId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReReadingApplyState != ReReadingApplyState.Agree + ).OrderBy(x => x.VisitTaskNum).Select(x => new TaskInfo() + { + Id = x.Id, + ReadingCategory = x.ReadingCategory, + TaskBlindName = x.TaskBlindName, + TaskName = x.TaskName + }).ToListAsync(); + if (medicalReviewInfo.ReadingType == ReadingMethod.Double) { - //case ReadingMethod.Single: - // await GetOrderTaskInfo(); - // break; - //case ReadingMethod.Double: - // await GetOrderTaskInfo(); - // break; + //medicalReviewInfo.OtherDoctorTaskList= } } - //// 有序任务列表 - //async Task GetOrderTaskInfo() - //{ - // medicalReviewInfo.TaskList = await _visitTaskRepository.Where(x => x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId - // && x.DoctorUserId == taskInfo.DoctorUserId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReReadingApplyState != ReReadingApplyState.Agree - // ).OrderBy(x => x.VisitTaskNum).Select(x => new TaskInfo() - // { - // Id = x.Id, - // ReadingCategory = x.ReadingCategory, - // TaskBlindName = x.TaskBlindName, - // TaskName = x.TaskName - // }).ToListAsync(); - //} + return medicalReviewInfo; diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index 66b868d8e..6294e8521 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -425,7 +425,9 @@ namespace IRaCIS.Application.Services { var trialUsrSystemIds = _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId && x.ReadingQuestionCriterionSystemId != null) .Select(x => x.ReadingQuestionCriterionSystemId); - var needAddSystemDataList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id)&&x.Dictionary.IsEnable).Include(x=>x.ReadingQuestionSystemList).ToListAsync(); + var trialCriterionNames= _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId) + .Select(x => x.CriterionName); + var needAddSystemDataList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id)&&x.Dictionary.IsEnable&& !trialCriterionNames.Contains(x.CriterionName)).Include(x=>x.ReadingQuestionSystemList).ToListAsync(); List needAddCriterionList = new List(); List needAddQuestionList = new List(); needAddSystemDataList.ForEach(x =>