修改
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 MassTransit;
|
||||||
using NPOI.POIFS.Properties;
|
using NPOI.POIFS.Properties;
|
||||||
using Org.BouncyCastle.Crypto;
|
using Org.BouncyCastle.Crypto;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
namespace IRaCIS.Core.Application.Service;
|
namespace IRaCIS.Core.Application.Service;
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,20 +27,20 @@ public class AuditDocumentService(IRepository<AuditDocument> _auditDocumentRepos
|
||||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer): BaseService
|
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer): BaseService
|
||||||
{
|
{
|
||||||
|
|
||||||
///// <summary>
|
/// <summary>
|
||||||
///// 获取稽查文档
|
/// 获取稽查文档
|
||||||
///// </summary>
|
/// </summary>
|
||||||
///// <param name="inQuery"></param>
|
/// <param name="inQuery"></param>
|
||||||
///// <returns></returns>
|
/// <returns></returns>
|
||||||
//[HttpPost]
|
[HttpPost]
|
||||||
//public async Task<PageOutput<AuditDocumentView>> GetAuditDocumentList(AuditDocumentQuery inQuery)
|
public async Task<PageOutput<AuditDocumentView>> GetAuditDocumentList(AuditDocumentQuery inQuery)
|
||||||
//{
|
{
|
||||||
// var auditDocumentQueryable =_auditDocumentRepository
|
var auditDocumentQueryable = _auditDocumentRepository
|
||||||
// .ProjectTo<AuditDocumentView>(_mapper.ConfigurationProvider);
|
.ProjectTo<AuditDocumentView>(_mapper.ConfigurationProvider);
|
||||||
// var pageList= await auditDocumentQueryable.ToPagedListAsync(inQuery);
|
var pageList = await auditDocumentQueryable.ToPagedListAsync(inQuery);
|
||||||
|
|
||||||
// return pageList;
|
return pageList;
|
||||||
//}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改稽查文档
|
/// 修改稽查文档
|
||||||
|
@ -192,9 +193,16 @@ public class AuditDocumentService(IRepository<AuditDocument> _auditDocumentRepos
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<PageOutput<AuditDocumentData>> GetAuditDocumentData(GetAuditDocumentDataInDto inDto)
|
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)
|
.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,
|
PageIndex = inDto.PageIndex,
|
||||||
PageSize = inDto.PageSize,
|
PageSize = inDto.PageSize,
|
||||||
TotalCount = query.Count(),
|
TotalCount = query.Count(),
|
||||||
};
|
};
|
||||||
|
var root = query
|
||||||
var root = query
|
|
||||||
.OrderBy(x => x.Name)
|
|
||||||
.Skip(inDto.PageSize * (inDto.PageIndex - 1)).Take(inDto.PageSize).ToList();
|
.Skip(inDto.PageSize * (inDto.PageIndex - 1)).Take(inDto.PageSize).ToList();
|
||||||
|
|
||||||
foreach (var item in root)
|
foreach (var item in root)
|
||||||
|
|
Loading…
Reference in New Issue