diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index 3835792cd..c4864d213 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -92,6 +92,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto { public Guid? QuestionId { get; set; } + public bool IsHaveChange { get; set; } = false; + public string QuestionName { get; set; } public string Answer { get; set; } @@ -357,8 +359,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string QuestionName { get; set; } - public string Answer { get; set; } + public dynamic Answer { get; set; } + public JudgeReadingQuestionType QuestionType { get; set; } = JudgeReadingQuestionType.Question; } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index aceeab303..bd98b44ff 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -209,6 +209,7 @@ namespace IRaCIS.Application.Services (lr.global.Select(x => x.Answer).FirstOrDefault().IsNullOrEmpty()&& inDto.UsingOriginalData? lr.question.Answer:lr.global.Select(x => x.Answer).FirstOrDefault() ), + IsHaveChange= lr.global==null? false: lr.global.Any(), QuestionId = lr.question.QuestionId, QuestionName = lr.question.QuestionName, Type = lr.question.Type, @@ -801,7 +802,7 @@ namespace IRaCIS.Application.Services VisitTaskInfoList = new List(), }; - judgeReadingInfo.VisitTaskInfoList.Add(new JudgeReadingQuestion() + var judgeReadingQuestion = new JudgeReadingQuestion() { ArmEnum = item.ArmEnum, VisitTaskId = item.VisitTaskId, @@ -812,10 +813,28 @@ namespace IRaCIS.Application.Services QuestionId = x.QuestionId.Value, QuestionName = x.QuestionName }).ToList() + }; + + + + // 加全局是否更新 和访视点注释 + judgeReadingQuestion.JudgeQuestionList.Add( new JudgeQuestion() { + Answer= item.AfterQuestionList.Any(x=>x.IsHaveChange), + QuestionType= JudgeReadingQuestionType.GlobalChange, + }); + + judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion() + { + Answer = item.AfterQuestionList.Where(x => x.QuestionId==null).Select(x=>x.Answer).FirstOrDefault(), + QuestionType = JudgeReadingQuestionType.VisitRemark, + + }); + + judgeReadingInfo.VisitTaskInfoList.Add(judgeReadingQuestion); if (twoItem != null) { - judgeReadingInfo.VisitTaskInfoList.Add(new JudgeReadingQuestion() + var rTwoJudge = new JudgeReadingQuestion() { ArmEnum = twoItem.ArmEnum, VisitTaskId = twoItem.VisitTaskId, @@ -826,7 +845,24 @@ namespace IRaCIS.Application.Services QuestionId = x.QuestionId.Value, QuestionName = x.QuestionName }).ToList() + }; + + // 加全局是否更新 和访视点注释 + judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion() + { + Answer = twoItem.AfterQuestionList.Any(x => x.IsHaveChange), + QuestionType = JudgeReadingQuestionType.GlobalChange, + }); + + judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion() + { + Answer = twoItem.AfterQuestionList.Where(x => x.QuestionId == null).Select(x => x.Answer).FirstOrDefault(), + QuestionType = JudgeReadingQuestionType.VisitRemark, + + }); + + judgeReadingInfo.VisitTaskInfoList.Add(rTwoJudge); } judgeInfo.VisitInfoList.Add(judgeReadingInfo); diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index b4120536a..ec882e92f 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -179,6 +179,27 @@ namespace IRaCIS.Core.Domain.Share Read = 2, } + /// + /// 裁判阅片问题类型 + /// + public enum JudgeReadingQuestionType + { + /// + /// 问题 + /// + Question=1, + + /// + /// 全局修改 + /// + GlobalChange=2, + + /// + /// 访视点注释 + /// + VisitRemark = 3, + } + public enum JudgeTypeEnum { None=0,