From 34ff47bc1c927e5f14f2acd81889bdbb5b9fe777 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 10 Apr 2025 14:01:06 +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/Document/AuditDocumentService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs index efed114e2..08b2cd225 100644 --- a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs @@ -208,7 +208,11 @@ public class AuditDocumentService(IRepository _auditDocumentRepos { var defalutSortArray = new string[] { nameof(AuditDocumentData.AuditDocumentTypeEnum), nameof(AuditDocumentData.Name) }; - + if (inDto.SortField.IsNotNullOrEmpty()) + { + defalutSortArray = new string[] { nameof(AuditDocumentData.AuditDocumentTypeEnum), inDto.SortField + (inDto.Asc ? " asc" : " desc") }; + inDto.SortField = string.Empty; + } // 新取出来排序 然后再找子项 var data= (await _auditDocumentRepository .Where(x=>x.AuditDocumentTypeEnum!=AuditDocumentType.HistoricalVersion)