|
@ -172,7 +172,28 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
|
|
|
|
|
|
virtual public async Task<PagedResultDto<WmsDetailReport>> GetListAsync(WmsRequestDetailReportDto input) |
|
|
virtual public async Task<PagedResultDto<WmsDetailReport>> GetListAsync(WmsRequestDetailReportDto input) |
|
|
{ |
|
|
{ |
|
|
|
|
|
if (!string.IsNullOrEmpty(input.Client)) |
|
|
|
|
|
{ |
|
|
|
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Client", Logic = EnumFilterLogic.And, Value = input.Client }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(input.Type)) |
|
|
|
|
|
{ |
|
|
|
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Type", Logic = EnumFilterLogic.And, Value = input.Type }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(input.MaterialGroup)) |
|
|
|
|
|
{ |
|
|
|
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "MaterialGroup", Logic = EnumFilterLogic.And, Value = input.MaterialGroup }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(input.BillNum)) |
|
|
|
|
|
{ |
|
|
|
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); |
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); |
|
|
|
|
|
|
|
|
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount, |
|
|
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount, |
|
|
input.SkipCount, true); |
|
|
input.SkipCount, true); |
|
|
var totalCount = await GetCountAsync(input); |
|
|
var totalCount = await GetCountAsync(input); |
|
@ -198,6 +219,26 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
|
|
|
|
|
|
private async Task<long> GetCountAsync(WmsRequestDetailReportDto input) |
|
|
private async Task<long> GetCountAsync(WmsRequestDetailReportDto input) |
|
|
{ |
|
|
{ |
|
|
|
|
|
if (!string.IsNullOrEmpty(input.Client)) |
|
|
|
|
|
{ |
|
|
|
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Client", Logic = EnumFilterLogic.And, Value = input.Client }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(input.Type)) |
|
|
|
|
|
{ |
|
|
|
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Type", Logic = EnumFilterLogic.And, Value = input.Type }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(input.MaterialGroup)) |
|
|
|
|
|
{ |
|
|
|
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "MaterialGroup", Logic = EnumFilterLogic.And, Value = input.MaterialGroup }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(input.BillNum)) |
|
|
|
|
|
{ |
|
|
|
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); |
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); |
|
|
// input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
|
|
|
// input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
|
|
|
return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters); |
|
|
return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters); |
|
|