去掉允许称重
This commit is contained in:
@@ -61,26 +61,26 @@ namespace Tnb.ProductionMgr
|
||||
[HttpPost]
|
||||
public async Task<dynamic> GetWeight(string device, string jihao)
|
||||
{
|
||||
EqpDaq eqpDaq1 = await _repository.AsSugarClient().Queryable<EqpDaq>().
|
||||
LeftJoin<EqpEquipment>((x,y)=>x.equip_id==y.id).
|
||||
Where((x,y) => y.code == device && x.label_name.Contains("允许称重")).FirstAsync();
|
||||
if (eqpDaq1 == null)
|
||||
{
|
||||
throw Oops.Bah("未在数据采集中设置允许称重标签点");
|
||||
}
|
||||
// EqpDaq eqpDaq1 = await _repository.AsSugarClient().Queryable<EqpDaq>().
|
||||
// LeftJoin<EqpEquipment>((x,y)=>x.equip_id==y.id).
|
||||
// Where((x,y) => y.code == device && x.label_name.Contains("允许称重")).FirstAsync();
|
||||
// if (eqpDaq1 == null)
|
||||
// {
|
||||
// throw Oops.Bah("未在数据采集中设置允许称重标签点");
|
||||
// }
|
||||
|
||||
string eqpcode = device;
|
||||
device = eqpDaq1.equip_code;
|
||||
Dictionary<string, string> dicCommand = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["DevName"] = device,
|
||||
["token"] = _eleCtlCfg.token,
|
||||
["TagName"] = eqpDaq1.label_name,
|
||||
["Value"] = "true",
|
||||
};
|
||||
Log.Information($"确认称重参数:{JsonConvert.SerializeObject(dicCommand)}");
|
||||
var str = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand);
|
||||
Log.Information($"{device},{eqpDaq1.label_name}确认称重返回:{str}");
|
||||
// device = eqpDaq1.equip_code;
|
||||
// Dictionary<string, string> dicCommand = new(StringComparer.OrdinalIgnoreCase)
|
||||
// {
|
||||
// ["DevName"] = device,
|
||||
// ["token"] = _eleCtlCfg.token,
|
||||
// ["TagName"] = eqpDaq1.label_name,
|
||||
// ["Value"] = "true",
|
||||
// };
|
||||
// Log.Information($"确认称重参数:{JsonConvert.SerializeObject(dicCommand)}");
|
||||
// var str = await HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand);
|
||||
// Log.Information($"{device},{eqpDaq1.label_name}确认称重返回:{str}");
|
||||
|
||||
EqpDaq eqpDaq2 = await _repository.AsSugarClient().Queryable<EqpDaq>().
|
||||
LeftJoin<EqpEquipment>((x,y)=>x.equip_id==y.id).
|
||||
|
||||
Reference in New Issue
Block a user