From 5b4673adef9f8cd7a4f35b71c1f7f13c0247a0ce Mon Sep 17 00:00:00 2001 From: zenghongyao <873884283@qq.com> Date: Mon, 12 May 2025 17:24:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96iotdb=20=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AnalysisData/DataStorage.cs | 10 +++++----- web/JiShe.CollectBus.Host/Pages/Monitor.cshtml | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/protocols/JiShe.CollectBus.Protocol.T37612012/AnalysisData/DataStorage.cs b/protocols/JiShe.CollectBus.Protocol.T37612012/AnalysisData/DataStorage.cs index 87a2abf..2183ca2 100644 --- a/protocols/JiShe.CollectBus.Protocol.T37612012/AnalysisData/DataStorage.cs +++ b/protocols/JiShe.CollectBus.Protocol.T37612012/AnalysisData/DataStorage.cs @@ -173,7 +173,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData ReceivedTime = analysisBaseDto.ReceivedTime, }; } - + _runtimeContext.UseTableSessionPool = true; // 使树模型池 await _dbProvider.InsertAsync(taskData); //如果无字段名,则不保存数据 if (!string.IsNullOrWhiteSpace(data.FiledName)) @@ -346,7 +346,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData await _dbProvider.InsertAsync(treeFrameData); // 时间 - var treeRecordingTimeData = new TreeModelSingleMeasuringEntity() + var treeRecordingTimeData = new TreeModelSingleMeasuringEntity() { SystemName = _applicationOptions.SystemType, DeviceId = $"{data.DeviceId}", @@ -354,7 +354,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData ProjectId = $"{data.ProjectId}", Timestamps = timestamps, DataType = analysisBaseDto.DataType, - SingleMeasuring = (ConcentratorStatusFieldConst.RecordingTime, (data.TimeSpan.HasValue ? data.TimeSpan.Value : DateTime.Now).GetDateTimeOffset().ToUnixTimeNanoseconds()) + SingleMeasuring = (ConcentratorStatusFieldConst.RecordingTime, data.TimeSpan.HasValue ? data.TimeSpan.Value : DateTime.Now) }; _runtimeContext.UseTableSessionPool = false; // 使树模型池 await _dbProvider.InsertAsync(treeRecordingTimeData); @@ -446,14 +446,14 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData await _dbProvider.InsertAsync(treeFrameData); // 时间 - var treeRecordingTimeData = new TreeModelSingleMeasuringEntity() + var treeRecordingTimeData = new TreeModelSingleMeasuringEntity() { SystemName = _applicationOptions.SystemType, DeviceType = $"{item.DeviceType}", ProjectId = $"{item.ProjectId}", DataType = analysisBaseDto.DataType, Timestamps = timestamps, - SingleMeasuring = (ConcentratorStatusFieldConst.RecordingTime, (item.TimeSpan.HasValue ? item.TimeSpan.Value : DateTime.Now).GetDateTimeOffset().ToUnixTimeNanoseconds()) + SingleMeasuring = (ConcentratorStatusFieldConst.RecordingTime, item.TimeSpan.HasValue ? item.TimeSpan.Value : DateTime.Now) }; _runtimeContext.UseTableSessionPool = false; // 使树模型池 await _dbProvider.InsertAsync(treeRecordingTimeData); diff --git a/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml b/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml index 30e91e8..a58ded5 100644 --- a/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml +++ b/web/JiShe.CollectBus.Host/Pages/Monitor.cshtml @@ -16,7 +16,6 @@ 后端服务 -