From b31b96edf548eaa0c03f2f5d0485312c9976ca6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A6=82=E6=84=8F=20=E5=BD=AD?= <2417589739@qq.com>
Date: Wed, 11 May 2022 11:55:56 +0800
Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BPASmartClient.Device/BaseDevice.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/BPASmartClient.Device/BaseDevice.cs b/BPASmartClient.Device/BaseDevice.cs
index 90a2f225..5d46a3da 100644
--- a/BPASmartClient.Device/BaseDevice.cs
+++ b/BPASmartClient.Device/BaseDevice.cs
@@ -66,7 +66,7 @@ namespace BPASmartClient.Device
///
/// 设备运行日志
///
- public ConcurrentDictionary Log { get; set; }=new ConcurrentDictionary();
+ public ConcurrentDictionary Log { get; set; } = new ConcurrentDictionary();
///
/// 设备运行告警与错误
///
@@ -87,7 +87,7 @@ namespace BPASmartClient.Device
///
public void DeviceProcessLogShow(string info)
{
- DeviceProcessLog.Add(info);
+ Log.TryAdd(DeviceId.ToString(), new { Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Type = "流程", Text = info });
MessageLog.GetInstance.DeviceProcessLogShow(DeviceId.ToString(), info);
}
@@ -109,8 +109,8 @@ namespace BPASmartClient.Device
public virtual void StartMain()
{
#region 测试添加几个日志与告警
- Log.TryAdd(Guid.NewGuid().ToString(), new {Time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),Type="运行",Text="正常启动" });
- Log.TryAdd(Guid.NewGuid().ToString(), new { Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Type = "打料", Text = "开始打料" });
+ //Log.TryAdd(Guid.NewGuid().ToString(), new {Time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),Type="运行",Text="正常启动" });
+ //Log.TryAdd(Guid.NewGuid().ToString(), new { Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Type = "打料", Text = "开始打料" });
Error.TryAdd(Guid.NewGuid().ToString(), new { Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Type = "落碗", Text = "落碗异常" });
Error.TryAdd(Guid.NewGuid().ToString(), new { Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), Type = "煮面机", Text = "煮面机温度异常" });