更改PDAFeeding

This commit is contained in:
FanLian
2023-06-26 13:51:15 +08:00
parent 2e90f164a0
commit c097fb78d6

View File

@@ -91,22 +91,25 @@ namespace Tnb.WarehouseMgr
feedBox.create_time = DateTime.Now;
var row = await _db.Updateable(feedBox).ExecuteCommandAsync();
//更新投料记录条码表
foreach (var carryCode in carryCodes)
if (carryCodes != null)
{
WmsFeedingrecordCode wmsFeedingrecordCode = new();
wmsFeedingrecordCode.id = SnowflakeIdHelper.NextId();
wmsFeedingrecordCode.org_id = _userManager.User.OrganizeId;
wmsFeedingrecordCode.record_id = input.data["ReturnIdentity"]?.ToString()!;
wmsFeedingrecordCode.material_id = carryCode.material_id;
wmsFeedingrecordCode.material_code = carryCode.material_code;
wmsFeedingrecordCode.barcode = carryCode.barcode;
wmsFeedingrecordCode.code_batch = carryCode.code_batch;
wmsFeedingrecordCode.codeqty = carryCode.codeqty;
wmsFeedingrecordCode.unit_id = carryCode.unit_id;
wmsFeedingrecordCode.unit_code = carryCode.unit_code;
wmsFeedingrecordCode.create_id = _userManager.UserId;
wmsFeedingrecordCode.create_time = DateTime.Now;
row = await _db.Insertable(wmsFeedingrecordCode).ExecuteCommandAsync();
foreach (var carryCode in carryCodes)
{
WmsFeedingrecordCode wmsFeedingrecordCode = new();
wmsFeedingrecordCode.id = SnowflakeIdHelper.NextId();
wmsFeedingrecordCode.org_id = _userManager.User.OrganizeId;
wmsFeedingrecordCode.record_id = input.data["ReturnIdentity"]?.ToString()!;
wmsFeedingrecordCode.material_id = carryCode.material_id;
wmsFeedingrecordCode.material_code = carryCode.material_code;
wmsFeedingrecordCode.barcode = carryCode.barcode;
wmsFeedingrecordCode.code_batch = carryCode.code_batch;
wmsFeedingrecordCode.codeqty = carryCode.codeqty;
wmsFeedingrecordCode.unit_id = carryCode.unit_id;
wmsFeedingrecordCode.unit_code = carryCode.unit_code;
wmsFeedingrecordCode.create_id = _userManager.UserId;
wmsFeedingrecordCode.create_time = DateTime.Now;
row = await _db.Insertable(wmsFeedingrecordCode).ExecuteCommandAsync();
}
}
//更新载具
row = await UpdateNullCarry(carry);