From 22639a725ce87c2647751709628a1646cb5d06b5 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Wed, 12 Jun 2024 09:44:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=A1=91=E5=AE=9A=E7=82=B9=E9=85=8D?= =?UTF-8?q?=E9=80=81=E5=A2=9E=E5=8A=A0=E8=AE=BE=E5=A4=87=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=88=A4=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.ProductionMgr/TimeWorkService.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs index 7c581e59..3c31db07 100644 --- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs @@ -224,6 +224,19 @@ namespace Tnb.ProductionMgr { string state = await _redisData.TryGetValueByKeyField("YTCS", "State"); if ("OK" != state) return "YTCS没开机"; + string stateHxja = await _redisData.TryGetValueByKeyField("hxjA", "State"); + string stateHxjc = await _redisData.TryGetValueByKeyField("hxjC", "State"); + List hxjList = new List(); + if ("OK" == stateHxja) + { + hxjList.Add("hxjA"); + } + if ("OK" == stateHxjc) + { + hxjList.Add("hxjC"); + } + + if (hxjList.IsEmpty()) return "hxjA,hxjC不正常"; string msg = ""; List equipments = await _db.Queryable() .InnerJoin((x, y) => x.id == y.equip_type_id) @@ -241,6 +254,11 @@ namespace Tnb.ProductionMgr Log.Error($"{equipment.name}没配置允许入空箱"); continue; } + if (!hxjList.Contains(eqpDaq.equip_code)) + { + Log.Error($"{eqpDaq.equip_code}状态不正常"); + continue; + } bool? value = await _redisData.TryGetValueByKeyField(eqpDaq.equip_code, eqpDaq.label_name); bool valueFlag = _redisData.Get($"{eqpDaq.equip_code}_{eqpDaq.label_name}_flag");