|
|
@ -69,10 +69,24 @@ namespace Win.Sfs.SettleAccount.Bases |
|
|
|
//[Route("detailquery")]
|
|
|
|
public virtual async Task<PagedResultDto<TEntityDetailDto>> DetailQueryAsync(TRequestDetailInput input) |
|
|
|
{ |
|
|
|
List<string> filters = new List<string>(); |
|
|
|
filters.Add("ParentBillNum"); |
|
|
|
filters.Add("InvBillNum"); |
|
|
|
filters.Add("IsReturn"); |
|
|
|
var ls = input.Filters.Where(p =>filters.Contains( p.Column )).ToList(); |
|
|
|
if (ls.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in ls) |
|
|
|
{ |
|
|
|
input.Filters.Remove(itm); |
|
|
|
} |
|
|
|
} |
|
|
|
var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount).ConfigureAwait(false); |
|
|
|
var totalCount = await _detailRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); |
|
|
|
var dtos = ObjectMapper.Map<List<TEntityDetail>, List<TEntityDetailDto>>(entitys); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new PagedResultDto<TEntityDetailDto>(totalCount, dtos); |
|
|
|
} |
|
|
|
|
|
|
@ -85,21 +99,28 @@ namespace Win.Sfs.SettleAccount.Bases |
|
|
|
//[Route("export")]
|
|
|
|
public virtual async Task<string> ExportAsync(TRequestDetailInput input) |
|
|
|
{ |
|
|
|
IExporter _csv = new CsvExporter(); |
|
|
|
IExporter _excel = new ExcelExporter(); |
|
|
|
var entities = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false); |
|
|
|
var dtoDetails = ObjectMapper.Map<List<TEntityDetail>, List<TEntityDetailExportDto>>(entities); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var entities = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false); |
|
|
|
List<string> filters = new List<string>(); |
|
|
|
filters.Add("ParentBillNum"); |
|
|
|
filters.Add("InvBillNum"); |
|
|
|
filters.Add("IsReturn"); |
|
|
|
var ls = input.Filters.Where(p => filters.Contains(p.Column)).ToList(); |
|
|
|
if (ls.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in ls) |
|
|
|
{ |
|
|
|
input.Filters.Remove(itm); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
IExporter _csv = new CsvExporter(); |
|
|
|
IExporter _excel = new ExcelExporter(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dtoDetails = ObjectMapper.Map<List<TEntityDetail>, List<TEntityDetailExportDto>>(entities); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|