Compare commits

..

4 Commits

Author SHA1 Message Date
ChenYi
c6e7389c3b 新增postgresql数据初始脚本 2026-01-26 16:02:37 +08:00
ChenYi
05c2046aba 迁移更新 2026-01-26 15:42:35 +08:00
ChenYi
c8c8d1c45f 完善设备升级记录更新 2026-01-26 15:42:14 +08:00
ChenYi
7b57e93c04 完善平台端物模型 2026-01-26 15:41:36 +08:00
25 changed files with 5757 additions and 19334 deletions

3
.gitignore vendored
View File

@ -60,5 +60,4 @@
/gateways/JiShe.IoT.WebGateway/bin/Debug/net10.0 /gateways/JiShe.IoT.WebGateway/bin/Debug/net10.0
/host/JiShe.IoT.HttpApi.Host/bin/Debug/net10.0 /host/JiShe.IoT.HttpApi.Host/bin/Debug/net10.0
/src/JiShe.IoT.Application/bin/Debug/net10.0 /src/JiShe.IoT.Application/bin/Debug/net10.0
/host/JiShe.IoT.HttpApi.Host/UploadFile/20251210/host/abp-file-management /host/JiShe.IoT.HttpApi.Host/UploadFile
/host/JiShe.IoT.HttpApi.Host/UploadFile/20260108/host/abp-file-management

View File

@ -29,6 +29,6 @@ SQLSERVER_PORT=11433
# 认证信息 # 认证信息
PULSAR_ADMIN_USER=admin PULSAR_ADMIN_USER=admin
PULSAR_ADMIN_PASSWORD=0fd7afb8b0d04e6abc4fdfdac2190a79 PULSAR_ADMIN_PASSWORD=0fd7afb8b0d04e6abc4fdfdac2190a79
IOTDB_ROOT_PASSWORD=Lixiao@1980 IOTDB_ROOT_PASSWORD=Li#xiao@198!0
MYSQL_ROOT_PASSWORD='JiShe!aqG#5kGgh&0' MYSQL_ROOT_PASSWORD='JiShe!aqG#5kGgh&0'
SQLSERVER_SA_PASSWORD=JiShe!aqG@5kGgh&0 SQLSERVER_SA_PASSWORD=JiShe!aqG@5kGgh&0

View File

@ -183,7 +183,7 @@ services:
- pulsar-net - pulsar-net
iotdb-standalone-service: iotdb-standalone-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/iotdb:2.0.5-standalone image: registry.cn-qingdao.aliyuncs.com/jisheyun/iotdb:2.0.6-standalone
hostname: iotdb-standalone hostname: iotdb-standalone
container_name: iotdb-standalone container_name: iotdb-standalone
restart: always restart: always

View File

@ -1,6 +1,6 @@
services: services:
iotdb-standalone: iotdb-standalone:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/iotdb:2.0.5-standalone image: registry.cn-qingdao.aliyuncs.com/jisheyun/iotdb:2.0.6-standalone
hostname: iotdb-standalone hostname: iotdb-standalone
container_name: iotdb-standalone container_name: iotdb-standalone
restart: "no" restart: "no"

View File

@ -152,7 +152,7 @@ services:
max-file: "3" max-file: "3"
iotdb-standalone-service: iotdb-standalone-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/iotdb:2.0.5-standalone image: registry.cn-qingdao.aliyuncs.com/jisheyun/iotdb:2.0.6-standalone
hostname: iotdb-standalone hostname: iotdb-standalone
container_name: iotdb-standalone container_name: iotdb-standalone
restart: always restart: always

View File

@ -1,6 +1,6 @@
services: services:
iotdb-standalone-service: iotdb-standalone-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/iotdb:2.0.5-standalone image: registry.cn-qingdao.aliyuncs.com/jisheyun/iotdb:2.0.6-standalone
hostname: iotdb-standalone hostname: iotdb-standalone
container_name: iotdb-standalone container_name: iotdb-standalone
restart: always restart: always

View File

@ -1,6 +1,6 @@
services: services:
iotdb-standalone-service: iotdb-standalone-service:
image: registry.cn-qingdao.aliyuncs.com/jisheyun/iotdb:2.0.5-standalone image: registry.cn-qingdao.aliyuncs.com/jisheyun/iotdb:2.0.6-standalone
hostname: iotdb-standalone hostname: iotdb-standalone
container_name: iotdb-standalone container_name: iotdb-standalone
restart: always restart: always

View File

@ -17,6 +17,9 @@ REDIS_PORT=30712
POSTGRES_PORT=5432 POSTGRES_PORT=5432
POSTGRES_PASSWORD=JiShe!aqG#5kGgh&0 POSTGRES_PASSWORD=JiShe!aqG#5kGgh&0
POSTGRES_DB=jisheiotprodb POSTGRES_DB=jisheiotprodb
POSTGRES_USER=postgres
POSTGRES_CONTAINER=postgres
POSTGRES_BACKUP_DIR=/mnt/dockerdata/appservice/postgresql/backup
# Admin API配置 # Admin API配置
ADMIN_API_PORT=28080 ADMIN_API_PORT=28080

File diff suppressed because one or more lines are too long

View File

@ -275,6 +275,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DockerComposeShells", "DockerComposeShells", "{8FE7CFC6-BA2A-4717-941C-0C227EB151B9}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DockerComposeShells", "DockerComposeShells", "{8FE7CFC6-BA2A-4717-941C-0C227EB151B9}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
DockerComposeShells\.env = DockerComposeShells\.env DockerComposeShells\.env = DockerComposeShells\.env
DockerComposeShells\postgresql\init\01-jisheiotprodb.sql = DockerComposeShells\postgresql\init\01-jisheiotprodb.sql
DockerComposeShells\adminapi\conf\appsettings.Development.json = DockerComposeShells\adminapi\conf\appsettings.Development.json DockerComposeShells\adminapi\conf\appsettings.Development.json = DockerComposeShells\adminapi\conf\appsettings.Development.json
DockerComposeShells\adminapi\conf\appsettings.Development_服务订阅模式.json = DockerComposeShells\adminapi\conf\appsettings.Development_服务订阅模式.json DockerComposeShells\adminapi\conf\appsettings.Development_服务订阅模式.json = DockerComposeShells\adminapi\conf\appsettings.Development_服务订阅模式.json
DockerComposeShells\adminapi\conf\appsettings.json = DockerComposeShells\adminapi\conf\appsettings.json DockerComposeShells\adminapi\conf\appsettings.json = DockerComposeShells\adminapi\conf\appsettings.json

View File

@ -1169,6 +1169,7 @@ namespace JiShe.IoT.DeviceAggregation
var upgradeRecordInput = new CreateDeviceUpgradeRecordInput() var upgradeRecordInput = new CreateDeviceUpgradeRecordInput()
{ {
DeviceDataId = deviceInfo.Id,
DeviceName = deviceInfo.DeviceName, DeviceName = deviceInfo.DeviceName,
DeviceAddress = deviceInfo.DeviceAddress, DeviceAddress = deviceInfo.DeviceAddress,
OldFirmwareVersion = deviceInfo.FirmwareVersion, OldFirmwareVersion = deviceInfo.FirmwareVersion,

View File

@ -195,7 +195,7 @@ namespace JiShe.ServicePro.OneNETManagement.Subscribers
.Set(d => d.UpgradeDate, currentTime) .Set(d => d.UpgradeDate, currentTime)
.Set(d => d.LastModificationTime, currentTime) .Set(d => d.LastModificationTime, currentTime)
.Set(d => d.LastModifierId, CurrentUser.Id) .Set(d => d.LastModifierId, CurrentUser.Id)
.Where(d=>d.DeviceAddress == deviceUpgradeRecordEntity.DeviceAddress) .Where(d=>d.Id == deviceUpgradeRecordEntity.DeviceDataId)
.ExecuteAffrowsAsync(); .ExecuteAffrowsAsync();
} }
else else

View File

@ -1,52 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JiShe.IoT.Migrations
{
/// <inheritdoc />
public partial class updateIoTThingModels : 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",
oldNullable: true,
oldComment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型");
migrationBuilder.AddColumn<bool>(
name: "IsOperableIdentifier",
table: "ServiceProIoTPlatformThingModelInfo",
type: "boolean",
nullable: false,
defaultValue: false,
comment: "是否可操作物模型标识符");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IsOperableIdentifier",
table: "ServiceProIoTPlatformThingModelInfo");
migrationBuilder.AlterColumn<string>(
name: "IoTPlatformRawFieldExtension",
table: "ServiceProIoTPlatformThingModelInfo",
type: "text",
nullable: true,
comment: "物联网平台中对应产品物模型标识符扩展,用于扩展结构体类型",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true,
oldComment: "物联网平台中对应产品物模型标识符扩展,结构体或者数组的时候,是参数的名称与长度的键值对,其他类型就是长度或者值范围");
}
}
}

View File

@ -1,30 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JiShe.IoT.Migrations
{
/// <inheritdoc />
public partial class updatethingmodel : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "AccessMode",
table: "ServiceProIoTPlatformThingModelInfo",
type: "text",
nullable: false,
defaultValue: "r",
comment: "物模型标识符访问模式");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AccessMode",
table: "ServiceProIoTPlatformThingModelInfo");
}
}
}

View File

@ -1,44 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JiShe.IoT.Migrations
{
/// <inheritdoc />
public partial class updatethingmodel2 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "AccessMode",
table: "ServiceProIoTPlatformThingModelInfo",
type: "character varying(10)",
maxLength: 10,
nullable: false,
defaultValue: "r",
comment: "物模型标识符访问模式",
oldClrType: typeof(string),
oldType: "text",
oldDefaultValue: "r",
oldComment: "物模型标识符访问模式");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "AccessMode",
table: "ServiceProIoTPlatformThingModelInfo",
type: "text",
nullable: false,
defaultValue: "r",
comment: "物模型标识符访问模式",
oldClrType: typeof(string),
oldType: "character varying(10)",
oldMaxLength: 10,
oldDefaultValue: "r",
oldComment: "物模型标识符访问模式");
}
}
}

View File

@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore;
namespace JiShe.IoT.Migrations namespace JiShe.IoT.Migrations
{ {
[DbContext(typeof(IoTDbContext))] [DbContext(typeof(IoTDbContext))]
[Migration("20260121062614_updatethingmodel2")] [Migration("20260126022433_InitialCreate")]
partial class updatethingmodel2 partial class InitialCreate
{ {
/// <inheritdoc /> /// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -907,6 +907,10 @@ namespace JiShe.IoT.Migrations
.HasColumnType("character varying(50)") .HasColumnType("character varying(50)")
.HasComment("设备地址"); .HasComment("设备地址");
b.Property<Guid>("DeviceDataId")
.HasColumnType("uuid")
.HasComment("设备数据Id");
b.Property<string>("DeviceName") b.Property<string>("DeviceName")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
@ -1581,6 +1585,10 @@ namespace JiShe.IoT.Migrations
.HasColumnType("character varying(50)") .HasColumnType("character varying(50)")
.HasComment("物联网平台中对应产品物模型属性或者事件类型"); .HasComment("物联网平台中对应产品物模型属性或者事件类型");
b.Property<int>("IdentifierType")
.HasColumnType("integer")
.HasComment("物模型标识符类型");
b.Property<int>("IoTPlatform") b.Property<int>("IoTPlatform")
.HasColumnType("integer") .HasColumnType("integer")
.HasComment("物联网平台类型,默认没有指定"); .HasComment("物联网平台类型,默认没有指定");

View File

@ -872,6 +872,7 @@ namespace JiShe.IoT.Migrations
columns: table => new columns: table => new
{ {
Id = table.Column<Guid>(type: "uuid", nullable: false), Id = table.Column<Guid>(type: "uuid", nullable: false),
DeviceDataId = table.Column<Guid>(type: "uuid", nullable: false, comment: "设备数据Id"),
DeviceName = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "设备名称"), DeviceName = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "设备名称"),
DeviceAddress = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "设备地址"), DeviceAddress = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "设备地址"),
OldFirmwareVersion = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "旧的固件版本"), OldFirmwareVersion = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "旧的固件版本"),
@ -922,6 +923,8 @@ namespace JiShe.IoT.Migrations
IsSpecialIdentifier = table.Column<bool>(type: "boolean", nullable: false, comment: "是否是特殊物模型标识符"), IsSpecialIdentifier = table.Column<bool>(type: "boolean", nullable: false, comment: "是否是特殊物模型标识符"),
IoTPlatformRawFieldExtension = table.Column<string>(type: "text", nullable: true, comment: "物联网平台中对应产品物模型标识符扩展,结构体或者数组的时候,是参数的名称与长度的键值对,其他类型就是长度或者值范围"), IoTPlatformRawFieldExtension = table.Column<string>(type: "text", nullable: true, comment: "物联网平台中对应产品物模型标识符扩展,结构体或者数组的时候,是参数的名称与长度的键值对,其他类型就是长度或者值范围"),
IsOperableIdentifier = table.Column<bool>(type: "boolean", nullable: false, comment: "是否可操作物模型标识符"), IsOperableIdentifier = table.Column<bool>(type: "boolean", nullable: false, comment: "是否可操作物模型标识符"),
AccessMode = table.Column<string>(type: "character varying(10)", maxLength: 10, nullable: false, defaultValue: "r", comment: "物模型标识符访问模式"),
IdentifierType = table.Column<int>(type: "integer", nullable: false, comment: "物模型标识符类型"),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false), ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false), CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true), CreatorId = table.Column<Guid>(type: "uuid", nullable: true),

View File

@ -904,6 +904,10 @@ namespace JiShe.IoT.Migrations
.HasColumnType("character varying(50)") .HasColumnType("character varying(50)")
.HasComment("设备地址"); .HasComment("设备地址");
b.Property<Guid>("DeviceDataId")
.HasColumnType("uuid")
.HasComment("设备数据Id");
b.Property<string>("DeviceName") b.Property<string>("DeviceName")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
@ -1578,6 +1582,10 @@ namespace JiShe.IoT.Migrations
.HasColumnType("character varying(50)") .HasColumnType("character varying(50)")
.HasComment("物联网平台中对应产品物模型属性或者事件类型"); .HasComment("物联网平台中对应产品物模型属性或者事件类型");
b.Property<int>("IdentifierType")
.HasColumnType("integer")
.HasComment("物模型标识符类型");
b.Property<int>("IoTPlatform") b.Property<int>("IoTPlatform")
.HasColumnType("integer") .HasColumnType("integer")
.HasComment("物联网平台类型,默认没有指定"); .HasComment("物联网平台类型,默认没有指定");