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