bug
This commit is contained in:
@@ -69,6 +69,7 @@ namespace Tnb.ProductionMgr
|
|||||||
throw Oops.Bah("未在数据采集中设置允许称重标签点");
|
throw Oops.Bah("未在数据采集中设置允许称重标签点");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string eqpcode = device;
|
||||||
device = eqpDaq1.equip_code;
|
device = eqpDaq1.equip_code;
|
||||||
Dictionary<string, string> dicCommand = new(StringComparer.OrdinalIgnoreCase)
|
Dictionary<string, string> dicCommand = new(StringComparer.OrdinalIgnoreCase)
|
||||||
{
|
{
|
||||||
@@ -80,7 +81,9 @@ namespace Tnb.ProductionMgr
|
|||||||
Log.Information($"确认称重参数:{JsonConvert.SerializeObject(dicCommand)}");
|
Log.Information($"确认称重参数:{JsonConvert.SerializeObject(dicCommand)}");
|
||||||
var str = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand);
|
var str = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand);
|
||||||
|
|
||||||
EqpDaq eqpDaq2 = await _repository.AsSugarClient().Queryable<EqpDaq>().Where(x => x.equip_code == device && x.label_name.Contains("当前重量")).FirstAsync();
|
EqpDaq eqpDaq2 = await _repository.AsSugarClient().Queryable<EqpDaq>().
|
||||||
|
LeftJoin<EqpEquipment>((x,y)=>x.equip_id==y.id).
|
||||||
|
Where((x,y) => y.code == eqpcode && x.label_name.Contains("当前重量")).FirstAsync();
|
||||||
if (eqpDaq2 == null)
|
if (eqpDaq2 == null)
|
||||||
{
|
{
|
||||||
throw Oops.Bah("未在数据采集中设置当前重量标签点");
|
throw Oops.Bah("未在数据采集中设置当前重量标签点");
|
||||||
@@ -98,7 +101,9 @@ namespace Tnb.ProductionMgr
|
|||||||
decimal result = res != null && res["Value"] != null ? decimal.Parse(res["Value"]!.ToString()) : throw Oops.Bah("数据格式错误");
|
decimal result = res != null && res["Value"] != null ? decimal.Parse(res["Value"]!.ToString()) : throw Oops.Bah("数据格式错误");
|
||||||
if (result > 0)
|
if (result > 0)
|
||||||
{
|
{
|
||||||
EqpDaq eqpDaq3 = await _repository.AsSugarClient().Queryable<EqpDaq>().Where(x => x.equip_code == device && x.label_name.Contains("称重完成")).FirstAsync();
|
EqpDaq eqpDaq3 = await _repository.AsSugarClient().Queryable<EqpDaq>().
|
||||||
|
LeftJoin<EqpEquipment>((x,y)=>x.equip_id==y.id).
|
||||||
|
Where((x,y) => y.code == eqpcode && x.label_name.Contains("称重完成")).FirstAsync();
|
||||||
|
|
||||||
if (eqpDaq3 == null)
|
if (eqpDaq3 == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user