From 4413634a4473e7b27f5b15496814140eca9490c7 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 15 Jun 2022 09:08:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/ReadingQuestionService.cs | 6 +- .../Reading/ReadingQuestionAnswerTrial.cs | 59 +++++++++++++++++++ .../Reading/ReadingQuestionCriterionTrial.cs | 4 +- .../Reading/ReadingQuestionSystem.cs | 5 +- .../Reading/ReadingQuestionTrial.cs | 3 + 5 files changed, 69 insertions(+), 8 deletions(-) create mode 100644 IRaCIS.Core.Domain/Reading/ReadingQuestionAnswerTrial.cs diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index a5336fa19..2db911b99 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -125,8 +125,7 @@ namespace IRaCIS.Application.Services }); }); await _readingQuestionCriterionSystemRepository.AddRangeAsync(needAddCriterionList); - - await _readingQuestionCriterionSystemRepository.SaveChangesAsync(); + await _readingQuestionCriterionSystemRepository.SaveChangesAsync(); } ///// @@ -183,7 +182,6 @@ namespace IRaCIS.Application.Services var types = new List() { "select","radio" - }; var questionList =await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.ReadingQuestionCriterionSystemId) .Where(x=> types.Contains(x.Type)) @@ -258,7 +256,6 @@ namespace IRaCIS.Application.Services private void SetChildParentQuestion(Guid ReadingQuestionCriterionTrialId, Guid trialId, List systemQuesitonList,List needQuestionList) { var parentIdIsNullList = systemQuesitonList.Where(x => x.ParentId == null).ToList(); - parentIdIsNullList.ForEach(x => { var quesiton = x.Clone(); @@ -421,7 +418,6 @@ namespace IRaCIS.Application.Services var types = new List() { "select","radio" - }; var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId) .Where(x => types.Contains(x.Type)) diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionAnswerTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionAnswerTrial.cs new file mode 100644 index 000000000..d8c0d8552 --- /dev/null +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionAnswerTrial.cs @@ -0,0 +1,59 @@ + + +using System; +using IRaCIS.Core.Domain.Share; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using IRaCIS.Core.Domain.Share.Reading; +using System.Collections.Generic; + +namespace IRaCIS.Core.Domain.Models +{ + /// + /// 项目阅片问题答案 + /// + [Table("ReadingQuestionAnswerTrial")] + public class ReadingQuestionAnswerTrial : Entity, IAuditAdd + { + /// + /// 项目问题Id + /// + public Guid ReadingQuestionTrialId { get; set; } + + /// + /// 项目ID + /// + public Guid TrialId { get; set; } + + /// + /// 受试者Id + /// + public Guid SubjectId { get; set; } + + /// + /// 阅片Id + /// + public Guid ReadingId { get; set; } + + /// + /// 答案 + /// + public string Answer { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } + + /// + /// 创建人 + /// + public Guid CreateUserId { get; set; } + } + + + + + + +} diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs index f70ddb97c..c5d041fcf 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs @@ -20,6 +20,9 @@ namespace IRaCIS.Core.Domain.Models /// public Guid? ReadingQuestionCriterionSystemId { get; set; } + /// + /// 项目Id + /// public Guid TrialId { get; set; } /// @@ -42,7 +45,6 @@ namespace IRaCIS.Core.Domain.Models /// public Guid CreateUserId { get; set; } - /// /// 是否确认 /// diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs index 3ffd64dad..f23a29205 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs @@ -50,13 +50,14 @@ namespace IRaCIS.Core.Domain.Models /// public Guid? ParentId { get; set; } - /// /// 类型值 /// public string TypeValue { get; set; } - + /// + /// 是否启用 + /// public bool IsEnable { get; set; } /// diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs index e0918d74a..5c046b420 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs @@ -20,6 +20,9 @@ namespace IRaCIS.Core.Domain.Models /// public Guid ReadingQuestionCriterionTrialId { get; set; } + /// + /// 项目Id + /// public Guid TrialId { get; set; } ///