1
This commit is contained in:
@@ -69,7 +69,7 @@ public partial class WmsInstockCode : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 条码数量
|
/// 条码数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int barcode_qty { get; set; }
|
public int codeqty { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否锁定
|
/// 是否锁定
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public partial class WmsTempCode : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 条码数量
|
/// 条码数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public decimal? barcode_qty { get; set; }
|
public decimal? codeqty { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单位ID
|
/// 单位ID
|
||||||
|
|||||||
@@ -96,12 +96,12 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
if (index < codeNum)
|
if (index < codeNum)
|
||||||
{
|
{
|
||||||
barCode.barcode_qty = minPacking;
|
barCode.codeqty = minPacking;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (mod > 0) barCode.barcode_qty = mod;
|
if (mod > 0) barCode.codeqty = mod;
|
||||||
else barCode.barcode_qty = minPacking;
|
else barCode.codeqty = minPacking;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wmsTempCodes.Add(barCode);
|
wmsTempCodes.Add(barCode);
|
||||||
@@ -144,7 +144,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
var code = $"{detail.material_code}{detail.code_batch}{no.ToString().PadLeft(4, '0')}";
|
var code = $"{detail.material_code}{detail.code_batch}{no.ToString().PadLeft(4, '0')}";
|
||||||
barCode.barcode = code;
|
barCode.barcode = code;
|
||||||
barCode.code_batch = detail.code_batch;
|
barCode.code_batch = detail.code_batch;
|
||||||
barCode.barcode_qty = detail.pr_qty!.Value;
|
barCode.codeqty = detail.pr_qty!.Value;
|
||||||
barCode.unit_id = detail.unit_id;
|
barCode.unit_id = detail.unit_id;
|
||||||
barCode.is_lock = 0;
|
barCode.is_lock = 0;
|
||||||
barCode.is_end = "0";
|
barCode.is_end = "0";
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
c.id = SnowflakeIdHelper.NextId();
|
c.id = SnowflakeIdHelper.NextId();
|
||||||
c.bill_d_id = instockDetails.Find(x => x.material_code == materialCode && x.code_batch == codeBatch)?.id!;
|
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 = 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);
|
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
|
var instockCodes = await _db.Queryable<WmsInstockCode>().Where(it => barCodes.Contains(it.barcode)).Select(it => new
|
||||||
{
|
{
|
||||||
id = it.bill_d_id,
|
id = it.bill_d_id,
|
||||||
barcode_qty = it.barcode_qty,
|
barcode_qty = it.codeqty,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
var dic = instockCodes.GroupBy(g => g.id).ToDictionary(x => x.Key, x => x.Select(d => d.barcode_qty).ToList());
|
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();
|
var ids = instockCodes.Select(it => it.id).ToList();
|
||||||
|
|||||||
Reference in New Issue
Block a user