diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 9607afe7..af8f4428 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -1952,11 +1952,11 @@ namespace Tnb.ProductionMgr // } - Dictionary header = new() - { - ["Authorization"] = App.HttpContext != null ? App.HttpContext.Request.Headers["Authorization"] : "" - }; - BasFactoryConfig config = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN); + // Dictionary header = new() + // { + // ["Authorization"] = App.HttpContext != null ? App.HttpContext.Request.Headers["Authorization"] : "" + // }; + // BasFactoryConfig config = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN); WmsCarryH wmsCarryH = await db.Queryable().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(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(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); } }