diff --git a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs index d3490fa7b..3c871be7b 100644 --- a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs @@ -211,7 +211,7 @@ namespace IRaCIS.Core.Application.Services select new UnionDocumentWithConfirmInfoView() { - AttachmentCount=sysDoc.SystemDocumentAttachmentList.Count(), + AttachmentCount=sysDoc.SystemDocumentAttachmentList.Where(z=>z.OffLine).Count(), IsSystemDoc = true, CurrentStaffTrainDays=sysDoc.CurrentStaffTrainDays, NewStaffTrainDays = sysDoc.NewStaffTrainDays, diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index a5c4582a1..27fc19428 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -419,7 +419,7 @@ namespace IRaCIS.Core.Application.Services { if (sysDataList.Any(y => y.Id == x.Id)) { - x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Count()).FirstOrDefault(); + x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Where(z=> !z.OffLine).Count()).FirstOrDefault(); } @@ -590,7 +590,7 @@ namespace IRaCIS.Core.Application.Services { if (sysDataList.Any(y => y.Id == x.Id)) { - x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Count()).FirstOrDefault(); + x.AttachmentCount = sysDataList.Where(y => y.Id == x.Id).Select(x => x.SystemDocumentAttachmentList.Where(z=>!z.OffLine).Count()).FirstOrDefault(); } });