修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
83a15a0b47
commit
52ffdac948
|
@ -498,15 +498,27 @@ namespace IRaCIS.Core.Application.Services
|
||||||
var sysids = result.CurrentPageData.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList();
|
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();
|
var sysDataList = await _systemDocumentRepository.Where(x => sysids.Contains(x.Id)).Include(x => x.SystemDocumentAttachmentList).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
result.CurrentPageData.ForEach(x =>
|
result.CurrentPageData.ForEach(x =>
|
||||||
{
|
{
|
||||||
if (sysDataList.Any(y => y.Id == x.Id))
|
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();
|
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
|
#endregion
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue