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);