生产提报优化

This commit is contained in:
2024-06-24 10:06:31 +08:00
parent 493547020b
commit 18d4659e80

View File

@@ -1952,11 +1952,11 @@ namespace Tnb.ProductionMgr
// }
Dictionary<string, object> header = new()
{
["Authorization"] = App.HttpContext != null ? App.HttpContext.Request.Headers["Authorization"] : ""
};
BasFactoryConfig config = await _repository.AsSugarClient().Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN);
// Dictionary<string, object> header = new()
// {
// ["Authorization"] = App.HttpContext != null ? App.HttpContext.Request.Headers["Authorization"] : ""
// };
// BasFactoryConfig config = await _repository.AsSugarClient().Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN);
WmsCarryH wmsCarryH = await db.Queryable<WmsCarryH>().SingleAsync((x => x.carry_code == materialBoxCode));
if (wmsCarryH == null)
throw Oops.Bah($"未找到{materialBoxCode}载具");
@@ -2039,7 +2039,13 @@ namespace Tnb.ProductionMgr
["Value"] = "true",
};
Log.Information($"提拔确认完成参数:{JsonConvert.SerializeObject(dicCommand2)}");
await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand2);
string responseresult = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand2);
Log.Information($"提拔确认完成参数成返回结果:{responseresult}");
X2ServerResult x2ServerResult = JsonConvert.DeserializeObject<X2ServerResult>(responseresult);
if (x2ServerResult.Result != "OK")
{
throw Oops.Bah(x2ServerResult.Msg);
}
}
if (prdMoTask.schedule_type == 1)
@@ -2062,10 +2068,12 @@ namespace Tnb.ProductionMgr
["Value"] = "true",
};
Log.Information($"称重完成参数:{JsonConvert.SerializeObject(dicCommand3)}");
for (int i = 0; i < 1; i++)
string responseresult = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand3,false);
Log.Information($"{eqpDaq3.equip_code},{eqpDaq3.label_name}称重完成返回结果:{responseresult}");
X2ServerResult x2ServerResult = JsonConvert.DeserializeObject<X2ServerResult>(responseresult);
if (x2ServerResult.Result != "OK")
{
string responseresult = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand3,false);
Log.Information($"{eqpDaq3.equip_code},{eqpDaq3.label_name}称重完成返回结果:{responseresult}");
throw Oops.Bah(x2ServerResult.Msg);
}
}