1
This commit is contained in:
@@ -75,10 +75,10 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
var carryId = input.data.ContainsKey("carry_id") ? input.data["carry_id"]?.ToString() : "";
|
||||
var feedBoxCode = input.data.ContainsKey("feedbox_code") ? input.data["feedbox_code"]?.ToString() : "";
|
||||
var carry = await _db.Queryable<WmsCarryH>().FirstAsync(it => it.id == carryId);
|
||||
var feedBox = await _db.Queryable<WmsFeedbox>().FirstAsync(it => it.id == feedBoxCode);
|
||||
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == carryId);
|
||||
var feedBox = await _db.Queryable<WmsFeedbox>().SingleAsync(it => it.feedbox_code == feedBoxCode);
|
||||
var carryMaterial = await _db.Queryable<WmsCarryMat>().FirstAsync(it => it.carry_id == carryId);
|
||||
var carryCodes = await _db.Queryable<WmsCarryCode>().Where(it=>it.carry_id == carryId).ToListAsync();
|
||||
var carryCodes = await _db.Queryable<WmsCarryCode>().Where(it => it.carry_id == carryId).ToListAsync();
|
||||
if (carry != null && feedBox != null)
|
||||
{
|
||||
feedBox.material_id = carryMaterial.material_id;
|
||||
@@ -89,7 +89,7 @@ namespace Tnb.WarehouseMgr
|
||||
feedBox.create_id = _userManager.UserId;
|
||||
feedBox.create_time = DateTime.Now;
|
||||
var row = await _db.Updateable(feedBox).ExecuteCommandAsync();
|
||||
foreach(var carryCode in carryCodes)
|
||||
foreach (var carryCode in carryCodes)
|
||||
{
|
||||
WmsFeedingrecordCode wmsFeedingrecordCode = new();
|
||||
wmsFeedingrecordCode.id = SnowflakeIdHelper.NextId();
|
||||
@@ -97,7 +97,7 @@ namespace Tnb.WarehouseMgr
|
||||
wmsFeedingrecordCode.record_id = input.data["ReturnIdentity"]?.ToString()!;
|
||||
wmsFeedingrecordCode.material_id = carryCode.material_id;
|
||||
wmsFeedingrecordCode.material_code = carryCode.material_code;
|
||||
wmsFeedingrecordCode.barcode = carryCode.barcode;
|
||||
wmsFeedingrecordCode.barcode = carryCode.barcode;
|
||||
wmsFeedingrecordCode.code_batch = carryCode.code_batch;
|
||||
wmsFeedingrecordCode.codeqty = carryCode.codeqty;
|
||||
wmsFeedingrecordCode.unit_id = carryCode.unit_id;
|
||||
|
||||
Reference in New Issue
Block a user