添加设备管理迁移

This commit is contained in:
zenghongyao 2025-06-05 11:49:13 +08:00
parent 375b111d65
commit 569c782b38
16 changed files with 472 additions and 47 deletions

View File

@ -2,7 +2,7 @@
<!-- 定义项目加载属性 --> <!-- 定义项目加载属性 -->
<PropertyGroup> <PropertyGroup>
<!--JiShe.ServicePro版本--> <!--JiShe.ServicePro版本-->
<ServiceProVersion>1.0.5.06</ServiceProVersion> <ServiceProVersion>1.0.5.8</ServiceProVersion>
<!--Volo Abp 版本--> <!--Volo Abp 版本-->
<VoloAbpVersion>9.1.1</VoloAbpVersion> <VoloAbpVersion>9.1.1</VoloAbpVersion>

View File

@ -38,32 +38,32 @@
<PackageReference Include="MiniProfiler.EntityFrameworkCore" /> <PackageReference Include="MiniProfiler.EntityFrameworkCore" />
<PackageReference Include="MiniProfiler.Shared" /> <PackageReference Include="MiniProfiler.Shared" />
<PackageReference Include="Volo.Abp.BackgroundJobs.HangFire" /> <PackageReference Include="Volo.Abp.BackgroundJobs.HangFire" />
<PackageReference Include="Volo.Abp.DistributedLocking"/> <PackageReference Include="Volo.Abp.DistributedLocking" />
<PackageReference Include="DistributedLock.Redis"/> <PackageReference Include="DistributedLock.Redis" />
<PackageReference Include="Volo.Abp.BlobStoring.FileSystem" /> <PackageReference Include="Volo.Abp.BlobStoring.FileSystem" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\JiShe.IoT.Application\JiShe.IoT.Application.csproj"/> <ProjectReference Include="..\..\src\JiShe.IoT.Application\JiShe.IoT.Application.csproj" />
<ProjectReference Include="..\..\src\JiShe.IoT.EntityFrameworkCore\JiShe.IoT.EntityFrameworkCore.csproj"/> <ProjectReference Include="..\..\src\JiShe.IoT.EntityFrameworkCore\JiShe.IoT.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\src\JiShe.IoT.HttpApi\JiShe.IoT.HttpApi.csproj"/> <ProjectReference Include="..\..\src\JiShe.IoT.HttpApi\JiShe.IoT.HttpApi.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="JiShe.ServicePro.Shared.Hosting.Microservices"/> <PackageReference Include="JiShe.ServicePro.Shared.Hosting.Microservices" />
<PackageReference Include="JiShe.ServicePro.CAP" /> <PackageReference Include="JiShe.ServicePro.CAP" />
<PackageReference Include="JiShe.ServicePro.CAP.EntityFrameworkCore" /> <PackageReference Include="JiShe.ServicePro.CAP.EntityFrameworkCore" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="Logs\**"/> <Compile Remove="Logs\**" />
<Content Remove="Logs\**"/> <Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**"/> <EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**"/> <None Remove="Logs\**" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Remove="$(UserProfile)\.nuget\packages\*\*\contentFiles\any\*\*.abppkg*.json"/> <Content Remove="$(UserProfile)\.nuget\packages\*\*\contentFiles\any\*\*.abppkg*.json" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -4,7 +4,7 @@
"CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://localhost" "CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://localhost"
}, },
"ConnectionStrings": { "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": { "Redis": {
"Configuration": "localhost,password=1q2w3E*,defaultdatabase=1" "Configuration": "localhost,password=1q2w3E*,defaultdatabase=1"

View File

@ -1,3 +1,4 @@
using JiShe.ServicePro.DeviceManagement;
using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.DynamicMenuManagement;
using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.FileManagement;
using JiShe.ServicePro.IoTDBManagement; using JiShe.ServicePro.IoTDBManagement;
@ -15,7 +16,8 @@ namespace JiShe.IoT
typeof(TemplateManagementApplicationContractsModule), typeof(TemplateManagementApplicationContractsModule),
typeof(FileManagementApplicationContractsModule), typeof(FileManagementApplicationContractsModule),
typeof(IoTDBManagementApplicationContractsModule), typeof(IoTDBManagementApplicationContractsModule),
typeof(DynamicMenuManagementApplicationContractsModule) typeof(DynamicMenuManagementApplicationContractsModule),
typeof(DeviceManagementApplicationContractsModule)
)] )]
public class IoTApplicationContractsModule : AbpModule public class IoTApplicationContractsModule : AbpModule
{ {

View File

@ -1,3 +1,4 @@
using JiShe.ServicePro.DeviceManagement;
using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.DynamicMenuManagement;
using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.FileManagement;
using JiShe.ServicePro.FreeRedisProvider; using JiShe.ServicePro.FreeRedisProvider;
@ -18,7 +19,8 @@ namespace JiShe.IoT
typeof(DynamicMenuManagementApplicationModule), typeof(DynamicMenuManagementApplicationModule),
typeof(FileManagementApplicationModule), typeof(FileManagementApplicationModule),
typeof(IoTDBManagementApplicationModule), typeof(IoTDBManagementApplicationModule),
typeof(ServiceProFreeRedisProviderModule) typeof(ServiceProFreeRedisProviderModule),
typeof(DeviceManagementApplicationModule)
)] )]
public class IoTApplicationModule : AbpModule public class IoTApplicationModule : AbpModule
{ {

View File

@ -1,3 +1,4 @@
using JiShe.ServicePro.DeviceManagement;
using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.DynamicMenuManagement;
using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.FileManagement;
using JiShe.ServicePro.FreeSqlProvider; using JiShe.ServicePro.FreeSqlProvider;
@ -16,7 +17,8 @@ namespace JiShe.IoT
typeof(FileManagementDomainSharedModule), typeof(FileManagementDomainSharedModule),
typeof(IoTDBManagementDomainSharedModule), typeof(IoTDBManagementDomainSharedModule),
typeof(ServiceProFreeSqlProviderModule), typeof(ServiceProFreeSqlProviderModule),
typeof(ServiceProCoreModule) typeof(ServiceProCoreModule),
typeof(DeviceManagementDomainSharedModule)
)] )]
public class IoTDomainSharedModule : AbpModule public class IoTDomainSharedModule : AbpModule
{ {

View File

@ -6,23 +6,25 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Localization\IoT\*.json"/> <EmbeddedResource Include="Localization\IoT\*.json" />
<Content Remove="Localization\IoT\*.json"/> <Content Remove="Localization\IoT\*.json" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="JiShe.ServicePro.Core"/> <PackageReference Include="JiShe.ServicePro.Core" />
<PackageReference Include="JiShe.ServicePro.BasicManagement.Domain.Shared"/> <PackageReference Include="JiShe.ServicePro.BasicManagement.Domain.Shared" />
<PackageReference Include="JiShe.ServicePro.NotificationManagement.Domain.Shared"/> <PackageReference Include="JiShe.ServicePro.NotificationManagement.Domain.Shared" />
<PackageReference Include="JiShe.ServicePro.DataDictionaryManagement.Domain.Shared"/> <PackageReference Include="JiShe.ServicePro.DataDictionaryManagement.Domain.Shared" />
<PackageReference Include="JiShe.ServicePro.LanguageManagement.Domain.Shared"/> <PackageReference Include="JiShe.ServicePro.LanguageManagement.Domain.Shared" />
<PackageReference Include="JiShe.ServicePro.TemplateManagement.Domain.Shared"/> <PackageReference Include="JiShe.ServicePro.TemplateManagement.Domain.Shared" />
<PackageReference Include="JiShe.ServicePro.DynamicMenuManagement.Domain.Shared"/> <PackageReference Include="JiShe.ServicePro.DynamicMenuManagement.Domain.Shared" />
<PackageReference Include="JiShe.ServicePro.FileManagement.Domain.Shared"/> <PackageReference Include="JiShe.ServicePro.FileManagement.Domain.Shared" />
<PackageReference Include="JiShe.ServicePro.IoTDBManagement.Domain.Shared"/> <PackageReference Include="JiShe.ServicePro.IoTDBManagement.Domain.Shared" />
<PackageReference Include="JiShe.ServicePro.FreeSqlProvider" /> <PackageReference Include="JiShe.ServicePro.FreeSqlProvider" />
<PackageReference Include="JiShe.ServicePro.DeviceManagement.Domain.Shared" /> <PackageReference Include="JiShe.ServicePro.DeviceManagement.Domain.Shared" />
<PackageReference Include="Volo.Abp.Core" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,3 +1,4 @@
using JiShe.ServicePro.DeviceManagement;
using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.DynamicMenuManagement;
using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.FileManagement;
using JiShe.ServicePro.IoTDBManagement; using JiShe.ServicePro.IoTDBManagement;
@ -14,7 +15,8 @@ namespace JiShe.IoT
typeof(TemplateManagementDomainModule), typeof(TemplateManagementDomainModule),
typeof(FileManagementDomainModule), typeof(FileManagementDomainModule),
typeof(IoTDBManagementDomainModule), typeof(IoTDBManagementDomainModule),
typeof(DynamicMenuManagementDomainModule) typeof(DynamicMenuManagementDomainModule),
typeof(DeviceManagementDomainModule)
)] )]
public class IoTDomainModule : AbpModule public class IoTDomainModule : AbpModule
{ {

View File

@ -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.EntityFrameworkCore;
using JiShe.ServicePro.DynamicMenuManagement.Menus; using JiShe.ServicePro.DynamicMenuManagement.Menus;
using JiShe.ServicePro.FileManagement.EntityFrameworkCore; using JiShe.ServicePro.FileManagement.EntityFrameworkCore;
@ -15,7 +17,9 @@ namespace JiShe.IoT.EntityFrameworkCore
IDataDictionaryManagementDbContext, IDataDictionaryManagementDbContext,
ILanguageManagementDbContext, ILanguageManagementDbContext,
ITemplateManagementDbContext, ITemplateManagementDbContext,
IDynamicMenuManagementDbContext IDynamicMenuManagementDbContext,
IFileManagementDbContext,
IDeviceManagementDbContext
{ {
public DbSet<IdentityUser> Users { get; set; } public DbSet<IdentityUser> Users { get; set; }
public DbSet<IdentityRole> Roles { get; set; } public DbSet<IdentityRole> Roles { get; set; }
@ -51,6 +55,7 @@ namespace JiShe.IoT.EntityFrameworkCore
//文件管理 //文件管理
public DbSet<FileObject> FileObjects { get; set; } public DbSet<FileObject> FileObjects { get; set; }
public DbSet<FocusInfo> Focus { get; set; }
public IoTDbContext(DbContextOptions<IoTDbContext> options) public IoTDbContext(DbContextOptions<IoTDbContext> options)
: base(options) : base(options)
@ -84,6 +89,9 @@ namespace JiShe.IoT.EntityFrameworkCore
//文件管理 //文件管理
builder.ConfigureFileManagement(); builder.ConfigureFileManagement();
// 设备管理
builder.ConfigureDeviceManagement();
} }

View File

@ -1,3 +1,4 @@
using JiShe.ServicePro.DeviceManagement.EntityFrameworkCore;
using JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore; using JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore;
using JiShe.ServicePro.FileManagement.EntityFrameworkCore; using JiShe.ServicePro.FileManagement.EntityFrameworkCore;
using JiShe.ServicePro.TemplateManagement.EntityFrameworkCore; using JiShe.ServicePro.TemplateManagement.EntityFrameworkCore;
@ -14,7 +15,8 @@ namespace JiShe.IoT.EntityFrameworkCore
typeof(LanguageManagementEntityFrameworkCoreModule), typeof(LanguageManagementEntityFrameworkCoreModule),
typeof(TemplateManagementEntityFrameworkCoreModule), typeof(TemplateManagementEntityFrameworkCoreModule),
typeof(FileManagementEntityFrameworkCoreModule), typeof(FileManagementEntityFrameworkCoreModule),
typeof(DynamicMenuManagementEntityFrameworkCoreModule) typeof(DynamicMenuManagementEntityFrameworkCoreModule),
typeof(DeviceManagementEntityFrameworkCoreModule)
)] )]
public class IoTEntityFrameworkCoreModule : AbpModule public class IoTEntityFrameworkCoreModule : AbpModule
{ {

View File

@ -5,20 +5,20 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\JiShe.IoT.Domain\JiShe.IoT.Domain.csproj"/> <ProjectReference Include="..\JiShe.IoT.Domain\JiShe.IoT.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL"/> <PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="JiShe.ServicePro.BasicManagement.EntityFrameworkCore"/> <PackageReference Include="JiShe.ServicePro.BasicManagement.EntityFrameworkCore" />
<PackageReference Include="JiShe.ServicePro.NotificationManagement.EntityFrameworkCore"/> <PackageReference Include="JiShe.ServicePro.NotificationManagement.EntityFrameworkCore" />
<PackageReference Include="JiShe.ServicePro.DataDictionaryManagement.EntityFrameworkCore"/> <PackageReference Include="JiShe.ServicePro.DataDictionaryManagement.EntityFrameworkCore" />
<PackageReference Include="JiShe.ServicePro.LanguageManagement.EntityFrameworkCore"/> <PackageReference Include="JiShe.ServicePro.LanguageManagement.EntityFrameworkCore" />
<PackageReference Include="JiShe.ServicePro.TemplateManagement.EntityFrameworkCore"/> <PackageReference Include="JiShe.ServicePro.TemplateManagement.EntityFrameworkCore" />
<PackageReference Include="JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore"/> <PackageReference Include="JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore" />
<PackageReference Include="JiShe.ServicePro.FileManagement.EntityFrameworkCore"/> <PackageReference Include="JiShe.ServicePro.FileManagement.EntityFrameworkCore" />
<PackageReference Include="JiShe.ServicePro.IoTDBManagement.EntityFrameworkCore"/> <PackageReference Include="JiShe.ServicePro.IoTDBManagement.EntityFrameworkCore" />
<PackageReference Include="JiShe.ServicePro.DeviceManagement.EntityFrameworkCore"/> <PackageReference Include="JiShe.ServicePro.DeviceManagement.EntityFrameworkCore" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -27,4 +27,8 @@
<PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets> <PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
</Project> </Project>

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("20250527141907_InitialCreate")] [Migration("20250605034725_initCreate")]
partial class InitialCreate partial class initCreate
{ {
/// <inheritdoc /> /// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -226,6 +226,171 @@ namespace JiShe.IoT.Migrations
b.ToTable("AbpDataDictionaryDetails", (string)null); b.ToTable("AbpDataDictionaryDetails", (string)null);
}); });
modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.Focuses.FocusInfo", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<string>("APN")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("APN");
b.Property<int>("BusinessSystem")
.HasColumnType("int")
.HasComment("业务系统");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("char(36)")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime(6)")
.HasColumnName("DeletionTime");
b.Property<string>("DeviceNo")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasComment("设备编号");
b.Property<bool>("Enabled")
.HasColumnType("tinyint(1)")
.HasComment("是否启用");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties")
.HasComment("扩展属性,用于存储自定义字段,JSON格式");
b.Property<string>("FocusAddress")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("集中器地址");
b.Property<string>("FocusCode")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasComment("集中器型号");
b.Property<long>("FocusId")
.HasColumnType("bigint")
.HasComment("集中器ID");
b.Property<string>("HardwareReleaseDate")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasComment("硬件软件发布日期:日月年");
b.Property<string>("HardwareVersion")
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasComment("硬件软件版本号");
b.Property<int>("HeartbeatInterval")
.HasColumnType("int")
.HasComment("心跳间隔");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<DateTime?>("LastRefreshTime")
.HasColumnType("datetime(6)")
.HasComment("最后刷新时间");
b.Property<string>("MakerNo")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasComment("厂商代号");
b.Property<string>("MasterStation")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasComment("主站");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasComment("集中器名称");
b.Property<int?>("OSACreatorId")
.HasColumnType("int")
.HasComment("旧系统授权创建者Id");
b.Property<int?>("OSADeleterId")
.HasColumnType("int")
.HasComment("旧系统授权最后删除者Id");
b.Property<int?>("OSALastModifierId")
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("备注");
b.Property<bool>("SelfDevelop")
.HasColumnType("tinyint(1)")
.HasComment("是否自研");
b.Property<string>("SoftwareReleaseDate")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasComment("终端软件发布日期:日月年");
b.Property<string>("SoftwareVersion")
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasComment("终端软件版本号");
b.Property<bool>("Status")
.HasColumnType("tinyint(1)")
.HasComment("是否在线状态");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId")
.HasComment("租户ID");
b.Property<int>("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 => modelBuilder.Entity("JiShe.ServicePro.DynamicMenuManagement.Menus.Menu", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")

View File

@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
namespace JiShe.IoT.Migrations namespace JiShe.IoT.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class InitialCreate : Migration public partial class initCreate : Migration
{ {
/// <inheritdoc /> /// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)
@ -734,6 +734,65 @@ namespace JiShe.IoT.Migrations
}) })
.Annotation("MySql:CharSet", "utf8mb4"); .Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ServiceProFocusInfo",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
BusinessSystem = table.Column<int>(type: "int", nullable: false, comment: "业务系统"),
Name = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false, comment: "集中器名称")
.Annotation("MySql:CharSet", "utf8mb4"),
FocusAddress = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "集中器地址")
.Annotation("MySql:CharSet", "utf8mb4"),
FocusCode = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true, comment: "集中器型号")
.Annotation("MySql:CharSet", "utf8mb4"),
SelfDevelop = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "是否自研"),
UpLink = table.Column<int>(type: "int", maxLength: 20, nullable: false, comment: "上行链路"),
APN = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "APN")
.Annotation("MySql:CharSet", "utf8mb4"),
MasterStation = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "主站")
.Annotation("MySql:CharSet", "utf8mb4"),
Status = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "是否在线状态"),
HeartbeatInterval = table.Column<int>(type: "int", nullable: false, comment: "心跳间隔"),
LastRefreshTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "最后刷新时间"),
FocusId = table.Column<long>(type: "bigint", nullable: false, comment: "集中器ID"),
Enabled = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "是否启用"),
MakerNo = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "厂商代号")
.Annotation("MySql:CharSet", "utf8mb4"),
DeviceNo = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "设备编号")
.Annotation("MySql:CharSet", "utf8mb4"),
SoftwareVersion = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "终端软件版本号")
.Annotation("MySql:CharSet", "utf8mb4"),
SoftwareReleaseDate = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "终端软件发布日期:日月年")
.Annotation("MySql:CharSet", "utf8mb4"),
HardwareVersion = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "硬件软件版本号")
.Annotation("MySql:CharSet", "utf8mb4"),
HardwareReleaseDate = table.Column<string>(type: "varchar(80)", maxLength: 80, 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),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, comment: "租户ID", collation: "ascii_general_ci"),
Remark = table.Column<string>(type: "longtext", nullable: true, comment: "备注")
.Annotation("MySql:CharSet", "utf8mb4"),
OSACreatorId = table.Column<int>(type: "int", nullable: true, comment: "旧系统授权创建者Id"),
OSALastModifierId = table.Column<int>(type: "int", nullable: true, comment: "旧系统授权最后修改者Id"),
OSADeleterId = table.Column<int>(type: "int", nullable: true, comment: "旧系统授权最后删除者Id"),
ExtraProperties = table.Column<string>(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( migrationBuilder.CreateTable(
name: "ServiceProMenus", name: "ServiceProMenus",
columns: table => new columns: table => new
@ -1408,6 +1467,11 @@ namespace JiShe.IoT.Migrations
table: "AbpUsers", table: "AbpUsers",
column: "UserName"); column: "UserName");
migrationBuilder.CreateIndex(
name: "IX_ServiceProFocusInfo_FocusAddress",
table: "ServiceProFocusInfo",
column: "FocusAddress");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_ServiceProTextTemplates_Code", name: "IX_ServiceProTextTemplates_Code",
table: "ServiceProTextTemplates", table: "ServiceProTextTemplates",
@ -1512,6 +1576,9 @@ namespace JiShe.IoT.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AbpUserTokens"); name: "AbpUserTokens");
migrationBuilder.DropTable(
name: "ServiceProFocusInfo");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "ServiceProMenus"); name: "ServiceProMenus");

View File

@ -223,6 +223,171 @@ namespace JiShe.IoT.Migrations
b.ToTable("AbpDataDictionaryDetails", (string)null); b.ToTable("AbpDataDictionaryDetails", (string)null);
}); });
modelBuilder.Entity("JiShe.ServicePro.DeviceManagement.Focuses.FocusInfo", b =>
{
b.Property<Guid>("Id")
.HasColumnType("char(36)");
b.Property<string>("APN")
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("APN");
b.Property<int>("BusinessSystem")
.HasColumnType("int")
.HasComment("业务系统");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("char(36)")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime(6)")
.HasColumnName("DeletionTime");
b.Property<string>("DeviceNo")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasComment("设备编号");
b.Property<bool>("Enabled")
.HasColumnType("tinyint(1)")
.HasComment("是否启用");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties")
.HasComment("扩展属性,用于存储自定义字段,JSON格式");
b.Property<string>("FocusAddress")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("varchar(20)")
.HasComment("集中器地址");
b.Property<string>("FocusCode")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasComment("集中器型号");
b.Property<long>("FocusId")
.HasColumnType("bigint")
.HasComment("集中器ID");
b.Property<string>("HardwareReleaseDate")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasComment("硬件软件发布日期:日月年");
b.Property<string>("HardwareVersion")
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasComment("硬件软件版本号");
b.Property<int>("HeartbeatInterval")
.HasColumnType("int")
.HasComment("心跳间隔");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<DateTime?>("LastRefreshTime")
.HasColumnType("datetime(6)")
.HasComment("最后刷新时间");
b.Property<string>("MakerNo")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasComment("厂商代号");
b.Property<string>("MasterStation")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasComment("主站");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasComment("集中器名称");
b.Property<int?>("OSACreatorId")
.HasColumnType("int")
.HasComment("旧系统授权创建者Id");
b.Property<int?>("OSADeleterId")
.HasColumnType("int")
.HasComment("旧系统授权最后删除者Id");
b.Property<int?>("OSALastModifierId")
.HasColumnType("int")
.HasComment("旧系统授权最后修改者Id");
b.Property<string>("Remark")
.HasColumnType("longtext")
.HasComment("备注");
b.Property<bool>("SelfDevelop")
.HasColumnType("tinyint(1)")
.HasComment("是否自研");
b.Property<string>("SoftwareReleaseDate")
.HasMaxLength(80)
.HasColumnType("varchar(80)")
.HasComment("终端软件发布日期:日月年");
b.Property<string>("SoftwareVersion")
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasComment("终端软件版本号");
b.Property<bool>("Status")
.HasColumnType("tinyint(1)")
.HasComment("是否在线状态");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId")
.HasComment("租户ID");
b.Property<int>("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 => modelBuilder.Entity("JiShe.ServicePro.DynamicMenuManagement.Menus.Menu", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")

View File

@ -1,5 +1,6 @@
using JiShe.ServicePro.BasicManagement; using JiShe.ServicePro.BasicManagement;
using JiShe.ServicePro.DataDictionaryManagement; using JiShe.ServicePro.DataDictionaryManagement;
using JiShe.ServicePro.DeviceManagement;
using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.DynamicMenuManagement;
using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.FileManagement;
using JiShe.ServicePro.IoTDBManagement; using JiShe.ServicePro.IoTDBManagement;
@ -18,7 +19,8 @@ namespace JiShe.IoT
typeof(TemplateManagementHttpApiClientModule), typeof(TemplateManagementHttpApiClientModule),
typeof(FileManagementHttpApiClientModule), typeof(FileManagementHttpApiClientModule),
typeof(IoTDBManagementHttpApiClientModule), typeof(IoTDBManagementHttpApiClientModule),
typeof(DynamicMenuManagementHttpApiClientModule) typeof(DynamicMenuManagementHttpApiClientModule),
typeof(DeviceManagementHttpApiClientModule)
)] )]
public class IoTHttpApiClientModule : AbpModule public class IoTHttpApiClientModule : AbpModule
{ {

View File

@ -1,4 +1,5 @@
using JiShe.ServicePro.DataDictionaryManagement; using JiShe.ServicePro.DataDictionaryManagement;
using JiShe.ServicePro.DeviceManagement;
using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.DynamicMenuManagement;
using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.FileManagement;
using JiShe.ServicePro.IoTDBManagement; using JiShe.ServicePro.IoTDBManagement;
@ -16,7 +17,8 @@ namespace JiShe.IoT
typeof(TemplateManagementHttpApiModule), typeof(TemplateManagementHttpApiModule),
typeof(FileManagementHttpApiModule), typeof(FileManagementHttpApiModule),
typeof(IoTDBManagementHttpApiModule), typeof(IoTDBManagementHttpApiModule),
typeof(DynamicMenuManagementHttpApiModule) typeof(DynamicMenuManagementHttpApiModule),
typeof(DeviceManagementHttpApiModule)
)] )]
public class IoTHttpApiModule : AbpModule public class IoTHttpApiModule : AbpModule
{ {