diff --git a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs index a7e8616a6..305e6f0b9 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs @@ -93,9 +93,14 @@ namespace IRaCIS.Application.Services TotalCount =await subjectQuery.Select(x => x.SubjectId).Distinct().CountAsync(), }; + var maxcount = 0; + pageOutput.CurrentPageData.ForEach(x => { + maxcount = maxcount < x.Data.Count ? x.Data.Count : maxcount; + }); + return (pageOutput, new { - MaxLength = pageOutput.CurrentPageData.ToList().Max(x => x.Data.Count) + MaxLength = maxcount }); #region 用导航属性写的 有问题