优化iotdb 存储
This commit is contained in:
parent
fed56f33ff
commit
5b4673adef
@ -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<long>()
|
||||
var treeRecordingTimeData = new TreeModelSingleMeasuringEntity<DateTime>()
|
||||
{
|
||||
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<long>()
|
||||
var treeRecordingTimeData = new TreeModelSingleMeasuringEntity<DateTime>()
|
||||
{
|
||||
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);
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link href="libs/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<title>后端服务</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user