From 94bf9895af7a8fb162f0fef6bda712101ae127c8 Mon Sep 17 00:00:00 2001 From: Hewt <109787524@qq.com> Date: Tue, 24 Mar 2026 15:37:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=BB=91=E5=AE=9A=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=20=E8=8E=B7=E5=8F=96=E5=88=86=E7=BB=84=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/Dto/SegmentBindingViewModel.cs | 13 ++++++++++++- .../Service/Reading/_MapConfig.cs | 4 +++- .../Reading/Segment/SegmentBinding.cs | 10 ++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/SegmentBindingViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/SegmentBindingViewModel.cs index 191cca72e..91370ff3b 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/SegmentBindingViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/SegmentBindingViewModel.cs @@ -15,7 +15,18 @@ public class SegmentBindingView : SegmentBindingAddOrEdit public DateTime CreateTime { get; set; } public DateTime UpdateTime { get; set; } - + + + /// + /// 分割分组名称 + /// + public string SegmentationName { get; set; } = string.Empty; + + /// + /// SegmentName + /// + public string SegmentName { get; set; } = string.Empty; + } public class SaveSegmentBindingAndAnswerInDto diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index 82de734f6..13a79940d 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -27,7 +27,9 @@ namespace IRaCIS.Core.Application.Service // 在此处拷贝automapper 映射 - CreateMap(); + CreateMap() + .ForMember(d => d.SegmentName, u => u.MapFrom(s => s.Segment.SegmentName)) + .ForMember(d => d.SegmentationName, u => u.MapFrom(s => s.Segmentation.SegmentationName)); CreateMap().ReverseMap(); CreateMap() diff --git a/IRaCIS.Core.Domain/Reading/Segment/SegmentBinding.cs b/IRaCIS.Core.Domain/Reading/Segment/SegmentBinding.cs index bb7d1c249..b3625e6be 100644 --- a/IRaCIS.Core.Domain/Reading/Segment/SegmentBinding.cs +++ b/IRaCIS.Core.Domain/Reading/Segment/SegmentBinding.cs @@ -14,7 +14,17 @@ namespace IRaCIS.Core.Domain.Models public class SegmentBinding : BaseFullDeleteAuditEntity { #region 导航属性 + [JsonIgnore] + [Comment("分割分组")] + [ForeignKey("SegmentationId")] + public Segmentation Segmentation { get; set; } + + [JsonIgnore] + [Comment("分割")] + [ForeignKey("SegmentId")] + + public Segment Segment { get; set; } #endregion ///