生产提报优化
This commit is contained in:
@@ -1952,11 +1952,11 @@ namespace Tnb.ProductionMgr
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
Dictionary<string, object> header = new()
|
// Dictionary<string, object> header = new()
|
||||||
{
|
// {
|
||||||
["Authorization"] = App.HttpContext != null ? App.HttpContext.Request.Headers["Authorization"] : ""
|
// ["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);
|
// 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));
|
WmsCarryH wmsCarryH = await db.Queryable<WmsCarryH>().SingleAsync((x => x.carry_code == materialBoxCode));
|
||||||
if (wmsCarryH == null)
|
if (wmsCarryH == null)
|
||||||
throw Oops.Bah($"未找到{materialBoxCode}载具");
|
throw Oops.Bah($"未找到{materialBoxCode}载具");
|
||||||
@@ -2039,7 +2039,13 @@ namespace Tnb.ProductionMgr
|
|||||||
["Value"] = "true",
|
["Value"] = "true",
|
||||||
};
|
};
|
||||||
Log.Information($"提拔确认完成参数:{JsonConvert.SerializeObject(dicCommand2)}");
|
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)
|
if (prdMoTask.schedule_type == 1)
|
||||||
@@ -2062,10 +2068,12 @@ namespace Tnb.ProductionMgr
|
|||||||
["Value"] = "true",
|
["Value"] = "true",
|
||||||
};
|
};
|
||||||
Log.Information($"称重完成参数:{JsonConvert.SerializeObject(dicCommand3)}");
|
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);
|
throw Oops.Bah(x2ServerResult.Msg);
|
||||||
Log.Information($"{eqpDaq3.equip_code},{eqpDaq3.label_name}称重完成返回结果:{responseresult}");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user