From bffc8626c7021b5e7463069c473d8c108a8c3151 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 1 Apr 2025 16:31:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Document/AuditDocumentService.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs index 8b38a3d86..6c76d290c 100644 --- a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs @@ -241,9 +241,13 @@ public class AuditDocumentService(IRepository _auditDocumentRepos { var parentid = dataList.Where(x => ids.Contains(x.Id.Value) && x.ParentId != null).Select(x => x.ParentId.Value).ToList(); - parentIds.AddRange(parentid); + if (parentid.Count() > 0) + { + parentIds.AddRange(parentid); - GetParentId(parentIds, parentid, dataList); + GetParentId(parentIds, parentid, dataList); + } + } private void GetChildren(AuditDocumentData item, List dataList)