1
This commit is contained in:
@@ -51,11 +51,11 @@ namespace Tnb.WarehouseMgr
|
|||||||
}, true)
|
}, true)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
var carryCodes = await _db.Queryable<WmsCarryCode>().ToListAsync();
|
var carryCodes = await _db.Queryable<WmsCarryCode>().ToListAsync();
|
||||||
var storeMap = items.DistinctBy(x=> new {x.warehouse_id,x.material_id }).ToDictionary(x => $"{x.warehouse_id}{x.material_id}", x => x);
|
var storeMap = items.DistinctBy(x=> new {x.warehouse_id,x.material_id }).ToDictionary(x => new {x.warehouse_id,x.material_id }, x => x);
|
||||||
|
|
||||||
var result = items.GroupBy(g => new { g.warehouse_id, g.material_id }).Select(itGroup =>
|
var result = items.GroupBy(g => new { g.warehouse_id, g.material_id }).Select(itGroup =>
|
||||||
{
|
{
|
||||||
storeMap.TryGetValue($"{itGroup.Key.warehouse_id}{itGroup.Key.material_id}", out var report);
|
storeMap.TryGetValue(itGroup.Key, out var report);
|
||||||
WmsStockReportH stockReport = new();
|
WmsStockReportH stockReport = new();
|
||||||
stockReport.material_code = report?.material_code ?? "";
|
stockReport.material_code = report?.material_code ?? "";
|
||||||
stockReport.mater_name = report?.mater_name ?? "";
|
stockReport.mater_name = report?.mater_name ?? "";
|
||||||
|
|||||||
Reference in New Issue
Block a user