Compare commits
No commits in common. "9f61d371294d08c8f18fcb33c6d456f7adb5f2f9" and "0bc946d1e9635effd00520a8d3cf950ec6956c51" have entirely different histories.
9f61d37129
...
0bc946d1e9
@ -1,5 +1 @@
|
||||
CREATE TABLE IF NOT EXISTS CTWingAepReceiveMessageEntity( time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, PlatformTenantId STRING FIELD, ProductId STRING FIELD, ServiceId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, MessageType STRING FIELD, Protocol STRING FIELD, RawMessage STRING FIELD, ReceivedPayload STRING FIELD, ReceivedTimestamps INT64 FIELD, IMSI STRING FIELD, IMEI STRING FIELD ) COMMENT 'CTWingAepReceiveMessageEntity';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS DeviceTelemetryPacketTaskInfo( time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, IoTPlatformProductId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, IoTPlatformProductName STRING FIELD, IoTPlatformAccountId STRING FIELD, AccountPhoneNumber STRING FIELD, IssueRawMessage STRING FIELD, IssuePayload STRING FIELD, ResponseRawMessage STRING FIELD, ResponsePayload STRING FIELD, TelemetrySource INT32 FIELD, IoTPlatform INT32 FIELD, RetryCount INT32 FIELD, LastIssueTime TIMESTAMP FIELD, IssueStatus INT32 FIELD ) COMMENT 'DeviceTelemetryPacketTaskInfo';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS OneNETReceiveMessageEntity( time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, ProductId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, MessageType STRING FIELD, Protocol STRING FIELD, RawMessage STRING FIELD, IsEncrypted BOOLEAN FIELD, PlaintextMessage STRING FIELD, ReceivedPayload STRING FIELD, ReceivedTimestamps INT64 FIELD ) COMMENT 'OneNETReceiveMessageEntity';
|
||||
CREATE TABLE IF NOT EXISTS CTWingAepReceiveMessageEntity(time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, PlatformTenantId STRING FIELD, ProductId STRING FIELD, ServiceId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, MessageType STRING FIELD, Protocol STRING FIELD, RawMessage STRING FIELD, ReceivedPayload STRING FIELD, ReceivedTimestamps INT64 FIELD, IMSI STRING FIELD, IMEI STRING FIELD ) COMMENT 'CTWingAepReceiveMessageEntity';CREATE TABLE IF NOT EXISTS DeviceTelemetryPacketTaskInfo(time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, IoTPlatformProductId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, IoTPlatformProductName STRING FIELD, IoTPlatformAccountId STRING FIELD, AccountPhoneNumber STRING FIELD, TelemetryType INT32 FIELD, IssueRawMessage STRING FIELD, IssuePayload STRING FIELD, ResponseRawMessage STRING FIELD, ResponsePayload STRING FIELD, TelemetrySource INT32 FIELD, IoTPlatform INT32 FIELD, RetryCount INT32 FIELD, LastIssueTime TIMESTAMP FIELD, IssueStatus INT32 FIELD ) COMMENT 'DeviceTelemetryPacketTaskInfo';CREATE TABLE IF NOT EXISTS OneNETReceiveMessageEntity(time TIMESTAMP TIME, IoTDataType STRING TAG, DeviceType STRING TAG, DeviceAddress STRING TAG, SubDevice STRING TAG, ProductId STRING FIELD, IoTPlatformDeviceOpenInfo STRING FIELD, MessageType STRING FIELD, Protocol STRING FIELD, RawMessage STRING FIELD, IsEncrypted BOOLEAN FIELD, PlaintextMessage STRING FIELD, ReceivedPayload STRING FIELD, ReceivedTimestamps INT64 FIELD ) COMMENT 'OneNETReceiveMessageEntity';
|
||||
@ -1,7 +1,6 @@
|
||||
using JiShe.ServicePro.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -16,7 +15,6 @@ namespace JiShe.IoT.IoTPlatformAggregation.Dto
|
||||
/// <summary>
|
||||
/// 平台类型
|
||||
/// </summary>
|
||||
[Required]
|
||||
public IoTPlatformTypeEnum IoTPlatformType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
using JiShe.ServicePro.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JiShe.IoT.IoTPlatformAggregation.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 产品属性信息输入
|
||||
/// </summary>
|
||||
public class IoTPlatformProductPropertyInfoInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 物联网平台类型,默认没有指定
|
||||
/// </summary>
|
||||
[Required]
|
||||
public IoTPlatformTypeEnum IoTPlatformType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物联网平台中对应的产品Id
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string IoTPlatformProductId { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,4 @@
|
||||
using JiShe.IoT.IoTPlatformAggregation.Dto;
|
||||
using JiShe.ServicePro.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -20,13 +19,5 @@ namespace JiShe.IoT.IoTPlatformAggregation
|
||||
/// <returns></returns>
|
||||
Task<List<IoTPlatformProductInfoOutput>> GetIoTPlatformProductInfoAsync(IoTPlatformProductInfoInput input
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// 获取平台产品物模型属性信息
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<SelectResult>> GetIoTPlatformProductPropertyInfoAsync(IoTPlatformProductPropertyInfoInput input
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,8 @@
|
||||
using Castle.Core.Logging;
|
||||
using JiShe.IoT.IoTPlatformAggregation.Dto;
|
||||
using JiShe.ServicePro.Commons;
|
||||
using JiShe.ServicePro.Core;
|
||||
using JiShe.ServicePro.CTWingManagement.CTWingProducts;
|
||||
using JiShe.ServicePro.Enums;
|
||||
using JiShe.ServicePro.FreeRedisProvider;
|
||||
using JiShe.ServicePro.OneNETManagement.OneNETProducts;
|
||||
using Microsoft.AspNetCore.DataProtection.KeyManagement;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -53,7 +49,7 @@ namespace JiShe.IoT.IoTPlatformAggregation
|
||||
if (input.IoTPlatformType == IoTPlatformTypeEnum.CTWing)
|
||||
{
|
||||
var ctwingProductInfos = await _ctwingProductService.GetAllListAsync();
|
||||
if (ctwingProductInfos == null)
|
||||
if(ctwingProductInfos == null)
|
||||
{
|
||||
return ioTPlatformProductInfoOutputs;
|
||||
}
|
||||
@ -69,10 +65,10 @@ namespace JiShe.IoT.IoTPlatformAggregation
|
||||
}
|
||||
}
|
||||
|
||||
if (input.IoTPlatformType == IoTPlatformTypeEnum.OneNET)
|
||||
if(input.IoTPlatformType == IoTPlatformTypeEnum.OneNET)
|
||||
{
|
||||
var oneNetProductInfos = await _oneNetProductService.GetAllListAsync();
|
||||
if (oneNetProductInfos == null)
|
||||
if(oneNetProductInfos == null)
|
||||
{
|
||||
return ioTPlatformProductInfoOutputs;
|
||||
}
|
||||
@ -95,85 +91,5 @@ namespace JiShe.IoT.IoTPlatformAggregation
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取平台产品物模型属性信息
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<SelectResult>> GetIoTPlatformProductPropertyInfoAsync(IoTPlatformProductPropertyInfoInput input)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (input == null)
|
||||
{
|
||||
throw new UserFriendlyException($"{nameof(GetIoTPlatformProductPropertyInfoAsync)} 平台产品聚合服务获取产品属性信息失败,参数异常");
|
||||
}
|
||||
var key = string.Format($"{RedisConst.CachePlatformProductThingModelInfoKey}", input.IoTPlatformType);
|
||||
List<SelectResult> selectResults = new List<SelectResult>();
|
||||
|
||||
List<IoTPlatformProductInfoOutput> ioTPlatformProductInfoOutputs = new List<IoTPlatformProductInfoOutput>();
|
||||
if (input.IoTPlatformType == IoTPlatformTypeEnum.CTWing)
|
||||
{
|
||||
//var ctwingProductInfos = await _ctwingProductService.GetAllListAsync();
|
||||
//if (ctwingProductInfos == null)
|
||||
//{
|
||||
// return ioTPlatformProductInfoOutputs;
|
||||
//}
|
||||
|
||||
//foreach (var ctwingProductInfo in ctwingProductInfos)
|
||||
//{
|
||||
// ioTPlatformProductInfoOutputs.Add(new IoTPlatformProductInfoOutput
|
||||
// {
|
||||
// IoTPlatformType = IoTPlatformTypeEnum.CTWing,
|
||||
// IoTPlatformProductId = ctwingProductInfo.IoTPlatformProductId,
|
||||
// ProductName = ctwingProductInfo.ProductName
|
||||
// });
|
||||
//}
|
||||
_logger.LogError($"{nameof(GetIoTPlatformProductPropertyInfoAsync)}产品聚合服务暂不支持CTWing产品物模型属性信息查询");
|
||||
|
||||
return selectResults;
|
||||
}
|
||||
|
||||
|
||||
if (input.IoTPlatformType == IoTPlatformTypeEnum.OneNET)
|
||||
{
|
||||
|
||||
var oneNETAllThingModel = FreeRedisProvider.Instance.HGet<OneNETAllThingModel>(key, input.IoTPlatformProductId);
|
||||
if (oneNETAllThingModel != null)
|
||||
{
|
||||
return OneNETAllThingModel.GetAllPropertiesSelectResult(oneNETAllThingModel.Properties);
|
||||
}
|
||||
|
||||
var oneNetProductInfos = await _oneNetProductService.GetProductInfoAsync(new IdInput<string>() { Id = input.IoTPlatformProductId });
|
||||
if (oneNetProductInfos == null || string.IsNullOrWhiteSpace(oneNetProductInfos.ThingModelInfos))
|
||||
{
|
||||
return selectResults;
|
||||
}
|
||||
|
||||
|
||||
|
||||
oneNETAllThingModel = oneNetProductInfos.ThingModelInfos.Deserialize<OneNETAllThingModel>();
|
||||
|
||||
if (oneNETAllThingModel == null)
|
||||
{
|
||||
return selectResults;
|
||||
}
|
||||
|
||||
await FreeRedisProvider.Instance.HSetAsync<OneNETAllThingModel>(key, input.IoTPlatformProductId, oneNETAllThingModel);
|
||||
|
||||
return OneNETAllThingModel.GetAllPropertiesSelectResult(oneNETAllThingModel.Properties);
|
||||
}
|
||||
|
||||
return selectResults;
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
3831
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251208010754_InitialCreate.Designer.cs
generated
Normal file
3831
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251208010754_InitialCreate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -984,8 +984,9 @@ namespace JiShe.IoT.Migrations
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ScriptName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "脚本函数名称")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
FunctionScript = table.Column<string>(type: "text", nullable: true, comment: "脚本函数体")
|
||||
FunctionScript = table.Column<string>(type: "text", nullable: false, comment: "脚本函数体")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ParsingSequence = table.Column<int>(type: "int", nullable: false, comment: "解析顺序,1234或者3412(高低位反转)"),
|
||||
FunctionAnalysisFlag = table.Column<sbyte>(type: "tinyint(1)", nullable: false, comment: "函数解析标记,默认为false, 不能解析"),
|
||||
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
@ -1021,12 +1022,11 @@ 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"),
|
||||
IoTPlatformThingModelDataId = table.Column<Guid>(type: "char(36)", nullable: false, comment: "系统中平台端物模型数据Id", collation: "ascii_general_ci"),
|
||||
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"),
|
||||
IoTPlatformRawFieldDataType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "物联网平台中对应的产品物模型属性或者事件数据类型")
|
||||
IoTPlatformRawFieldDataType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件数据类型")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
StandardFieldName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
@ -1035,11 +1035,8 @@ namespace JiShe.IoT.Migrations
|
||||
StandardFieldDisplayName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IsValueNeedConvert = table.Column<sbyte>(type: "tinyint(1)", nullable: false, comment: "是否需要值类型转换"),
|
||||
NativeSkipNumber = table.Column<int>(type: "int", nullable: false, comment: "正序跳过数量"),
|
||||
NativeTakeNumber = table.Column<int>(type: "int", nullable: false, comment: "正序获取数量"),
|
||||
ParsingSequence = table.Column<int>(type: "int", nullable: false, comment: "解析顺序,1234或者3412(高低反转)"),
|
||||
ReversalSkipNumber = table.Column<int>(type: "int", nullable: true, comment: "反转跳过数量"),
|
||||
ReversalTakeNumber = table.Column<int>(type: "int", nullable: true, comment: "反转获取数量"),
|
||||
SkipNumber = table.Column<int>(type: "int", nullable: false, comment: "跳过数量"),
|
||||
TakeNumber = table.Column<int>(type: "int", nullable: false, comment: "获取数量"),
|
||||
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
@ -1077,8 +1074,6 @@ namespace JiShe.IoT.Migrations
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IoTPlatformRawFieldName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "物联网平台中对应的产品物模型属性或者事件名称")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IoTPlatformRawFieldDataType = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "物联网平台中对应的产品物模型属性或者事件数据类型")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
StandardFieldName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
StandardFieldValueType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "标准物模型字段值类型")
|
||||
@ -1086,9 +1081,6 @@ namespace JiShe.IoT.Migrations
|
||||
StandardFieldDisplayName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "管理后台产品标准的物模型属性或者事件名称")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IsValueNeedConvert = table.Column<sbyte>(type: "tinyint(1)", nullable: false, comment: "是否需要值类型转换"),
|
||||
IsSpecialIdentifier = table.Column<sbyte>(type: "tinyint(1)", nullable: false, comment: "是否是特殊物模型标识符"),
|
||||
IoTPlatformRawFieldExtension = table.Column<string>(type: "text", nullable: true, comment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
3840
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251212073952_update20251212.Designer.cs
generated
Normal file
3840
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251212073952_update20251212.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,42 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace JiShe.IoT.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class update20251212 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "IoTPlatformRawFieldExtension",
|
||||
table: "ServiceProIoTPlatformThingModelInfo",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
comment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<sbyte>(
|
||||
name: "IsSpecialIdentifier",
|
||||
table: "ServiceProIoTPlatformThingModelInfo",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: (sbyte)0,
|
||||
comment: "是否是特殊物模型标识符");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IoTPlatformRawFieldExtension",
|
||||
table: "ServiceProIoTPlatformThingModelInfo");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsSpecialIdentifier",
|
||||
table: "ServiceProIoTPlatformThingModelInfo");
|
||||
}
|
||||
}
|
||||
}
|
||||
3839
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251217033440_update20251217.Designer.cs
generated
Normal file
3839
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251217033440_update20251217.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,50 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace JiShe.IoT.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class update20251217 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "IoTPlatformRawFieldExtension",
|
||||
table: "ServiceProIoTPlatformThingModelInfo",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
comment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldComment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ServiceProIoTPlatformThingModelInfo",
|
||||
keyColumn: "IoTPlatformRawFieldExtension",
|
||||
keyValue: null,
|
||||
column: "IoTPlatformRawFieldExtension",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "IoTPlatformRawFieldExtension",
|
||||
table: "ServiceProIoTPlatformThingModelInfo",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
comment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true,
|
||||
oldComment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
3847
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251218020524_udpate202512181004.Designer.cs
generated
Normal file
3847
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251218020524_udpate202512181004.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,112 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace JiShe.IoT.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class udpate202512181004 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SkipNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TakeNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ParsingSequence",
|
||||
table: "ServiceProDeviceThingModelManagement");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "NativeSkipNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
comment: "正序跳过数量");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "NativeTakeNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
comment: "正序获取数量");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ParsingSequence",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
comment: "解析顺序,1234或者3412(高低反转)");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ReversalSkipNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "反转跳过数量");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ReversalTakeNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "反转获取数量");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NativeSkipNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NativeTakeNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ParsingSequence",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ReversalSkipNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ReversalTakeNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "SkipNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
comment: "跳过数量");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TakeNumber",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
comment: "获取数量");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ParsingSequence",
|
||||
table: "ServiceProDeviceThingModelManagement",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
comment: "解析顺序,1234或者3412(高低位反转)");
|
||||
}
|
||||
}
|
||||
}
|
||||
3846
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251218082708_udpate202512181626.Designer.cs
generated
Normal file
3846
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251218082708_udpate202512181626.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,50 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace JiShe.IoT.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class udpate202512181626 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FunctionScript",
|
||||
table: "ServiceProDeviceThingModelManagement",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
comment: "脚本函数体",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldComment: "脚本函数体")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ServiceProDeviceThingModelManagement",
|
||||
keyColumn: "FunctionScript",
|
||||
keyValue: null,
|
||||
column: "FunctionScript",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FunctionScript",
|
||||
table: "ServiceProDeviceThingModelManagement",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
comment: "脚本函数体",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true,
|
||||
oldComment: "脚本函数体")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
3850
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251219034055_udpate202512191140.Designer.cs
generated
Normal file
3850
src/JiShe.IoT.EntityFrameworkCore/Migrations/20251219034055_udpate202512191140.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace JiShe.IoT.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class udpate202512191140 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "IoTPlatformThingModelDataId",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
comment: "系统中平台端物模型数据Id",
|
||||
collation: "ascii_general_ci");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IoTPlatformThingModelDataId",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
|
||||
namespace JiShe.IoT.Migrations
|
||||
{
|
||||
[DbContext(typeof(IoTDbContext))]
|
||||
[Migration("20251222073841_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
[Migration("20251219054834_udpate202512191347")]
|
||||
partial class udpate202512191347
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@ -0,0 +1,67 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace JiShe.IoT.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class udpate202512191347 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "IoTPlatformRawFieldDataType",
|
||||
table: "ServiceProIoTPlatformThingModelInfo",
|
||||
type: "varchar(64)",
|
||||
maxLength: 64,
|
||||
nullable: true,
|
||||
comment: "物联网平台中对应的产品物模型属性或者事件数据类型")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "IoTPlatformRawFieldDataType",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo",
|
||||
type: "varchar(20)",
|
||||
maxLength: 20,
|
||||
nullable: true,
|
||||
comment: "物联网平台中对应的产品物模型属性或者事件数据类型",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(20)",
|
||||
oldMaxLength: 20,
|
||||
oldComment: "物联网平台中对应的产品物模型属性或者事件数据类型")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IoTPlatformRawFieldDataType",
|
||||
table: "ServiceProIoTPlatformThingModelInfo");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "ServiceProDeviceThingModelPropertylInfo",
|
||||
keyColumn: "IoTPlatformRawFieldDataType",
|
||||
keyValue: null,
|
||||
column: "IoTPlatformRawFieldDataType",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "IoTPlatformRawFieldDataType",
|
||||
table: "ServiceProDeviceThingModelPropertylInfo",
|
||||
type: "varchar(20)",
|
||||
maxLength: 20,
|
||||
nullable: false,
|
||||
comment: "物联网平台中对应的产品物模型属性或者事件数据类型",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(20)",
|
||||
oldMaxLength: 20,
|
||||
oldNullable: true,
|
||||
oldComment: "物联网平台中对应的产品物模型属性或者事件数据类型")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,7 +3,6 @@ using JiShe.IoT.DeviceAggregation.Dto;
|
||||
using JiShe.IoT.IoTPlatformAggregation;
|
||||
using JiShe.IoT.IoTPlatformAggregation.Dto;
|
||||
using JiShe.ServicePro;
|
||||
using JiShe.ServicePro.Commons;
|
||||
using JiShe.ServicePro.Core;
|
||||
using JiShe.ServicePro.DeviceManagement.DeviceInfos;
|
||||
|
||||
@ -32,18 +31,6 @@ namespace JiShe.IoT.Controllers
|
||||
{
|
||||
return await _iotPlatformAggregationService.GetIoTPlatformProductInfoAsync(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取平台产品物模型属性信息
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost(nameof(GetIoTPlatformProductPropertyInfoAsync))]
|
||||
[SwaggerOperation(summary: "获取平台产品物模型属性信息", Tags = new[] { "AggregationIoTPlatform" })]
|
||||
public async Task<List<SelectResult>> GetIoTPlatformProductPropertyInfoAsync(IoTPlatformProductPropertyInfoInput input)
|
||||
{
|
||||
return await _iotPlatformAggregationService.GetIoTPlatformProductPropertyInfoAsync(input);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user