Browse Source

库存事务修改

master
zhouhongjun 12 months ago
parent
commit
6fc8d613c5
  1. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

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

@ -238,7 +238,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
query = query.Where(input.Filters.ToLambda<VmiLog>()); query = query.Where(input.Filters.ToLambda<VmiLog>());
} }
query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting); query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting);
var query2 = query.GroupBy(o => new { o.ErpToLoc, o.RealPartCode, o.VinCode, o.LogType }).Select(o => new VmiBalanceNewDto { VinCode = o.Key.VinCode, ErpToLoc = o.Key.ErpToLoc, RealPartCode = o.Key.RealPartCode, Qty = o.Sum(o => o.ChangedQty), BillTime = o.Max(o => o.BillTime),Se = o.Sum(o => o.LogType == VmiLogType.Type100 ? 1 : 0), ReturnGoods = o.Sum(o => o.LogType == VmiLogType.Type400 ? 1 : 0) }).Where(p => p.Qty != 0); var query2 = query.GroupBy(o => new { o.ErpToLoc, o.RealPartCode, o.VinCode, o.LogType }).Select(o => new VmiBalanceNewDto { VinCode = o.Key.VinCode, ErpToLoc = o.Key.ErpToLoc, RealPartCode = o.Key.RealPartCode, Qty = o.Sum(o => o.ChangedQty), BillTime = o.Max(o => o.BillTime),Se = o.Sum(o => o.LogType == VmiLogType.Type100 ? 1 : 0), ReturnGoods = o.Sum(o => o.LogType == VmiLogType.Type400 ? 1 : 0),Settlement= o.Sum(o => o.LogType == VmiLogType.Type200 ? 1 : 0),AdjustIn= o.Sum(o => o.LogType == VmiLogType.Type500 ? 1 : 0),AdjustOut= o.Sum(o => o.LogType == VmiLogType.Type600 ? 1 : 0) }).Where(p => p.Qty != 0);
var entities = query2.ToList(); var entities = query2.ToList();
// var entities = await _balanceRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false); // var entities = await _balanceRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false);
@ -1338,7 +1338,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[Display(Name = "数量", Order = 4)] [Display(Name = "数量", Order = 4)]
public decimal Qty { get; set; } public decimal Qty { get; set; }
[Display(Name = "发运时间", Order = 5)] [Display(Name = "最后发运时间", Order = 5)]
public DateTime? BillTime { get; set; } public DateTime? BillTime { get; set; }
[Display(Name = "发运入库数量", Order = 4)] [Display(Name = "发运入库数量", Order = 4)]
@ -1347,6 +1347,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[Display(Name = "发运退货数量", Order = 4)] [Display(Name = "发运退货数量", Order = 4)]
public decimal ReturnGoods { get; set; } public decimal ReturnGoods { get; set; }
[Display(Name = "结算出库数量", Order = 4)]
public decimal Settlement { get; set; }
[Display(Name = "调整入库数量", Order = 4)]
public decimal AdjustIn { get; set; }
[Display(Name = "调整出库数量", Order = 4)]
public decimal AdjustOut { get; set; }
} }

Loading…
Cancel
Save