修复遥测日志报错问题

This commit is contained in:
ChenYi 2025-10-29 15:19:18 +08:00
parent ec3003acea
commit 090be8f6f0
6 changed files with 29 additions and 48 deletions

File diff suppressed because one or more lines are too long

View File

@ -311,10 +311,10 @@ namespace JiShe.IoT.DeviceAggregation
var packetTaskInfo = GetDeviceTelemetryPacketTaskInfo(ioTDBOptions, commandRequest, deviceInfo.Adapt<DeviceCacheInfos>(), commandRequest.Message);
//数据写入遥测任务数据存储通道
await ioTDBDataChannelManageService.DeviceTelemetryTaskWriterAsync(DataChannelManage.DeviceTelemetryTaskDataChannel.Writer, (DistributedMessageCenterConst.OneNETCommandIssuedEventName, packetTaskInfo));
if (deviceInfo.IoTPlatform == IoTPlatformTypeEnum.OneNET)
{
await ioTDBDataChannelManageService.DeviceTelemetryTaskWriterAsync(DataChannelManage.DeviceTelemetryTaskDataChannel.Writer, (DistributedMessageCenterConst.OneNETCommandIssuedEventName, packetTaskInfo));
return await DeviceCommandInfoToOneNET(deviceInfo, packetTaskInfo);
}
else if (deviceInfo.IoTPlatform == IoTPlatformTypeEnum.CTWing)

View File

@ -62,7 +62,8 @@ namespace JiShe.IoT
IoTPlatformProductName = deviceInfo.IoTPlatformProductName,
IssuePayload = messageBody,
RetryCount = 0,
IssueStatus = (int)DeviceCommandIssueStatusEnum.Unprocessed
IssueStatus = (int)DeviceCommandIssueStatusEnum.Unprocessed,
LastIssueTime = DateTime.Now
};
return oneNETIssueMessageEntity;

View File

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace JiShe.IoT.Migrations
{
[DbContext(typeof(IoTDbContext))]
[Migration("20251028091552_InitialCreate")]
[Migration("20251029012420_InitialCreate")]
partial class InitialCreate
{
/// <inheritdoc />
@ -751,8 +751,8 @@ namespace JiShe.IoT.Migrations
b.Property<string>("FiledType")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasComment("物联网平台中对应产品物模型属性或者事件类型");
b.Property<int>("IoTPlatform")

View File

@ -920,7 +920,7 @@ namespace JiShe.IoT.Migrations
IoTPlatform = table.Column<int>(type: "int", nullable: false, comment: "物联网平台类型,默认没有指定"),
IoTPlatformProductId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应的产品Id")
.Annotation("MySql:CharSet", "utf8mb4"),
FiledType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "物联网平台中对应产品物模型属性或者事件类型")
FiledType = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物联网平台中对应产品物模型属性或者事件类型")
.Annotation("MySql:CharSet", "utf8mb4"),
IoTPlatformRawFieldName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件名称")
.Annotation("MySql:CharSet", "utf8mb4"),

View File

@ -748,8 +748,8 @@ namespace JiShe.IoT.Migrations
b.Property<string>("FiledType")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasComment("物联网平台中对应产品物模型属性或者事件类型");
b.Property<int>("IoTPlatform")