1
This commit is contained in:
@@ -132,17 +132,19 @@ namespace Tnb.WarehouseMgr
|
||||
[HttpPost]
|
||||
public async Task<dynamic> MESCarrySign(MESCarrySignInput input)
|
||||
{
|
||||
var isSuccessFul = false;
|
||||
if (input.IsNull()) throw new ArgumentNullException("input");
|
||||
var signInput = input.Adapt<SignForDeliveryInput>();
|
||||
try
|
||||
{
|
||||
await SignForDelivery(signInput);
|
||||
isSuccessFul = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return ToApiResult(HttpStatusCode.InternalServerError, "签收失败");
|
||||
isSuccessFul= false;
|
||||
}
|
||||
return ToApiResult();
|
||||
return isSuccessFul;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,7 @@ namespace Tnb.WarehouseMgr
|
||||
[HttpPost]
|
||||
public async Task<dynamic> MESKittingOutStk(List<MESKittingOutStkInput> input)
|
||||
{
|
||||
var isSuccessFul = false;
|
||||
if (input.IsNull()) throw new ArgumentNullException("input");
|
||||
try
|
||||
{
|
||||
@@ -333,15 +334,18 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
await _db.Insertable(kittingOuts).ExecuteCommandAsync();
|
||||
await _db.Insertable(kittingOutDs).ExecuteCommandAsync();
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
await KittingOutByAdd();
|
||||
isSuccessFul = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
isSuccessFul = false;
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
|
||||
}
|
||||
await KittingOutByAdd();
|
||||
return ToApiResult();
|
||||
|
||||
return isSuccessFul;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user