mes物料签收后调用wms载具签收接口
This commit is contained in:
@@ -27,7 +27,7 @@ using Tnb.BasicData;
|
||||
namespace Tnb.ProductionMgr
|
||||
{
|
||||
/// <summary>
|
||||
/// 业务实现:物料签收
|
||||
/// 业务实现:物料投料
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, Order = 700)]
|
||||
[Route("api/[area]/[controller]/[action]")]
|
||||
@@ -159,7 +159,7 @@ namespace Tnb.ProductionMgr
|
||||
}
|
||||
|
||||
if(!result.IsSuccess) throw Oops.Oh(result.ErrorMessage);
|
||||
return result.IsSuccess ? "签收成功" : result.ErrorMessage;
|
||||
return result.IsSuccess ? "投料成功" : result.ErrorMessage;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@@ -272,34 +272,34 @@ namespace Tnb.ProductionMgr
|
||||
// carry_code = input.carry_code ?? "",
|
||||
// });
|
||||
|
||||
var mesCarrySignInput = new MESCarrySignInput()
|
||||
{
|
||||
org_id = _userManager.GetUserInfo().Result.organizeId,
|
||||
create_id = _userManager.UserId,
|
||||
carry_code = input.carry_code ?? "",
|
||||
};
|
||||
|
||||
string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
Dictionary<string, object> header = new Dictionary<string, object>()
|
||||
{
|
||||
["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
};
|
||||
var sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CARRY_SIGN,JsonConvert.SerializeObject(mesCarrySignInput),header);
|
||||
Log.Information(sendResult);
|
||||
AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
||||
if (authResponse.code != 200)
|
||||
{
|
||||
throw Oops.Bah(authResponse.msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
result2 = await db.Ado.UseTranAsync(async () =>
|
||||
{
|
||||
await db.Insertable<PrdFeedingH>(prdFeedingH).ExecuteCommandAsync();
|
||||
await db.Insertable<PrdFeedingD>(list).ExecuteCommandAsync();
|
||||
});
|
||||
|
||||
}
|
||||
// var mesCarrySignInput = new MESCarrySignInput()
|
||||
// {
|
||||
// org_id = _userManager.GetUserInfo().Result.organizeId,
|
||||
// create_id = _userManager.UserId,
|
||||
// carry_code = input.carry_code ?? "",
|
||||
// };
|
||||
//
|
||||
// string domain = (App.HttpContext.Request.IsHttps ? "https://" : "http://") + App.HttpContext.Request.Host;
|
||||
// Dictionary<string, object> header = new Dictionary<string, object>()
|
||||
// {
|
||||
// ["Authorization"] = App.HttpContext.Request.Headers["Authorization"]
|
||||
// };
|
||||
// var sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CARRY_SIGN,JsonConvert.SerializeObject(mesCarrySignInput),header);
|
||||
// Log.Information(sendResult);
|
||||
// AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
||||
// if (authResponse.code != 200)
|
||||
// {
|
||||
// throw Oops.Bah(authResponse.msg);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// result2 = await db.Ado.UseTranAsync(async () =>
|
||||
// {
|
||||
// await db.Insertable<PrdFeedingH>(prdFeedingH).ExecuteCommandAsync();
|
||||
// await db.Insertable<PrdFeedingD>(list).ExecuteCommandAsync();
|
||||
// });
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
if(!result2.IsSuccess) throw Oops.Oh(result2.ErrorMessage);
|
||||
|
||||
Reference in New Issue
Block a user