注塑定点配送增加设备状态判定
This commit is contained in:
@@ -224,6 +224,19 @@ namespace Tnb.ProductionMgr
|
|||||||
{
|
{
|
||||||
string state = await _redisData.TryGetValueByKeyField<string>("YTCS", "State");
|
string state = await _redisData.TryGetValueByKeyField<string>("YTCS", "State");
|
||||||
if ("OK" != state) return "YTCS没开机";
|
if ("OK" != state) return "YTCS没开机";
|
||||||
|
string stateHxja = await _redisData.TryGetValueByKeyField<string>("hxjA", "State");
|
||||||
|
string stateHxjc = await _redisData.TryGetValueByKeyField<string>("hxjC", "State");
|
||||||
|
List<String> hxjList = new List<string>();
|
||||||
|
if ("OK" == stateHxja)
|
||||||
|
{
|
||||||
|
hxjList.Add("hxjA");
|
||||||
|
}
|
||||||
|
if ("OK" == stateHxjc)
|
||||||
|
{
|
||||||
|
hxjList.Add("hxjC");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hxjList.IsEmpty()) return "hxjA,hxjC不正常";
|
||||||
string msg = "";
|
string msg = "";
|
||||||
List<EqpEquipment> equipments = await _db.Queryable<EqpEquipType>()
|
List<EqpEquipment> equipments = await _db.Queryable<EqpEquipType>()
|
||||||
.InnerJoin<EqpEquipment>((x, y) => x.id == y.equip_type_id)
|
.InnerJoin<EqpEquipment>((x, y) => x.id == y.equip_type_id)
|
||||||
@@ -241,6 +254,11 @@ namespace Tnb.ProductionMgr
|
|||||||
Log.Error($"{equipment.name}没配置允许入空箱");
|
Log.Error($"{equipment.name}没配置允许入空箱");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!hxjList.Contains(eqpDaq.equip_code))
|
||||||
|
{
|
||||||
|
Log.Error($"{eqpDaq.equip_code}状态不正常");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
bool? value = await _redisData.TryGetValueByKeyField<bool?>(eqpDaq.equip_code, eqpDaq.label_name);
|
bool? value = await _redisData.TryGetValueByKeyField<bool?>(eqpDaq.equip_code, eqpDaq.label_name);
|
||||||
bool valueFlag = _redisData.Get<bool>($"{eqpDaq.equip_code}_{eqpDaq.label_name}_flag");
|
bool valueFlag = _redisData.Get<bool>($"{eqpDaq.equip_code}_{eqpDaq.label_name}_flag");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user