From a3f82450779eacca4138f18f0f61cba02fafc843 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 24 Oct 2022 13:33:56 +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 --- .../Reading/Dto/ReadingQuestionViewModel.cs | 18 +++++++++++++++++- .../ReadingCriterionService.cs | 6 ++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 1be9a39b4..2cc304a26 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -88,10 +88,25 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string ParentCode { get; set; } - public List DictionaryIds { get; set; } + public List DictionaryList { get; set; } } + public class SetCriterionDictionaryDto + { + public Guid DictionaryId { get; set; } + + /// + /// IsBaseLineUse + /// + public bool IsBaseLineUse { get; set; } = false; + + /// + /// IsBaseUse + /// + public bool IsFollowVisitUse { get; set; } = false; + } + public class SetDictionaryFollowVisitUseInDto { public Guid Id { get; set; } @@ -139,6 +154,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public bool IsBaseLineUse { get; set; } = false; + /// /// IsBaseUse /// diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs index c968e575e..999f0d89a 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs @@ -473,10 +473,12 @@ namespace IRaCIS.Core.Application.Service.RC { await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.CriterionId && x.ParentCode == inDto.ParentCode); - await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryIds.Select(x => new ReadingCriterionDictionary() + await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryList.Select(x => new ReadingCriterionDictionary() { CriterionId = inDto.CriterionId, - DictionaryId = x, + DictionaryId = x.DictionaryId, + IsBaseLineUse=x.IsBaseLineUse, + IsFollowVisitUse=x.IsFollowVisitUse, IsSystemCriterion = true, ParentCode = inDto.ParentCode }));