From d2d4683f0d74d5a4c6cd161e7d8c2f3cedb58b52 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Wed, 18 Sep 2024 16:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=85=81=E8=AE=B8=E7=A7=B0?= =?UTF-8?q?=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/RedisDataService.cs | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs b/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs index 6725f680..b1d7b694 100644 --- a/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/RedisDataService.cs @@ -61,26 +61,26 @@ namespace Tnb.ProductionMgr [HttpPost] public async Task GetWeight(string device, string jihao) { - EqpDaq eqpDaq1 = await _repository.AsSugarClient().Queryable(). - LeftJoin((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(). + // LeftJoin((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 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 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(). LeftJoin((x,y)=>x.equip_id==y.id).