diff --git a/Directory.Build.props b/Directory.Build.props index c751906..39e19fa 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 1.0.5.22 + 1.0.5.26 9.1.1 diff --git a/host/JiShe.IoT.HttpApi.Host/appsettings.Development.json b/host/JiShe.IoT.HttpApi.Host/appsettings.Development.json index 877e9d3..67d1d7d 100644 --- a/host/JiShe.IoT.HttpApi.Host/appsettings.Development.json +++ b/host/JiShe.IoT.HttpApi.Host/appsettings.Development.json @@ -5,8 +5,12 @@ }, "ConnectionStrings": { "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;", - "PrepayDB": "server=118.190.144.92;database=jishe.sysdb;uid=sa;pwd=admin@2023;Encrypt=False;Trust Server Certificate=False", - "EnergyDB": "server=118.190.144.92;database=db_energy;uid=sa;pwd=admin@2023;Encrypt=False;Trust Server Certificate=False" + //"PrepayDB": "server=118.190.144.92;database=jishe.sysdb;uid=sa;pwd=admin@2023;Encrypt=False;Trust Server Certificate=False", + //"EnergyDB": "server=118.190.144.92;database=db_energy;uid=sa;pwd=admin@2023;Encrypt=False;Trust Server Certificate=False" + + // 正式 + "PrepayDB": "server=rm-m5el3d1u1k0wzk70n2o.sqlserver.rds.aliyuncs.com,3433;database=jishe.sysdb;uid=v3sa;pwd=JiShe123;Encrypt=False;Trust Server Certificate=False", + "EnergyDB": "server=rm-wz9hw529i3j1e3b5fbo.sqlserver.rds.aliyuncs.com,3433;database=db_energy;uid=yjdb;pwd=Kdjdhf+9*7ad222LL;Encrypt=False;Trust Server Certificate=False" }, "Hangfire": { "Redis": { @@ -63,12 +67,12 @@ } }, "FreeRedisOptions": { - "ConnectionString": "47.110.53.196:6379,password=1q3J@BGf!yhTaD46nS#,abortConnect=false,connectTimeout=30000,allowAdmin=true,maxPoolSize=50,defaultdatabase=14", + "ConnectionString": "47.110.53.196:6379,password=1q3J@BGf!yhTaD46nS#,abortConnect=false,connectTimeout=30000,allowAdmin=true,maxPoolSize=500,defaultdatabase=10", "UseDistributedCache": true }, "FreeSqlProviderOptions": { "UsePrepayDB": true, - "UseEnergyDB": false, + "UseEnergyDB": true, "PrintLog": false } } \ No newline at end of file diff --git a/host/JiShe.IoT.HttpApi.Host/appsettings.Production.json b/host/JiShe.IoT.HttpApi.Host/appsettings.Production.json index 31cffae..5a85005 100644 --- a/host/JiShe.IoT.HttpApi.Host/appsettings.Production.json +++ b/host/JiShe.IoT.HttpApi.Host/appsettings.Production.json @@ -4,7 +4,9 @@ "CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://localhost" }, "ConnectionStrings": { - "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;" + "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;", + "PrepayDB": "server=rm-m5el3d1u1k0wzk70n2o.sqlserver.rds.aliyuncs.com,3433;database=jishe.sysdb;uid=v3sa;pwd=JiShe123;Encrypt=False;Trust Server Certificate=False", + "EnergyDB": "server=rm-wz9hw529i3j1e3b5fbo.sqlserver.rds.aliyuncs.com,3433;database=db_energy;uid=yjdb;pwd=Kdjdhf+9*7ad222LL;Encrypt=False;Trust Server Certificate=False" }, "Redis": { "Configuration": "localhost,password=1q2w3E*,defaultdatabase=1" @@ -30,7 +32,7 @@ } }, "FreeRedisOptions": { - "ConnectionString": "172.21.40.198:6379,password=1q3J@BGf!yhTaD46nS#,syncTimeout=30000,abortConnect=false,connectTimeout=30000,allowAdmin=true,maxPoolSize=50,defaultdatabase=14", + "ConnectionString": "172.21.40.198:6379,password=1q3J@BGf!yhTaD46nS#,syncTimeout=30000,abortConnect=false,connectTimeout=30000,allowAdmin=true,maxPoolSize=500,defaultdatabase=14", "UseDistributedCache": true }, "FreeSqlProviderOptions": { diff --git a/src/JiShe.IoT.Application/IoTApplicationModule.cs b/src/JiShe.IoT.Application/IoTApplicationModule.cs index 054c7aa..2675e00 100644 --- a/src/JiShe.IoT.Application/IoTApplicationModule.cs +++ b/src/JiShe.IoT.Application/IoTApplicationModule.cs @@ -1,3 +1,4 @@ +using JiShe.IoT.Jobs; using JiShe.ServicePro.DeviceManagement; using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.FileManagement; @@ -5,6 +6,7 @@ using JiShe.ServicePro.FreeRedisProvider; using JiShe.ServicePro.FreeSqlProvider; using JiShe.ServicePro.IoTDBManagement; using JiShe.ServicePro.TemplateManagement; +using Microsoft.Extensions.DependencyInjection; namespace JiShe.IoT { @@ -20,6 +22,7 @@ namespace JiShe.IoT typeof(FileManagementApplicationModule), typeof(IoTDBManagementApplicationModule), typeof(ServiceProFreeRedisProviderModule), + typeof(ServiceProFreeSqlProviderModule), typeof(DeviceManagementApplicationModule) )] public class IoTApplicationModule : AbpModule @@ -30,7 +33,23 @@ namespace JiShe.IoT { options.AddMaps(); }); - + + } + + + public override void PostConfigureServices(ServiceConfigurationContext context) + { + // ʱ + ConfigureBackgroundJob(context); + } + + private static void ConfigureBackgroundJob(ServiceConfigurationContext context) + { + context.Services.AddHostedService(); + context.Services.AddHostedService(); + context.Services.AddHostedService(); + context.Services.AddHostedService(); + context.Services.AddHostedService(); } } } diff --git a/src/JiShe.IoT.Application/JiShe.IoT.Application.csproj b/src/JiShe.IoT.Application/JiShe.IoT.Application.csproj index 9412cc5..8182174 100644 --- a/src/JiShe.IoT.Application/JiShe.IoT.Application.csproj +++ b/src/JiShe.IoT.Application/JiShe.IoT.Application.csproj @@ -28,5 +28,9 @@ + + + + diff --git a/src/JiShe.IoT.Application/Jobs/BathSyncAmmeterDataToMysqlJob.cs b/src/JiShe.IoT.Application/Jobs/BathSyncAmmeterDataToMysqlJob.cs new file mode 100644 index 0000000..43ae9ce --- /dev/null +++ b/src/JiShe.IoT.Application/Jobs/BathSyncAmmeterDataToMysqlJob.cs @@ -0,0 +1,41 @@ +using JiShe.ServicePro.Core; +using JiShe.ServicePro.DeviceManagement.Meters; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.IoT.Jobs +{ + /// + /// 批量同步电表 ammeter 数据到mysql + /// + public class BathSyncAmmeterDataToMysqlJob : SystemBackGroundWorkService + { + private readonly ILogger _logger; + public readonly MeterAppService _meterAppService; + public BathSyncAmmeterDataToMysqlJob(ILogger logger, MeterAppService meterAppService) : base(logger) + { + _logger = logger; + _meterAppService = meterAppService; + } + + /// + /// 定时执行 + /// + /// + /// + protected override Task DoWorkAsync(CancellationToken cancellationToken) + { + return _meterAppService.BathSyncAmmeterDataAsync(); + } + + protected override TimeSpan GetInterval() + { + // 每隔3小时执行一次 + return TimeSpan.FromHours(3); + } + } +} diff --git a/src/JiShe.IoT.Application/Jobs/BathSyncFocusDataToMysqlJob.cs b/src/JiShe.IoT.Application/Jobs/BathSyncFocusDataToMysqlJob.cs new file mode 100644 index 0000000..de3dd2b --- /dev/null +++ b/src/JiShe.IoT.Application/Jobs/BathSyncFocusDataToMysqlJob.cs @@ -0,0 +1,37 @@ +using JiShe.ServicePro.Core; +using JiShe.ServicePro.DeviceManagement.Focuses; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.IoT.Jobs +{ + /// + /// 批量同步集中器 Focus数据到Mysql + /// + public class BathSyncFocusDataToMysqlJob : SystemBackGroundWorkService + { + + private readonly ILogger _logger; + public readonly FocusAppService _focusAppService; + public BathSyncFocusDataToMysqlJob(ILogger logger, FocusAppService focusAppService) : base(logger) + { + _logger = logger; + _focusAppService = focusAppService; + } + + protected override Task DoWorkAsync(CancellationToken cancellationToken) + { + return _focusAppService.BathSyncFocusDataAsync(); + } + + protected override TimeSpan GetInterval() + { + // 每隔3小时执行一次 + return TimeSpan.FromHours(3); + } + } +} diff --git a/src/JiShe.IoT.Application/Jobs/BathSyncWatermeterDataToMysqlJob.cs b/src/JiShe.IoT.Application/Jobs/BathSyncWatermeterDataToMysqlJob.cs new file mode 100644 index 0000000..ea2985e --- /dev/null +++ b/src/JiShe.IoT.Application/Jobs/BathSyncWatermeterDataToMysqlJob.cs @@ -0,0 +1,41 @@ +using JiShe.ServicePro.Core; +using JiShe.ServicePro.DeviceManagement.Meters; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.IoT.Jobs +{ + /// + /// 批量同步 水表 watermeter 数据到mysql + /// + public class BathSyncWatermeterDataToMysqlJob : SystemBackGroundWorkService + { + private readonly ILogger _logger; + public readonly MeterAppService _meterAppService; + public BathSyncWatermeterDataToMysqlJob(ILogger logger, MeterAppService meterAppService) : base(logger) + { + _logger = logger; + _meterAppService = meterAppService; + } + + /// + /// 定时执行 + /// + /// + /// + protected override Task DoWorkAsync(CancellationToken cancellationToken) + { + return _meterAppService.BathSyncWatermeterDataAsync(); + } + + protected override TimeSpan GetInterval() + { + // 每隔3小时执行一次 + return TimeSpan.FromHours(3); + } + } +} diff --git a/src/JiShe.IoT.Application/Jobs/CacheDeviceDataToRedisJob.cs b/src/JiShe.IoT.Application/Jobs/CacheDeviceDataToRedisJob.cs new file mode 100644 index 0000000..5b63a3d --- /dev/null +++ b/src/JiShe.IoT.Application/Jobs/CacheDeviceDataToRedisJob.cs @@ -0,0 +1,40 @@ +using JiShe.ServicePro.Core; +using JiShe.ServicePro.DeviceManagement.Meters; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.IoT.Jobs +{ + /// + /// 缓存设备数据到redis + /// + public class CacheDeviceDataToRedisJob : SystemBackGroundWorkService + { + private readonly ILogger _logger; + public readonly MeterAppService _meterAppService; + public CacheDeviceDataToRedisJob(ILogger logger, MeterAppService meterAppService) : base(logger) + { + _logger = logger; + _meterAppService = meterAppService; + } + + /// + /// 定时执行 + /// + /// + /// + protected override Task DoWorkAsync(CancellationToken cancellationToken) + { + return _meterAppService.CacheDeviceDataToRedisAsync(); + } + + protected override TimeSpan GetInterval() + { + return TimeSpan.FromHours(1); + } + } +} diff --git a/src/JiShe.IoT.Application/Jobs/CacheFocusDataToRedisJob.cs b/src/JiShe.IoT.Application/Jobs/CacheFocusDataToRedisJob.cs new file mode 100644 index 0000000..51d461e --- /dev/null +++ b/src/JiShe.IoT.Application/Jobs/CacheFocusDataToRedisJob.cs @@ -0,0 +1,37 @@ +using JiShe.ServicePro.Core; +using JiShe.ServicePro.DeviceManagement.Focuses; +using JiShe.ServicePro.DeviceManagement.Meters; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JiShe.IoT.Jobs +{ + /// + /// 缓存集中器数据到Redis + /// + public class CacheFocusDataToRedisJob : SystemBackGroundWorkService + { + + private readonly ILogger _logger; + public readonly FocusAppService _focusAppService; + public CacheFocusDataToRedisJob(ILogger logger, FocusAppService focusAppService) : base(logger) + { + _logger = logger; + _focusAppService= focusAppService; + } + + protected override Task DoWorkAsync(CancellationToken cancellationToken) + { + return _focusAppService.CacheFocusDataToRedisAsync(); + } + + protected override TimeSpan GetInterval() + { + return TimeSpan.FromHours(1); + } + } +} diff --git a/src/JiShe.IoT.Domain/Data/IoTDbMigrationService.cs b/src/JiShe.IoT.Domain/Data/IoTDbMigrationService.cs index b861bf2..0681d62 100644 --- a/src/JiShe.IoT.Domain/Data/IoTDbMigrationService.cs +++ b/src/JiShe.IoT.Domain/Data/IoTDbMigrationService.cs @@ -1,4 +1,4 @@ -using JiShe.ServicePro.IoTDBManagement.SessionPools; +using JiShe.ServicePro.ApacheIoTDB.Provider.ISessionPools; namespace JiShe.IoT.Data { diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250609070511_initCeate.Designer.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250611083124_initCreate.Designer.cs similarity index 97% rename from src/JiShe.IoT.EntityFrameworkCore/Migrations/20250609070511_initCeate.Designer.cs rename to src/JiShe.IoT.EntityFrameworkCore/Migrations/20250611083124_initCreate.Designer.cs index 39c2b2b..2d49600 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250609070511_initCeate.Designer.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250611083124_initCreate.Designer.cs @@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore; namespace JiShe.IoT.Migrations { [DbContext(typeof(IoTDbContext))] - [Migration("20250609070511_initCeate")] - partial class initCeate + [Migration("20250611083124_initCreate")] + partial class initCreate { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -352,6 +352,10 @@ namespace JiShe.IoT.Migrations .HasColumnType("int") .HasComment("旧系统授权最后修改者Id"); + b.Property("ProjectID") + .HasColumnType("int") + .HasComment("项目ID"); + b.Property("Remark") .HasColumnType("longtext") .HasComment("备注"); @@ -360,6 +364,11 @@ namespace JiShe.IoT.Migrations .HasColumnType("tinyint(1)") .HasComment("是否自研"); + b.Property("SimCard") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("通讯SIM卡卡号"); + b.Property("SoftwareReleaseDate") .HasMaxLength(80) .HasColumnType("varchar(80)") @@ -379,6 +388,10 @@ namespace JiShe.IoT.Migrations .HasColumnName("TenantId") .HasComment("租户ID"); + b.Property("TimeDensity") + .HasColumnType("int") + .HasComment("采集密度"); + b.Property("UpLink") .HasMaxLength(20) .HasColumnType("int") @@ -396,10 +409,24 @@ namespace JiShe.IoT.Migrations b.Property("Id") .HasColumnType("char(36)"); + b.Property("Address") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("表计地址"); + b.Property("ArchiveStatus") .HasColumnType("tinyint(1)") .HasComment("归档状态"); + b.Property("AreaCode") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("表计区域编码"); + + b.Property("AutomaticReport") + .HasColumnType("int") + .HasComment("是否自动采集"); + b.Property("Baudrate") .HasColumnType("int") .HasComment("波特率"); @@ -409,6 +436,10 @@ namespace JiShe.IoT.Migrations .HasColumnType("varchar(128)") .HasComment("品牌类型"); + b.Property("BusinessSystem") + .HasColumnType("int") + .HasComment("业务系统"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() @@ -424,6 +455,11 @@ namespace JiShe.IoT.Migrations .HasColumnType("char(36)") .HasColumnName("CreatorId"); + b.Property("DataTypes") + .HasMaxLength(5000) + .HasColumnType("varchar(5000)") + .HasComment("采集项编号ID"); + b.Property("DatabaseBusiID") .HasColumnType("int") .HasComment("业务库ID"); @@ -471,6 +507,11 @@ namespace JiShe.IoT.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("ItemCodes") + .HasMaxLength(5000) + .HasColumnType("varchar(5000)") + .HasComment("采集项编码"); + b.Property("LastModificationTime") .HasColumnType("datetime(6)") .HasColumnName("LastModificationTime"); @@ -479,6 +520,11 @@ namespace JiShe.IoT.Migrations .HasColumnType("char(36)") .HasColumnName("LastModifierId"); + b.Property("LinkType") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("水表通讯方案"); + b.Property("MeterAddress") .IsRequired() .HasMaxLength(40) @@ -499,6 +545,11 @@ namespace JiShe.IoT.Migrations .HasColumnType("int") .HasComment("表计类型"); + b.Property("MeterTypeName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("水表设备类型"); + b.Property("MeteringCode") .HasColumnType("int") .HasComment("表计编码"); @@ -544,17 +595,21 @@ namespace JiShe.IoT.Migrations .HasColumnType("tinyint(1)") .HasComment("是否单倍率"); + b.Property("Special") + .HasColumnType("int") + .HasComment("是否特殊表"); + b.Property("TenantId") .HasColumnType("char(36)") .HasColumnName("TenantId") .HasComment("租户ID"); b.Property("TimesA") - .HasColumnType("decimal(65,30)") + .HasColumnType("decimal(12, 4)") .HasComment("倍率A"); b.Property("Timev") - .HasColumnType("decimal(65,30)") + .HasColumnType("decimal(12, 4)") .HasComment("倍率V"); b.Property("TripState") diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250609070511_initCeate.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250611083124_initCreate.cs similarity index 98% rename from src/JiShe.IoT.EntityFrameworkCore/Migrations/20250609070511_initCeate.cs rename to src/JiShe.IoT.EntityFrameworkCore/Migrations/20250611083124_initCreate.cs index 860e903..6382685 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250609070511_initCeate.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/20250611083124_initCreate.cs @@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace JiShe.IoT.Migrations { /// - public partial class initCeate : Migration + public partial class initCreate : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) @@ -755,8 +755,12 @@ namespace JiShe.IoT.Migrations 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: "最后刷新时间"), + TimeDensity = table.Column(type: "int", nullable: false, comment: "采集密度"), FocusId = table.Column(type: "bigint", nullable: false, comment: "集中器ID"), + ProjectID = table.Column(type: "int", nullable: false, comment: "项目ID"), Enabled = table.Column(type: "tinyint(1)", nullable: false, comment: "是否启用"), + SimCard = table.Column(type: "varchar(80)", maxLength: 80, nullable: true, comment: "通讯SIM卡卡号") + .Annotation("MySql:CharSet", "utf8mb4"), 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: "设备编号") @@ -845,6 +849,7 @@ namespace JiShe.IoT.Migrations columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), + BusinessSystem = table.Column(type: "int", nullable: false, comment: "业务系统"), MeterName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "表计名称") .Annotation("MySql:CharSet", "utf8mb4"), MeterAddress = table.Column(type: "varchar(40)", maxLength: 40, nullable: false, comment: "表计地址") @@ -864,8 +869,8 @@ namespace JiShe.IoT.Migrations .Annotation("MySql:CharSet", "utf8mb4"), ArchiveStatus = table.Column(type: "tinyint(1)", nullable: false, comment: "归档状态"), TripState = table.Column(type: "tinyint(1)", nullable: false, comment: "是否跳闸"), - TimesA = table.Column(type: "decimal(65,30)", nullable: false, comment: "倍率A"), - Timev = table.Column(type: "decimal(65,30)", nullable: false, comment: "倍率V"), + TimesA = table.Column(type: "decimal(12,4)", nullable: false, comment: "倍率A"), + Timev = table.Column(type: "decimal(12,4)", nullable: false, comment: "倍率V"), HaveValve = table.Column(type: "tinyint(1)", nullable: true, comment: "是否带阀控"), FocusId = table.Column(type: "int", nullable: false, comment: "集中器ID"), MeterId = table.Column(type: "int", nullable: false, comment: "表计ID"), @@ -874,6 +879,20 @@ namespace JiShe.IoT.Migrations Enabled = table.Column(type: "tinyint(1)", nullable: false, comment: "是否启用"), GatherCount = table.Column(type: "int", nullable: false, comment: "采集项数量"), FunctionCount = table.Column(type: "int", nullable: false, comment: "功能数量(包含采集项和阀控等)"), + ItemCodes = table.Column(type: "varchar(5000)", maxLength: 5000, nullable: true, comment: "采集项编码") + .Annotation("MySql:CharSet", "utf8mb4"), + DataTypes = table.Column(type: "varchar(5000)", maxLength: 5000, nullable: true, comment: "采集项编号ID") + .Annotation("MySql:CharSet", "utf8mb4"), + Address = table.Column(type: "varchar(20)", maxLength: 20, nullable: true, comment: "表计地址") + .Annotation("MySql:CharSet", "utf8mb4"), + AreaCode = table.Column(type: "varchar(20)", maxLength: 20, nullable: true, comment: "表计区域编码") + .Annotation("MySql:CharSet", "utf8mb4"), + LinkType = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "水表通讯方案") + .Annotation("MySql:CharSet", "utf8mb4"), + MeterTypeName = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "水表设备类型") + .Annotation("MySql:CharSet", "utf8mb4"), + Special = table.Column(type: "int", nullable: false, comment: "是否特殊表"), + AutomaticReport = table.Column(type: "int", nullable: false, comment: "是否自动采集"), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), CreationTime = table.Column(type: "datetime(6)", nullable: false), diff --git a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs index 79bcf18..ee9b40f 100644 --- a/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs +++ b/src/JiShe.IoT.EntityFrameworkCore/Migrations/IoTDbContextModelSnapshot.cs @@ -349,6 +349,10 @@ namespace JiShe.IoT.Migrations .HasColumnType("int") .HasComment("旧系统授权最后修改者Id"); + b.Property("ProjectID") + .HasColumnType("int") + .HasComment("项目ID"); + b.Property("Remark") .HasColumnType("longtext") .HasComment("备注"); @@ -357,6 +361,11 @@ namespace JiShe.IoT.Migrations .HasColumnType("tinyint(1)") .HasComment("是否自研"); + b.Property("SimCard") + .HasMaxLength(80) + .HasColumnType("varchar(80)") + .HasComment("通讯SIM卡卡号"); + b.Property("SoftwareReleaseDate") .HasMaxLength(80) .HasColumnType("varchar(80)") @@ -376,6 +385,10 @@ namespace JiShe.IoT.Migrations .HasColumnName("TenantId") .HasComment("租户ID"); + b.Property("TimeDensity") + .HasColumnType("int") + .HasComment("采集密度"); + b.Property("UpLink") .HasMaxLength(20) .HasColumnType("int") @@ -393,10 +406,24 @@ namespace JiShe.IoT.Migrations b.Property("Id") .HasColumnType("char(36)"); + b.Property("Address") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("表计地址"); + b.Property("ArchiveStatus") .HasColumnType("tinyint(1)") .HasComment("归档状态"); + b.Property("AreaCode") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasComment("表计区域编码"); + + b.Property("AutomaticReport") + .HasColumnType("int") + .HasComment("是否自动采集"); + b.Property("Baudrate") .HasColumnType("int") .HasComment("波特率"); @@ -406,6 +433,10 @@ namespace JiShe.IoT.Migrations .HasColumnType("varchar(128)") .HasComment("品牌类型"); + b.Property("BusinessSystem") + .HasColumnType("int") + .HasComment("业务系统"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .IsRequired() @@ -421,6 +452,11 @@ namespace JiShe.IoT.Migrations .HasColumnType("char(36)") .HasColumnName("CreatorId"); + b.Property("DataTypes") + .HasMaxLength(5000) + .HasColumnType("varchar(5000)") + .HasComment("采集项编号ID"); + b.Property("DatabaseBusiID") .HasColumnType("int") .HasComment("业务库ID"); @@ -468,6 +504,11 @@ namespace JiShe.IoT.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("ItemCodes") + .HasMaxLength(5000) + .HasColumnType("varchar(5000)") + .HasComment("采集项编码"); + b.Property("LastModificationTime") .HasColumnType("datetime(6)") .HasColumnName("LastModificationTime"); @@ -476,6 +517,11 @@ namespace JiShe.IoT.Migrations .HasColumnType("char(36)") .HasColumnName("LastModifierId"); + b.Property("LinkType") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("水表通讯方案"); + b.Property("MeterAddress") .IsRequired() .HasMaxLength(40) @@ -496,6 +542,11 @@ namespace JiShe.IoT.Migrations .HasColumnType("int") .HasComment("表计类型"); + b.Property("MeterTypeName") + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasComment("水表设备类型"); + b.Property("MeteringCode") .HasColumnType("int") .HasComment("表计编码"); @@ -541,17 +592,21 @@ namespace JiShe.IoT.Migrations .HasColumnType("tinyint(1)") .HasComment("是否单倍率"); + b.Property("Special") + .HasColumnType("int") + .HasComment("是否特殊表"); + b.Property("TenantId") .HasColumnType("char(36)") .HasColumnName("TenantId") .HasComment("租户ID"); b.Property("TimesA") - .HasColumnType("decimal(65,30)") + .HasColumnType("decimal(12, 4)") .HasComment("倍率A"); b.Property("Timev") - .HasColumnType("decimal(65,30)") + .HasColumnType("decimal(12, 4)") .HasComment("倍率V"); b.Property("TripState")