修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
fea3d8d415
commit
be498f2329
|
@ -18,6 +18,7 @@ using DocumentFormat.OpenXml.Office2010.Excel;
|
|||
using MassTransit;
|
||||
using NPOI.POIFS.Properties;
|
||||
using Org.BouncyCastle.Crypto;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
|
||||
|
@ -26,20 +27,20 @@ public class AuditDocumentService(IRepository<AuditDocument> _auditDocumentRepos
|
|||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer): BaseService
|
||||
{
|
||||
|
||||
///// <summary>
|
||||
///// 获取稽查文档
|
||||
///// </summary>
|
||||
///// <param name="inQuery"></param>
|
||||
///// <returns></returns>
|
||||
//[HttpPost]
|
||||
//public async Task<PageOutput<AuditDocumentView>> GetAuditDocumentList(AuditDocumentQuery inQuery)
|
||||
//{
|
||||
// var auditDocumentQueryable =_auditDocumentRepository
|
||||
// .ProjectTo<AuditDocumentView>(_mapper.ConfigurationProvider);
|
||||
// var pageList= await auditDocumentQueryable.ToPagedListAsync(inQuery);
|
||||
/// <summary>
|
||||
/// 获取稽查文档
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<AuditDocumentView>> GetAuditDocumentList(AuditDocumentQuery inQuery)
|
||||
{
|
||||
var auditDocumentQueryable = _auditDocumentRepository
|
||||
.ProjectTo<AuditDocumentView>(_mapper.ConfigurationProvider);
|
||||
var pageList = await auditDocumentQueryable.ToPagedListAsync(inQuery);
|
||||
|
||||
// return pageList;
|
||||
//}
|
||||
return pageList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改稽查文档
|
||||
|
@ -192,9 +193,16 @@ public class AuditDocumentService(IRepository<AuditDocument> _auditDocumentRepos
|
|||
[HttpPost]
|
||||
public async Task<PageOutput<AuditDocumentData>> GetAuditDocumentData(GetAuditDocumentDataInDto inDto)
|
||||
{
|
||||
var data= await _auditDocumentRepository
|
||||
|
||||
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).ToListAsync();
|
||||
.WhereIf(inDto.IsAuthorization!=null,x=>x.IsAuthorization==inDto.IsAuthorization)
|
||||
.ProjectTo<AuditDocumentData>(_mapper.ConfigurationProvider).ToPagedListAsync(new PageInput() {
|
||||
PageIndex=1,
|
||||
PageSize=999999,
|
||||
}, defalutSortArray) ).CurrentPageData.ToList();
|
||||
|
||||
|
||||
|
||||
|
@ -221,10 +229,8 @@ public class AuditDocumentService(IRepository<AuditDocument> _auditDocumentRepos
|
|||
PageIndex = inDto.PageIndex,
|
||||
PageSize = inDto.PageSize,
|
||||
TotalCount = query.Count(),
|
||||
};
|
||||
|
||||
var root = query
|
||||
.OrderBy(x => x.Name)
|
||||
};
|
||||
var root = query
|
||||
.Skip(inDto.PageSize * (inDto.PageIndex - 1)).Take(inDto.PageSize).ToList();
|
||||
|
||||
foreach (var item in root)
|
||||
|
|
Loading…
Reference in New Issue