This commit is contained in:
alex
2023-06-20 09:15:59 +08:00
parent 99abe25c26
commit c57e3137d6

View File

@@ -90,11 +90,13 @@ namespace Tnb.WarehouseMgr
carryMats = carryMats.OrderBy(o => o.create_time).GroupBy(g => new { g.carry_id, g.material_id, g.code_batch })
.Select(x =>
{
WmsCarryMat carryMat = x.FirstOrDefault()!;
WmsCarryMat? carryMat = x.FirstOrDefault()!;
carryMat.real_qty = x.Sum(d => d.real_qty);
return carryMat;
})
.ToList();
await _db.Insertable(carryMats).ExecuteCommandAsync();
}
}
}