diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index e18f987db..249234795 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -1247,10 +1247,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public JudgeTypeEnum JudgeType { get; set; } - /// - /// 类型值 - /// - public string TypeValue { get; set; } + public int ShowOrder { get; set; } + + /// + /// 类型值 + /// + public string TypeValue { get; set; } /// /// 数值类型 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs index 61110da35..441d8c1ad 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs @@ -248,18 +248,63 @@ namespace IRaCIS.Application.Services GlobalReadingShowType=y.ReadingQuestionTrial.GlobalReadingShowType, AnswerCombination = y.ReadingQuestionTrial.AnswerCombination, JudgeType = y.ReadingQuestionTrial.JudgeType, - Type = y.ReadingQuestionTrial.Type, + ShowOrder= y.ReadingQuestionTrial.ShowOrder, + Type = y.ReadingQuestionTrial.Type, TypeValue = y.ReadingQuestionTrial.TypeValue, ValueType = y.ReadingQuestionTrial.ValueType, IsJudgeQuestion =y.ReadingQuestionTrial.IsJudgeQuestion, Answer =y.Answer, }).ToList() }).ToListAsync(); + var globalQuestionList = await _readingQuestionTrialRepository.Where(x => x.GlobalReadingShowType != GlobalReadingShowType.NotShow && x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId).IgnoreAutoIncludes().ToListAsync(); + + + result.TaskList.ForEach(x => { x.CrterionDictionaryGroup = ReadingCommon.GetCrterionDictionaryGroup(x.IsConvertedTask); - }); + if (x.BeforeQuestionList.Count() != globalQuestionList.Count()) + { + var beforeQuestionIds = x.BeforeQuestionList.Select(x => x.QuestionId).ToList(); + + globalQuestionList.ForEach(y => + { + if (!beforeQuestionIds.Contains(y.Id)) + { + x.BeforeQuestionList.Add(new GlobalQuestionInfo() + { + QuestionId = y.Id, + QuestionName = y.QuestionName.LanguageName(y.QuestionEnName, _userInfo.IsEn_Us), + QuestionEnName = y.QuestionEnName, + AnswerGroup = y.AnswerGroup, + QuestionType = y.QuestionType, + LimitEdit = y.LimitEdit, + MaxAnswerLength = y.MaxAnswerLength, + FileType = y.FileType, + QuestionGenre = y.QuestionGenre, + ShowOrder=y.ShowOrder, + DictionaryCode = y.DictionaryCode, + GlobalReadingShowType = y.GlobalReadingShowType, + AnswerCombination = y.AnswerCombination, + JudgeType = y.JudgeType, + Type = y.Type, + TypeValue = y.TypeValue, + ValueType = y.ValueType, + IsJudgeQuestion = y.IsJudgeQuestion, + Answer = string.Empty, + + }); + + } + + }); + + } + + x.BeforeQuestionList = x.BeforeQuestionList.OrderBy(y => y.ShowOrder).ToList(); + + }); var globalReadingQuestion = await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == inDto.VisitTaskId).ToListAsync(); var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync(); diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidus.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidus.cs index 63dee9c27..659b5346c 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidus.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidus.cs @@ -12,7 +12,7 @@ namespace IRaCIS.Core.Domain.Models /// /// 标准病灶中间表 /// - [Table("CriterionNidus")] + [Table("CriterionNidusSystem")] public class CriterionNidus : Entity, IAuditAdd { diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingCriterionDictionary.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingCriterionDictionary.cs index 7357954ac..1957cdc22 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingCriterionDictionary.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingCriterionDictionary.cs @@ -10,7 +10,7 @@ namespace IRaCIS.Core.Domain.Models /// ///ReadingCriterionDictionary /// - [Table("ReadingCriterionDictionary")] + [Table("ReadingSystemCriterionDictionary")] public class ReadingCriterionDictionary : Entity, IAuditAdd { ///