This commit is contained in:
alex
2023-06-21 16:24:29 +08:00
parent eff0778780
commit 03c9911e00
4 changed files with 8 additions and 8 deletions

View File

@@ -230,7 +230,7 @@ namespace Tnb.WarehouseMgr
c.id = SnowflakeIdHelper.NextId();
c.bill_d_id = instockDetails.Find(x => x.material_code == materialCode && x.code_batch == codeBatch)?.id!;
c.barcode = jo.Value<string>(nameof(WmsInstockCode.barcode))!;
c.barcode_qty = jo.Value<int>(nameof(WmsInstockCode.barcode_qty));
c.codeqty = jo.Value<int>(nameof(WmsInstockCode.codeqty));
instockCOdes.Add(c);
}
}
@@ -275,7 +275,7 @@ namespace Tnb.WarehouseMgr
var instockCodes = await _db.Queryable<WmsInstockCode>().Where(it => barCodes.Contains(it.barcode)).Select(it => new
{
id = it.bill_d_id,
barcode_qty = it.barcode_qty,
barcode_qty = it.codeqty,
}).ToListAsync();
var dic = instockCodes.GroupBy(g => g.id).ToDictionary(x => x.Key, x => x.Select(d => d.barcode_qty).ToList());
var ids = instockCodes.Select(it => it.id).ToList();