From 3f524341bd8d2c3663afe52b8e56bc88401303d9 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 4 Aug 2022 14:53:23 +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 --- .../QC/DTO/QCQuestionConfigureViewModel.cs | 1 - .../QC/DTO/TrialQCQuestionConfigureViewModel.cs | 3 +++ .../Service/QC/Interface/IQCQuestionService.cs | 2 ++ .../Service/QC/TrialQCQuestionService.cs | 16 ++++++++++++++++ IRaCIS.Core.Domain/QC/TrialQCQuestion.cs | 5 +---- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs index fc589669a..ca65bffb8 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCQuestionConfigureViewModel.cs @@ -58,7 +58,6 @@ namespace IRaCIS.Core.Application.Contracts public int ShowOrder { get; set; } - public string ParentTriggerValue { get; set; } } diff --git a/IRaCIS.Core.Application/Service/QC/DTO/TrialQCQuestionConfigureViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/TrialQCQuestionConfigureViewModel.cs index 35ceb551d..af74165f4 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/TrialQCQuestionConfigureViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/TrialQCQuestionConfigureViewModel.cs @@ -92,6 +92,9 @@ namespace IRaCIS.Core.Application.Contracts public string TypeValue { get; set; } = string.Empty; public string ParentTriggerValue { get; set; } = string.Empty; public int ShowOrder { get; set; } + + + public Guid SystemQuestionId { get; set; } } } diff --git a/IRaCIS.Core.Application/Service/QC/Interface/IQCQuestionService.cs b/IRaCIS.Core.Application/Service/QC/Interface/IQCQuestionService.cs index fda12a5c7..40a829a14 100644 --- a/IRaCIS.Core.Application/Service/QC/Interface/IQCQuestionService.cs +++ b/IRaCIS.Core.Application/Service/QC/Interface/IQCQuestionService.cs @@ -12,5 +12,7 @@ namespace IRaCIS.Core.Application.Contracts Task AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure); Task DeleteQCQuestionConfigure(Guid qCQuestionConfigureId); Task> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure); + + Task> GetQCQuestionSelectList(TrialQCQuestionFilterSelect trialQCQuestionFilterSelect); } } \ No newline at end of file diff --git a/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs b/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs index 43e9e1f09..61fb7cdc5 100644 --- a/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs +++ b/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs @@ -7,6 +7,7 @@ using IRaCIS.Core.Application.Auth; using IRaCIS.Core.Infra.EFCore; using IRaCIS.Core.Infrastructure; +using MassTransit; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -139,6 +140,21 @@ namespace IRaCIS.Core.Application.Contracts await VerifyIsQCConfirmedAsync(trialId); + batchList.ForEach(x => + { + + x.SystemQuestionId = x.Id; + x.Id = NewId.NextGuid(); + + }); + + foreach (var item in batchList.Where(x=>x.ParentId!=null)) + { + + } + + + var batchConfigList = _mapper.Map>(batchList); batchConfigList.ForEach(t => t.TrialId = trialId); diff --git a/IRaCIS.Core.Domain/QC/TrialQCQuestion.cs b/IRaCIS.Core.Domain/QC/TrialQCQuestion.cs index 2f0920175..961422a92 100644 --- a/IRaCIS.Core.Domain/QC/TrialQCQuestion.cs +++ b/IRaCIS.Core.Domain/QC/TrialQCQuestion.cs @@ -100,10 +100,7 @@ namespace IRaCIS.Core.Domain.Models public bool? IsConfirm { get; set; } - /// - /// 系统的问题ID - /// - public Guid? SystemQuestionId { get; set; } + public List TrialQCQuestionAnswerList { get; set; }