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