This commit is contained in:
2024-09-16 15:15:42 +08:00
parent 44812663f0
commit 90db5740ec

View File

@@ -125,19 +125,19 @@ namespace Tnb.ProductionMgr
// Log.Information($"{device},{eqpDaq3.label_name}称重完成返回结果:{responseresult}"); // Log.Information($"{device},{eqpDaq3.label_name}称重完成返回结果:{responseresult}");
// } // }
// } // }
string equipStatus = await _redisData.GetHash(device, "1 启动 2 停止 3手动 4 急停"); int equipStatus = await _redisData.TryGetValueByKeyField<int>(device, "1 启动 2 停止 3手动 4 急停");
Log.Information($"换箱机状态:{equipStatus}"); Log.Information($"换箱机状态:{equipStatus}");
if (equipStatus != "1") if (equipStatus.ToString() != "1")
{ {
if (equipStatus.Trim() == "2") if (equipStatus.ToString().Trim() == "2")
{ {
throw Oops.Bah("换箱机状态为停止"); throw Oops.Bah("换箱机状态为停止");
} }
if (equipStatus.Trim() == "3") if (equipStatus.ToString().Trim() == "3")
{ {
throw Oops.Bah("换箱机状态为手动"); throw Oops.Bah("换箱机状态为手动");
} }
if (equipStatus.Trim() == "4") if (equipStatus.ToString().Trim() == "4")
{ {
throw Oops.Bah("换箱机状态为急停"); throw Oops.Bah("换箱机状态为急停");
} }