From 0424b6ae38064361ee4364b9d1ce7ac54b94eb0d Mon Sep 17 00:00:00 2001 From: ChenYi <296215406@outlook.com> Date: Tue, 3 Feb 2026 17:23:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E5=A4=84?= =?UTF-8?q?=E7=90=86=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DeviceAggregation/DeviceAggregationService.cs | 3 ++- src/JiShe.IoT.Application/IoTAppService.cs | 8 ++++---- src/JiShe.IoT.Application/IoTDeviceBasicAppService.cs | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs b/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs index db4cd85..71489b1 100644 --- a/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs +++ b/src/JiShe.IoT.Application/DeviceAggregation/DeviceAggregationService.cs @@ -557,7 +557,8 @@ namespace JiShe.IoT.DeviceAggregation { Message = input.Serialize(), }; - var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, commandRequest, deviceInfo.Adapt(), input.PropertyList.Serialize()); + var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, commandRequest, deviceInfo.Adapt(), input.PropertyList.Serialize()); + if (deviceInfo.IoTPlatform == IoTPlatformTypeEnum.OneNET) { diff --git a/src/JiShe.IoT.Application/IoTAppService.cs b/src/JiShe.IoT.Application/IoTAppService.cs index 06e6eb3..0d777e9 100644 --- a/src/JiShe.IoT.Application/IoTAppService.cs +++ b/src/JiShe.IoT.Application/IoTAppService.cs @@ -47,13 +47,13 @@ namespace JiShe.IoT var oneNETIssueMessageEntity = new DeviceTelemetryPacketTaskInfo() { DataBaseName = iotDBOptions.DataBaseName, - DeviceType = $"{commandIssueInfo.DeviceType}", - DeviceAddress = commandIssueInfo.DeviceAddress, + DeviceType = $"{deviceInfo.DeviceType}", + DeviceAddress = deviceInfo.DeviceAddress, IssueRawMessage = input.Serialize(), IssuePayload = messageBody, IoTDataType = IoTDBDataTypeConst.Command, TelemetrySource = (int)commandIssueInfo.SourceType, - IoTPlatform = (int)commandIssueInfo.IoTPlatform, + IoTPlatform = (int)deviceInfo.IoTPlatform, IoTPlatformProductId = deviceInfo.IoTPlatformProductId, IoTPlatformDeviceOpenInfo = deviceInfo.IoTPlatformDeviceOpenInfo, IoTPlatformAccountId = deviceInfo.IoTPlatformAccountId, @@ -61,7 +61,7 @@ namespace JiShe.IoT IoTPlatformProductName = deviceInfo.IoTPlatformProductName, RetryCount = 0, IssueStatus = (int)DeviceCommandIssueStatusEnum.Unprocessed, - LastIssueTime = DateTime.Now + LastIssueTime = DateTime.Now, }; return oneNETIssueMessageEntity; diff --git a/src/JiShe.IoT.Application/IoTDeviceBasicAppService.cs b/src/JiShe.IoT.Application/IoTDeviceBasicAppService.cs index d7c6d66..b4b3aad 100644 --- a/src/JiShe.IoT.Application/IoTDeviceBasicAppService.cs +++ b/src/JiShe.IoT.Application/IoTDeviceBasicAppService.cs @@ -449,6 +449,7 @@ namespace JiShe.IoT }; var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, commandRequest, deviceInfo.Adapt(), input.Commands.Serialize()); + await ioTDBDataChannelManageService.DeviceTelemetryTaskWriterAsync(DataChannelManage.DeviceTelemetryTaskDataChannel.Writer, (DistributedMessageCenterConst.OneNETCommandIssuedEventName, packetTaskInfo)); await redisPubSubService.PublishReliableAsync(DistributedMessageCenterConst.OneNETCommandIssuedEventName, packetTaskInfo);