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