From 99350c3a17c2c014627d0cadc3484a99826cf76c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Sun, 28 Sep 2025 15:31:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4=E4=BA=8B?= =?UTF-8?q?=E5=8A=A1=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Document/AuditDocumentService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs index 14239a87d..40a4c2362 100644 --- a/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/AuditDocumentService.cs @@ -190,15 +190,17 @@ public class AuditDocumentService(IRepository _auditDocumentRepos await _auditRecordPermissionRepository.AddAsync(new AuditRecordPermission() { AuditRecordId = inCommand.AuditRecordId, AuditDocumentId = matchItem }); } - await _auditRecordPermissionRepository.SaveChangesAsync(); + } else { - await _auditRecordPermissionRepository.DeleteFromQueryAsync(t => t.AuditRecordId == inCommand.AuditRecordId && t.AuditDocumentId == item.AuditDocumentId, true); + await _auditRecordPermissionRepository.DeleteFromQueryAsync(t => t.AuditRecordId == inCommand.AuditRecordId && t.AuditDocumentId == item.AuditDocumentId); } + } + await _auditRecordPermissionRepository.SaveChangesAsync(); return ResponseOutput.Ok();