修改
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
he 2025-06-04 17:09:23 +08:00
parent 83a15a0b47
commit 52ffdac948
1 changed files with 12 additions and 0 deletions

View File

@ -498,15 +498,27 @@ namespace IRaCIS.Core.Application.Services
var sysids = result.CurrentPageData.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList();
var sysDataList = await _systemDocumentRepository.Where(x => sysids.Contains(x.Id)).Include(x => x.SystemDocumentAttachmentList).ToListAsync();
result.CurrentPageData.ForEach(x =>
{
if (sysDataList.Any(y => y.Id == x.Id))
{
x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Where(z => !z.OffLine).Count()).FirstOrDefault();
}
});
var trialids = result.CurrentPageData.Where(t => t.IsSystemDoc == false).Select(t => t.Id).ToList();
var trialDataList = await _trialDocumentRepository.Where(x => trialids.Contains(x.Id)).Include(x => x.TrialDocumentAttachmentList).ToListAsync();
result.CurrentPageData.ForEach(x =>
{
if (trialDataList.Any(y => y.Id == x.Id))
{
x.AttachmentCount = trialDataList.Where(y => y.Id == x.Id).Select(x => x.TrialDocumentAttachmentList.Where(z => !z.OffLine).Count()).FirstOrDefault();
}
});
#endregion