静置仓逻辑编写,返回提示修改 bug,包材出库逻辑变更

This commit is contained in:
2024-07-17 11:23:23 +08:00
parent bf39c08837
commit 03775c8a12
18 changed files with 467 additions and 107 deletions

View File

@@ -118,7 +118,7 @@ namespace Tnb.WarehouseMgr
/// <returns></returns>
/// <exception cref="AppFriendlyException"></exception>
[HttpPost, NonUnify, AllowAnonymous]
public async Task<Tnb.WarehouseMgr.Entities.Dto.Outputs.Result> PackInstock(OutsourcedPartsInstockInput input)
public async Task<dynamic> PackInstock(OutsourcedPartsInstockInput input)
{
try
{
@@ -180,6 +180,10 @@ 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
{
@@ -314,7 +318,7 @@ namespace Tnb.WarehouseMgr
Logger.LogError($"【PackInstock】 {ex.Message}");
Logger.LogError($"【PackInstock】 {ex.StackTrace}");
await _db.Ado.RollbackTranAsync();
return await ToApiResult(HttpStatusCode.InternalServerError, ex.Message);
throw Oops.Bah(ex.Message);
}
finally
{
@@ -322,7 +326,7 @@ namespace Tnb.WarehouseMgr
await InvokeGenPretaskExcute();
}
return await ToApiResult(HttpStatusCode.OK, "成功");
return await Task.FromResult(true);
}
}