From 61c4d79fa145f3cc50589acc1494cc56106b1d17 Mon Sep 17 00:00:00 2001 From: Hewt <109787524@qq.com> Date: Fri, 20 Mar 2026 14:30:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/Dto/SegmentBindingViewModel.cs | 5 ++++- .../Service/Reading/Dto/SegmentViewModel.cs | 3 +++ .../Service/Reading/Segment/SegmentationService.cs | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/SegmentBindingViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/SegmentBindingViewModel.cs index 7a934535d..191cca72e 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/SegmentBindingViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/SegmentBindingViewModel.cs @@ -61,7 +61,10 @@ public class SegmentBindingAddOrEdit public class SegmentBindingQuery:PageInput { public Guid? QuestionId { get; set; } - + + public Guid? Id { get; set; } + + public Guid? RowId { get; set; } public Guid? SegmentId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/SegmentViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/SegmentViewModel.cs index 41468cefa..279569f32 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/SegmentViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/SegmentViewModel.cs @@ -86,6 +86,9 @@ public class SegmentQuery:PageInput public Guid? SegmentationId { get; set; } + public Guid? Id { get; set; } + + public Guid? VisitTaskId { get; set; } public decimal? ShortAxis { get; set; } diff --git a/IRaCIS.Core.Application/Service/Reading/Segment/SegmentationService.cs b/IRaCIS.Core.Application/Service/Reading/Segment/SegmentationService.cs index 2fb4aeaf5..adc7e8102 100644 --- a/IRaCIS.Core.Application/Service/Reading/Segment/SegmentationService.cs +++ b/IRaCIS.Core.Application/Service/Reading/Segment/SegmentationService.cs @@ -104,6 +104,7 @@ public class SegmentationService(IRepository _segmentationReposito .WhereIf(inQuery.SegmentationId != null, x => x.SegmentationId == inQuery.SegmentationId) .WhereIf(inQuery.SegmentName.IsNotNullOrEmpty(), x => x.SegmentName.Contains(inQuery.SegmentName)) .WhereIf(inQuery.VisitTaskId != null, x => x.VisitTaskId == inQuery.VisitTaskId) + .WhereIf(inQuery.Id != null, x => x.Id == inQuery.Id) .ProjectTo(_mapper.ConfigurationProvider); var pageList = await segmentQueryable.ToPagedListAsync(inQuery); @@ -152,6 +153,7 @@ public class SegmentationService(IRepository _segmentationReposito { var segmentBindingQueryable = _segmentBindingRepository + .WhereIf(inQuery.Id != null, x => x.Id == inQuery.Id) .WhereIf(inQuery.QuestionId != null, x => x.QuestionId == inQuery.QuestionId) .WhereIf(inQuery.RowId != null, x => x.RowId == inQuery.RowId) .WhereIf(inQuery.SegmentId != null, x => x.SegmentId == inQuery.SegmentId)