修改代码

This commit is contained in:
zenghongyao 2025-05-08 17:33:07 +08:00
parent bdfc8eabae
commit 8d1fc46e8f
2 changed files with 15 additions and 13 deletions

View File

@ -284,7 +284,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
DeviceId = $"{data.DeviceId}",
DeviceType = $"{data.DeviceType}",
ProjectId = $"{data.ProjectId}",
DataType = IOTDBDataTypeConst.Data,
DataType = IOTDBDataTypeConst.Status,
Timestamps = timestamps,
SingleMeasuring = (data.FiledName!, data.DataValue!)
};
@ -297,7 +297,7 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
DeviceId = $"{data.DeviceId}",
DeviceType = $"{data.DeviceType}",
ProjectId = $"{data.ProjectId}",
DataType = IOTDBDataTypeConst.Data,
DataType = IOTDBDataTypeConst.Status,
Timestamps = timestamps,
SingleMeasuring = (ConcentratorStatusFieldConst.FrameData, analysisBaseDto.HexMessage ?? string.Empty)
};
@ -359,10 +359,11 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
{
SystemName = _applicationOptions.SystemType,
DeviceId = $"{item.DeviceId}",
DeviceType = $"{item.DeviceType}.{IOTDBDataType.Status}",
DeviceType = $"{item.DeviceType}",
ProjectId = $"{item.ProjectId}",
DataType = IOTDBDataTypeConst.Status,
Timestamps = timestamps,
SingleMeasuring = new Tuple<string, T>(item.FiledName!, item.DataValue!)
SingleMeasuring = (item.FiledName!, item.DataValue!)
};
_runtimeContext.UseTableSessionPool = false; // 使树模型池
await _dbProvider.InsertAsync(treeData);
@ -370,11 +371,11 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
var treeFrameData = new TreeModelSingleMeasuringEntity<string>()
{
SystemName = _applicationOptions.SystemType,
DeviceId = $"{item.DeviceId}",
DeviceType = $"{item.DeviceType}.{IOTDBDataType.Status}",
DeviceType = $"{item.DeviceType}",
ProjectId = $"{item.ProjectId}",
DataType = IOTDBDataTypeConst.Status,
Timestamps = timestamps,
SingleMeasuring = new Tuple<string, string>(ConcentratorStatusFieldConst.FrameData, analysisBaseDto.HexMessage ?? string.Empty)
SingleMeasuring = (ConcentratorStatusFieldConst.FrameData, analysisBaseDto.HexMessage ?? string.Empty)
};
_runtimeContext.UseTableSessionPool = false; // 使树模型池
@ -384,11 +385,11 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
var treeRecordingTimeData = new TreeModelSingleMeasuringEntity<long>()
{
SystemName = _applicationOptions.SystemType,
DeviceId = $"{item.DeviceId}",
DeviceType = $"{item.DeviceType}.{IOTDBDataType.Status}",
DeviceType = $"{item.DeviceType}",
ProjectId = $"{item.ProjectId}",
DataType = IOTDBDataTypeConst.Status,
Timestamps = timestamps,
SingleMeasuring = new Tuple<string, long>(ConcentratorStatusFieldConst.RecordingTime, (item.TimeSpan.HasValue ? item.TimeSpan.Value : DateTime.Now).GetDateTimeOffset().ToUnixTimeNanoseconds())
SingleMeasuring = (ConcentratorStatusFieldConst.RecordingTime, (item.TimeSpan.HasValue ? item.TimeSpan.Value : DateTime.Now).GetDateTimeOffset().ToUnixTimeNanoseconds())
};
_runtimeContext.UseTableSessionPool = false; // 使树模型池
await _dbProvider.InsertAsync(treeRecordingTimeData);
@ -396,11 +397,11 @@ namespace JiShe.CollectBus.Protocol.T37612012.AnalysisData
var treeRemarkData = new TreeModelSingleMeasuringEntity<string>()
{
SystemName = _applicationOptions.SystemType,
DeviceId = $"{item.DeviceId}",
DeviceType = $"{item.DeviceType}.{IOTDBDataType.Status}",
DeviceType = $"{item.DeviceType}",
ProjectId = $"{item.ProjectId}",
DataType = IOTDBDataTypeConst.Status,
Timestamps = timestamps,
SingleMeasuring = new Tuple<string, string>(ConcentratorStatusFieldConst.Remark, item.FiledDesc ?? string.Empty)
SingleMeasuring =(ConcentratorStatusFieldConst.Remark, item.FiledDesc ?? string.Empty)
};
_runtimeContext.UseTableSessionPool = false; // 使树模型池
await _dbProvider.InsertAsync(treeRemarkData);

View File

@ -16,6 +16,7 @@
<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>