diff --git a/Directory.Build.props b/Directory.Build.props index 07d38b1..a495e49 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 1.0.5.06 + 1.0.5.8 9.1.1 diff --git a/host/JiShe.IoT.HttpApi.Host/JiShe.IoT.HttpApi.Host.csproj b/host/JiShe.IoT.HttpApi.Host/JiShe.IoT.HttpApi.Host.csproj index 5449737..3217c6d 100644 --- a/host/JiShe.IoT.HttpApi.Host/JiShe.IoT.HttpApi.Host.csproj +++ b/host/JiShe.IoT.HttpApi.Host/JiShe.IoT.HttpApi.Host.csproj @@ -38,32 +38,32 @@ - - + + - - - + + + - + - - - - + + + + - + diff --git a/host/JiShe.IoT.HttpApi.Host/appsettings.Production.json b/host/JiShe.IoT.HttpApi.Host/appsettings.Production.json index f66767e..ecbf6e0 100644 --- a/host/JiShe.IoT.HttpApi.Host/appsettings.Production.json +++ b/host/JiShe.IoT.HttpApi.Host/appsettings.Production.json @@ -4,7 +4,7 @@ "CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://localhost" }, "ConnectionStrings": { - "Default": "Data Source=localhost;Port=3306;Database=JiSheIoTProDB;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + "Default": "Data Source=47.110.60.222;Port=13306;Database=JiSheIoTProDB;uid=root;pwd=JiShe!aqG#5kGgh&0;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;" }, "Redis": { "Configuration": "localhost,password=1q2w3E*,defaultdatabase=1" diff --git a/src/JiShe.IoT.Application.Contracts/IoTApplicationContractsModule.cs b/src/JiShe.IoT.Application.Contracts/IoTApplicationContractsModule.cs index 61f7478..154ea11 100644 --- a/src/JiShe.IoT.Application.Contracts/IoTApplicationContractsModule.cs +++ b/src/JiShe.IoT.Application.Contracts/IoTApplicationContractsModule.cs @@ -1,3 +1,4 @@ +using JiShe.ServicePro.DeviceManagement; using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.IoTDBManagement; @@ -15,7 +16,8 @@ namespace JiShe.IoT typeof(TemplateManagementApplicationContractsModule), typeof(FileManagementApplicationContractsModule), typeof(IoTDBManagementApplicationContractsModule), - typeof(DynamicMenuManagementApplicationContractsModule) + typeof(DynamicMenuManagementApplicationContractsModule), + typeof(DeviceManagementApplicationContractsModule) )] public class IoTApplicationContractsModule : AbpModule { diff --git a/src/JiShe.IoT.Application/IoTApplicationModule.cs b/src/JiShe.IoT.Application/IoTApplicationModule.cs index aab3f2b..054c7aa 100644 --- a/src/JiShe.IoT.Application/IoTApplicationModule.cs +++ b/src/JiShe.IoT.Application/IoTApplicationModule.cs @@ -1,3 +1,4 @@ +using JiShe.ServicePro.DeviceManagement; using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.FreeRedisProvider; @@ -18,7 +19,8 @@ namespace JiShe.IoT typeof(DynamicMenuManagementApplicationModule), typeof(FileManagementApplicationModule), typeof(IoTDBManagementApplicationModule), - typeof(ServiceProFreeRedisProviderModule) + typeof(ServiceProFreeRedisProviderModule), + typeof(DeviceManagementApplicationModule) )] public class IoTApplicationModule : AbpModule { diff --git a/src/JiShe.IoT.Domain.Shared/IoTDomainSharedModule.cs b/src/JiShe.IoT.Domain.Shared/IoTDomainSharedModule.cs index a661b02..1a73b4d 100644 --- a/src/JiShe.IoT.Domain.Shared/IoTDomainSharedModule.cs +++ b/src/JiShe.IoT.Domain.Shared/IoTDomainSharedModule.cs @@ -1,3 +1,4 @@ +using JiShe.ServicePro.DeviceManagement; using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.FreeSqlProvider; @@ -16,7 +17,8 @@ namespace JiShe.IoT typeof(FileManagementDomainSharedModule), typeof(IoTDBManagementDomainSharedModule), typeof(ServiceProFreeSqlProviderModule), - typeof(ServiceProCoreModule) + typeof(ServiceProCoreModule), + typeof(DeviceManagementDomainSharedModule) )] public class IoTDomainSharedModule : AbpModule { diff --git a/src/JiShe.IoT.Domain.Shared/JiShe.IoT.Domain.Shared.csproj b/src/JiShe.IoT.Domain.Shared/JiShe.IoT.Domain.Shared.csproj index f4a25b5..34c7217 100644 --- a/src/JiShe.IoT.Domain.Shared/JiShe.IoT.Domain.Shared.csproj +++ b/src/JiShe.IoT.Domain.Shared/JiShe.IoT.Domain.Shared.csproj @@ -6,23 +6,25 @@ - - + + - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/src/JiShe.IoT.Domain/IoTDomainModule.cs b/src/JiShe.IoT.Domain/IoTDomainModule.cs index 57f22ac..915ea1e 100644 --- a/src/JiShe.IoT.Domain/IoTDomainModule.cs +++ b/src/JiShe.IoT.Domain/IoTDomainModule.cs @@ -1,3 +1,4 @@ +using JiShe.ServicePro.DeviceManagement; using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.IoTDBManagement; @@ -14,7 +15,8 @@ namespace JiShe.IoT typeof(TemplateManagementDomainModule), typeof(FileManagementDomainModule), typeof(IoTDBManagementDomainModule), - typeof(DynamicMenuManagementDomainModule) + typeof(DynamicMenuManagementDomainModule), + typeof(DeviceManagementDomainModule) )] public class IoTDomainModule : AbpModule { diff --git a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTDbContext.cs b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTDbContext.cs index 06adeae..4fea4b8 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTDbContext.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTDbContext.cs @@ -1,4 +1,6 @@ -using JiShe.ServicePro.BasicManagement.UserRefreshTokens; +using JiShe.ServicePro.BasicManagement.UserRefreshTokens; +using JiShe.ServicePro.DeviceManagement.EntityFrameworkCore; +using JiShe.ServicePro.DeviceManagement.Focuses; using JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore; using JiShe.ServicePro.DynamicMenuManagement.Menus; using JiShe.ServicePro.FileManagement.EntityFrameworkCore; @@ -15,7 +17,9 @@ namespace JiShe.IoT.EntityFrameworkCore IDataDictionaryManagementDbContext, ILanguageManagementDbContext, ITemplateManagementDbContext, - IDynamicMenuManagementDbContext + IDynamicMenuManagementDbContext, + IFileManagementDbContext, + IDeviceManagementDbContext { public DbSet Users { get; set; } public DbSet Roles { get; set; } @@ -51,6 +55,7 @@ namespace JiShe.IoT.EntityFrameworkCore //文件管理 public DbSet FileObjects { get; set; } + public DbSet Focus { get; set; } public IoTDbContext(DbContextOptions options) : base(options) @@ -84,6 +89,9 @@ namespace JiShe.IoT.EntityFrameworkCore //文件管理 builder.ConfigureFileManagement(); + + // 设备管理 + builder.ConfigureDeviceManagement(); } diff --git a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs index c62802b..bdc9dff 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/EntityFrameworkCore/IoTEntityFrameworkCoreModule.cs @@ -1,3 +1,4 @@ +using JiShe.ServicePro.DeviceManagement.EntityFrameworkCore; using JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore; using JiShe.ServicePro.FileManagement.EntityFrameworkCore; using JiShe.ServicePro.TemplateManagement.EntityFrameworkCore; @@ -14,7 +15,8 @@ namespace JiShe.IoT.EntityFrameworkCore typeof(LanguageManagementEntityFrameworkCoreModule), typeof(TemplateManagementEntityFrameworkCoreModule), typeof(FileManagementEntityFrameworkCoreModule), - typeof(DynamicMenuManagementEntityFrameworkCoreModule) + typeof(DynamicMenuManagementEntityFrameworkCoreModule), + typeof(DeviceManagementEntityFrameworkCoreModule) )] public class IoTEntityFrameworkCoreModule : AbpModule { diff --git a/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj b/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj index 070c691..92cc77c 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj +++ b/src/JiShe.IoT.EntityFrameworkCore/JiShe.IoT.EntityFrameworkCore.csproj @@ -5,20 +5,20 @@ - - + + - - - - - - - - - + + + + + + + + + @@ -27,4 +27,8 @@ compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native + + + + diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250527141907_InitialCreate.Designer.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250605034725_initCreate.Designer.cs similarity index 93% rename from src/JiShe.IoT.EntityFrameworkCore/Migrations/20250527141907_InitialCreate.Designer.cs rename to src/JiShe.IoT.EntityFrameworkCore/Migrations/20250605034725_initCreate.Designer.cs index 0038789..f54b23a 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250527141907_InitialCreate.Designer.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250605034725_initCreate.Designer.cs @@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore; namespace JiShe.IoT.Migrations { [DbContext(typeof(IoTDbContext))] - [Migration("20250527141907_InitialCreate")] - partial class InitialCreate + [Migration("20250605034725_initCreate")] + partial class initCreate { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -226,6 +226,171 @@ namespace JiShe.IoT.Migrations b.ToTable("AbpDataDictionaryDetails", (string)null); }); + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.Focuses.FocusInfo", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("APN") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("APN"); + + b.Property("BusinessSystem") + .HasColumnType("int") + .HasComment("业务系统"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DeviceNo") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("设备编号"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasComment("是否启用"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FocusAddress") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("集中器地址"); + + b.Property("FocusCode") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("集中器型号"); + + b.Property("FocusId") + .HasColumnType("bigint") + .HasComment("集中器ID"); + + b.Property("HardwareReleaseDate") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("硬件软件发布日期:日月年"); + + b.Property("HardwareVersion") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("硬件软件版本号"); + + b.Property("HeartbeatInterval") + .HasColumnType("int") + .HasComment("心跳间隔"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastRefreshTime") + .HasColumnType("datetime(6)") + .HasComment("最后刷新时间"); + + b.Property("MakerNo") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("厂商代号"); + + b.Property("MasterStation") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("主站"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("集中器名称"); + + b.Property("OSACreatorId") + .HasColumnType("int") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("int") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("int") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("备注"); + + b.Property("SelfDevelop") + .HasColumnType("tinyint(1)") + .HasComment("是否自研"); + + b.Property("SoftwareReleaseDate") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("终端软件发布日期:日月年"); + + b.Property("SoftwareVersion") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("终端软件版本号"); + + b.Property("Status") + .HasColumnType("tinyint(1)") + .HasComment("是否在线状态"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("UpLink") + .HasMaxLength(20) + .HasColumnType("int") + .HasComment("上行链路"); + + b.HasKey("Id"); + + b.HasIndex("FocusAddress"); + + b.ToTable("ServiceProFocusInfo", (string)null); + }); + modelBuilder.Entity("JiShe.ServicePro.DynamicMenuManagement.Menus.Menu", b => { b.Property("Id") diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250527141907_InitialCreate.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250605034725_initCreate.cs similarity index 94% rename from src/JiShe.IoT.EntityFrameworkCore/Migrations/20250527141907_InitialCreate.cs rename to src/JiShe.IoT.EntityFrameworkCore/Migrations/20250605034725_initCreate.cs index fad258c..c043e56 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250527141907_InitialCreate.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250605034725_initCreate.cs @@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace JiShe.IoT.Migrations { /// - public partial class InitialCreate : Migration + public partial class initCreate : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) @@ -734,6 +734,65 @@ namespace JiShe.IoT.Migrations }) .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.CreateTable( + name: "ServiceProFocusInfo", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + BusinessSystem = table.Column(type: "int", nullable: false, comment: "业务系统"), + Name = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "集中器名称") + .Annotation("MySql:CharSet", "utf8mb4"), + FocusAddress = table.Column(type: "varchar(20)", maxLength: 20, nullable: false, comment: "集中器地址") + .Annotation("MySql:CharSet", "utf8mb4"), + FocusCode = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "集中器型号") + .Annotation("MySql:CharSet", "utf8mb4"), + SelfDevelop = table.Column(type: "tinyint(1)", nullable: false, comment: "是否自研"), + UpLink = table.Column(type: "int", maxLength: 20, nullable: false, comment: "上行链路"), + APN = table.Column(type: "varchar(20)", maxLength: 20, nullable: true, comment: "APN") + .Annotation("MySql:CharSet", "utf8mb4"), + MasterStation = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "主站") + .Annotation("MySql:CharSet", "utf8mb4"), + Status = table.Column(type: "tinyint(1)", nullable: false, comment: "是否在线状态"), + HeartbeatInterval = table.Column(type: "int", nullable: false, comment: "心跳间隔"), + LastRefreshTime = table.Column(type: "datetime(6)", nullable: true, comment: "最后刷新时间"), + FocusId = table.Column(type: "bigint", nullable: false, comment: "集中器ID"), + Enabled = table.Column(type: "tinyint(1)", nullable: false, comment: "是否启用"), + MakerNo = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "厂商代号") + .Annotation("MySql:CharSet", "utf8mb4"), + DeviceNo = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "设备编号") + .Annotation("MySql:CharSet", "utf8mb4"), + SoftwareVersion = table.Column(type: "varchar(40)", maxLength: 40, nullable: true, comment: "终端软件版本号") + .Annotation("MySql:CharSet", "utf8mb4"), + SoftwareReleaseDate = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "终端软件发布日期:日月年") + .Annotation("MySql:CharSet", "utf8mb4"), + HardwareVersion = table.Column(type: "varchar(40)", maxLength: 40, nullable: true, comment: "硬件软件版本号") + .Annotation("MySql:CharSet", "utf8mb4"), + HardwareReleaseDate = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "硬件软件发布日期:日月年") + .Annotation("MySql:CharSet", "utf8mb4"), + ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CreationTime = table.Column(type: "datetime(6)", nullable: false), + CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + LastModificationTime = table.Column(type: "datetime(6)", nullable: true), + LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), + DeletionTime = table.Column(type: "datetime(6)", nullable: true), + TenantId = table.Column(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"), + Remark = table.Column(type: "longtext", nullable: true, comment: "备注") + .Annotation("MySql:CharSet", "utf8mb4"), + OSACreatorId = table.Column(type: "int", nullable: true, comment: "旧系统授权创建者Id"), + OSALastModifierId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"), + OSADeleterId = table.Column(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"), + ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性,用于存储自定义字段,JSON格式") + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_ServiceProFocusInfo", x => x.Id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.CreateTable( name: "ServiceProMenus", columns: table => new @@ -1408,6 +1467,11 @@ namespace JiShe.IoT.Migrations table: "AbpUsers", column: "UserName"); + migrationBuilder.CreateIndex( + name: "IX_ServiceProFocusInfo_FocusAddress", + table: "ServiceProFocusInfo", + column: "FocusAddress"); + migrationBuilder.CreateIndex( name: "IX_ServiceProTextTemplates_Code", table: "ServiceProTextTemplates", @@ -1512,6 +1576,9 @@ namespace JiShe.IoT.Migrations migrationBuilder.DropTable( name: "AbpUserTokens"); + migrationBuilder.DropTable( + name: "ServiceProFocusInfo"); + migrationBuilder.DropTable( name: "ServiceProMenus"); diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs index 9eecbbc..129134e 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs @@ -223,6 +223,171 @@ namespace JiShe.IoT.Migrations b.ToTable("AbpDataDictionaryDetails", (string)null); }); + modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.Focuses.FocusInfo", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("APN") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("APN"); + + b.Property("BusinessSystem") + .HasColumnType("int") + .HasComment("业务系统"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DeviceNo") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("设备编号"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasComment("是否启用"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties") + .HasComment("扩展属性,用于存储自定义字段,JSON格式"); + + b.Property("FocusAddress") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("集中器地址"); + + b.Property("FocusCode") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("集中器型号"); + + b.Property("FocusId") + .HasColumnType("bigint") + .HasComment("集中器ID"); + + b.Property("HardwareReleaseDate") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("硬件软件发布日期:日月年"); + + b.Property("HardwareVersion") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("硬件软件版本号"); + + b.Property("HeartbeatInterval") + .HasColumnType("int") + .HasComment("心跳间隔"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastRefreshTime") + .HasColumnType("datetime(6)") + .HasComment("最后刷新时间"); + + b.Property("MakerNo") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("厂商代号"); + + b.Property("MasterStation") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("主站"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("集中器名称"); + + b.Property("OSACreatorId") + .HasColumnType("int") + .HasComment("旧系统授权创建者Id"); + + b.Property("OSADeleterId") + .HasColumnType("int") + .HasComment("旧系统授权最后删除者Id"); + + b.Property("OSALastModifierId") + .HasColumnType("int") + .HasComment("旧系统授权最后修改者Id"); + + b.Property("Remark") + .HasColumnType("longtext") + .HasComment("备注"); + + b.Property("SelfDevelop") + .HasColumnType("tinyint(1)") + .HasComment("是否自研"); + + b.Property("SoftwareReleaseDate") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("终端软件发布日期:日月年"); + + b.Property("SoftwareVersion") + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasComment("终端软件版本号"); + + b.Property("Status") + .HasColumnType("tinyint(1)") + .HasComment("是否在线状态"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId") + .HasComment("租户ID"); + + b.Property("UpLink") + .HasMaxLength(20) + .HasColumnType("int") + .HasComment("上行链路"); + + b.HasKey("Id"); + + b.HasIndex("FocusAddress"); + + b.ToTable("ServiceProFocusInfo", (string)null); + }); + modelBuilder.Entity("JiShe.ServicePro.DynamicMenuManagement.Menus.Menu", b => { b.Property("Id") diff --git a/src/JiShe.IoT.HttpApi.Client/IoTHttpApiClientModule.cs b/src/JiShe.IoT.HttpApi.Client/IoTHttpApiClientModule.cs index 9a4a50a..3421004 100644 --- a/src/JiShe.IoT.HttpApi.Client/IoTHttpApiClientModule.cs +++ b/src/JiShe.IoT.HttpApi.Client/IoTHttpApiClientModule.cs @@ -1,5 +1,6 @@ using JiShe.ServicePro.BasicManagement; using JiShe.ServicePro.DataDictionaryManagement; +using JiShe.ServicePro.DeviceManagement; using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.IoTDBManagement; @@ -18,7 +19,8 @@ namespace JiShe.IoT typeof(TemplateManagementHttpApiClientModule), typeof(FileManagementHttpApiClientModule), typeof(IoTDBManagementHttpApiClientModule), - typeof(DynamicMenuManagementHttpApiClientModule) + typeof(DynamicMenuManagementHttpApiClientModule), + typeof(DeviceManagementHttpApiClientModule) )] public class IoTHttpApiClientModule : AbpModule { diff --git a/src/JiShe.IoT.HttpApi/IoTHttpApiModule.cs b/src/JiShe.IoT.HttpApi/IoTHttpApiModule.cs index 7ccd8fa..bedadad 100644 --- a/src/JiShe.IoT.HttpApi/IoTHttpApiModule.cs +++ b/src/JiShe.IoT.HttpApi/IoTHttpApiModule.cs @@ -1,4 +1,5 @@ using JiShe.ServicePro.DataDictionaryManagement; +using JiShe.ServicePro.DeviceManagement; using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.IoTDBManagement; @@ -16,7 +17,8 @@ namespace JiShe.IoT typeof(TemplateManagementHttpApiModule), typeof(FileManagementHttpApiModule), typeof(IoTDBManagementHttpApiModule), - typeof(DynamicMenuManagementHttpApiModule) + typeof(DynamicMenuManagementHttpApiModule), + typeof(DeviceManagementHttpApiModule) )] public class IoTHttpApiModule : AbpModule {