From 2d9ebe70940fdc5388422573e1018a0ed54e240e Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 31 Mar 2025 15:26:13 +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 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs index 9b251bcfc..ce493f398 100644 --- a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs @@ -150,15 +150,16 @@ public class AuditDocumentService(IRepository _auditDocumentRepos /// /// /// - public async Task> GetBreadcrumbData(GetBreadcrumbDataInDto inDto) + [HttpPost] + public async Task> GetBreadcrumbData(GetBreadcrumbDataInDto inDto) { - List result=new List(); + List result=new List(); await findParent(result, inDto.Id); - async Task findParent(List datas, Guid id) + async Task findParent(List datas, Guid id) { - var data= await _auditDocumentRepository.Where(x => x.Id == inDto.Id).FirstNotNullAsync(); - datas.Add(data.Name); + var data= await _auditDocumentRepository.Where(x => x.Id == inDto.Id).ProjectTo(_mapper.ConfigurationProvider).FirstNotNullAsync(); + datas.Add(data); if (data.ParentId != null) { await findParent(datas, data.ParentId.Value);