Browse Source

update

master
wanggang 1 year ago
parent
commit
65da89abf7
  1. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

@ -37,7 +37,6 @@ using Volo.Abp.Users;
using Volo.Abp.Validation;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Filter;
@ -193,7 +192,7 @@ 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 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();
var entities = await query2.PageBy(input.SkipCount, input.MaxResultCount).ToListAsync().ConfigureAwait(false);
return new PagedResultDto<VmiBalanceSumDto>(totalCount, entities);
@ -506,7 +505,7 @@ public class VmiAppService : Controller, IApplicationService, IJobService, ITran
{
var row = ws.Row(rowIndex);
var model = Activator.CreateInstance<T>();
for (var columnIndex = 1; columnIndex < columnsUsedCount; columnIndex++)
for (var columnIndex = 1; columnIndex < columnsUsedCount + 1; columnIndex++)
{
var cell = row.Cell(columnIndex);
var headerName = ws.Cell(1, columnIndex).Value.ToString().Trim();
@ -656,6 +655,7 @@ public class VmiBalanceSumDto
{
[Display(Name = "ERP库位", Order = 13)]
public string ErpToLoc { get; set; }
[Display(Name = "厂内零件号", Order = 6)]
public string RealPartCode { get; set; }//原始

Loading…
Cancel
Save