diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index bea2328b0..acd44980c 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -1476,19 +1476,29 @@ namespace IRaCIS.Core.Application.Service.Common ).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault()?.JudgeArmEnum == item.ArmEnum ? true : false; } - //全局裁判了,选择了那个全局,那么对应全局下面的访视 设置裁判标记 + + //访视、全局列表中过滤出访视进行处理 foreach (var item in resultList.Where(t => t.ReadingCategory == ReadingCategory.Visit)) { + //全局裁判了,选择了那个全局,那么对应全局下面的访视 设置裁判标记 var selectJudegeGlobalList = resultList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.IsGenerateJudge == true).ToList(); - //全局修改了答案,那么给访视上赋值全局的结果 并且取的是最后的全局 - var existGlobalAnswer = selectJudegeGlobalList.Where(t => t.SubjectCode == item.SubjectCode).SelectMany(t => t.GlobalTaskAnswerList).Where(t => t.VisitTaskId == item.Id) - .OrderByDescending(t => t.GlobalTaskVisitNum).FirstOrDefault()?.Answer; + if (selectJudegeGlobalList.Count == 0) + { + //生成了裁判,但是裁判没有做 - item.OverallTumorEvaluationResult = string.IsNullOrEmpty(existGlobalAnswer) ? item.OverallTumorEvaluationResult : existGlobalAnswer; + item.IsGenerateJudge = null; + } + else + { - item.IsGenerateJudge = true; + if(selectJudegeGlobalList.Where(t => t.SubjectCode == item.SubjectCode).SelectMany(t => t.GlobalTaskAnswerList).Any(t => t.VisitTaskId == item.Id)) + { + item.IsGenerateJudge = true; + } + + } } diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index 7740b145b..e011609f2 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -935,6 +935,9 @@ namespace IRaCIS.Core.Application.Contracts public string SubjectCode { get; set; } = String.Empty; public Guid Id { get; set; } + + public Guid DoctorUserId { get; set; } + public string TaskName { get; set; } public string TaskBlindName { get; set; } @@ -964,7 +967,7 @@ namespace IRaCIS.Core.Application.Contracts //根据裁判的任务结果 设置访视任务的这个字段 该字段表示 裁判认同该任务的结果 [DictionaryTranslateAttribute("YesOrNo")] - public bool IsGenerateJudge { get; set; } + public bool? IsGenerateJudge { get; set; } [JsonIgnore] diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index d9c9aa987..71f380b62 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -192,7 +192,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.OverallTumorEvaluationResult, t => t.MapFrom(u => criterionType == CriterionType.RECIST1Point1 ?( u.SourceSubjectVisit.IsBaseLine==true ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.ExistDisease).FirstOrDefault()!.Answer: - u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).FirstOrDefault()!.Answer) + u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).Select(t=>t.IsGlobalChange?t.GlobalChangeAnswer:t.Answer).FirstOrDefault()) : criterionType == CriterionType.PCWG3 ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.SiteVisitForTumorEvaluation).FirstOrDefault()!.Answer : String.Empty ))