电梯下发逻辑变更

This commit is contained in:
2024-07-17 22:50:24 +08:00
parent c6ae917bc9
commit 019651b023
10 changed files with 246 additions and 144 deletions

View File

@@ -118,7 +118,7 @@ namespace Tnb.WarehouseMgr
/// <returns></returns>
/// <exception cref="AppFriendlyException"></exception>
[HttpPost, NonUnify, AllowAnonymous]
public async Task<dynamic> PackInstock(OutsourcedPartsInstockInput input)
public async Task<Tnb.WarehouseMgr.Entities.Dto.Outputs.Result> PackInstock(OutsourcedPartsInstockInput input)
{
try
{
@@ -180,10 +180,6 @@ namespace Tnb.WarehouseMgr
}
ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == endLocations[0].id);
if (ePoint == null)
{
throw new AppFriendlyException($"{endLocations[0].location_code}终点未配置点位", 500);
}
}
else
{
@@ -318,7 +314,7 @@ namespace Tnb.WarehouseMgr
Logger.LogError($"【PackInstock】 {ex.Message}");
Logger.LogError($"【PackInstock】 {ex.StackTrace}");
await _db.Ado.RollbackTranAsync();
throw Oops.Bah(ex.Message);
return await ToApiResult(HttpStatusCode.InternalServerError, ex.Message);
}
finally
{
@@ -326,7 +322,7 @@ namespace Tnb.WarehouseMgr
await InvokeGenPretaskExcute();
}
return await Task.FromResult(true);
return await ToApiResult(HttpStatusCode.OK, "成功");
}
}