修改稽查文档闭包修改
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-09-28 14:25:05 +08:00
parent 7a3bbbeb19
commit be1fbf2059
5 changed files with 553 additions and 463 deletions
+3 -1
View File
@@ -84,9 +84,11 @@ namespace IRaCIS.Core.Application.Service
public async Task RebuildAuditDocumentClosureAsync([FromServices] IRepository<AuditDocumentClosure> _auditDocumentClosureRepository, [FromServices] IRepository<AuditDocument> _auditDocumentRepository)
{
await _auditDocumentClosureRepository.BatchDeleteNoTrackingAsync(t => t.Id != Guid.Empty);
var documents = await _auditDocumentRepository.Where().Select(t => new { t.Id, t.ParentId }).ToListAsync();
//过滤版本文件,防止污染闭包表
var documents = await _auditDocumentRepository.Where(t => t.MainFileId == null).Select(t => new { t.Id, t.ParentId }).ToListAsync();
var closures = new List<AuditDocumentClosure>();