From 65d23a4d910948b0f039c68071e6ee1bb7844c28 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 15 Sep 2022 14:39:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/ReadingQuestionService.cs | 2 +- IRaCIS.Core.Application/Service/Reading/_MapConfig.cs | 6 +++--- .../Reading/ReadingQuestionCriterionSystem.cs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index f3d36feb..332c6684 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -1081,7 +1081,7 @@ namespace IRaCIS.Application.Services .Select(x => x.ReadingQuestionCriterionSystemId); var trialCriterionNames= _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId) .Select(x => x.CriterionName); - var needAddSystemDataList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id)&&x.Dictionary.IsEnable&& !trialCriterionNames.Contains(x.CriterionName)).Include(x=>x.ReadingQuestionSystemList).ToListAsync(); + var needAddSystemDataList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id)&&x.IsEnable&& !trialCriterionNames.Contains(x.CriterionName)).Include(x=>x.ReadingQuestionSystemList).ToListAsync(); List needAddCriterionList = new List(); List needAddQuestionList = new List(); needAddSystemDataList.ForEach(x => diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index 65e9e526..986d4f36 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -118,9 +118,9 @@ namespace IRaCIS.Core.Application.Service CreateMap(); CreateMap() - .ForMember(d => d.QuestionCount, u => u.MapFrom(s => s.ReadingQuestionSystemList.Count())) - .ForMember(d => d.IsEnable, u => u.MapFrom(s => s.Dictionary.IsEnable)) - .ForMember(d => d.ShowOrder, u => u.MapFrom(s => s.Dictionary.ShowOrder)); + .ForMember(d => d.QuestionCount, u => u.MapFrom(s => s.ReadingQuestionSystemList.Count())); + //.ForMember(d => d.IsEnable, u => u.MapFrom(s => s.Dictionary.IsEnable)) + //.ForMember(d => d.ShowOrder, u => u.MapFrom(s => s.Dictionary.ShowOrder)); CreateMap(); diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionSystem.cs index a20951b3..eec7e3e8 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionSystem.cs @@ -52,9 +52,9 @@ namespace IRaCIS.Core.Domain.Models [JsonIgnore] public List ReadingQuestionSystemList { get; set; } = new List(); - [JsonIgnore] - [ForeignKey("CriterionId")] - public Dictionary Dictionary { get; set; } + //[JsonIgnore] + //[ForeignKey("CriterionId")] + //public Dictionary Dictionary { get; set; } }