出库时,增加型号规格和箱号的判断

This commit is contained in:
2023-11-27 11:43:00 +08:00
parent 67ac295742
commit 6106263c8a
12 changed files with 30 additions and 14 deletions

View File

@@ -28,6 +28,13 @@
public int BllType { get; set; }
public int Size { get; set; }
/// <summary>
/// 规格型号
/// </summary>
public string? material_specification { get; set; }
/// <summary>
/// 箱号
/// </summary>
public string? container_no { get; set; }
}
}

View File

@@ -117,7 +117,7 @@ public partial class WmsCarryCode : BaseEntity<string>, IWmsCarryEntity
/// </summary>
public string? material_specification { get; set; }
/// <summary>
/// 规格型
///
/// </summary>
public string? container_no { get; set; }
}

View File

@@ -108,7 +108,7 @@ public partial class WmsCarryMat : BaseEntity<string>, IWmsCarryEntity
/// </summary>
public string? material_specification { get; set; }
/// <summary>
/// 规格型
///
/// </summary>
public string? container_no { get; set; }

View File

@@ -164,7 +164,7 @@ public partial class WmsInstockCode : BaseEntity<string>, IInOutStockCode
/// </summary>
public string? material_specification { get; set; }
/// <summary>
/// 规格型
///
/// </summary>
public string? container_no { get; set; }

View File

@@ -188,7 +188,7 @@ public partial class WmsInstockD : BaseEntity<string>
/// </summary>
public string? material_specification { get; set; }
/// <summary>
/// 规格型
///
/// </summary>
public string? container_no { get; set; }
}

View File

@@ -113,7 +113,7 @@ public partial class WmsOutstockCode : BaseEntity<string>
/// </summary>
public string? material_specification { get; set; }
/// <summary>
/// 规格型
///
/// </summary>
public string? container_no { get; set; }

View File

@@ -193,7 +193,7 @@ public partial class WmsOutstockD : BaseEntity<string>
/// </summary>
public string? material_specification { get; set; }
/// <summary>
/// 规格型
///
/// </summary>
public string? container_no { get; set; }
}

View File

@@ -109,7 +109,7 @@ public partial class WmsPretaskCode : BaseEntity<string>
/// </summary>
public string? material_specification { get; set; }
/// <summary>
/// 规格型
///
/// </summary>
public string? container_no { get; set; }
}

View File

@@ -98,5 +98,12 @@ public partial class WmsPurchaseD : BaseEntity<string>
/// 本次到货数量
/// </summary>
public decimal purchase_arriveqty { get; set; }
/// <summary>
/// 规格型号
/// </summary>
public string? material_specification { get; set; }
/// <summary>
/// 箱号
/// </summary>
public string? container_no { get; set; }
}

View File

@@ -88,7 +88,7 @@ public partial class WmsSaleD : BaseEntity<string>
/// </summary>
public string? material_specification { get; set; }
/// <summary>
/// 规格型
///
/// </summary>
public string? container_no { get; set; }
}

View File

@@ -196,6 +196,8 @@ namespace Tnb.WarehouseMgr
.And((a, b, c) => c.wh_id == input.warehouse_id)
.AndIF(!string.IsNullOrEmpty(input.material_id), (a, b, c) => b.material_id == input.material_id)
.AndIF(!string.IsNullOrEmpty(input.code_batch), (a, b, c) => b.code_batch == input.code_batch)
.AndIF(!string.IsNullOrEmpty(input.material_specification), (a, b, c) => b.material_specification == input.material_specification)
.AndIF(!string.IsNullOrEmpty(input.container_no), (a, b, c) => b.container_no == input.container_no)
.AndIF(!string.IsNullOrEmpty(input.carrystd_id), (a, b, c) => a.carrystd_id == input.carrystd_id);
Expression<Func<WmsCarryH, WmsCarryCode, BasLocation, bool>> carryStatusFilterExp = !input.material_id.IsNullOrWhiteSpace()
? (a, b, c) => a.carry_status == ((int)EnumCarryStatus.).ToString()

View File

@@ -210,7 +210,7 @@ namespace Tnb.WarehouseMgr
if (carryMats.Count > 0)
{
carryMats.ForEach(x => x.id = SnowflakeIdHelper.NextId());
carryMats = carryMats.OrderBy(o => o.create_time).GroupBy(g => new { g.carry_id, g.material_id, g.code_batch })
carryMats = carryMats.OrderBy(o => o.create_time).GroupBy(g => new { g.carry_id, g.material_id, g.code_batch , g.material_specification,g.container_no })
.Select(x =>
{
WmsCarryMat[] arr = x.ToArray();
@@ -842,10 +842,10 @@ namespace Tnb.WarehouseMgr
outStockCodes.ForEach(x =>
{
string? billDId = otds?.Find(xx => xx.material_id == x.material_id && xx.code_batch == x.code_batch)?.id;
string? billDId = otds?.Find(xx => xx.material_id == x.material_id && xx.code_batch == x.code_batch && xx.material_specification == x.material_specification && xx.container_no == x.container_no)?.id;
if (billDId.IsNullOrEmpty())
{
billDId = otds?.Find(xx => xx.material_id == x.material_id)?.id;
billDId = otds?.Find(xx => xx.material_id == x.material_id )?.id;
}
x.id = SnowflakeIdHelper.NextId();
x.bill_id = input.requireId;
@@ -891,7 +891,7 @@ namespace Tnb.WarehouseMgr
List<WmsOutstockCode> osCodes = input.distaskCodes.Adapt<List<WmsOutstockCode>>();
osCodes.ForEach(x =>
{
string? billDId = otds?.Find(xx => xx.material_id == x.material_id && xx.code_batch == x.code_batch)?.id;
string? billDId = otds?.Find(xx => xx.material_id == x.material_id && xx.code_batch == x.code_batch && xx.material_specification == x.material_specification && xx.container_no == x.container_no )?.id;
if (billDId.IsNullOrEmpty())
{
billDId = otds?.Find(xx => xx.material_id == x.material_id)?.id;