@@ -116,19 +116,15 @@ public class AuditDocumentService(IRepository<AuditDocument> _auditDocumentRepos
|
||||
else
|
||||
{
|
||||
return alikeData;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var entityData = await _auditDocumentRepository.InsertOrUpdateAsync(inDto, true);
|
||||
|
||||
var historicalVersionIds = await _auditDocumentRepository.Where(x => x.MainFileId == alikeData.Id).OrderBy(x => x.Version).Select(x => x.Id).ToListAsync();
|
||||
|
||||
historicalVersionIds.Add(alikeData.Id);
|
||||
|
||||
int num = 1;
|
||||
|
||||
foreach (var item in historicalVersionIds)
|
||||
{
|
||||
await _auditDocumentRepository.UpdatePartialFromQueryAsync(item, x => new AuditDocument()
|
||||
@@ -177,17 +173,6 @@ public class AuditDocumentService(IRepository<AuditDocument> _auditDocumentRepos
|
||||
|
||||
}
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 新增稽查文档
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public async Task<IResponseOutput> InsertAuditDocument()
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取文件树形结构 (传Id 根节点就是自己)
|
||||
/// </summary>
|
||||
@@ -199,12 +184,13 @@ public class AuditDocumentService(IRepository<AuditDocument> _auditDocumentRepos
|
||||
|
||||
var defalutSortArray = new string[] { nameof(AuditDocumentData.AuditDocumentTypeEnum), nameof(AuditDocumentData.Name) };
|
||||
|
||||
// 新取出来排序 然后再找子项
|
||||
var data= (await _auditDocumentRepository
|
||||
.Where(x=>x.AuditDocumentTypeEnum!=AuditDocumentType.HistoricalVersion)
|
||||
.WhereIf(inDto.IsAuthorization!=null,x=>x.IsAuthorization==inDto.IsAuthorization)
|
||||
.ProjectTo<AuditDocumentData>(_mapper.ConfigurationProvider).ToPagedListAsync(new PageInput() {
|
||||
PageIndex=1,
|
||||
PageSize=999999,
|
||||
PageIndex=1,
|
||||
PageSize=999999,
|
||||
}, defalutSortArray) ).CurrentPageData.ToList();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user