From 6cffb32af493a2e4211c7c947e9e92de4688e6d1 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 14 Jun 2022 11:53:25 +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 --- .../IRaCIS.Core.Application.xml | 19 +++++++++++++++++-- .../Reading/Dto/ReadingQuestionViewModel.cs | 4 ++++ .../Service/Reading/ReadingQuestionService.cs | 2 -- .../Service/Reading/_MapConfig.cs | 6 ++++-- .../Reading/ReadingQuestionSystem.cs | 3 +++ .../Reading/ReadingQuestionTrial.cs | 3 ++- 6 files changed, 30 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 6a7fb8fa7..8a795d866 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -4126,10 +4126,25 @@ - + - 递归处理父子问题关系 + 设置父子关系 + 项目标准ID + 项目Id + 系统问题 + 需要添加list + + + + 递归处理父子关系 + + + + + + + diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index a80bf62cb..789887e56 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -131,6 +131,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string TypeValue { get; set; } public bool IsEnable { get; set; } + + public string ParentQuestionName { get; set; } } public class ReadingQuestionSystemView @@ -175,6 +177,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public Guid? ParentId { get; set; } + public string ParentQuestionName { get; set; } + /// /// 类型值 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index c0939a867..154e5e213 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -315,8 +315,6 @@ namespace IRaCIS.Application.Services } - - /// /// 新增修改项目问题标准(项目) /// diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index efa2ac442..a1ee0ffda 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -55,7 +55,8 @@ namespace IRaCIS.Core.Application.Service CreateMap(); - CreateMap(); + CreateMap() + .ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionSystem==null?string.Empty: s.ParentReadingQuestionSystem.QuestionName)); CreateMap(); @@ -63,7 +64,8 @@ namespace IRaCIS.Core.Application.Service CreateMap(); - CreateMap(); + CreateMap() + .ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionTrial == null ? string.Empty : s.ParentReadingQuestionTrial.QuestionName)); ; #endregion diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs index 1f5a65563..3ffd64dad 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs @@ -72,6 +72,9 @@ namespace IRaCIS.Core.Domain.Models [ForeignKey("ReadingQuestionCriterionSystemId")] public ReadingQuestionCriterionSystem ReadingQuestionCriterionSystem { get; set; } + [ForeignKey("ParentId")] + public ReadingQuestionSystem ParentReadingQuestionSystem { get; set; } + } diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs index 322265151..68e577ac7 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs @@ -70,7 +70,8 @@ namespace IRaCIS.Core.Domain.Models /// public Guid CreateUserId { get; set; } - + [ForeignKey("ParentId")] + public ReadingQuestionTrial ParentReadingQuestionTrial { get; set; } }