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)