CAN卡添加

This commit is contained in:
hsc
2026-07-01 17:37:30 +08:00
parent f27045153c
commit 63f43853fa
13 changed files with 1841 additions and 881 deletions

View File

@@ -182,12 +182,14 @@ namespace MonitorModule.ViewModels
channel.Record(time, args.Value);
// 入队数据库批量写入
// CreateTime 使用 args.Time采样触发时刻而不是 DateTime.Now设备响应到达时刻
// 这样即使设备响应有延迟,数据库里的时间戳仍然按设定采样间隔分布。
var entity = new MonitorValueEntity
{
MonitorName = channel.DisplayName,
MonitorValue = args.Value,
Scope = args.Scope,
CreateTime = DateTime.Now,
CreateTime = args.Time,
IsDel = 0
};
_insertQueue.Enqueue(entity);