From 97133a555419fd453789d2f82e709fbea31e1bb2 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 27 Mar 2025 16:29:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=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 | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs index ecab5e24f..8e5bf4891 100644 --- a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs @@ -41,12 +41,12 @@ public class AuditDocumentService(IRepository _auditDocumentRepos } /// - /// 新增或者修改稽查文档 + /// 修改稽查文档 /// /// /// [HttpPost] - public async Task AddOrUpdateAuditDocument(AuditDocumentAddOrEdit inDto) + public async Task UpdateAuditDocument(AuditDocumentAddOrEdit inDto) { if (inDto.ParentId != null) { @@ -59,7 +59,7 @@ public class AuditDocumentService(IRepository _auditDocumentRepos } else { - var entityData = await _auditDocumentRepository.InsertOrUpdateAsync(inDto, true); + var entityData = await _auditDocumentRepository.UpdateFromDTOAsync(inDto, true); var historicalVersionIds = await _auditDocumentRepository.Where(x => x.MainFileId == alikeData.Id).OrderBy(x => x.Version).Select(x => x.Id).ToListAsync(); @@ -82,28 +82,26 @@ public class AuditDocumentService(IRepository _auditDocumentRepos } } - var entity = await _auditDocumentRepository.InsertOrUpdateAsync(inDto, true); + var entity = await _auditDocumentRepository.UpdateFromDTOAsync(inDto, true); return ResponseOutput.Ok(entity.Id.ToString()); } - // /// - // /// 删除稽查文档 - // /// - // /// - // /// - // [HttpDelete("{auditDocumentId:guid}")] - // public async Task DeleteAuditDocument(Guid auditDocumentId) + ///// + ///// 新增稽查文档 + ///// + ///// + //public async Task InsertAuditDocument() //{ - // var success = await _auditDocumentRepository.DeleteFromQueryAsync(t => t.Id == auditDocumentId,true); - // return ResponseOutput.Ok(); + //} - /// - /// 获取文件树形结构 (传Id 根节点就是自己) - /// - /// - /// - [HttpPost] + + /// + /// 获取文件树形结构 (传Id 根节点就是自己) + /// + /// + /// + [HttpPost] public async Task GetAuditDocumentData(GetAuditDocumentDataInDto inDto) { var data= await _auditDocumentRepository