调整Mes->Wms生产出库返回值
This commit is contained in:
@@ -321,6 +321,7 @@ namespace Tnb.WarehouseMgr
|
||||
//[NonUnify]
|
||||
public async Task<dynamic> MESCreateOutstock(MESCreateOutstockInput input)
|
||||
{
|
||||
var isSuccessful = true;
|
||||
try
|
||||
{
|
||||
await _db.Ado.BeginTranAsync();
|
||||
@@ -445,10 +446,10 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
}
|
||||
carryIds = allOutIds.Concat(sortingOutIds).ToList();
|
||||
if(carryIds?.Count> 0)
|
||||
if (carryIds?.Count > 0)
|
||||
{
|
||||
var carryId = carryIds[^carryIds.Count];
|
||||
var curCurry =await _db.Queryable<WmsCarryH>().SingleAsync(it=>it.id == carryId);
|
||||
var curCurry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == carryId);
|
||||
var isMatch = await IsCarryAndLocationMatchByCarryStd(curCurry, location);
|
||||
if (!isMatch) throw new AppFriendlyException("该载具无法放置到目标库位", 500);
|
||||
}
|
||||
@@ -549,11 +550,11 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
isSuccessful = false;
|
||||
JNPF.Logging.Log.Error(ex.Message);
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
|
||||
}
|
||||
return await ToApiResult();
|
||||
return isSuccessful;
|
||||
}
|
||||
|
||||
public override async Task ModifyAsync(WareHouseUpInput input)
|
||||
|
||||
Reference in New Issue
Block a user