|
|
@ -191,9 +191,9 @@ public class VmiAppService : Controller, IApplicationService, IJobService, ITran |
|
|
|
{ |
|
|
|
query = query.Where(input.Filters.ToLambda<VmiBalance>()); |
|
|
|
} |
|
|
|
query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting); |
|
|
|
var query2 = query.GroupBy(o => new { o.ErpToLoc, o.RealPartCode }).Select(o => new VmiBalanceSumDto { ErpToLoc = o.Key.ErpToLoc, RealPartCode = o.Key.RealPartCode, Qty = o.Sum(o => o.Qty) }); |
|
|
|
var totalCount = query2.Count(); |
|
|
|
query2 = string.IsNullOrEmpty(input.Sorting) ? query2 : DynamicQueryableExtensions.OrderBy(query2, input.Sorting); |
|
|
|
var entities = await query2.PageBy(input.SkipCount, input.MaxResultCount).ToListAsync().ConfigureAwait(false); |
|
|
|
return new PagedResultDto<VmiBalanceSumDto>(totalCount, entities); |
|
|
|
} |
|
|
|