1
This commit is contained in:
@@ -341,11 +341,21 @@ namespace Tnb.WarehouseMgr
|
||||
if (input.IsNull()) throw new ArgumentNullException(nameof(input));
|
||||
try
|
||||
{
|
||||
var kittingOut = input[^1];
|
||||
var curCarry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == kittingOut.carry_id);
|
||||
var endLocation = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == kittingOut.location_id);
|
||||
var isMatch = await IsCarryAndLocationMatchByCarryStd(curCarry, endLocation);
|
||||
if (!isMatch) throw new AppFriendlyException("该载具无法放置到目标库位", 500);
|
||||
//var kittingOut = input[^1];
|
||||
//if ((!kittingOut.carry_id.IsNullOrEmpty() || !kittingOut.carry_code.IsNullOrEmpty()) && !kittingOut.location_code.IsNullOrEmpty())
|
||||
//{
|
||||
// WmsCarryH? curCarry = null;
|
||||
// if (!kittingOut.carry_id.IsNullOrEmpty())
|
||||
// curCarry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == kittingOut.carry_id);
|
||||
// else
|
||||
// curCarry = await _db.Queryable<WmsCarryH>().FirstAsync(it => it.carry_code == kittingOut.carry_code);
|
||||
|
||||
// var endLocation = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == kittingOut.location_code);
|
||||
// var isMatch = await IsCarryAndLocationMatchByCarryStd(curCarry, endLocation);
|
||||
// if (!isMatch) throw new AppFriendlyException("该载具无法放置到目标库位", 500);
|
||||
|
||||
//}
|
||||
|
||||
|
||||
await _db.Ado.BeginTranAsync();
|
||||
List<WmsKittingoutD> kittingOutDs = new();
|
||||
|
||||
Reference in New Issue
Block a user