From c4f67aebbc44c0f4ed5241badb9ddc4f6bc40ea4 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 14 Dec 2022 14:53:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/ReadingCriterion/OrganInfoService.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/OrganInfoService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/OrganInfoService.cs index 1e6b56365..800c7a51f 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/OrganInfoService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/OrganInfoService.cs @@ -67,7 +67,8 @@ namespace IRaCIS.Core.Application.Service .Where(x => x.SystemCriterionId == inQuery.SystemCriterionId) .WhereIf(inQuery.LesionType != null, x => organs.Contains(x.OrganType)) .WhereIf(inQuery.OrganType != null, x => x.OrganType == inQuery.OrganType) - .OrderBy(x=>x.ShowOrder) + .OrderBy(x=>x.OrganType) + .ThenBy(x=>x.ShowOrder) .ProjectTo(_mapper.ConfigurationProvider); return await organInfoQueryable.ToListAsync(); } @@ -96,7 +97,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.LesionType != null, x => organs.Contains(x.OrganType)) .WhereIf(inQuery.OrganType != null, x => x.OrganType == inQuery.OrganType) .ProjectTo(_mapper.ConfigurationProvider); - return await organInfoQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(OrganInfoView.ShowOrder) : inQuery.SortField, inQuery.Asc); + return await organInfoQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(OrganInfoView.ShowOrder) : inQuery.SortField, inQuery.Asc,true,new string[] { nameof(OrganInfoView.OrganType) , nameof(OrganInfoView.ShowOrder) }); } /// @@ -168,7 +169,7 @@ namespace IRaCIS.Core.Application.Service List result = organList.GroupBy(x => new { x.LesionType }).Select(x => new GetReadingOrganListOutDto() { LesionType = x.Key.LesionType, - OrganList = x.ToList() + OrganList = x.OrderBy(y=>y.ShowOrder).ToList() }).ToList(); return result; @@ -233,7 +234,7 @@ namespace IRaCIS.Core.Application.Service }; - return await organInfoQueryable.OrderBy(x=>x.ShowOrder).ToListAsync(); + return await organInfoQueryable.OrderBy(x=>x.OrganType).ThenBy(x=>x.ShowOrder).ToListAsync(); }