现场问题处理

This commit is contained in:
2024-09-18 13:53:44 +08:00
parent 68f9b871fa
commit 4245c26097
8 changed files with 68 additions and 14 deletions

View File

@@ -319,7 +319,10 @@ namespace Tnb.WarehouseMgr
_ = await _db.Updateable<BasLocation>().SetColumns(it => new BasLocation { is_lock = 1 }).Where(it => ids.Contains(it.id)).ExecuteCommandAsync();
BasMaterial basMaterial = await _db.Queryable<BasMaterial>().FirstAsync(it => it.id == input.material_id);
if (basMaterial == null)
{
throw new Exception($"找不到物料id为{input.material_id}的物料");
}
BindCarryCodeInput bindCarryCodeInput = new BindCarryCodeInput();
bindCarryCodeInput.carry_id = wmsCarryH.id;
@@ -361,6 +364,8 @@ namespace Tnb.WarehouseMgr
}
catch (Exception ex)
{
Logger.LogWarning($"外协入库出现异常 {ex.Message}");
Logger.LogWarning($"外协入库出现异常 {ex.StackTrace}");
await _db.Ado.RollbackTranAsync();
return await ToApiResult(HttpStatusCode.InternalServerError, ex.Message);
}