From 6b2e7a7501d0bf09830566233afbe695cc776cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=AD=A3=E5=85=B4?= <1016129865@qq.com> Date: Tue, 26 Nov 2024 17:40:42 +0800 Subject: [PATCH 01/84] =?UTF-8?q?=E6=B7=BB=E5=8A=A0MTNet.Application?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=BA=94=E7=94=A8=E5=B1=82=E5=B7=A5=E7=A8=8B?= =?UTF-8?q?=20=E6=9B=BF=E6=8D=A2=E5=8E=9F=E6=9C=89Admin.NET.Application?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin.NET.Web.Core.csproj | 2 +- Admin.NET/Admin.NET.sln | 6 + .../Configuration/APIJSON.json | 34 +++++ .../MTNet.Application/Configuration/App.json | 53 ++++++++ .../Configuration/Cache.json | 36 +++++ .../Configuration/Captcha.json | 29 ++++ .../Configuration/CodeGen.json | 20 +++ .../Configuration/Database.json | 83 ++++++++++++ .../Configuration/Email.json | 14 ++ .../MTNet.Application/Configuration/Enum.json | 8 ++ .../Configuration/EventBus.json | 12 ++ .../MTNet.Application/Configuration/JWT.json | 17 +++ .../Configuration/Limit.json | 107 +++++++++++++++ .../Configuration/Logging.json | 48 +++++++ .../Configuration/OAuth.json | 14 ++ .../MTNet.Application/Configuration/SMS.json | 37 ++++++ .../Configuration/Swagger.json | 32 +++++ .../Configuration/Upload.json | 29 ++++ .../Configuration/Wechat.json | 32 +++++ .../Const/ApplicationConst.cs | 18 +++ Admin.NET/MTNet.Application/GlobalUsings.cs | 22 ++++ .../MTNet.Application.csproj | 124 ++++++++++++++++++ .../MTNet.Application/OpenApi/DemoOpenApi.cs | 28 ++++ Admin.NET/MTNet.Application/Startup.cs | 22 ++++ 24 files changed, 826 insertions(+), 1 deletion(-) create mode 100644 Admin.NET/MTNet.Application/Configuration/APIJSON.json create mode 100644 Admin.NET/MTNet.Application/Configuration/App.json create mode 100644 Admin.NET/MTNet.Application/Configuration/Cache.json create mode 100644 Admin.NET/MTNet.Application/Configuration/Captcha.json create mode 100644 Admin.NET/MTNet.Application/Configuration/CodeGen.json create mode 100644 Admin.NET/MTNet.Application/Configuration/Database.json create mode 100644 Admin.NET/MTNet.Application/Configuration/Email.json create mode 100644 Admin.NET/MTNet.Application/Configuration/Enum.json create mode 100644 Admin.NET/MTNet.Application/Configuration/EventBus.json create mode 100644 Admin.NET/MTNet.Application/Configuration/JWT.json create mode 100644 Admin.NET/MTNet.Application/Configuration/Limit.json create mode 100644 Admin.NET/MTNet.Application/Configuration/Logging.json create mode 100644 Admin.NET/MTNet.Application/Configuration/OAuth.json create mode 100644 Admin.NET/MTNet.Application/Configuration/SMS.json create mode 100644 Admin.NET/MTNet.Application/Configuration/Swagger.json create mode 100644 Admin.NET/MTNet.Application/Configuration/Upload.json create mode 100644 Admin.NET/MTNet.Application/Configuration/Wechat.json create mode 100644 Admin.NET/MTNet.Application/Const/ApplicationConst.cs create mode 100644 Admin.NET/MTNet.Application/GlobalUsings.cs create mode 100644 Admin.NET/MTNet.Application/MTNet.Application.csproj create mode 100644 Admin.NET/MTNet.Application/OpenApi/DemoOpenApi.cs create mode 100644 Admin.NET/MTNet.Application/Startup.cs diff --git a/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj b/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj index c7b6eeb3..6a85e66e 100644 --- a/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj +++ b/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj @@ -15,7 +15,7 @@ - + diff --git a/Admin.NET/Admin.NET.sln b/Admin.NET/Admin.NET.sln index 838d1032..0764e4df 100644 --- a/Admin.NET/Admin.NET.sln +++ b/Admin.NET/Admin.NET.sln @@ -28,6 +28,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Admin.NET.Plugin.ApprovalFl EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Admin.NET.Plugin.K3Cloud", "Plugins\Admin.NET.Plugin.K3Cloud\Admin.NET.Plugin.K3Cloud.csproj", "{72EB89AB-15F7-4F85-88DB-7C2EF7C3D588}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MTNet.Application", "MTNet.Application\MTNet.Application.csproj", "{2210EC07-3D71-43C2-8777-BA29C6C03B42}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -70,6 +72,10 @@ Global {72EB89AB-15F7-4F85-88DB-7C2EF7C3D588}.Debug|Any CPU.Build.0 = Debug|Any CPU {72EB89AB-15F7-4F85-88DB-7C2EF7C3D588}.Release|Any CPU.ActiveCfg = Release|Any CPU {72EB89AB-15F7-4F85-88DB-7C2EF7C3D588}.Release|Any CPU.Build.0 = Release|Any CPU + {2210EC07-3D71-43C2-8777-BA29C6C03B42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2210EC07-3D71-43C2-8777-BA29C6C03B42}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2210EC07-3D71-43C2-8777-BA29C6C03B42}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2210EC07-3D71-43C2-8777-BA29C6C03B42}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Admin.NET/MTNet.Application/Configuration/APIJSON.json b/Admin.NET/MTNet.Application/Configuration/APIJSON.json new file mode 100644 index 00000000..5baf2316 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/APIJSON.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "APIJSON": { + "Roles": [ + { + "RoleName": "Role1", // 权限名称 唯一 + "Select": { // 查询 + "Table": [ "*" ], // 可操作的表 + "Column": [ "*" ], // 可操作的字段 + "Filter": [] + }, + "Insert": { // 添加 + "Table": [ "table1", "table2", "table3" ], + "Column": [ "*", "*", "tb.*" ] + }, + "Update": { // 修改 + "Table": [ "table1", "table2", "table3" ], + "Column": [ "*", "tb.*", "tb.*" ] + }, + "Delete": { // 删除 + "Table": [ "table1", "table2", "table3" ] + } + }, + { + "RoleName": "Role2", + "Select": { + "Table": [ "table1" ], + "Column": [ "tb.*" ] + } + } + ] + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/App.json b/Admin.NET/MTNet.Application/Configuration/App.json new file mode 100644 index 00000000..93d5050d --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/App.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Urls": "http://*:5005", // 配置默认端口 + // "https_port": 44325, + + "AllowedHosts": "*", + + "AppSettings": { + "InjectSpecificationDocument": true, // 生产环境是否开启Swagger + "ExternalAssemblies": [ "plugins" ] // 插件目录 + }, + "DynamicApiControllerSettings": { + //"DefaultRoutePrefix": "api", // 默认路由前缀 + "CamelCaseSeparator": "", // 驼峰命名分隔符 + "SplitCamelCase": false, // 切割骆驼(驼峰)/帕斯卡命名 + "LowercaseRoute": false, // 小写路由格式 + "AsLowerCamelCase": true, // 小驼峰命名(首字母小写) + "KeepVerb": false, // 保留动作方法请求谓词 + "KeepName": false // 保持原有名称不处理 + }, + "FriendlyExceptionSettings": { + "DefaultErrorMessage": "系统异常,请联系管理员", + "ThrowBah": true, // 是否将 Oops.Oh 默认抛出为业务异常 + "LogError": false // 是否输出异常日志 + }, + "LocalizationSettings": { + "SupportedCultures": [ "zh-CN", "en" ], // 语言列表 + "DefaultCulture": "zh-CN", // 默认语言 + "DateTimeFormatCulture": "zh-CN" // 固定时间区域为特定时区(多语言) + }, + "CorsAccessorSettings": { + //"PolicyName": "App.Cors.Policy", + //"WithOrigins": [ "http://localhost:5005", "https://gitee.com" ], + "WithExposedHeaders": [ "Content-Disposition", "X-Pagination", "access-token", "x-access-token" ], // 如果前端不代理且是axios请求 + "SignalRSupport": true // 启用 SignalR 跨域支持 + }, + "SnowId": { + "WorkerId": 1, // 机器码 全局唯一 + "WorkerIdBitLength": 6, // 机器码位长 默认值6,取值范围 [1, 19] + "SeqBitLength": 6, // 序列数位长 默认值6,取值范围 [3, 21](建议不小于4,值越大性能越高、Id位数也更长) + "WorkerPrefix": "adminnet_" // 缓存前缀 + }, + "Cryptogram": { + "StrongPassword": false, // 是否开启密码强度验证 + "PasswordStrengthValidation": "(?=^.{6,16}$)(?=.*\\d)(?=.*\\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\\n).*$", // 密码强度验证正则表达式,必须须包含大小写字母、数字和特殊字符的组合,长度在6-16之间 + "PasswordStrengthValidationMsg": "密码必须包含大小写字母、数字和特殊字符的组合,长度在6-16之间", // 密码强度验证消息提示 + "CryptoType": "SM2", // 密码加密算法:MD5、SM2、SM4 + // 新业务系统记得改密匙,通过接口(http://localhost:5005/api/sysCommon/smKeyPair)获取。记得同步修改前端公钥配置:VITE_SM_PUBLIC_KEY + "PublicKey": "0484C7466D950E120E5ECE5DD85D0C90EAA85081A3A2BD7C57AE6DC822EFCCBD66620C67B0103FC8DD280E36C3B282977B722AAEC3C56518EDCEBAFB72C5A05312", // 公钥 + "PrivateKey": "8EDB615B1D48B8BE188FC0F18EC08A41DF50EA731FA28BF409E6552809E3A111" // 私钥 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Cache.json b/Admin.NET/MTNet.Application/Configuration/Cache.json new file mode 100644 index 00000000..47bf2a2b --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Cache.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Cache": { + "Prefix": "adminnet_", // 全局缓存前缀 + "CacheType": "Memory", // Memory、Redis + "Redis": { + "Configuration": "server=127.0.0.1:6379;password=;db=5;", // Redis连接字符串 + "Prefix": "adminnet_", // Redis前缀(目前没用) + "MaxMessageSize": "1048576", // 最大消息大小 默认1024 * 1024 + "AutoDetect": false // 自动检测集群节点 阿里云的Redis分布式集群使用代理模式,需要设置为false关闭自动检测;如果不用代理地址,就配置多个节点地址并打开自动检测 + } + }, + "Cluster": { // 集群配置 + "Enabled": false, // 启用集群:前提开启Redis缓存模式 + "ServerId": "adminnet", // 服务器标识 + "ServerIp": "", // 服务器IP + "SignalR": { + "RedisConfiguration": "127.0.0.1:6379,ssl=false,password=,defaultDatabase=5", + "ChannelPrefix": "signalrPrefix_" + }, + "DataProtecteKey": "AdminNet:DataProtection-Keys", + "IsSentinel": false, // 是否哨兵模式 + "SentinelConfig": { + "DefaultDb": "4", + "EndPoints": [ // 哨兵端口 + // "10.10.0.124:26380" + ], + "MainPrefix": "adminNet:", + "Password": "123456", + "SentinelPassword": "adminNet", + "ServiceName": "adminNet", + "SignalRChannelPrefix": "signalR:" + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Captcha.json b/Admin.NET/MTNet.Application/Configuration/Captcha.json new file mode 100644 index 00000000..69d3c68b --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Captcha.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // Lazy.Captcha.Core 组件详细文档(https://api.gitee.com/pojianbing/lazy-captcha/) + "CaptchaOptions": { + "CaptchaType": 10, // 验证码类型0、1、2、3、4、5、6、7、8、9、10、11 + "CodeLength": 1, // 验证码长度, 要放在CaptchaType设置后 当类型为算术表达式时,长度代表操作的个数, 例如2 + "ExpirySeconds": 60, // 验证码过期秒数 + "IgnoreCase": true, // 比较时是否忽略大小写 + "StoreageKeyPrefix": "", // 存储键前缀 + "ImageOption": { + "Animation": true, // 是否启用动画 + "FontSize": 36, // 字体大小 + "Width": 150, // 验证码宽度 + "Height": 50, // 验证码高度 + "BubbleMinRadius": 5, // 气泡最小半径 + "BubbleMaxRadius": 10, // 气泡最大半径 + "BubbleCount": 3, // 气泡数量 + "BubbleThickness": 1.0, // 气泡边沿厚度 + "InterferenceLineCount": 3, // 干扰线数量 + "FontFamily": "kaiti", // 包含actionj,epilog,fresnel,headache,lexo,prefix,progbot,ransom,robot,scandal,kaiti + "FrameDelay": 300, // 每帧延迟,Animation=true时有效, 默认300 + "BackgroundColor": "#ffffff", // 格式: rgb, rgba, rrggbb, or rrggbbaa format to match web syntax, 默认#fff + "ForegroundColors": "", // 颜色格式同BackgroundColor,多个颜色逗号分割,随机选取。不填,空值,则使用默认颜色集 + "Quality": 100, // 图片质量(质量越高图片越大,gif调整无效可能会更大) + "TextBold": true // 粗体 + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/CodeGen.json b/Admin.NET/MTNet.Application/Configuration/CodeGen.json new file mode 100644 index 00000000..275087a8 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/CodeGen.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // 代码生成配置项-程序集名称集合 + "CodeGen": { + "EntityAssemblyNames": [ "Admin.NET.Core", "Admin.NET.Application" ], + "BaseEntityNames": [ "EntityTenantId", "EntityTenant", "EntityTenantBaseData", "EntityBaseData", "EntityBase", "EntityBaseId" ], + "EntityBaseColumn": { + "EntityTenantId": [ "Id", "TenantId" ], + "EntityTenant": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete", "TenantId" ], + "EntityTenantBaseData": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete", "CreateOrgId", "CreateOrgName", "TenantId" ], + "EntityBaseData": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete", "CreateOrgId", "CreateOrgName" ], + "EntityBase": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete" ], + "EntityBaseId": [ "Id" ] + //"BaseId": [ "Id" ] + }, + "FrontRootPath": "Web", // 前端项目根目录 + "BackendApplicationNamespaces": [ "Admin.NET.Application", "Admin.NET.Application2" ] // 后端生成到的项目 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Database.json b/Admin.NET/MTNet.Application/Configuration/Database.json new file mode 100644 index 00000000..110efd5b --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Database.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // 详细数据库配置见SqlSugar官网(第一个为默认库),极力推荐 PostgreSQL 数据库 + // 数据库连接字符串参考地址:https://www.connectionstrings.com/ + "DbConnection": { + "EnableConsoleSql": false, // 启用控制台打印SQL + "ConnectionConfigs": [ + { + //"ConfigId": "1300000000001", // 默认库标识-禁止修改 + "DbType": "Sqlite", // MySql、SqlServer、Sqlite、Oracle、PostgreSQL、Dm、Kdbndp、Oscar、MySqlConnector、Access、OpenGauss、QuestDB、HG、ClickHouse、GBase、Odbc、Custom + "ConnectionString": "DataSource=./Admin.NET.db", // Sqlite 库连接字符串 + //"ConnectionString": "PORT=5432;DATABASE=xxx;HOST=localhost;PASSWORD=xxx;USER ID=xxx", // PostgreSQL 库连接字符串 + //"ConnectionString": "Server=localhost;Database=mtnet;Uid=root;Pwd=123456;SslMode=None;", // MySql 库连接字符串", + //"ConnectionString": "User Id=xxx; Password=xxx; Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL)))", // Oracle 库连接字符串 + //"ConnectionString": "Server=localhost;Database=xxx;User Id=xxx;Password=xxx;Encrypt=True;TrustServerCertificate=True;", // SqlServer 库连接字符串 + + //"SlaveConnectionConfigs": [ // 读写分离/主从 + // { + // "HitRate": 10, + // "ConnectionString": "DataSource=./Admin.NET1.db" + // }, + // { + // "HitRate": 10, + // "ConnectionString": "DataSource=./Admin.NET2.db" + // } + //], + "DbSettings": { + "EnableInitDb": false, // 启用库初始化 + "EnableDiffLog": false, // 启用库表差异日志 + "EnableUnderLine": false, // 启用驼峰转下划线 + "EnableConnStringEncrypt": false // 启用数据库连接串加密 + }, + "TableSettings": { + "EnableInitTable": false, // 启用表初始化 + "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] + }, + "SeedSettings": { + "EnableInitSeed": false, // 启用种子初始化 + "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] + } + } + //// 日志独立数据库配置 + //{ + // "ConfigId": "1300000000002", // 日志库标识-禁止修改 + // "DbType": "Sqlite", + // "ConnectionString": "DataSource=./Admin.NET.Log.db", // 库连接字符串 + // "DbSettings": { + // "EnableInitDb": true, // 启用库初始化 + // "EnableDiffLog": false, // 启用库表差异日志 + // "EnableUnderLine": false // 启用驼峰转下划线 + // }, + // "TableSettings": { + // "EnableInitTable": true, // 启用表初始化 + // "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] + // }, + // "SeedSettings": { + // "EnableInitSeed": false, // 启用种子初始化 + // "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] + // } + //}, + //// 其他数据库配置(可以配置多个) + //{ + // "ConfigId": "test", // 库标识 + // "DbType": "Sqlite", // 库类型 + // "ConnectionString": "DataSource=./Admin.NET.Test.db", // 库连接字符串 + // "DbSettings": { + // "EnableInitDb": true, // 启用库初始化 + // "EnableDiffLog": false, // 启用库表差异日志 + // "EnableUnderLine": false // 启用驼峰转下划线 + // }, + // "TableSettings": { + // "EnableInitTable": true, // 启用表初始化 + // "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] + // }, + // "SeedSettings": { + // "EnableInitSeed": true, // 启用种子初始化 + // "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] + // } + //} + ] + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Email.json b/Admin.NET/MTNet.Application/Configuration/Email.json new file mode 100644 index 00000000..bc53ba93 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Email.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Email": { + "Host": "smtp.163.com", // 主机 + "Port": 465, // 端口 465、994、25 + "EnableSsl": true, // 启用SSL + "DefaultFromEmail": "xxx@163.com", // 默认发件者邮箱 + "DefaultToEmail": "xxx@qq.com", // 默认接收人邮箱 + "UserName": "xxx@163.com", // 邮箱账号 + "Password": "", // 邮箱授权码 + "DefaultFromName": "Admin.NET 通用权限开发平台" // 默认邮件标题 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Enum.json b/Admin.NET/MTNet.Application/Configuration/Enum.json new file mode 100644 index 00000000..b5266623 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Enum.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // 枚举实体所在程序集名称集合 + "Enum": { + "EntityAssemblyNames": [ "Admin." ] + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/EventBus.json b/Admin.NET/MTNet.Application/Configuration/EventBus.json new file mode 100644 index 00000000..520123e8 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/EventBus.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "EventBus": { + "RabbitMQ": { + "UserName": "adminnet", + "Password": "adminnet++123456", + "HostName": "127.0.0.1", + "Port": 5672 + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/JWT.json b/Admin.NET/MTNet.Application/Configuration/JWT.json new file mode 100644 index 00000000..72c7dc59 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/JWT.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "JWTSettings": { + "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true + "IssuerSigningKey": "3c1cbc3f546eda35168c3aa3cb91780fbe703f0996c6d123ea96dc85c70bbc0a", // 密钥,string 类型,必须是复杂密钥,长度大于16 + "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true + "ValidIssuer": "Admin.NET", // 签发方,string 类型 + "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true + "ValidAudience": "Admin.NET", // 签收方,string 类型 + "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true + //"ExpiredTime": 20, // 过期时间,long 类型,单位分钟,默认20分钟,最大支持 13 年 + "ClockSkew": 5, // 过期时间容错值,long 类型,单位秒,默认5秒 + "Algorithm": "HS256", // 加密算法,string 类型,默认 HS256 + "RequireExpirationTime": true // 验证过期时间,设置 false 将永不过期 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Limit.json b/Admin.NET/MTNet.Application/Configuration/Limit.json new file mode 100644 index 00000000..d23bbca1 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Limit.json @@ -0,0 +1,107 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // IP限流配置 + "IpRateLimiting": { + // 例如:设置每分钟5次访问限流 + // 当False时:每个接口都加入计数,不管你访问哪个接口,只要在一分钟内累计够5次,将禁止访问。 + // 当True 时:当一分钟请求了5次GetData接口,则该接口将在时间段内禁止访问,但是还可以访问PostData()5次,总得来说是每个接口都有5次在这一分钟,互不干扰。 + "EnableEndpointRateLimiting": true, + // 如果StackBlockedRequests设置为false,拒绝的API调用不会添加到调用次数计数器上。比如:如果客户端每秒发出3个请求并且您设置了每秒一个调用的限制, + // 则每分钟或每天计数器等其他限制将仅记录第一个调用,即成功的API调用。如果您希望被拒绝的API调用计入其他时间的显示(分钟,小时等),则必须设置 + "StackBlockedRequests": false, + // 在RealIpHeader使用时,你的Kestrel服务器背后是一个反向代理,如果你的代理服务器使用不同的页眉然后提取客户端IP X-Real-IP使用此选项来设置它。 + "RealIpHeader": "X-Real-IP", + // 将ClientIdHeader被用于提取白名单的客户端ID。如果此标头中存在客户端ID并且与ClientWhitelist中指定的值匹配,则不应用速率限制。 + "ClientIdHeader": "X-ClientId", + // IP白名单:支持Ipv4和Ipv6 + "IpWhitelist": [], + // 端点白名单 + "EndpointWhitelist": [], + // 客户端白名单 + "ClientWhitelist": [], + "QuotaExceededResponse": { + "Content": "{{\"code\":429,\"type\":\"error\",\"message\":\"访问过于频繁,请稍后重试!禁止违法行为否则110 👮\",\"result\":null,\"extras\":null}}", + "ContentType": "application/json", + "StatusCode": 429 + }, + // 返回状态码 + "HttpStatusCode": 429, + // API规则,结尾一定要带* + "GeneralRules": [ + // 1秒钟只能调用1000次 + { + "Endpoint": "*", + "Period": "1s", + "Limit": 1000 + }, + // 1分钟只能调用60000次 + { + "Endpoint": "*", + "Period": "1m", + "Limit": 60000 + } + //// 1小时只能调用3600000次 + //{ + // "Endpoint": "*", + // "Period": "1h", + // "Limit": 3600000 + //}, + //// 1天只能调用86400000次 + //{ + // "Endpoint": "*", + // "Period": "1d", + // "Limit": 86400000 + //} + ] + }, + // IP 黑名单 + "IpRateLimitPolicies": { + "IpRules": [ + { + "Ip": "0.0.0.0", // IP可用:"::1/10" + "Rules": [ + { + "Endpoint": "*", + "Period": "1s", + "Limit": 0 // 设置为0就是1次都不能请求,完全屏蔽 + } + ] + } + ] + }, + // 客户端限流配置 + "ClientRateLimiting": { + "EnableEndpointRateLimiting": true, + "ClientIdHeader": "X-ClientId", + "EndpointWhitelist": [], + "ClientWhitelist": [], + "QuotaExceededResponse": { + "Content": "{{\"code\":429,\"type\":\"error\",\"message\":\"访问人数过多,请稍后重试!\",\"result\":null,\"extras\":null}}", + "ContentType": "application/json", + "StatusCode": 429 + }, + "HttpStatusCode": 429, + "GeneralRules": [ + { + "Endpoint": "*", + "Period": "1s", + "Limit": 2000 + } + ] + }, + "ClientRateLimitPolicies": { + "ClientRules": [ + { + "ClientId": "", + "Rules": [ + { + "Endpoint": "*", + "Period": "1s", + "Limit": 2000 + } + ] + } + ] + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Logging.json b/Admin.NET/MTNet.Application/Configuration/Logging.json new file mode 100644 index 00000000..f3a10bb9 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Logging.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning", + "Microsoft.EntityFrameworkCore": "Information", + "AspNetCoreRateLimit": "None" + }, + "File": { + "Enabled": false, // 启用文件日志 + "FileName": "logs/{0:yyyyMMdd}_{1}.log", // 日志文件 + "Append": true, // 追加覆盖 + // "MinimumLevel": "Information", // 日志级别 + "FileSizeLimitBytes": 10485760, // 10M=10*1024*1024 + "MaxRollingFiles": 30 // 只保留30个文件 + }, + "Database": { + "Enabled": true, // 启用数据库日志 + "MinimumLevel": "Information" + }, + "ElasticSearch": { + "Enabled": false, // 启用ES日志 + "AuthType": "Basic", // ES认证类型,可选 Basic、ApiKey、Base64ApiKey + "User": "admin", // Basic认证的用户名,使用Basic认证类型时必填 + "Password": "123456", // Basic认证的密码,使用Basic认证类型时必填 + "ApiId": "", // 使用ApiKey认证类型时必填 + "ApiKey": "", // 使用ApiKey认证类型时必填 + "Base64ApiKey": "TmtrOEszNEJuQ0NyaWlydGtROFk6SG1RZ0w3YzBTc2lCanJTYlV3aXNzZw==", // 使用Base64ApiKey认证类型时必填 + "Fingerprint": "37:08:6A:C6:06:CC:9A:43:CF:ED:25:A2:1C:A4:69:57:90:31:2C:06:CA:61:56:39:6A:9C:46:11:BD:22:51:DA", // ES使用Https时的证书指纹 + "ServerUris": [ "http://192.168.1.100:9200" ], // 地址 + "DefaultIndex": "adminnet" // 索引 + }, + "Monitor": { + "GlobalEnabled": true, // 启用全局拦截日志 + "IncludeOfMethods": [], // 拦截特定方法,当GlobalEnabled=false有效 + "ExcludeOfMethods": [], // 排除特定方法,当GlobalEnabled=true有效 + "BahLogLevel": "Information", // Oops.Oh 和 Oops.Bah 业务日志输出级别 + "WithReturnValue": true, // 是否包含返回值,默认true + "ReturnValueThreshold": 500, // 返回值字符串阈值,默认0全量输出 + "JsonBehavior": "None", // 是否输出Json,默认None(OnlyJson、All) + "JsonIndented": false, // 是否格式化Json + "UseUtcTimestamp": false, // 时间格式UTC、LOCAL + "ConsoleLog": true // 是否显示控制台日志 + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/OAuth.json b/Admin.NET/MTNet.Application/Configuration/OAuth.json new file mode 100644 index 00000000..f2f28aa1 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/OAuth.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "OAuth": { + "Weixin": { + "ClientId": "xxx", + "ClientSecret": "xxx" + }, + "Gitee": { + "ClientId": "xxx", + "ClientSecret": "xxx" + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/SMS.json b/Admin.NET/MTNet.Application/Configuration/SMS.json new file mode 100644 index 00000000..58a697db --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/SMS.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "SMS": { + "Aliyun": { + "AccessKeyId": "", + "AccessKeySecret": "", + "Templates": [ + { + "Id": "0", + "SignName": "AdminNET 平台", + "TemplateCode": "SMS_291005708", + "Content": "您的验证码为:${code},请勿泄露于他人!" + }, + { + "Id": "1", + "SignName": "AdminNET 平台", + "TemplateCode": "SMS_462801755", + "Content": "注册成功,感谢您的注册,请妥善保管您的账户信息" + } + ] + }, + "Tencentyun": { + "SdkAppId": "", + "AccessKeyId": "", + "AccessKeySecret": "", + "Templates": [ + { + "Id": "0", + "SignName": "AdminNET 平台", + "TemplateCode": "", + "Content": "" + } + ] + } + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Swagger.json b/Admin.NET/MTNet.Application/Configuration/Swagger.json new file mode 100644 index 00000000..b8179caa --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Swagger.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "SpecificationDocumentSettings": { + "DocumentTitle": "Admin.NET 通用权限开发平台", + "GroupOpenApiInfos": [ + { + "Group": "Default", + "Title": "Admin.NET 通用权限开发平台", + "Description": "让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。", + "Version": "1.0.0", + "Order": 1000 + }, + { + "Group": "All Groups", + "Title": "所有接口", + "Description": "让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。", + "Version": "1.0.0", + "Order": 0 + } + ], + "DefaultGroupName": "Default", // 默认分组名 + "DocExpansionState": "List", // List、Full、None + "EnableAllGroups": true, + "LoginInfo": { + "Enabled": true, // 是否开启Swagger登录 + "CheckUrl": "/api/swagger/checkUrl", + "SubmitUrl": "/api/swagger/submitUrl" + }, + "EnumToNumber": true // 枚举类型生成值类型 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Upload.json b/Admin.NET/MTNet.Application/Configuration/Upload.json new file mode 100644 index 00000000..601f8f29 --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Upload.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Upload": { + "Path": "upload/{yyyy}/{MM}/{dd}", // 文件上传目录 + "MaxSize": 51200, // 文件最大限制KB:1024*50 + "ContentType": [ "image/jpg", "image/png", "image/jpeg", "image/gif", "image/bmp", "text/plain", "application/pdf", "application/msword", "application/vnd.ms-excel", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "video/mp4", "application/wps-office.docx", "application/wps-office.xlsx", "application/wps-office.pptx", "application/vnd.android.package-archive" ], + "EnableMd5": false // 启用文件MDF5验证-防止重复上传 + }, + "OSSProvider": { + "Enabled": false, + "Provider": "Minio", // OSS提供者 Invalid/Minio/Aliyun/QCloud/Qiniu/HuaweiCloud + "Endpoint": "xxx.xxx.xxx.xxx:8090", // 节点/API地址(在腾讯云OSS中表示AppId) + "Region": "xxx.xxx.xxx.xxx", // 地域 + "AccessKey": "", + "SecretKey": "", + "IsEnableHttps": false, // 是否启用HTTPS + "IsEnableCache": true, // 是否启用缓存 + "Bucket": "admin.net", + "CustomHost": "" // 自定义Host:拼接外链的Host,若空则使用Endpoint拼接 + }, + "SSHProvider": { + "Enabled": false, + "Host": "127.0.0.1", + "Port": 8222, + "Username": "sshuser", + "Password": "Password.1" + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Wechat.json b/Admin.NET/MTNet.Application/Configuration/Wechat.json new file mode 100644 index 00000000..f591e84d --- /dev/null +++ b/Admin.NET/MTNet.Application/Configuration/Wechat.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Wechat": { + // 公众号 + "WechatAppId": "", + "WechatAppSecret": "", + "WechatToken": "", // 微信公众号服务器配置中的令牌(Token) + "WechatEncodingAESKey": "", // 微信公众号服务器配置中的消息加解密密钥(EncodingAESKey) + // 小程序 + "WxOpenAppId": "", + "WxOpenAppSecret": "", + "WxToken": "", // 小程序消息推送中的令牌(Token) + "WxEncodingAESKey": "", // 小程序消息推送中的消息加解密密钥(EncodingAESKey) + "QRImagePath": "" //小程序生成带参数二维码保存位置(绝对路径 eg: D:\\Web\\wwwroot\\upload\\QRImage) + }, + // 微信支付 + "WechatPay": { + "AppId": "", // 微信公众平台AppId、开放平台AppId、小程序AppId、企业微信CorpId + "MerchantId": "", // 商户平台的商户号 + "MerchantV3Secret": "", // 商户平台的APIv3密钥 + "MerchantCertificateSerialNumber": "", // 商户平台的证书序列号 + "MerchantCertificatePrivateKey": "\\WxPayCert\\apiclient_key.pem" // 商户平台的API证书私钥(apiclient_key.pem文件内容) + }, + // 支付回调 + "PayCallBack": { + "WechatPayUrl": "https://xxx/api/sysWechatPay/payCallBack", // 微信支付回调 + "WechatRefundUrl": "", // 微信退款回调 + "AlipayUrl": "", // 支付宝支付回调 + "AlipayRefundUrl": "" // 支付宝退款回调 + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Const/ApplicationConst.cs b/Admin.NET/MTNet.Application/Const/ApplicationConst.cs new file mode 100644 index 00000000..783f0391 --- /dev/null +++ b/Admin.NET/MTNet.Application/Const/ApplicationConst.cs @@ -0,0 +1,18 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace MTNet.Application; + +/// +/// 业务应用相关常量 +/// +public class ApplicationConst +{ + /// + /// API分组名称 + /// + public const string GroupName = "MTNet业务应用"; +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/GlobalUsings.cs b/Admin.NET/MTNet.Application/GlobalUsings.cs new file mode 100644 index 00000000..7dd67391 --- /dev/null +++ b/Admin.NET/MTNet.Application/GlobalUsings.cs @@ -0,0 +1,22 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +global using Admin.NET.Core; +global using Furion; +global using Furion.DependencyInjection; +global using Furion.DynamicApiController; +global using Furion.FriendlyException; +global using Mapster; +global using Microsoft.AspNetCore.Authorization; +global using Microsoft.AspNetCore.Mvc; +global using Microsoft.Extensions.DependencyInjection; +global using SqlSugar; +global using System; +global using System.Collections.Generic; +global using System.ComponentModel; +global using System.ComponentModel.DataAnnotations; +global using System.Threading.Tasks; +global using System.Linq; \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/MTNet.Application.csproj b/Admin.NET/MTNet.Application/MTNet.Application.csproj new file mode 100644 index 00000000..a750daa7 --- /dev/null +++ b/Admin.NET/MTNet.Application/MTNet.Application.csproj @@ -0,0 +1,124 @@ + + + + net6.0 + enable + enable + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + + + + + + + + + diff --git a/Admin.NET/MTNet.Application/OpenApi/DemoOpenApi.cs b/Admin.NET/MTNet.Application/OpenApi/DemoOpenApi.cs new file mode 100644 index 00000000..7a4761e3 --- /dev/null +++ b/Admin.NET/MTNet.Application/OpenApi/DemoOpenApi.cs @@ -0,0 +1,28 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +namespace MTNet.Application; + +/// +/// 示例开放接口 +/// +[ApiDescriptionSettings("开放接口", Name = "Demo", Order = 100)] +[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)] +public class DemoOpenApi : IDynamicApiController +{ + private readonly UserManager _userManager; + + public DemoOpenApi(UserManager userManager) + { + _userManager = userManager; + } + + [HttpGet("helloWord")] + public Task HelloWord() + { + return Task.FromResult($"Hello word. {_userManager.Account}"); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Startup.cs b/Admin.NET/MTNet.Application/Startup.cs new file mode 100644 index 00000000..a3b892d1 --- /dev/null +++ b/Admin.NET/MTNet.Application/Startup.cs @@ -0,0 +1,22 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; + +namespace MTNet.Application; + +[AppStartup(100)] +public class Startup : AppStartup +{ + public void ConfigureServices(IServiceCollection services) + { + } + + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + } +} \ No newline at end of file -- Gitee From 868006915531515857985d4ca4eefa4c983f22a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=AD=A3=E5=85=B4?= <1016129865@qq.com> Date: Tue, 3 Dec 2024 09:50:44 +0800 Subject: [PATCH 02/84] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=A0=87=E9=A2=98=E4=BF=A1=E6=81=AF=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=88=E7=AB=AF=E6=B5=8B=E8=AF=95=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=A7=8D=E5=AD=90=E6=95=B0=E6=8D=AE=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=AE=A1=E7=90=86=E5=91=98=E8=A7=92=E8=89=B2=E7=9A=84?= =?UTF-8?q?=E7=BB=88=E7=AB=AF=E6=B5=8B=E8=AF=95=E6=9D=83=E9=99=90=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86=E5=92=8C?= =?UTF-8?q?=E6=98=A0=E5=B0=84=E7=AE=A1=E7=90=86=E5=A2=9E=E5=88=A0=E6=94=B9?= =?UTF-8?q?=E6=9F=A5=E6=8E=A5=E5=8F=A3=E4=BB=A5=E5=8F=8A=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E7=A7=8D=E5=AD=90=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/.editorconfig | 3 +- .../Admin.NET.Core/SeedData/SysAppSeedData.cs | 3 +- .../SeedData/SysMenuSeedData.cs | 24 ++- .../SeedData/SysRoleMenuSeedData.cs | 23 +++ .../Attribute/CategoryIndexAttribute.cs | 22 +++ .../Attribute/ColumnAttribute.cs | 22 +++ .../Attribute/DeviceTableAttribute.cs | 16 ++ .../Attribute/IsListAttribute.cs | 22 +++ .../Attribute/IsPathAttribute.cs | 22 +++ .../Attribute/PropertyOrderAttribute.cs | 136 +++++++++++++++ .../Entity/DeviceAddr Parameters/AxisInfo.cs | 83 ++++++++++ .../BaseStationTesterAddrConfig.cs | 33 ++++ .../ChannelEmulatorAddrConfig.cs | 33 ++++ .../CommunicationTesterAddrConfig.cs | 33 ++++ .../DeviceAddr Parameters/DeviceAddrConfig.cs | 67 ++++++++ .../DeviceAddr Parameters/DevicesConfig.cs | 91 ++++++++++ .../HighSpeedSwitchBoxAddrConfig.cs | 33 ++++ .../InterferenceGeneratorAddrConfig.cs | 33 ++++ .../NetworkAnalyzerAddrConfig.cs | 33 ++++ .../NetworkDamageTesterAddrConfig.cs | 33 ++++ .../PhaseShifterAddrConfig.cs | 33 ++++ .../PowerConsumptionTesterAddrConfig.cs | 33 ++++ .../ProgrammableAttenuatorAddrConfig.cs | 33 ++++ .../ScannerAddrConfig.cs | 33 ++++ .../SignalGeneratorAddrConfig.cs | 33 ++++ .../SpecialEquipmentAddrConfig.cs | 33 ++++ .../SpectrumAnalyzerAddrConfig.cs | 33 ++++ .../SwitchBoxAddrConfig.cs | 33 ++++ .../TurntableAddrConfig.cs | 35 ++++ .../UEMonitorAddrConfig.cs | 33 ++++ .../UserEquipmentAddrConfig.cs | 36 ++++ ...relessRoadMeasuringInstrumentAddrConfig.cs | 33 ++++ .../MTNet.Application/Entity/PAMapping.cs | 77 +++++++++ .../MTNet.Application/Enum/DeviceTypeEnum.cs | 73 ++++++++ .../MTNet.Application/Enum/TestTypeEnum.cs | 119 +++++++++++++ .../SeedData/DeviceSeedData.cs | 120 ++++++++++++++ .../SeedData/PAMappingSeedData.cs | 121 ++++++++++++++ .../Service/Device/DeviceService.cs | 146 ++++++++++++++++ .../Device/Dto/DeviceAddrConfigInput.cs | 54 ++++++ .../Service/Device/Dto/PAMappingInput.cs | 76 +++++++++ .../Service/Device/PAMappingService.cs | 156 ++++++++++++++++++ .../Service/Report/ReportService.cs | 29 ++++ .../Service/Template/TemplateService.cs | 29 ++++ .../Service/Testing/TestingService.cs | 29 ++++ 44 files changed, 2192 insertions(+), 3 deletions(-) create mode 100644 Admin.NET/MTNet.Application/Attribute/CategoryIndexAttribute.cs create mode 100644 Admin.NET/MTNet.Application/Attribute/ColumnAttribute.cs create mode 100644 Admin.NET/MTNet.Application/Attribute/DeviceTableAttribute.cs create mode 100644 Admin.NET/MTNet.Application/Attribute/IsListAttribute.cs create mode 100644 Admin.NET/MTNet.Application/Attribute/IsPathAttribute.cs create mode 100644 Admin.NET/MTNet.Application/Attribute/PropertyOrderAttribute.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/AxisInfo.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DevicesConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs create mode 100644 Admin.NET/MTNet.Application/Entity/PAMapping.cs create mode 100644 Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs create mode 100644 Admin.NET/MTNet.Application/Enum/TestTypeEnum.cs create mode 100644 Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs create mode 100644 Admin.NET/MTNet.Application/SeedData/PAMappingSeedData.cs create mode 100644 Admin.NET/MTNet.Application/Service/Device/DeviceService.cs create mode 100644 Admin.NET/MTNet.Application/Service/Device/Dto/DeviceAddrConfigInput.cs create mode 100644 Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs create mode 100644 Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs create mode 100644 Admin.NET/MTNet.Application/Service/Report/ReportService.cs create mode 100644 Admin.NET/MTNet.Application/Service/Template/TemplateService.cs create mode 100644 Admin.NET/MTNet.Application/Service/Testing/TestingService.cs diff --git a/Admin.NET/.editorconfig b/Admin.NET/.editorconfig index aab71a9f..e1c1be38 100644 --- a/Admin.NET/.editorconfig +++ b/Admin.NET/.editorconfig @@ -175,4 +175,5 @@ tab_width = 4 dotnet_style_operator_placement_when_wrapping = beginning_of_line # Add copyright file header -file_header_template = Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\n\n本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\n\n不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! \ No newline at end of file +# file_header_template = Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\n\n本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\n\n不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! +file_header_template = \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs index a16f34af..cfb58e24 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs @@ -19,7 +19,8 @@ public class SysAppSeedData : ISqlSugarEntitySeedData { return new[] { - new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="Admin.NET", ViceTitle="Admin.NET", ViceDesc="站在巨人肩膀上的 .NET 通用权限开发框架", Watermark="Admin.NET", Copyright="Copyright \u00a9 2021-present Admin.NET All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, + //new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="Admin.NET", ViceTitle="Admin.NET", ViceDesc="站在巨人肩膀上的 .NET 通用权限开发框架", Watermark="Admin.NET", Copyright="Copyright \u00a9 2021-present Admin.NET All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, + new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="OTA_Mirror", ViceTitle="MTNet", ViceDesc="自动化测试 V3.0", Watermark="OTA_Mirror", Copyright="Copyright \u00a9 2021-present MTNet All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, }; } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs index c1e5415b..2006c4b3 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs @@ -24,6 +24,28 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData new SysMenu{ Id=1300000000121, Pid=1300000000101, Title="站内信", Path="/dashboard/notice", Name="notice", Component="/home/notice/index", Icon="ele-Bell", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=101 }, // 建议此处Id范围之间放置具体业务应用菜单 + new SysMenu{ Id=1300000000201, Pid=0, Title="终端测试", Path="/test", Name="test", Component="Layout", Icon="ele-Platform", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=1000 }, + + new SysMenu{ Id=1300000000211, Pid=1300000000201, Title="设备管理", Path="/test/device", Name="device", Component="/test/device/index", Icon="ele-Coordinate", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000212, Pid=1300000000211, Title="查询", Permission="device:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000213, Pid=1300000000211, Title="编辑", Permission="device:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000214, Pid=1300000000211, Title="增加", Permission="device:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000215, Pid=1300000000211, Title="删除", Permission="device:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + + new SysMenu{ Id=1300000000221, Pid=1300000000201, Title="映射管理", Path="/test/mapping", Name="mapping", Component="/test/mapping/index", Icon="ele-SetUp", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=110 }, + new SysMenu{ Id=1310000000222, Pid=1300000000221, Title="查询", Permission="mapping:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000223, Pid=1300000000221, Title="编辑", Permission="mapping:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000224, Pid=1300000000221, Title="增加", Permission="mapping:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + new SysMenu{ Id=1310000000225, Pid=1300000000221, Title="删除", Permission="mapping:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + + new SysMenu{ Id=1300000000231, Pid=1300000000201, Title="模板配置", Path="/test/template", Name="template", Component="/test/template/index", Icon="ele-DocumentCopy", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=120 }, + new SysMenu{ Id=1310000000232, Pid=1300000000231, Title="查询", Permission="template:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + + new SysMenu{ Id=1300000000241, Pid=1300000000201, Title="测试流程", Path="/test/testing", Name="testing", Component="/test/testing/index", Icon="ele-Loading", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=130 }, + new SysMenu{ Id=1310000000242, Pid=1300000000241, Title="查询", Permission="testing:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, + + new SysMenu{ Id=1300000000251, Pid=1300000000201, Title="报表统计", Path="/test/report", Name="report", Component="/test/report/index", Icon="ele-PieChart", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=140 }, + new SysMenu{ Id=1310000000252, Pid=1300000000251, Title="查询", Permission="report:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000000101, Pid=0, Title="系统管理", Path="/system", Name="system", Component="Layout", Icon="ele-Setting", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=10000 }, @@ -98,7 +120,7 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData new SysMenu{ Id=1310000001315, Pid=1310000001311, Title="删除", Permission="sysApp:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000001316, Pid=1310000001311, Title="授权菜单", Permission="sysApp:grantMenu", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000001317, Pid=1310000001311, Title="切换应用", Permission="sysApp:changeApp", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, - + new SysMenu{ Id=1310000000311, Pid=1310000000301, Title="租户管理", Path="/platform/tenant", Name="sysTenant", Component="/system/tenant/index", Icon="ele-School", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000000312, Pid=1310000000311, Title="查询", Permission="sysTenant:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000000313, Pid=1310000000311, Title="编辑", Permission="sysTenant:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs index a9c1d30e..31d26e64 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs @@ -145,6 +145,29 @@ public class SysRoleMenuSeedData : ISqlSugarEntitySeedData new SysRoleMenu{ Id=1300000000404, RoleId=1300000000101, MenuId=1310000000713 }, new SysRoleMenu{ Id=1300000000405, RoleId=1300000000101, MenuId=1310000000714 }, new SysRoleMenu{ Id=1300000000455, RoleId=1300000000101, MenuId=1310000000801 }, + ////// 终端测试 + new SysRoleMenu{ Id=1300000000901, RoleId=1300000000101, MenuId=1300000000201 }, + // 设备管理 + new SysRoleMenu{ Id=1300000000911, RoleId=1300000000101, MenuId=1300000000211 }, + new SysRoleMenu{ Id=1300000000912, RoleId=1300000000101, MenuId=1310000000212 }, + new SysRoleMenu{ Id=1300000000913, RoleId=1300000000101, MenuId=1310000000213 }, + new SysRoleMenu{ Id=1300000000914, RoleId=1300000000101, MenuId=1310000000214 }, + new SysRoleMenu{ Id=1300000000915, RoleId=1300000000101, MenuId=1310000000215 }, + // 映射管理 + new SysRoleMenu{ Id=1300000000921, RoleId=1300000000101, MenuId=1300000000221 }, + new SysRoleMenu{ Id=1300000000922, RoleId=1300000000101, MenuId=1310000000222 }, + new SysRoleMenu{ Id=1300000000923, RoleId=1300000000101, MenuId=1310000000223 }, + new SysRoleMenu{ Id=1300000000924, RoleId=1300000000101, MenuId=1310000000224 }, + new SysRoleMenu{ Id=1300000000935, RoleId=1300000000101, MenuId=1310000000225 }, + // 模板配置 + new SysRoleMenu{ Id=1300000000931, RoleId=1300000000101, MenuId=1300000000231 }, + new SysRoleMenu{ Id=1300000000932, RoleId=1300000000101, MenuId=1310000000232 }, + // 测试流程 + new SysRoleMenu{ Id=1300000000941, RoleId=1300000000101, MenuId=1300000000241 }, + new SysRoleMenu{ Id=1300000000942, RoleId=1300000000101, MenuId=1310000000242 }, + // 报表统计 + new SysRoleMenu{ Id=1300000000951, RoleId=1300000000101, MenuId=1300000000251 }, + new SysRoleMenu{ Id=1300000000952, RoleId=1300000000101, MenuId=1310000000252 }, // 其他角色默认菜单 // 数据面板【1300000000102】 diff --git a/Admin.NET/MTNet.Application/Attribute/CategoryIndexAttribute.cs b/Admin.NET/MTNet.Application/Attribute/CategoryIndexAttribute.cs new file mode 100644 index 00000000..1021b03b --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/CategoryIndexAttribute.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 标记属性的分组索引 +/// +[SuppressSniffer] +[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)] +public class CategoryIndexAttribute : Attribute +{ + public int Index { get; set; } + + public CategoryIndexAttribute(int index) + { + this.Index = index; + } +} diff --git a/Admin.NET/MTNet.Application/Attribute/ColumnAttribute.cs b/Admin.NET/MTNet.Application/Attribute/ColumnAttribute.cs new file mode 100644 index 00000000..049daefa --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/ColumnAttribute.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 标记对象的属性对应表格的哪一列 +/// +[SuppressSniffer] +[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] +public class ColumnAttribute : Attribute +{ + public int Index { get; set; } + + public ColumnAttribute(int index) + { + Index = index; + } +} diff --git a/Admin.NET/MTNet.Application/Attribute/DeviceTableAttribute.cs b/Admin.NET/MTNet.Application/Attribute/DeviceTableAttribute.cs new file mode 100644 index 00000000..1802380e --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/DeviceTableAttribute.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 设备表特性 +/// +[SuppressSniffer] +[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)] +public class DeviceTableAttribute : Attribute +{ +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Attribute/IsListAttribute.cs b/Admin.NET/MTNet.Application/Attribute/IsListAttribute.cs new file mode 100644 index 00000000..c1bdeda5 --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/IsListAttribute.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 标记属性是否为集合 +/// 配合前端弹出Dialog时使用 +/// +[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] +public class IsListAttribute : Attribute +{ + public bool IsList { get; set; } + + public IsListAttribute(bool isList) + { + this.IsList = isList; + } +} diff --git a/Admin.NET/MTNet.Application/Attribute/IsPathAttribute.cs b/Admin.NET/MTNet.Application/Attribute/IsPathAttribute.cs new file mode 100644 index 00000000..15c8a4cc --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/IsPathAttribute.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 标记属性是否为路径 +/// 配合前端弹出Dialog时使用 +/// +[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] +public class IsPathAttribute : Attribute +{ + public bool IsPath { get; set; } + + public IsPathAttribute(bool isPath) + { + this.IsPath = isPath; + } +} diff --git a/Admin.NET/MTNet.Application/Attribute/PropertyOrderAttribute.cs b/Admin.NET/MTNet.Application/Attribute/PropertyOrderAttribute.cs new file mode 100644 index 00000000..af5ad24f --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/PropertyOrderAttribute.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public class PropertySorter : ExpandableObjectConverter +{ + #region Methods + public override bool GetPropertiesSupported(ITypeDescriptorContext context) + { + return true; + } + + public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) + { + // + // This override returns a list of properties in order + // + PropertyDescriptorCollection pdc = TypeDescriptor.GetProperties(value, attributes); + ArrayList orderedProperties = new ArrayList(); + foreach (PropertyDescriptor pd in pdc) + { + Attribute attribute = pd.Attributes[typeof(PropertyOrderAttribute)]; + if (attribute != null) + { + // + // If the attribute is found, then create an pair object to hold it + // + PropertyOrderAttribute poa = (PropertyOrderAttribute)attribute; + orderedProperties.Add(new PropertyOrderPair(pd.Name, poa.Order)); + } + else + { + // + // If no order attribute is specifed then given it an order of 0 + // + orderedProperties.Add(new PropertyOrderPair(pd.Name, 0)); + } + } + // + // Perform the actual order using the value PropertyOrderPair classes + // implementation of IComparable to sort + // + orderedProperties.Sort(); + // + // Build a string list of the ordered names + // + ArrayList propertyNames = new ArrayList(); + foreach (PropertyOrderPair pop in orderedProperties) + { + propertyNames.Add(pop.Name.ToString()); + } + // + // Pass in the ordered list for the PropertyDescriptorCollection to sort by + // + return pdc.Sort((string[])propertyNames.ToArray(typeof(string))); + } + #endregion +} + +#region Helper Class - PropertyOrderAttribute +[AttributeUsage(AttributeTargets.Property | AttributeTargets.Module)] +public class PropertyOrderAttribute : Attribute +{ + // + // Simple attribute to allow the order of a property to be specified + // + private int _order; + public PropertyOrderAttribute(int order) + { + _order = order; + } + + public int Order + { + get + { + return _order; + } + } +} +#endregion + +#region Helper Class - PropertyOrderPair +public class PropertyOrderPair : IComparable +{ + private int _order; + private string _name; + public string Name + { + get + { + return _name; + } + } + public int Order + { + get + { + return _order; + } + } + + public PropertyOrderPair(string name, int order) + { + _order = order; + _name = name; + } + + public int CompareTo(object obj) + { + // + // Sort the pair objects by ordering by order value + // Equal values get the same rank + // + int otherOrder = ((PropertyOrderPair)obj)._order; + if (otherOrder == _order) + { + // + // If order not specified, sort by name + // + string otherName = ((PropertyOrderPair)obj)._name; + return string.Compare(_name, otherName); + } + else if (otherOrder > _order) + { + return -1; + } + return 1; + } +} +#endregion diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/AxisInfo.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/AxisInfo.cs new file mode 100644 index 00000000..8d8b85c0 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/AxisInfo.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[Serializable] +public class AxisInfo +{ + /// + /// 轴号 + /// + public int AxisNum { get; set; } + + /// + /// 轴名称 + /// + public string AxisName { get; set; } + + /// + /// 轴移动类型 + /// + public AxisMoveType MoveType { get; set; } = AxisMoveType.Position; + + /// + /// 轴归零功能 + /// + public bool GoHome { get; set; } + + /// + /// 轴置零功能 + /// + public bool SetZero { get; set; } + + /// + /// 当前轴最小角度值 + /// + public double MinAngle { get; set; } + + /// + /// 当前轴最大角度值 + /// + public double MaxAngle { get; set; } + + /// + /// 当前轴最小移动速度 + /// + public double MinMoveSpeed { get; set; } + + /// + /// 当前轴最大移动速度 + /// + public double MaxMoveSpeed { get; set; } + + /// + /// 轴当前位置 + /// + public double CurrentAngle { get; set; } + + ///// + ///// 轴目标位置 + ///// + //public double TargetAngle { get; set; } + + /// + /// 轴当前速度 + /// + public double CurrentSpeed { get; set; } + + ///// + ///// 要设置的轴速度 + ///// + //public double Speed { get; set; } +} + +/// +/// 轴移动类型 +/// 达位运动,步进运动 +/// +public enum AxisMoveType { Position, Step } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs new file mode 100644 index 00000000..6bb22f7d --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(BaseStationTesterAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class BaseStationTesterAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public BaseStationTesterAddrConfig() + { + this.DeviceTypeConfig = DeviceType.BaseStationTester; + } + + BaseStationTesterType _deviceModelConfig = BaseStationTesterType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public BaseStationTesterType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs new file mode 100644 index 00000000..77b2e4fd --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(ChannelEmulatorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class ChannelEmulatorAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public ChannelEmulatorAddrConfig() + { + this.DeviceTypeConfig = DeviceType.ChannelEmulator; + } + + ChannelEmulatorType _deviceModelConfig = ChannelEmulatorType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public ChannelEmulatorType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs new file mode 100644 index 00000000..320e4fb2 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(CommunicationTesterAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class CommunicationTesterAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public CommunicationTesterAddrConfig() + { + this.DeviceTypeConfig = DeviceType.CommunicationTester; + } + + CommunicationTesterType _deviceModelConfig = CommunicationTesterType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public CommunicationTesterType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs new file mode 100644 index 00000000..7383c638 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[Serializable] +[DeviceTable] +[SugarTable(null, "设备信息表")] +public class DeviceAddrConfig : EntityBase +{ + [SugarColumn(ColumnDescription = "设备名称", Length = 32), Required, MaxLength(32)] + [Description("Set the name of the device,and it cannot be repeated."), Category("Basic Parameters"), DisplayName("Device Name"), Browsable(true)] + public string DeviceNameConfig { get; set; } = ""; + + [SugarColumn(ColumnDescription = "设备类型")] + [Description("Set the type of the device."), Category("Basic Parameters"), DisplayName("Device Type")] + public virtual DeviceType DeviceTypeConfig { get; set; } = DeviceType.BaseStationTester; + + [SugarColumn(ColumnDescription = "设备型号")] + [Description("Set the model of the device."), Category("Basic Parameters"), DisplayName("Device Model"), Browsable(true)] + public int DeviceModelConfig { get; set; } = 0; + + [SugarColumn(ColumnDescription = "通讯类型")] + [Description("Set the communication type of the device."), Category("Communication Parameters"), DisplayName("Communication Type"), Browsable(true)] + public CommunicationType CommunicationTypeConfig { get; set; } = CommunicationType.Socket; + + [SugarColumn(ColumnDescription = "IP地址", Length = 32), Required, MaxLength(32)] + [Description("Communication address setting. IP address or serial port number (for example: COM3)"), Category("Communication Parameters"), DisplayName("Communication Address"), Browsable(true)] + public string AddrConfig { get; set; } = ""; + + [SugarColumn(ColumnDescription = "端口号")] + [Description("Set the port number of the device.It is enabled when the 'Whether to use visa protocol?' parameter is set to false and the communication type is set to 'socket'."), Category("Communication Parameters"), DisplayName("Port"), Browsable(true)] + public int PortConfig { get; set; } = 0; + + [SugarColumn(ColumnDescription = "用户名", Length = 32), Required, MaxLength(32)] + [Description("Communication user name setting."), Category("Communication Parameters"), DisplayName("Communication UserName"), Browsable(true)] + public string? UserName { get; set; } = ""; + + [SugarColumn(ColumnDescription = "密码", Length = 32), Required, MaxLength(32)] + [Description("Communication password setting."), Category("Communication Parameters"), DisplayName("Communication Password"), Browsable(true)] + public string? Password { get; set; } = ""; + + [SugarColumn(ColumnDescription = "管理员用户名", Length = 32), Required, MaxLength(32)] + [Description("Communication admin user name setting."), Category("Communication Parameters"), DisplayName("Communication Admin UserName"), Browsable(true)] + public string? AdminUserName { get; set; } = ""; + + [SugarColumn(ColumnDescription = "管理员密码", Length = 32), Required, MaxLength(32)] + [Description("Communication admin password setting."), Category("Communication Parameters"), DisplayName("Communication Admin Password"), Browsable(true)] + public string? AdminPassword { get; set; } = ""; + + [SugarColumn(ColumnDescription = "连接地址", Length = 32), Required, MaxLength(32)] + [Description("The actual communication address.It is automatically generated."), Category("Communication Parameters"), DisplayName("Actual Communication Address"), Browsable(false)] + public string? RealAddrConfig { get; set; } = ""; + + [SugarColumn(ColumnDescription = "VISA协议")] + [Description("Whether to use visa protocol?"), Category("Communication Parameters"), DisplayName("Whether to use visa protocol?"), Browsable(true)] + public bool UseVisaProgrammerConfig { get; set; } = false; + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DevicesConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DevicesConfig.cs new file mode 100644 index 00000000..a7600607 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DevicesConfig.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; +[SerializableAttribute] +public class DevicesConfig +{ + public DevicesConfig() + { + + } + + List _turntableListConfig = new List(); + [Description("Turntable List"), Category("Turntable List Configuration"), DisplayName("Turntable List")] + public List TurntableListConfig { get => _turntableListConfig; set => _turntableListConfig = value; } + + List _highSpeedSwitchBoxListConfig = new List(); + [Description("High Speed Switch Box List"), Category("High Speed Switch Box List Configutation"), DisplayName("High Speed Switch Box List")] + public List HighSpeedSwitchBoxListConfig { get => _highSpeedSwitchBoxListConfig; set => _highSpeedSwitchBoxListConfig = value; } + + List _scannerListConfig = new List(); + [Description("Scanner List"), Category("Scanner List Configuration"), DisplayName("Scanner List")] + public List ScannerListConfig { get => _scannerListConfig; set => _scannerListConfig = value; } + + List _switchBoxListConfig = new List(); + [Description("Switch Box List"), Category("Switch Box List Configutation"), DisplayName("Switch Box List")] + public List SwitchBoxListConfig { get => _switchBoxListConfig; set => _switchBoxListConfig = value; } + + List _spectrumAnalyzerListConfig = new List(); + [Description("Spectrum Analyzer List"), Category("Spectrum Analyzer List Configuration"), DisplayName("Spectrum Analyzer List")] + public List SpectrumAnalyzerListConfig { get => _spectrumAnalyzerListConfig; set => _spectrumAnalyzerListConfig = value; } + + List _networkAnalyzerListConfig = new List(); + [Description("Network Analyzer List"), Category("Network Analyzer List Configuration"), DisplayName("Network Analyzer List")] + public List NetworkAnalyzerListConfig { get => _networkAnalyzerListConfig; set => _networkAnalyzerListConfig = value; } + + List _baseStationTesterListConfig = new List(); + [Description("Base Station List"), Category("Base Station List Configutation"), DisplayName("Base Station List")] + public List BaseStationTesterListConfig { get => _baseStationTesterListConfig; set => _baseStationTesterListConfig = value; } + + List _channelEmulatorListConfig = new List(); + [Description("Channal Emulator List"), Category("Channal Emulator List Configuration"), DisplayName("Channal Emulator List")] + public List ChannelEmulatorListConfig { get => _channelEmulatorListConfig; set => _channelEmulatorListConfig = value; } + + List _communicationTesterListConfig = new List(); + [Description("Communication Tester List"), Category("Communication Tester List Configuration"), DisplayName("Communication Tester List")] + public List CommunicationTesterListConfig { get => _communicationTesterListConfig; set => _communicationTesterListConfig = value; } + + List _specialEquipmentListConfig = new List(); + [Description("Special Equipment List"), Category("Special Equipment List Configuration"), DisplayName("Special Equipment List")] + public List SpecialEquipmentListConfig { get => _specialEquipmentListConfig; set => _specialEquipmentListConfig = value; } + + List _ueEquipmentListConfig = new List(); + [Description("UE List"), Category("UE List Configuration"), DisplayName("UE List")] + public List UEEquipmentListConfig { get => _ueEquipmentListConfig; set => _ueEquipmentListConfig = value; } + + List _ueMonitorListConfig = new List(); + [Description("UE Monitor List"), Category("UE Monitor List Configuration"), DisplayName("UE Monitor List")] + public List UEMonitorListConfig { get => _ueMonitorListConfig; set => _ueMonitorListConfig = value; } + + List _signalGeneratorListConfig = new List(); + [Description("Signal Generator List"), Category("Signal Generator List Configuration"), DisplayName("Signal Generator List")] + public List SignalGeneratorListConfig { get => _signalGeneratorListConfig; set => _signalGeneratorListConfig = value; } + + List _programmableAttenuatorListConfig = new List(); + [Description("Programmable Attenuator List"), Category("Programmable Attenuator List Configuration"), DisplayName("Programmable Attenuator List")] + public List ProgrammableAttenuatorListConfig { get => _programmableAttenuatorListConfig; set => _programmableAttenuatorListConfig = value; } + + List _phaseShifterListConfig = new List(); + [Description("Phase Shifter List"), Category("Phase Shifter List Configuration"), DisplayName("Phase Shifter List")] + public List PhaseShifterListConfig { get => _phaseShifterListConfig; set => _phaseShifterListConfig = value; } + + List _wirelessRoadMeasuringInstrumentListConfig = new List(); + [Description("Wireless Road Measuring Instrument List"), Category("Wireless Road Measuring Instrument List Configuration"), DisplayName("Wireless Road Measuring Instrument List")] + public List WirelessRoadMeasuringInstrumentListConfig { get => _wirelessRoadMeasuringInstrumentListConfig; set => _wirelessRoadMeasuringInstrumentListConfig = value; } + + List _powerConsumptionTesterListConfig = new List(); + [Description("Power Consumption Tester List"), Category("Power Consumption Tester List Configuration"), DisplayName("Power Consumption Tester List")] + public List PowerConsumptionTesterListConfig { get => _powerConsumptionTesterListConfig; set => _powerConsumptionTesterListConfig = value; } + + List _networkDamageTesterListConfig = new List(); + [Description("Network Damage Tester List"), Category("Network Damage Tester List Configuration"), DisplayName("Network Damage Tester List")] + public List NetworkDamageTesterListConfig { get => _networkDamageTesterListConfig; set => _networkDamageTesterListConfig = value; } + + List _interferenceGeneratorListConfig = new List(); + [Description("Interference Generator List"), Category("Interference Generator List Configuration"), DisplayName("Interference Generator List")] + public List InterferenceGeneratorListConfig { get => _interferenceGeneratorListConfig; set => _interferenceGeneratorListConfig = value; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs new file mode 100644 index 00000000..607e652c --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(HighSpeedSwitchBoxAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class HighSpeedSwitchBoxAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public HighSpeedSwitchBoxAddrConfig() + { + this.DeviceTypeConfig = DeviceType.HighSpeedSwitchBox; + } + + HighSpeedSwitchBoxType _deviceModelConfig = HighSpeedSwitchBoxType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public HighSpeedSwitchBoxType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs new file mode 100644 index 00000000..2522403f --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(InterferenceGeneratorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class InterferenceGeneratorAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public InterferenceGeneratorAddrConfig() + { + this.DeviceTypeConfig = DeviceType.InterferenceGenerator; + } + + InterferenceGeneratorType _deviceModelConfig = InterferenceGeneratorType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public InterferenceGeneratorType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs new file mode 100644 index 00000000..c783d2d5 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(NetworkAnalyzerAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class NetworkAnalyzerAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public NetworkAnalyzerAddrConfig() + { + this.DeviceTypeConfig = DeviceType.NetworkAnalyzer; + } + + NetworkAnalyzerType _deviceModelConfig = NetworkAnalyzerType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public NetworkAnalyzerType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs new file mode 100644 index 00000000..feb6cf75 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(NetworkDamageTesterAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class NetworkDamageTesterAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public NetworkDamageTesterAddrConfig() + { + this.DeviceTypeConfig = DeviceType.NetworkDamageTester; + } + + NetworkDamageTesterType _deviceModelConfig = NetworkDamageTesterType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public NetworkDamageTesterType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs new file mode 100644 index 00000000..7204fdae --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(ProgrammableAttenuatorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class PhaseShifterAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public PhaseShifterAddrConfig() + { + this.DeviceTypeConfig = DeviceType.PhaseShifter; + } + + PhaseShifterType _deviceModelConfig = PhaseShifterType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public PhaseShifterType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs new file mode 100644 index 00000000..695c2af7 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(PowerConsumptionTesterAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class PowerConsumptionTesterAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public PowerConsumptionTesterAddrConfig() + { + this.DeviceTypeConfig = DeviceType.PowerConsumptionTester; + } + + PowerConsumptionTesterType _deviceModelConfig = PowerConsumptionTesterType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public PowerConsumptionTesterType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs new file mode 100644 index 00000000..118a6187 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(ProgrammableAttenuatorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class ProgrammableAttenuatorAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public ProgrammableAttenuatorAddrConfig() + { + this.DeviceTypeConfig = DeviceType.ProgrammableAttenuator; + } + + ProgrammableAttenuatorType _deviceModelConfig = ProgrammableAttenuatorType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public ProgrammableAttenuatorType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs new file mode 100644 index 00000000..398bbf66 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(ScannerAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class ScannerAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public ScannerAddrConfig() + { + this.DeviceTypeConfig = DeviceType.Scanner; + } + + ScannerType _deviceModelConfig = ScannerType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public ScannerType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs new file mode 100644 index 00000000..ba8304be --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(SignalGeneratorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class SignalGeneratorAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public SignalGeneratorAddrConfig() + { + this.DeviceTypeConfig = DeviceType.SignalGenerator; + } + + SignalGeneratorType _deviceModelConfig = SignalGeneratorType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public SignalGeneratorType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs new file mode 100644 index 00000000..a706fef1 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(SpecialEquipmentAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class SpecialEquipmentAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public SpecialEquipmentAddrConfig() + { + this.DeviceTypeConfig = DeviceType.SpecialEquipment; + } + + SpecialEquipmentType _deviceModelConfig = SpecialEquipmentType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public SpecialEquipmentType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs new file mode 100644 index 00000000..847e38a6 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(SpectrumAnalyzerAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class SpectrumAnalyzerAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public SpectrumAnalyzerAddrConfig() + { + this.DeviceTypeConfig = DeviceType.SpectrumAnalyzer; + } + + SpectrumAnalyzerType _deviceModelConfig = SpectrumAnalyzerType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public SpectrumAnalyzerType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs new file mode 100644 index 00000000..fed800e7 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(SwitchBoxAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class SwitchBoxAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public SwitchBoxAddrConfig() + { + this.DeviceTypeConfig = DeviceType.SwitchBox; + } + + SwitchBoxType _deviceModelConfig = SwitchBoxType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public SwitchBoxType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs new file mode 100644 index 00000000..58c503e6 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(TurntableAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class TurntableAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public TurntableAddrConfig() + { + this.DeviceTypeConfig = DeviceType.Turntable; + } + + TurntableType _deviceModelConfig = TurntableType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public TurntableType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + [Description("Axis information set added for position box."), Category("Communication Parameters"), DisplayName("Axis Information Collection"), Browsable(false)] + public List AxisInfoListConfig { get; set; } = new List(); + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs new file mode 100644 index 00000000..a4acb39a --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(UEMonitorAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class UEMonitorAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public UEMonitorAddrConfig() + { + this.DeviceTypeConfig = DeviceType.UeMonitor; + } + + UeMonitorType _deviceModelConfig = UeMonitorType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public UeMonitorType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs new file mode 100644 index 00000000..4ee146d7 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(UserEquipmentAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class UserEquipmentAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public UserEquipmentAddrConfig() + { + this.DeviceTypeConfig = DeviceType.UserEquipment; + } + + UserEquipmentType _deviceModelConfig = UserEquipmentType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public UserEquipmentType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + [Description("Communication root password setting."), Category("Communication Parameters"), DisplayName("Communication Root Password"), Browsable(true)] + public string RootPassword { get; set; } = ""; + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs new file mode 100644 index 00000000..23061bbb --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace MTNet.Application.Entity; + +[SerializableAttribute] +[XmlInclude(typeof(WirelessRoadMeasuringInstrumentAddrConfig))] +[XmlInclude(typeof(DeviceAddrConfig))] +public class WirelessRoadMeasuringInstrumentAddrConfig : DeviceAddrConfig +{ + public override DeviceType DeviceTypeConfig { get; set; } + /// + /// 构造函数 + /// + public WirelessRoadMeasuringInstrumentAddrConfig() + { + this.DeviceTypeConfig = DeviceType.WirelessRoadMeasuringInstrument; + } + + WirelessRoadMeasuringInstrumentType _deviceModelConfig = WirelessRoadMeasuringInstrumentType.Virtual; + [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] + public WirelessRoadMeasuringInstrumentType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/PAMapping.cs b/Admin.NET/MTNet.Application/Entity/PAMapping.cs new file mode 100644 index 00000000..70cb3ccb --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/PAMapping.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[DeviceTable] +[SugarTable(null, "程控映射表")] +public class PAMapping : EntityBase +{ + /// + /// 基站厂家 + /// + [SugarColumn(ColumnDescription = "基站厂家", Length = 32), Required, MaxLength(32)] + public string? BaseStationFactory { get; set; } = ""; + + /// + /// AAU频段 + /// + [SugarColumn(ColumnDescription = "AAU频段", Length = 32), Required, MaxLength(32)] + public string? AAUFrequencyBand { get; set; } = ""; + + /// + /// AAU频段编号 + /// + [SugarColumn(ColumnDescription = "AAU频段ID", Length = 32), Required, MaxLength(32)] + public string? AAUFrequencyBandId { get; set; } = ""; + + /// + /// 基站ID + /// + [SugarColumn(ColumnDescription = "基站ID")] + public int NodeBId { get; set; } + + /// + /// 小区ID + /// + [SugarColumn(ColumnDescription = "小区ID")] + public int CellId { get; set; } + + /// + /// 屏蔽房 + /// + [SugarColumn(ColumnDescription = "屏蔽房", Length = 32), Required, MaxLength(32)] + public string ShieldRoom { get; set; } = ""; + + /// + /// 程控IP + /// + [SugarColumn(ColumnDescription = "程控IP", Length = 32), Required, MaxLength(32)] + public string Address { get; set; } = ""; + + /// + /// 输入端口 + /// + [SugarColumn(ColumnDescription = "输入端口")] + public int InputPort { get; set; } + + /// + /// 输出端口 + /// + [SugarColumn(ColumnDescription = "输出端口")] + public int OutputPort { get; set; } + + /// + /// 初始功率 + /// + [SugarColumn(ColumnDescription = "初始功率")] + public double InitialPower { get; set; } + + public override string ToString() + { + return $"{NodeBId}-{CellId},{Address},{InputPort},{OutputPort}"; + } +} diff --git a/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs b/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs new file mode 100644 index 00000000..a4ddedcf --- /dev/null +++ b/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +[Description("设备类型枚举")] +public enum DeviceType +{ + [Description("基站")] + BaseStationTester, + [Description("信道仿真器")] + ChannelEmulator, + [Description("综合测试仪")] + CommunicationTester, + [Description("网络分析仪")] + NetworkAnalyzer, + [Description("信号源")] + SignalGenerator, + [Description("特殊设备")] + SpecialEquipment, + [Description("频谱分析仪")] + SpectrumAnalyzer, + [Description("无线路测仪")] + WirelessRoadMeasuringInstrument, + [Description("功率测试仪")] + PowerConsumptionTester, + [Description("网络损伤仪")] + NetworkDamageTester, + [Description("干扰发生器")] + InterferenceGenerator, + [Description("转台")] + Turntable, + [Description("扫描架")] + Scanner, + [Description("开关箱")] + SwitchBox, + [Description("高速开关箱")] + HighSpeedSwitchBox, + [Description("调相网络")] + PhaseShifter, + [Description("程控矩阵")] + ProgrammableAttenuator, + [Description("终端")] + UserEquipment, + [Description("终端模拟器")] + UeMonitor, +} + +public enum NetworkTypeEnum { GSM, WCDMA, LTE, NR, WLAN, BT } +public enum CommunicationType { Serial_Port, Socket, GPIB, USB, HTTP, SSH } + +public enum BaseStationTesterType { ZTE, Nokia, Huawei, Ericsson, Virtual } +public enum ChannelEmulatorType { Keyseight_F64, Spirent_Vertex, Virtual } +public enum CommunicationTesterType { MT8000A_NR, SP9500_NR, Virtual } +public enum NetworkAnalyzerType { E5071C, N5230C, N5225A, M9804A, ZNA, ZNB, ZND, Ceyear3672, Virtual } +public enum SignalGeneratorType { E4438C, N5182A, SMW200A, M9384B, E8267D, SMBV100B, ZSA_S6000, Virtual } +public enum SpecialEquipmentType { Virtual } +public enum SpectrumAnalyzerType { N9040B, FSW, ZSA_F6000, Virtual } +public enum WirelessRoadMeasuringInstrumentType { WSW, Virtual } +public enum PowerConsumptionTesterType { UDP3305S, Virtual } +public enum NetworkDamageTesterType { Spirent, Virtual } +public enum InterferenceGeneratorType { Virtual } +public enum TurntableType { HBTE, HansRobot, Maturo, Virtual } +public enum ScannerType { Virtual } +public enum SwitchBoxType { Virtual } +public enum HighSpeedSwitchBoxType { Virtual } +public enum PhaseShifterType { HBTE, Virtual } +public enum ProgrammableAttenuatorType { HBTE, TopYoung, Virtual } +public enum UserEquipmentType { Android, Tbox, Virtual } +public enum UeMonitorType { DoToutch, E500, Virtual } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Enum/TestTypeEnum.cs b/Admin.NET/MTNet.Application/Enum/TestTypeEnum.cs new file mode 100644 index 00000000..aaf0cc80 --- /dev/null +++ b/Admin.NET/MTNet.Application/Enum/TestTypeEnum.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +public enum TestType +{ + #region Calibration + [Description("线缆测量"), Category("校准测试"), CategoryIndex(0), Browsable(false)] + LossMeasurementTestCase, + [Description("系统校准-网分"), Category("校准测试"), CategoryIndex(0), Browsable(false)] + NetworkAnalyzerCalibrationTestCase, + [Description("系统校准-频谱仪"), Category("校准测试"), CategoryIndex(0), Browsable(false)] + SpectrumAnalyzerCalibrationTestCase, + #endregion + + #region 5G无线接入网功能测试 + [Description("无线网:100MHz载波带宽、30kHz子载波间隔测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationCarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase, + [Description("无线网:30MHz载波带宽、15kHz子载波间隔测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationCarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase, + [Description("无线网:下行PDSCH自适应调制与编码测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationAdaptiveModulationCoding_PDSCHTestCase, + [Description("无线网:上行PUSCH自适应调制与编码测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationAdaptiveModulationCoding_PUSCHTestCase, + [Description("无线网:系统广播信息的调度和传输(源自AMF或OAM)测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationSystemInformationBroadcastTestCase, + [Description("无线网:gNB内的同频切换测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationSameFrequencySwitching_Intra_gNBTestCase, + [Description("无线网:基于3GPP CDL信道模型不同运动速度下的吞吐量测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStation3GPPCDChannelModelThroughputTestAtDifferentSpeedTestCase, + [Description("无线网:基于3GPP CDL信道模型不同噪声、不同信号下的拉远测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStation3GPPCDChannelModelThroughputTestAtDifferentNoiseTestCase, + #endregion + + #region 5G无线网射频测试 + [Description("无线网:发射机测试-发射功率测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterOutputPowerTestCase, + [Description("无线网:发射机测试-总功率动态范围测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterTotalPowerDynamicRangeTestCase, + [Description("无线网:发射机测试-关断功率和过渡时间测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterTurnOffPowerAndTransitionTimeTestCase, + [Description("无线网:发射机测试-频率误差测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterFrequencyErrorTestCase, + [Description("无线网:发射机测试-EVM测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterEVMTestCase, + [Description("无线网:发射机测试-MIMO定时误差(TAE)测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterTAETestCase, + [Description("无线网:发射机测试-占用带宽(OBW)测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterOBWTestCase, + [Description("无线网:发射机测试-邻道抑制比ACLR测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterACLRTestCase, + [Description("无线网:发射机测试-频谱模板SEM/OBUE测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationTransmitterOBUETestCase, + [Description("无线网:发射机测试-关键频段的频谱杂散测试"), Category("5G无线接入网功能测试"), Browsable(true)] + BaseStationTransmitterSpecialBandSpuriousEmissionsTestCase, + [Description("无线网:接收机测试-接收机灵敏度测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationReceiverSensitivityTestCase, + [Description("无线网:接收机测试-动态范围测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationReceiverDynamicRangeTestCase, + [Description("无线网:接收机测试-邻道选择性(ACS)测试"), Category("5G无线接入网功能测试"), Browsable(true)] + BaseStationReceiverACSTestCase, + [Description("无线网:接收机测试-阻塞测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationReceiverBlockageTestCase, + [Description("无线网:接收机测试-信道内选择性测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] + BaseStationReceiverChannelSelectivityTestCase, + + #endregion + + + #region 5G无线网性能测试 + [Description("无线网:多用户接入(模拟至少1000UE)测试"), Category("5G无线接入网性能测试"), CategoryIndex(2), Browsable(true)] + BaseStationMultiUserAccessTestCase, + #endregion + + #region 5G终端功能测试 + [Description("终端:100MHz载波带宽、30kHz子载波间隔测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UECarrierBandwidthAndParameterSet_100MHzBandWidthAnd30kHzSubcarrierSpacingTestCase, + [Description("终端:30MHz载波带宽、15kHz子载波间隔测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UECarrierBandwidthAndParameterSet_30MHzBandWidthAnd15kHzSubcarrierSpacingTestCase, + [Description("终端:Step2随机接入测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEStep2RandomAccessTestCase, + [Description("终端:Step4随机接入测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEStep4RandomAccessTestCase, + [Description("终端:加密/解密测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEEncryptionAndDecryptionTestCase, + [Description("终端:完整性保护测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEIntegrityTestCase, + [Description("终端:gNB内的同频切换测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UESameFrequencySwithing_Intra_gNBTestCase, + [Description("终端:VoNR用户呼叫VoNR用户测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEVoiceCallBetweenVONRsTestCase, + + [Description("终端:基于3GPP CDL信道模型终端吞吐量测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UE3GPPCDChannelModelThroughputTestCase, + [Description("终端:基于3GPP 标准的终端OTA拉远测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UE3GPPStretchTestCase, + + [Description("终端:最大发射功率测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEMaximumTransmittingPowerTestCase, + [Description("终端:发射功率回退测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UETransmitPowerRolledBackTestCase, + [Description("终端:发射信号质量测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UETransmittedSignalQualityTestCase, + + [Description("终端:待机功耗测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEStandbyPowerConsumptionTestCase, + [Description("终端:数据业务功耗测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] + UEDataTrafficPowerConsumptionTestCase, + #endregion + + #region 5G终端性能测试 + [Description("终端:终端峰值速率测试"), Category("5G终端性能测试"), CategoryIndex(4), Browsable(true)] + UEPeakRateTestCase, + #endregion +} diff --git a/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs b/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs new file mode 100644 index 00000000..fb433509 --- /dev/null +++ b/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs @@ -0,0 +1,120 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using MTNet.Application.Entity; + +namespace MTNet.Application; + +/// +/// 系统应用表种子数据 +/// +public class DeviceSeedData : ISqlSugarEntitySeedData +{ + /// + /// 种子数据 + /// + /// + public IEnumerable HasData() + { + return new[] + { + //基站 + new DeviceAddrConfig { DeviceNameConfig = "ZTE", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.ZTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "10.92.243.190", PortConfig = 2443, UserName = "Test-op", Password = "123456Mt!@#", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Nokia74", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.Nokia, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "180.18.132.74", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Nokia79", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.Nokia, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "180.18.132.79", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Huawei", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.Huawei, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "178.16.10.184", PortConfig = 31114, UserName = "mtnet_test", Password = "Caict123.", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Ericsson", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.Ericsson, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.168.131", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VBS", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //信道仿真器 + new DeviceAddrConfig { DeviceNameConfig = "F64", DeviceTypeConfig = DeviceType.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorType.Keyseight_F64, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Vertex", DeviceTypeConfig = DeviceType.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorType.Spirent_Vertex, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VCE", DeviceTypeConfig = DeviceType.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //综合测试仪 + new DeviceAddrConfig { DeviceNameConfig = "MT8000A", DeviceTypeConfig = DeviceType.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterType.MT8000A_NR, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VCT", DeviceTypeConfig = DeviceType.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //网络分析仪 + new DeviceAddrConfig { DeviceNameConfig = "E5071C", DeviceTypeConfig = DeviceType.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerType.E5071C, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VNA", DeviceTypeConfig = DeviceType.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //信号源 + new DeviceAddrConfig { DeviceNameConfig = "ZSA", DeviceTypeConfig = DeviceType.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorType.ZSA_S6000, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VSG", DeviceTypeConfig = DeviceType.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //特殊设备 + new DeviceAddrConfig { DeviceNameConfig = "VSE", DeviceTypeConfig = DeviceType.SpecialEquipment, DeviceModelConfig = (int)SpecialEquipmentType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //频谱分析仪 + new DeviceAddrConfig { DeviceNameConfig = "N9040B", DeviceTypeConfig = DeviceType.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerType.N9040B, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "FSW", DeviceTypeConfig = DeviceType.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerType.FSW, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "ZSA", DeviceTypeConfig = DeviceType.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerType.ZSA_F6000, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VSA", DeviceTypeConfig = DeviceType.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //无线路测仪 + new DeviceAddrConfig { DeviceNameConfig = "WSW", DeviceTypeConfig = DeviceType.WirelessRoadMeasuringInstrument, DeviceModelConfig = (int)WirelessRoadMeasuringInstrumentType.WSW, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VRM", DeviceTypeConfig = DeviceType.WirelessRoadMeasuringInstrument, DeviceModelConfig = (int)WirelessRoadMeasuringInstrumentType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //功率测试仪 + new DeviceAddrConfig { DeviceNameConfig = "UDP3305S", DeviceTypeConfig = DeviceType.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterType.UDP3305S, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VPC", DeviceTypeConfig = DeviceType.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //网络损伤仪 + new DeviceAddrConfig { DeviceNameConfig = "Spirent", DeviceTypeConfig = DeviceType.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterType.Spirent, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VND", DeviceTypeConfig = DeviceType.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //干扰发生器 + new DeviceAddrConfig { DeviceNameConfig = "VIG", DeviceTypeConfig = DeviceType.InterferenceGenerator, DeviceModelConfig = (int)InterferenceGeneratorType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //转台 + new DeviceAddrConfig { DeviceNameConfig = "HBTE252", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.252", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "HBTE253", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.253", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "HBTE254", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "HansRobot", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.HansRobot, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Maturo", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.Maturo, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VTT", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //扫描架 + new DeviceAddrConfig { DeviceNameConfig = "VSC", DeviceTypeConfig = DeviceType.Scanner, DeviceModelConfig = (int)ScannerType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //开关箱 + new DeviceAddrConfig { DeviceNameConfig = "VSB", DeviceTypeConfig = DeviceType.SwitchBox, DeviceModelConfig = (int)SwitchBoxType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //高速开关箱 + new DeviceAddrConfig { DeviceNameConfig = "VHS", DeviceTypeConfig = DeviceType.HighSpeedSwitchBox, DeviceModelConfig = (int)HighSpeedSwitchBoxType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //调相网络 + new DeviceAddrConfig { DeviceNameConfig = "HBTE", DeviceTypeConfig = DeviceType.PhaseShifter, DeviceModelConfig = (int)PhaseShifterType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VSG", DeviceTypeConfig = DeviceType.PhaseShifter, DeviceModelConfig = (int)PhaseShifterType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //程控矩阵 + new DeviceAddrConfig { DeviceNameConfig = "PA130", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA131", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.131", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA132", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.132", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA133", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.133", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA134", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.134", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA135", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.135", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA136", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.136", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA137", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.137", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA245", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.245", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA246", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.246", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA247", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.247", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA248", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.248", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA249", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.249", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VPA", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //终端 + new DeviceAddrConfig { DeviceNameConfig = "Android", DeviceTypeConfig = DeviceType.UserEquipment, DeviceModelConfig = (int)UserEquipmentType.Android, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VUE", DeviceTypeConfig = DeviceType.UserEquipment, DeviceModelConfig = (int)UserEquipmentType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //终端模拟器 + new DeviceAddrConfig { DeviceNameConfig = "DoToutch", DeviceTypeConfig = DeviceType.UeMonitor, DeviceModelConfig = (int)UeMonitorType.DoToutch, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "E500", DeviceTypeConfig = DeviceType.UeMonitor, DeviceModelConfig = (int)UeMonitorType.E500, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VUM", DeviceTypeConfig = DeviceType.UeMonitor, DeviceModelConfig = (int)UeMonitorType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + }; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/SeedData/PAMappingSeedData.cs b/Admin.NET/MTNet.Application/SeedData/PAMappingSeedData.cs new file mode 100644 index 00000000..2ea9ab19 --- /dev/null +++ b/Admin.NET/MTNet.Application/SeedData/PAMappingSeedData.cs @@ -0,0 +1,121 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.SeedData; + +/// +/// 程控映射表种子数据 +/// +public class PAMappingSeedData : ISqlSugarEntitySeedData +{ + /// + /// 种子数据 + /// + /// + public IEnumerable HasData() + { + return new[] + { + //屏蔽房2 + //9292-15 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-13 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 17, OutputPort = 2, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 17, OutputPort = 2, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9292-17 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 17, OutputPort = 2, InitialPower = -87, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 17, OutputPort = 2, InitialPower = -87, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-16 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9191-7 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 7, ShieldRoom = "2", Address = "192.168.1.245", InputPort = 21, OutputPort = 2, InitialPower = -79, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 10, ShieldRoom = "2", Address = "192.168.1.246", InputPort = 21, OutputPort = 2, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9191-5 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 5, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 22, OutputPort = 2, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 5, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 22, OutputPort = 2, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9191-15 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 15, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 22, OutputPort = 2, InitialPower = -71, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 15, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 22, OutputPort = 2, InitialPower = -71, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //96-7 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 96, CellId = 7, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 17, OutputPort = 2, InitialPower = -75, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //96-8 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 96, CellId = 8, ShieldRoom = "2", Address = "192.168.1.247", InputPort = 8, OutputPort = 2, InitialPower = -74, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //96-9 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 96, CellId = 9, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 17, OutputPort = 2, InitialPower = -79, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //141-181 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 141, CellId = 181, ShieldRoom = "2", Address = "192.168.1.245", InputPort = 3, OutputPort = 2, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 141, CellId = 181, ShieldRoom = "2", Address = "192.168.1.246", InputPort = 3, OutputPort = 2, InitialPower = -70, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //屏蔽房3 + //9292-15 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.134", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.135", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.136", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.137", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-16 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.134", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.135", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.136", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.137", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + //屏蔽房6 + //9292-15 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-16 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-13 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 17, OutputPort = 6, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 17, OutputPort = 6, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9292-17 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 17, OutputPort = 6, InitialPower = -77, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 17, OutputPort = 6, InitialPower = -77, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-3 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.247", InputPort = 12, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.248", InputPort = 12, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.247", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.248", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9494-4 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9090-3 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //9090-7 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //520001-12 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + //520009-92 + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.130", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.131", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.132", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.133", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + + }; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs new file mode 100644 index 00000000..64ff1402 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs @@ -0,0 +1,146 @@ +using Admin.NET.Core.Service; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 设备接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Device", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class DeviceService : IDynamicApiController +{ + private readonly SqlSugarRepository _deviceRep; + private readonly UserManager _userManager; + + public DeviceService(SqlSugarRepository deviceRep, UserManager userManager) + { + _deviceRep = deviceRep; + _userManager = userManager; + } + + /// + /// 查询设备列表 🔖 + /// + /// + [DisplayName("查询设备列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList() + { + var query = _deviceRep.AsQueryable() + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 查询设备列表 🔖 + /// + /// + /// + [DisplayName("查询设备列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList(string keyword) + { + keyword = keyword?.Trim(); + var query = _deviceRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(keyword), u => u.DeviceNameConfig.Contains(keyword) + || u.DeviceTypeConfig.ToString().Contains(keyword) + || u.AddrConfig.Contains(keyword) + || u.UserName.Contains(keyword) + || u.Password.Contains(keyword)) + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 分页查询设备 🔖 + /// + /// + /// + [DisplayName("分页查询设备")] + [ApiDescriptionSettings(Name = "Page"), HttpPost] + public async Task> Page(BasePageInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _deviceRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.DeviceNameConfig.Contains(input.Keyword) + || u.DeviceTypeConfig.ToString().Contains(input.Keyword) + || u.AddrConfig.Contains(input.Keyword) + || u.UserName.Contains(input.Keyword) + || u.Password.Contains(input.Keyword)) + .OrderBy(u => u.Id) + .Select(); + + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加设备 🔖 + /// + /// + /// + [DisplayName("增加设备")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddDeviceAddrConfigInput input) + { + var entity = input.Adapt(); + var dtNow = DateTime.Now; + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + return await _deviceRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 更新设备 🔖 + /// + /// + /// + [DisplayName("更新设备")] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + public async Task Update(UpdateDeviceAddrConfigInput input) + { + _ = await _deviceRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var entity = input.Adapt(); + entity.UpdateTime = DateTime.Now; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + await _deviceRep.AsUpdateable(entity).ExecuteCommandAsync(); + } + + /// + /// 删除设备 🔖 + /// + /// + /// + [DisplayName("删除设备")] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + public async Task Delete(BaseIdInput input) + { + var entity = await _deviceRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + //// 禁止删除存在关联租户的应用 + //if (await _deviceRep.Context.Queryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1001); + + //// 禁止删除存在关联菜单的应用 + //if (await _sysAppMenuRep.AsQueryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1002); + + await _deviceRep.DeleteAsync(entity); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceAddrConfigInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceAddrConfigInput.cs new file mode 100644 index 00000000..cbd230cd --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceAddrConfigInput.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class AddDeviceAddrConfigInput +{ + [Required(ErrorMessage = "设备名称不能为空")] + public string DeviceNameConfig { get; set; } = ""; + + [Required(ErrorMessage = "设备类型不能为空")] + public virtual DeviceType DeviceTypeConfig { get; set; } = DeviceType.BaseStationTester; + + [Required(ErrorMessage = "设备型号不能为空")] + public int DeviceModelConfig { get; set; } = 0; + + [Required(ErrorMessage = "通讯方式不能为空")] + public CommunicationType CommunicationTypeConfig { get; set; } = CommunicationType.Socket; + + [Required(ErrorMessage = "IP地址不能为空")] + public string AddrConfig { get; set; } = ""; + + [Required(ErrorMessage = "端口号不能为空")] + public int PortConfig { get; set; } = 0; + + public string? UserName { get; set; } = ""; + + public string? Password { get; set; } = ""; + + public string? AdminUserName { get; set; } = ""; + + public string? AdminPassword { get; set; } = ""; + + public string? RealAddrConfig { get; set; } = ""; + + public bool UseVisaProgrammerConfig { get; set; } = false; + + public override string ToString() + { + return string.Format("{0}", DeviceNameConfig.ToString()); + } +} + +public class UpdateDeviceAddrConfigInput : AddDeviceAddrConfigInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs new file mode 100644 index 00000000..2f1385e5 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class AddPAMappingInput +{ + /// + /// 基站厂家 + /// + public string? BaseStationFactory { get; set; } = ""; + + /// + /// AAU频段 + /// + public string? AAUFrequencyBand { get; set; } = ""; + + /// + /// AAU频段编号 + /// + public string? AAUFrequencyBandId { get; set; } = ""; + + /// + /// 基站ID + /// + [Required(ErrorMessage = "基站ID不能为空")] + public int NodeBId { get; set; } + + /// + /// 小区ID + /// + [Required(ErrorMessage = "小区ID不能为空")] + public int CellId { get; set; } + + /// + /// 屏蔽房 + /// + [Required(ErrorMessage = "屏蔽房不能为空")] + public string ShieldRoom { get; set; } = ""; + + /// + /// 程控IP + /// + [Required(ErrorMessage = "程控IP不能为空")] + public string Address { get; set; } = ""; + + /// + /// 输入端口 + /// + [Required(ErrorMessage = "输入端口不能为空")] + public int InputPort { get; set; } + + /// + /// 输出端口 + /// + [Required(ErrorMessage = "输出端口不能为空")] + public int OutputPort { get; set; } + + /// + /// 初始功率 + /// + [Required(ErrorMessage = "初始功率不能为空")] + public double InitialPower { get; set; } +} + +public class UpdatePAMappingInput : AddPAMappingInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs b/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs new file mode 100644 index 00000000..faaec362 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs @@ -0,0 +1,156 @@ +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static SKIT.FlurlHttpClient.Wechat.Api.Models.CgibinGetCurrentAutoReplyInfoResponse.Types.KeywordAutoReplyRule.Types; + +namespace MTNet.Application.Service; + +/// +/// 程控映射表接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Mapping", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class PAMappingService : IDynamicApiController +{ + private readonly SqlSugarRepository _mappingRep; + private readonly UserManager _userManager; + + public PAMappingService(SqlSugarRepository mappingRep, UserManager userManager) + { + _mappingRep = mappingRep; + _userManager = userManager; + } + + /// + /// 查询映射列表 🔖 + /// + /// + [DisplayName("查询映射列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList() + { + var query = _mappingRep.AsQueryable() + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 查询映射列表 🔖 + /// + /// + /// + [DisplayName("查询映射列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList(string keyword) + { + keyword = keyword?.Trim(); + var query = _mappingRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(keyword), u => u.BaseStationFactory.Contains(keyword) + || u.AAUFrequencyBand.Contains(keyword) + || u.AAUFrequencyBandId.Contains(keyword) + || u.NodeBId.ToString().Contains(keyword) + || u.CellId.ToString().Contains(keyword) + || u.ShieldRoom.Contains(keyword) + || u.Address.Contains(keyword) + || u.InputPort.ToString().Contains(keyword) + || u.OutputPort.ToString().Contains(keyword) + || u.InitialPower.ToString().Contains(keyword)) + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 分页查询设备 🔖 + /// + /// + /// + [DisplayName("分页查询设备")] + [ApiDescriptionSettings(Name = "Page"), HttpPost] + public async Task> Page(BasePageInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _mappingRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.BaseStationFactory.Contains(input.Keyword) + || u.AAUFrequencyBand.Contains(input.Keyword) + || u.AAUFrequencyBandId.Contains(input.Keyword) + || u.NodeBId.ToString().Contains(input.Keyword) + || u.CellId.ToString().Contains(input.Keyword) + || u.ShieldRoom.Contains(input.Keyword) + || u.Address.Contains(input.Keyword) + || u.InputPort.ToString().Contains(input.Keyword) + || u.OutputPort.ToString().Contains(input.Keyword) + || u.InitialPower.ToString().Contains(input.Keyword)) + .OrderBy(u => u.Id) + .Select(); + + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加映射数据 🔖 + /// + /// + /// + [DisplayName("增加映射数据")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddPAMappingInput input) + { + var entity = input.Adapt(); + var dtNow = DateTime.Now; + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + return await _mappingRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 更新映射数据 🔖 + /// + /// + /// + [DisplayName("更新映射数据")] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + public async Task Update(UpdatePAMappingInput input) + { + _ = await _mappingRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var entity = input.Adapt(); + entity.UpdateTime = DateTime.Now; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + await _mappingRep.AsUpdateable(entity).ExecuteCommandAsync(); + } + + /// + /// 删除映射数据 🔖 + /// + /// + /// + [DisplayName("删除映射数据")] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + public async Task Delete(BaseIdInput input) + { + var entity = await _mappingRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + //// 禁止删除存在关联租户的应用 + //if (await _deviceRep.Context.Queryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1001); + + //// 禁止删除存在关联菜单的应用 + //if (await _sysAppMenuRep.AsQueryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1002); + + await _mappingRep.DeleteAsync(entity); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Report/ReportService.cs b/Admin.NET/MTNet.Application/Service/Report/ReportService.cs new file mode 100644 index 00000000..edf0015d --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Report/ReportService.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 报表接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Report", Order = 100)] +//[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)] +public class ReportService : IDynamicApiController +{ + private readonly UserManager _userManager; + + public ReportService(UserManager userManager) + { + _userManager = userManager; + } + + [ApiDescriptionSettings(Name = "page"), HttpGet] + [DisplayName("获取报表列表")] + public Task GetReportList() + { + return Task.FromResult($"Hello word. {_userManager.Account}"); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs new file mode 100644 index 00000000..570f13f0 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 模板接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Template", Order = 100)] +//[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)] +public class TemplateService : IDynamicApiController +{ + private readonly UserManager _userManager; + + public TemplateService(UserManager userManager) + { + _userManager = userManager; + } + + [ApiDescriptionSettings(Name = "Get"), HttpGet] + [DisplayName("获取模板列表")] + public Task GetTemplateList() + { + return Task.FromResult($"Hello word. {_userManager.Account}"); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Testing/TestingService.cs b/Admin.NET/MTNet.Application/Service/Testing/TestingService.cs new file mode 100644 index 00000000..f049419c --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Testing/TestingService.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 测试接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Testing", Order = 100)] +//[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)] +public class TestingService : IDynamicApiController +{ + private readonly UserManager _userManager; + + public TestingService(UserManager userManager) + { + _userManager = userManager; + } + + [ApiDescriptionSettings(Name = "page"), HttpGet] + [DisplayName("获取测试列表")] + public Task GetTestList() + { + return Task.FromResult($"Hello word. {_userManager.Account}"); + } +} \ No newline at end of file -- Gitee From c6adcfd024f1151d3f9b215abb8d20ebdfb32a9d Mon Sep 17 00:00:00 2001 From: wxh <906562008@qq.com> Date: Tue, 3 Dec 2024 15:11:05 +0800 Subject: [PATCH 03/84] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E6=B7=BB=E5=8A=A0=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/.env.development | 2 +- Web/src/api-services/api.ts | 3 +- Web/src/api-services/apis/sys-device-api.ts | 720 ++++++++++++++++++ .../test/device/component/editDevice.vue | 205 +++++ Web/src/views/test/device/index.vue | 151 ++++ 5 files changed, 1079 insertions(+), 2 deletions(-) create mode 100644 Web/src/api-services/apis/sys-device-api.ts create mode 100644 Web/src/views/test/device/component/editDevice.vue create mode 100644 Web/src/views/test/device/index.vue diff --git a/Web/.env.development b/Web/.env.development index ff6ad002..77917bbd 100644 --- a/Web/.env.development +++ b/Web/.env.development @@ -2,4 +2,4 @@ ENV = development # 本地环境接口地址 -VITE_API_URL = http://localhost:5005 \ No newline at end of file +VITE_API_URL = http://192.168.168.186:5005 \ No newline at end of file diff --git a/Web/src/api-services/api.ts b/Web/src/api-services/api.ts index d9e78c99..38da1e56 100644 --- a/Web/src/api-services/api.ts +++ b/Web/src/api-services/api.ts @@ -54,4 +54,5 @@ export * from './apis/sys-wechat-api'; export * from './apis/sys-wechat-pay-api'; export * from './apis/sys-wechat-user-api'; export * from './apis/sys-wx-open-api'; - +/**----------------------------------------- */ +export * from './apis/sys-device-api'; diff --git a/Web/src/api-services/apis/sys-device-api.ts b/Web/src/api-services/apis/sys-device-api.ts new file mode 100644 index 00000000..f6241dd4 --- /dev/null +++ b/Web/src/api-services/apis/sys-device-api.ts @@ -0,0 +1,720 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { AddSysAppInput } from '../models'; +import { AdminResultInt64 } from '../models'; +import { AdminResultListInt64 } from '../models'; +import { AdminResultLoginOutput } from '../models'; +import { AdminResultObject } from '../models'; +import { AdminResultSqlSugarPagedListSysAppOutput } from '../models'; +import { BaseIdInput } from '../models'; +import { BasePageInput } from '../models'; +import { ChangeAppInput } from '../models'; +import { UpdateAppMenuInput } from '../models'; +import { UpdateSysAppInput } from '../models'; +/** + * TestDeviceApi - axios parameter creator + * @export + */ +export const TestDeviceApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceAddPost: async (body?: AddSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/device/add`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceChangeAppGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceChangeAppPost: async (body?: ChangeAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/device/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceGrantMenuGet: async (id?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceGrantMenuPost: async (body?: UpdateAppMenuInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDevicePagePost: async (body?: BasePageInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/device/page`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestDeviceUpdatePost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/device/update`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TestDeviceApi - functional programming interface + * @export + */ +export const TestDeviceApiFp = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceAddPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceChangeAppGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceChangeAppGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceChangeAppPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceDeletePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceGrantMenuGet(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceGrantMenuPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDevicePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDevicePagePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestDeviceApiAxiosParamCreator(configuration).apiTestDeviceUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * TestDeviceApi - factory interface + * @export + */ +export const TestDeviceApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceChangeAppGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceChangeAppPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceGrantMenuGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceGrantMenuPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDevicePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDevicePagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestDeviceUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(configuration).apiTestDeviceUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TestDeviceApi - object-oriented interface + * @export + * @class TestDeviceApi + * @extends {BaseAPI} + */ +export class TestDeviceApi extends BaseAPI { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceChangeAppGet(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceChangeAppPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceGrantMenuGet(id, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceGrantMenuPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDevicePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDevicePagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestDeviceApi + */ + public async apiTestDeviceUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestDeviceApiFp(this.configuration).apiTestDeviceUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/views/test/device/component/editDevice.vue b/Web/src/views/test/device/component/editDevice.vue new file mode 100644 index 00000000..e2525bd0 --- /dev/null +++ b/Web/src/views/test/device/component/editDevice.vue @@ -0,0 +1,205 @@ + + + + + diff --git a/Web/src/views/test/device/index.vue b/Web/src/views/test/device/index.vue new file mode 100644 index 00000000..cef15d4b --- /dev/null +++ b/Web/src/views/test/device/index.vue @@ -0,0 +1,151 @@ + + + -- Gitee From eef52a68b4c4cf50ee39fd50479dcf601285bf45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=AD=A3=E5=85=B4?= <1016129865@qq.com> Date: Wed, 4 Dec 2024 09:55:53 +0800 Subject: [PATCH 04/84] =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=8E=A5=E5=8F=A3=E6=94=AF=E6=8C=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8C=87=E5=AE=9A=E8=AE=BE=E5=A4=87=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E6=9E=9A=E4=B8=BE=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Attribute/TestTableAttribute.cs | 16 +++ .../Configuration/Database.json | 6 +- .../MTNet.Application/Configuration/Enum.json | 2 +- Admin.NET/MTNet.Application/Entity/Cell.cs | 56 ++++++++ .../Entity/DeviceAddr Parameters/AxisInfo.cs | 5 +- .../BaseStationTesterAddrConfig.cs | 8 +- .../ChannelEmulatorAddrConfig.cs | 8 +- .../CommunicationTesterAddrConfig.cs | 8 +- .../DeviceAddr Parameters/DeviceAddrConfig.cs | 4 +- .../HighSpeedSwitchBoxAddrConfig.cs | 8 +- .../InterferenceGeneratorAddrConfig.cs | 8 +- .../NetworkAnalyzerAddrConfig.cs | 8 +- .../NetworkDamageTesterAddrConfig.cs | 8 +- .../PhaseShifterAddrConfig.cs | 8 +- .../PowerConsumptionTesterAddrConfig.cs | 8 +- .../ProgrammableAttenuatorAddrConfig.cs | 8 +- .../ScannerAddrConfig.cs | 8 +- .../SignalGeneratorAddrConfig.cs | 8 +- .../SpecialEquipmentAddrConfig.cs | 8 +- .../SpectrumAnalyzerAddrConfig.cs | 8 +- .../SwitchBoxAddrConfig.cs | 8 +- .../TurntableAddrConfig.cs | 8 +- .../UEMonitorAddrConfig.cs | 8 +- .../UserEquipmentAddrConfig.cs | 8 +- ...relessRoadMeasuringInstrumentAddrConfig.cs | 8 +- .../MTNet.Application/Entity/TestTemplate.cs | 24 ++++ .../MTNet.Application/Enum/DeviceTypeEnum.cs | 63 +++++--- .../MTNet.Application/Enum/TestTypeEnum.cs | 10 +- .../SeedData/DeviceSeedData.cs | 114 +++++++-------- .../SeedData/PAMappingSeedData.cs | 134 +++++++++--------- .../Service/Device/DeviceService.cs | 7 +- .../Device/Dto/DeviceAddrConfigInput.cs | 12 +- .../Service/Setting/Dto/SettingInput.cs | 11 ++ .../Service/Setting/SettingService.cs | 23 +++ .../Service/Template/Dto/TemplateInput.cs | 20 +++ .../Service/Template/TemplateService.cs | 110 +++++++++++++- 36 files changed, 523 insertions(+), 246 deletions(-) create mode 100644 Admin.NET/MTNet.Application/Attribute/TestTableAttribute.cs create mode 100644 Admin.NET/MTNet.Application/Entity/Cell.cs create mode 100644 Admin.NET/MTNet.Application/Entity/TestTemplate.cs create mode 100644 Admin.NET/MTNet.Application/Service/Setting/Dto/SettingInput.cs create mode 100644 Admin.NET/MTNet.Application/Service/Setting/SettingService.cs create mode 100644 Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs diff --git a/Admin.NET/MTNet.Application/Attribute/TestTableAttribute.cs b/Admin.NET/MTNet.Application/Attribute/TestTableAttribute.cs new file mode 100644 index 00000000..726c226a --- /dev/null +++ b/Admin.NET/MTNet.Application/Attribute/TestTableAttribute.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 测试表特性 +/// +[SuppressSniffer] +[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)] +public class TestTableAttribute : Attribute +{ +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Configuration/Database.json b/Admin.NET/MTNet.Application/Configuration/Database.json index 110efd5b..2ab38755 100644 --- a/Admin.NET/MTNet.Application/Configuration/Database.json +++ b/Admin.NET/MTNet.Application/Configuration/Database.json @@ -26,17 +26,17 @@ // } //], "DbSettings": { - "EnableInitDb": false, // 启用库初始化 + "EnableInitDb": true, // 启用库初始化 "EnableDiffLog": false, // 启用库表差异日志 "EnableUnderLine": false, // 启用驼峰转下划线 "EnableConnStringEncrypt": false // 启用数据库连接串加密 }, "TableSettings": { - "EnableInitTable": false, // 启用表初始化 + "EnableInitTable": true, // 启用表初始化 "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] }, "SeedSettings": { - "EnableInitSeed": false, // 启用种子初始化 + "EnableInitSeed": true, // 启用种子初始化 "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] } } diff --git a/Admin.NET/MTNet.Application/Configuration/Enum.json b/Admin.NET/MTNet.Application/Configuration/Enum.json index b5266623..4e12d22c 100644 --- a/Admin.NET/MTNet.Application/Configuration/Enum.json +++ b/Admin.NET/MTNet.Application/Configuration/Enum.json @@ -3,6 +3,6 @@ // 枚举实体所在程序集名称集合 "Enum": { - "EntityAssemblyNames": [ "Admin." ] + "EntityAssemblyNames": [ "Admin.", "MTNet." ] } } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/Cell.cs b/Admin.NET/MTNet.Application/Entity/Cell.cs new file mode 100644 index 00000000..af0bd89e --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/Cell.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[DeviceTable] +[SugarTable(null, "小区信息表")] +public class Cell : EntityBase +{ + [SugarColumn(ColumnDescription = "名称", Length = 32), Required, MaxLength(32)] + public string? Name { get; set; } + + /// + /// 基站ID + /// + [SugarColumn(ColumnDescription = "基站ID")] + public int NodeBId { get; set; } + + /// + /// 小区ID + /// + [SugarColumn(ColumnDescription = "小区ID")] + public int CellId { get; set; } + + /// + /// PCI + /// + [SugarColumn(ColumnDescription = "PCI")] + public int PCI { get; set; } + + /// + /// 小区状态 + /// + [SugarColumn(ColumnDescription = "小区状态")] + public int Status { get; set; } + + /// + /// 网络类型 + /// + [SugarColumn(ColumnDescription = "网络类型")] + public NetworkTypeEnum NetworkType { get; set; } + + /// + /// 厂家类型 + /// + [SugarColumn(ColumnDescription = "厂家类型")] + public BaseStationTesterTypeEnum FactoryType { get; set; } + + public override string ToString() + { + return $"{NodeBId}-{CellId}"; + } +} diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/AxisInfo.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/AxisInfo.cs index 8d8b85c0..f8b38375 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/AxisInfo.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/AxisInfo.cs @@ -23,7 +23,7 @@ public class AxisInfo /// /// 轴移动类型 /// - public AxisMoveType MoveType { get; set; } = AxisMoveType.Position; + public AxisMoveTypeEnum MoveType { get; set; } = AxisMoveTypeEnum.Position; /// /// 轴归零功能 @@ -80,4 +80,5 @@ public class AxisInfo /// 轴移动类型 /// 达位运动,步进运动 /// -public enum AxisMoveType { Position, Step } +[Description("轴移动类型枚举")] +public enum AxisMoveTypeEnum { Position, Step } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs index 6bb22f7d..f14c4d73 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class BaseStationTesterAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public BaseStationTesterAddrConfig() { - this.DeviceTypeConfig = DeviceType.BaseStationTester; + this.DeviceTypeConfig = DeviceTypeEnum.BaseStationTester; } - BaseStationTesterType _deviceModelConfig = BaseStationTesterType.Virtual; + BaseStationTesterTypeEnum _deviceModelConfig = BaseStationTesterTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public BaseStationTesterType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public BaseStationTesterTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs index 77b2e4fd..8ca31aca 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class ChannelEmulatorAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public ChannelEmulatorAddrConfig() { - this.DeviceTypeConfig = DeviceType.ChannelEmulator; + this.DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator; } - ChannelEmulatorType _deviceModelConfig = ChannelEmulatorType.Virtual; + ChannelEmulatorTypeEnum _deviceModelConfig = ChannelEmulatorTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public ChannelEmulatorType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public ChannelEmulatorTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs index 320e4fb2..935c2684 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class CommunicationTesterAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public CommunicationTesterAddrConfig() { - this.DeviceTypeConfig = DeviceType.CommunicationTester; + this.DeviceTypeConfig = DeviceTypeEnum.CommunicationTester; } - CommunicationTesterType _deviceModelConfig = CommunicationTesterType.Virtual; + CommunicationTesterTypeEnum _deviceModelConfig = CommunicationTesterTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public CommunicationTesterType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public CommunicationTesterTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs index 7383c638..e1b67dd8 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs @@ -18,7 +18,7 @@ public class DeviceAddrConfig : EntityBase [SugarColumn(ColumnDescription = "设备类型")] [Description("Set the type of the device."), Category("Basic Parameters"), DisplayName("Device Type")] - public virtual DeviceType DeviceTypeConfig { get; set; } = DeviceType.BaseStationTester; + public virtual DeviceTypeEnum DeviceTypeConfig { get; set; } = DeviceTypeEnum.BaseStationTester; [SugarColumn(ColumnDescription = "设备型号")] [Description("Set the model of the device."), Category("Basic Parameters"), DisplayName("Device Model"), Browsable(true)] @@ -26,7 +26,7 @@ public class DeviceAddrConfig : EntityBase [SugarColumn(ColumnDescription = "通讯类型")] [Description("Set the communication type of the device."), Category("Communication Parameters"), DisplayName("Communication Type"), Browsable(true)] - public CommunicationType CommunicationTypeConfig { get; set; } = CommunicationType.Socket; + public CommunicationTypeEnum CommunicationTypeConfig { get; set; } = CommunicationTypeEnum.Socket; [SugarColumn(ColumnDescription = "IP地址", Length = 32), Required, MaxLength(32)] [Description("Communication address setting. IP address or serial port number (for example: COM3)"), Category("Communication Parameters"), DisplayName("Communication Address"), Browsable(true)] diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs index 607e652c..96ed94ce 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class HighSpeedSwitchBoxAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public HighSpeedSwitchBoxAddrConfig() { - this.DeviceTypeConfig = DeviceType.HighSpeedSwitchBox; + this.DeviceTypeConfig = DeviceTypeEnum.HighSpeedSwitchBox; } - HighSpeedSwitchBoxType _deviceModelConfig = HighSpeedSwitchBoxType.Virtual; + HighSpeedSwitchBoxTypeEnum _deviceModelConfig = HighSpeedSwitchBoxTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public HighSpeedSwitchBoxType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public HighSpeedSwitchBoxTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs index 2522403f..5a2a1e96 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class InterferenceGeneratorAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public InterferenceGeneratorAddrConfig() { - this.DeviceTypeConfig = DeviceType.InterferenceGenerator; + this.DeviceTypeConfig = DeviceTypeEnum.InterferenceGenerator; } - InterferenceGeneratorType _deviceModelConfig = InterferenceGeneratorType.Virtual; + InterferenceGeneratorTypeEnum _deviceModelConfig = InterferenceGeneratorTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public InterferenceGeneratorType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public InterferenceGeneratorTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs index c783d2d5..4922a2da 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class NetworkAnalyzerAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public NetworkAnalyzerAddrConfig() { - this.DeviceTypeConfig = DeviceType.NetworkAnalyzer; + this.DeviceTypeConfig = DeviceTypeEnum.NetworkAnalyzer; } - NetworkAnalyzerType _deviceModelConfig = NetworkAnalyzerType.Virtual; + NetworkAnalyzerTypeEnum _deviceModelConfig = NetworkAnalyzerTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public NetworkAnalyzerType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public NetworkAnalyzerTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs index feb6cf75..6b184923 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class NetworkDamageTesterAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public NetworkDamageTesterAddrConfig() { - this.DeviceTypeConfig = DeviceType.NetworkDamageTester; + this.DeviceTypeConfig = DeviceTypeEnum.NetworkDamageTester; } - NetworkDamageTesterType _deviceModelConfig = NetworkDamageTesterType.Virtual; + NetworkDamageTesterTypeEnum _deviceModelConfig = NetworkDamageTesterTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public NetworkDamageTesterType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public NetworkDamageTesterTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs index 7204fdae..5869b4c7 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class PhaseShifterAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public PhaseShifterAddrConfig() { - this.DeviceTypeConfig = DeviceType.PhaseShifter; + this.DeviceTypeConfig = DeviceTypeEnum.PhaseShifter; } - PhaseShifterType _deviceModelConfig = PhaseShifterType.Virtual; + PhaseShifterTypeEnum _deviceModelConfig = PhaseShifterTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public PhaseShifterType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public PhaseShifterTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs index 695c2af7..2d899a13 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class PowerConsumptionTesterAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public PowerConsumptionTesterAddrConfig() { - this.DeviceTypeConfig = DeviceType.PowerConsumptionTester; + this.DeviceTypeConfig = DeviceTypeEnum.PowerConsumptionTester; } - PowerConsumptionTesterType _deviceModelConfig = PowerConsumptionTesterType.Virtual; + PowerConsumptionTesterTypeEnum _deviceModelConfig = PowerConsumptionTesterTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public PowerConsumptionTesterType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public PowerConsumptionTesterTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs index 118a6187..ded70d85 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class ProgrammableAttenuatorAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public ProgrammableAttenuatorAddrConfig() { - this.DeviceTypeConfig = DeviceType.ProgrammableAttenuator; + this.DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator; } - ProgrammableAttenuatorType _deviceModelConfig = ProgrammableAttenuatorType.Virtual; + ProgrammableAttenuatorTypeEnum _deviceModelConfig = ProgrammableAttenuatorTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public ProgrammableAttenuatorType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public ProgrammableAttenuatorTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs index 398bbf66..9523f819 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class ScannerAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public ScannerAddrConfig() { - this.DeviceTypeConfig = DeviceType.Scanner; + this.DeviceTypeConfig = DeviceTypeEnum.Scanner; } - ScannerType _deviceModelConfig = ScannerType.Virtual; + ScannerTypeEnum _deviceModelConfig = ScannerTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public ScannerType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public ScannerTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs index ba8304be..2a353535 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class SignalGeneratorAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public SignalGeneratorAddrConfig() { - this.DeviceTypeConfig = DeviceType.SignalGenerator; + this.DeviceTypeConfig = DeviceTypeEnum.SignalGenerator; } - SignalGeneratorType _deviceModelConfig = SignalGeneratorType.Virtual; + SignalGeneratorTypeEnum _deviceModelConfig = SignalGeneratorTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public SignalGeneratorType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public SignalGeneratorTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs index a706fef1..933d66a1 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class SpecialEquipmentAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public SpecialEquipmentAddrConfig() { - this.DeviceTypeConfig = DeviceType.SpecialEquipment; + this.DeviceTypeConfig = DeviceTypeEnum.SpecialEquipment; } - SpecialEquipmentType _deviceModelConfig = SpecialEquipmentType.Virtual; + SpecialEquipmentTypeEnum _deviceModelConfig = SpecialEquipmentTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public SpecialEquipmentType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public SpecialEquipmentTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs index 847e38a6..dc9acda0 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class SpectrumAnalyzerAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public SpectrumAnalyzerAddrConfig() { - this.DeviceTypeConfig = DeviceType.SpectrumAnalyzer; + this.DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer; } - SpectrumAnalyzerType _deviceModelConfig = SpectrumAnalyzerType.Virtual; + SpectrumAnalyzerTypeEnum _deviceModelConfig = SpectrumAnalyzerTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public SpectrumAnalyzerType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public SpectrumAnalyzerTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs index fed800e7..97e661f9 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class SwitchBoxAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public SwitchBoxAddrConfig() { - this.DeviceTypeConfig = DeviceType.SwitchBox; + this.DeviceTypeConfig = DeviceTypeEnum.SwitchBox; } - SwitchBoxType _deviceModelConfig = SwitchBoxType.Virtual; + SwitchBoxTypeEnum _deviceModelConfig = SwitchBoxTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public SwitchBoxType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public SwitchBoxTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs index 58c503e6..a71c6061 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs @@ -12,18 +12,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class TurntableAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public TurntableAddrConfig() { - this.DeviceTypeConfig = DeviceType.Turntable; + this.DeviceTypeConfig = DeviceTypeEnum.Turntable; } - TurntableType _deviceModelConfig = TurntableType.Virtual; + TurntableTypeEnum _deviceModelConfig = TurntableTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public TurntableType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public TurntableTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } [Description("Axis information set added for position box."), Category("Communication Parameters"), DisplayName("Axis Information Collection"), Browsable(false)] public List AxisInfoListConfig { get; set; } = new List(); diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs index a4acb39a..9d93f631 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class UEMonitorAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public UEMonitorAddrConfig() { - this.DeviceTypeConfig = DeviceType.UeMonitor; + this.DeviceTypeConfig = DeviceTypeEnum.UeMonitor; } - UeMonitorType _deviceModelConfig = UeMonitorType.Virtual; + UeMonitorTypeEnum _deviceModelConfig = UeMonitorTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public UeMonitorType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public UeMonitorTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs index 4ee146d7..b313fad1 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class UserEquipmentAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public UserEquipmentAddrConfig() { - this.DeviceTypeConfig = DeviceType.UserEquipment; + this.DeviceTypeConfig = DeviceTypeEnum.UserEquipment; } - UserEquipmentType _deviceModelConfig = UserEquipmentType.Virtual; + UserEquipmentTypeEnum _deviceModelConfig = UserEquipmentTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public UserEquipmentType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public UserEquipmentTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } [Description("Communication root password setting."), Category("Communication Parameters"), DisplayName("Communication Root Password"), Browsable(true)] public string RootPassword { get; set; } = ""; diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs index 23061bbb..92c558c5 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs @@ -13,18 +13,18 @@ namespace MTNet.Application.Entity; [XmlInclude(typeof(DeviceAddrConfig))] public class WirelessRoadMeasuringInstrumentAddrConfig : DeviceAddrConfig { - public override DeviceType DeviceTypeConfig { get; set; } + public override DeviceTypeEnum DeviceTypeConfig { get; set; } /// /// 构造函数 /// public WirelessRoadMeasuringInstrumentAddrConfig() { - this.DeviceTypeConfig = DeviceType.WirelessRoadMeasuringInstrument; + this.DeviceTypeConfig = DeviceTypeEnum.WirelessRoadMeasuringInstrument; } - WirelessRoadMeasuringInstrumentType _deviceModelConfig = WirelessRoadMeasuringInstrumentType.Virtual; + WirelessRoadMeasuringInstrumentTypeEnum _deviceModelConfig = WirelessRoadMeasuringInstrumentTypeEnum.Virtual; [Description("Set the model of the device."), Category("Advanced Parameters"), DisplayName("Device Model"), Browsable(true)] - public WirelessRoadMeasuringInstrumentType DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } + public WirelessRoadMeasuringInstrumentTypeEnum DeviceModelConfig { get => _deviceModelConfig; set => _deviceModelConfig = value; } public override string ToString() { diff --git a/Admin.NET/MTNet.Application/Entity/TestTemplate.cs b/Admin.NET/MTNet.Application/Entity/TestTemplate.cs new file mode 100644 index 00000000..8e655cb7 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/TestTemplate.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable(null, "测试模板表")] +public class TestTemplate : EntityBase +{ + /// + /// 测试例名称 + /// + [SugarColumn(ColumnDescription = "测试例名称", Length = 32), Required, MaxLength(32)] + public string Name { get; set; } = string.Empty; + + /// + /// 测试例类型 + /// + [SugarColumn(ColumnDescription = "测试例类型")] + public TestTypeEnum TestType { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs b/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs index a4ddedcf..b8ba4e37 100644 --- a/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs +++ b/Admin.NET/MTNet.Application/Enum/DeviceTypeEnum.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace MTNet.Application; [Description("设备类型枚举")] -public enum DeviceType +public enum DeviceTypeEnum { [Description("基站")] BaseStationTester, @@ -49,25 +49,46 @@ public enum DeviceType UeMonitor, } +[Description("网络类型枚举")] public enum NetworkTypeEnum { GSM, WCDMA, LTE, NR, WLAN, BT } -public enum CommunicationType { Serial_Port, Socket, GPIB, USB, HTTP, SSH } +[Description("通讯类型枚举")] +public enum CommunicationTypeEnum { Serial_Port, Socket, GPIB, USB, HTTP, SSH } -public enum BaseStationTesterType { ZTE, Nokia, Huawei, Ericsson, Virtual } -public enum ChannelEmulatorType { Keyseight_F64, Spirent_Vertex, Virtual } -public enum CommunicationTesterType { MT8000A_NR, SP9500_NR, Virtual } -public enum NetworkAnalyzerType { E5071C, N5230C, N5225A, M9804A, ZNA, ZNB, ZND, Ceyear3672, Virtual } -public enum SignalGeneratorType { E4438C, N5182A, SMW200A, M9384B, E8267D, SMBV100B, ZSA_S6000, Virtual } -public enum SpecialEquipmentType { Virtual } -public enum SpectrumAnalyzerType { N9040B, FSW, ZSA_F6000, Virtual } -public enum WirelessRoadMeasuringInstrumentType { WSW, Virtual } -public enum PowerConsumptionTesterType { UDP3305S, Virtual } -public enum NetworkDamageTesterType { Spirent, Virtual } -public enum InterferenceGeneratorType { Virtual } -public enum TurntableType { HBTE, HansRobot, Maturo, Virtual } -public enum ScannerType { Virtual } -public enum SwitchBoxType { Virtual } -public enum HighSpeedSwitchBoxType { Virtual } -public enum PhaseShifterType { HBTE, Virtual } -public enum ProgrammableAttenuatorType { HBTE, TopYoung, Virtual } -public enum UserEquipmentType { Android, Tbox, Virtual } -public enum UeMonitorType { DoToutch, E500, Virtual } \ No newline at end of file +[Description("基站型号枚举")] +public enum BaseStationTesterTypeEnum { ZTE, Nokia, Huawei, Ericsson, Virtual } +[Description("信道仿真器型号枚举")] +public enum ChannelEmulatorTypeEnum { Keyseight_F64, Spirent_Vertex, Virtual } +[Description("综合测试仪型号枚举")] +public enum CommunicationTesterTypeEnum { MT8000A_NR, SP9500_NR, Virtual } +[Description("网络分析仪型号枚举")] +public enum NetworkAnalyzerTypeEnum { E5071C, N5230C, N5225A, M9804A, ZNA, ZNB, ZND, Ceyear3672, Virtual } +[Description("信号源型号枚举")] +public enum SignalGeneratorTypeEnum { E4438C, N5182A, SMW200A, M9384B, E8267D, SMBV100B, ZSA_S6000, Virtual } +[Description("特殊设备型号枚举")] +public enum SpecialEquipmentTypeEnum { Virtual } +[Description("频谱分析仪型号枚举")] +public enum SpectrumAnalyzerTypeEnum { N9040B, FSW, ZSA_F6000, Virtual } +[Description("无线路测仪型号枚举")] +public enum WirelessRoadMeasuringInstrumentTypeEnum { WSW, Virtual } +[Description("功率测试仪型号枚举")] +public enum PowerConsumptionTesterTypeEnum { UDP3305S, Virtual } +[Description("网络损伤仪型号枚举")] +public enum NetworkDamageTesterTypeEnum { Spirent, Virtual } +[Description("干扰发生器型号枚举")] +public enum InterferenceGeneratorTypeEnum { Virtual } +[Description("转台型号枚举")] +public enum TurntableTypeEnum { HBTE, HansRobot, Maturo, Virtual } +[Description("扫描架型号枚举")] +public enum ScannerTypeEnum { Virtual } +[Description("开关箱型号枚举")] +public enum SwitchBoxTypeEnum { Virtual } +[Description("高速开关箱型号枚举")] +public enum HighSpeedSwitchBoxTypeEnum { Virtual } +[Description("调相网络型号枚举")] +public enum PhaseShifterTypeEnum { HBTE, Virtual } +[Description("程控矩阵型号枚举")] +public enum ProgrammableAttenuatorTypeEnum { HBTE, TopYoung, Virtual } +[Description("终端型号枚举")] +public enum UserEquipmentTypeEnum { Android, Tbox, Virtual } +[Description("终端模拟器型号枚举")] +public enum UeMonitorTypeEnum { DoToutch, E500, Virtual } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Enum/TestTypeEnum.cs b/Admin.NET/MTNet.Application/Enum/TestTypeEnum.cs index aaf0cc80..aaac0786 100644 --- a/Admin.NET/MTNet.Application/Enum/TestTypeEnum.cs +++ b/Admin.NET/MTNet.Application/Enum/TestTypeEnum.cs @@ -6,9 +6,10 @@ using System.Threading.Tasks; namespace MTNet.Application; -public enum TestType +[Description("测试类型枚举")] +public enum TestTypeEnum { - #region Calibration + #region 校准测试 [Description("线缆测量"), Category("校准测试"), CategoryIndex(0), Browsable(false)] LossMeasurementTestCase, [Description("系统校准-网分"), Category("校准测试"), CategoryIndex(0), Browsable(false)] @@ -67,10 +68,8 @@ public enum TestType BaseStationReceiverBlockageTestCase, [Description("无线网:接收机测试-信道内选择性测试"), Category("5G无线接入网功能测试"), CategoryIndex(1), Browsable(true)] BaseStationReceiverChannelSelectivityTestCase, - #endregion - #region 5G无线网性能测试 [Description("无线网:多用户接入(模拟至少1000UE)测试"), Category("5G无线接入网性能测试"), CategoryIndex(2), Browsable(true)] BaseStationMultiUserAccessTestCase, @@ -93,19 +92,16 @@ public enum TestType UESameFrequencySwithing_Intra_gNBTestCase, [Description("终端:VoNR用户呼叫VoNR用户测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] UEVoiceCallBetweenVONRsTestCase, - [Description("终端:基于3GPP CDL信道模型终端吞吐量测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] UE3GPPCDChannelModelThroughputTestCase, [Description("终端:基于3GPP 标准的终端OTA拉远测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] UE3GPPStretchTestCase, - [Description("终端:最大发射功率测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] UEMaximumTransmittingPowerTestCase, [Description("终端:发射功率回退测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] UETransmitPowerRolledBackTestCase, [Description("终端:发射信号质量测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] UETransmittedSignalQualityTestCase, - [Description("终端:待机功耗测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] UEStandbyPowerConsumptionTestCase, [Description("终端:数据业务功耗测试"), Category("5G终端功能测试"), CategoryIndex(3), Browsable(true)] diff --git a/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs b/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs index fb433509..b740999d 100644 --- a/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs +++ b/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs @@ -22,99 +22,99 @@ public class DeviceSeedData : ISqlSugarEntitySeedData return new[] { //基站 - new DeviceAddrConfig { DeviceNameConfig = "ZTE", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.ZTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "10.92.243.190", PortConfig = 2443, UserName = "Test-op", Password = "123456Mt!@#", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Nokia74", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.Nokia, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "180.18.132.74", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Nokia79", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.Nokia, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "180.18.132.79", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Huawei", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.Huawei, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "178.16.10.184", PortConfig = 31114, UserName = "mtnet_test", Password = "Caict123.", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Ericsson", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.Ericsson, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.168.131", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VBS", DeviceTypeConfig = DeviceType.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "ZTE", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.ZTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "10.92.243.190", PortConfig = 2443, UserName = "Test-op", Password = "123456Mt!@#", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Nokia74", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Nokia, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "180.18.132.74", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Nokia79", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Nokia, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "180.18.132.79", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Huawei", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Huawei, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "178.16.10.184", PortConfig = 31114, UserName = "mtnet_test", Password = "Caict123.", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Ericsson", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Ericsson, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.168.131", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VBS", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //信道仿真器 - new DeviceAddrConfig { DeviceNameConfig = "F64", DeviceTypeConfig = DeviceType.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorType.Keyseight_F64, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Vertex", DeviceTypeConfig = DeviceType.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorType.Spirent_Vertex, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VCE", DeviceTypeConfig = DeviceType.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "F64", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Keyseight_F64, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Vertex", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Spirent_Vertex, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VCE", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //综合测试仪 - new DeviceAddrConfig { DeviceNameConfig = "MT8000A", DeviceTypeConfig = DeviceType.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterType.MT8000A_NR, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VCT", DeviceTypeConfig = DeviceType.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "MT8000A", DeviceTypeConfig = DeviceTypeEnum.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterTypeEnum.MT8000A_NR, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VCT", DeviceTypeConfig = DeviceTypeEnum.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //网络分析仪 - new DeviceAddrConfig { DeviceNameConfig = "E5071C", DeviceTypeConfig = DeviceType.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerType.E5071C, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VNA", DeviceTypeConfig = DeviceType.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "E5071C", DeviceTypeConfig = DeviceTypeEnum.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerTypeEnum.E5071C, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VNA", DeviceTypeConfig = DeviceTypeEnum.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //信号源 - new DeviceAddrConfig { DeviceNameConfig = "ZSA", DeviceTypeConfig = DeviceType.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorType.ZSA_S6000, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VSG", DeviceTypeConfig = DeviceType.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "ZSA", DeviceTypeConfig = DeviceTypeEnum.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorTypeEnum.ZSA_S6000, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VSG", DeviceTypeConfig = DeviceTypeEnum.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //特殊设备 - new DeviceAddrConfig { DeviceNameConfig = "VSE", DeviceTypeConfig = DeviceType.SpecialEquipment, DeviceModelConfig = (int)SpecialEquipmentType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VSE", DeviceTypeConfig = DeviceTypeEnum.SpecialEquipment, DeviceModelConfig = (int)SpecialEquipmentTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //频谱分析仪 - new DeviceAddrConfig { DeviceNameConfig = "N9040B", DeviceTypeConfig = DeviceType.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerType.N9040B, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "FSW", DeviceTypeConfig = DeviceType.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerType.FSW, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "ZSA", DeviceTypeConfig = DeviceType.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerType.ZSA_F6000, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VSA", DeviceTypeConfig = DeviceType.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "N9040B", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.N9040B, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "FSW", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.FSW, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "ZSA", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.ZSA_F6000, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VSA", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //无线路测仪 - new DeviceAddrConfig { DeviceNameConfig = "WSW", DeviceTypeConfig = DeviceType.WirelessRoadMeasuringInstrument, DeviceModelConfig = (int)WirelessRoadMeasuringInstrumentType.WSW, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VRM", DeviceTypeConfig = DeviceType.WirelessRoadMeasuringInstrument, DeviceModelConfig = (int)WirelessRoadMeasuringInstrumentType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "WSW", DeviceTypeConfig = DeviceTypeEnum.WirelessRoadMeasuringInstrument, DeviceModelConfig = (int)WirelessRoadMeasuringInstrumentTypeEnum.WSW, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VRM", DeviceTypeConfig = DeviceTypeEnum.WirelessRoadMeasuringInstrument, DeviceModelConfig = (int)WirelessRoadMeasuringInstrumentTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //功率测试仪 - new DeviceAddrConfig { DeviceNameConfig = "UDP3305S", DeviceTypeConfig = DeviceType.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterType.UDP3305S, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VPC", DeviceTypeConfig = DeviceType.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "UDP3305S", DeviceTypeConfig = DeviceTypeEnum.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterTypeEnum.UDP3305S, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VPC", DeviceTypeConfig = DeviceTypeEnum.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //网络损伤仪 - new DeviceAddrConfig { DeviceNameConfig = "Spirent", DeviceTypeConfig = DeviceType.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterType.Spirent, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VND", DeviceTypeConfig = DeviceType.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Spirent", DeviceTypeConfig = DeviceTypeEnum.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterTypeEnum.Spirent, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VND", DeviceTypeConfig = DeviceTypeEnum.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //干扰发生器 - new DeviceAddrConfig { DeviceNameConfig = "VIG", DeviceTypeConfig = DeviceType.InterferenceGenerator, DeviceModelConfig = (int)InterferenceGeneratorType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VIG", DeviceTypeConfig = DeviceTypeEnum.InterferenceGenerator, DeviceModelConfig = (int)InterferenceGeneratorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //转台 - new DeviceAddrConfig { DeviceNameConfig = "HBTE252", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.252", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "HBTE253", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.253", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "HBTE254", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "HansRobot", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.HansRobot, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Maturo", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.Maturo, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VTT", DeviceTypeConfig = DeviceType.Turntable, DeviceModelConfig = (int)TurntableType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "HBTE252", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.252", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "HBTE253", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.253", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "HBTE254", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "HansRobot", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HansRobot, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Maturo", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.Maturo, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VTT", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //扫描架 - new DeviceAddrConfig { DeviceNameConfig = "VSC", DeviceTypeConfig = DeviceType.Scanner, DeviceModelConfig = (int)ScannerType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VSC", DeviceTypeConfig = DeviceTypeEnum.Scanner, DeviceModelConfig = (int)ScannerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //开关箱 - new DeviceAddrConfig { DeviceNameConfig = "VSB", DeviceTypeConfig = DeviceType.SwitchBox, DeviceModelConfig = (int)SwitchBoxType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VSB", DeviceTypeConfig = DeviceTypeEnum.SwitchBox, DeviceModelConfig = (int)SwitchBoxTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //高速开关箱 - new DeviceAddrConfig { DeviceNameConfig = "VHS", DeviceTypeConfig = DeviceType.HighSpeedSwitchBox, DeviceModelConfig = (int)HighSpeedSwitchBoxType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VHS", DeviceTypeConfig = DeviceTypeEnum.HighSpeedSwitchBox, DeviceModelConfig = (int)HighSpeedSwitchBoxTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //调相网络 - new DeviceAddrConfig { DeviceNameConfig = "HBTE", DeviceTypeConfig = DeviceType.PhaseShifter, DeviceModelConfig = (int)PhaseShifterType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VSG", DeviceTypeConfig = DeviceType.PhaseShifter, DeviceModelConfig = (int)PhaseShifterType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "HBTE", DeviceTypeConfig = DeviceTypeEnum.PhaseShifter, DeviceModelConfig = (int)PhaseShifterTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VSG", DeviceTypeConfig = DeviceTypeEnum.PhaseShifter, DeviceModelConfig = (int)PhaseShifterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //程控矩阵 - new DeviceAddrConfig { DeviceNameConfig = "PA130", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA131", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.131", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA132", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.132", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA133", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.133", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA134", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.134", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA135", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.135", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA136", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.136", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA137", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.137", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA245", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.245", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA246", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.246", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA247", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.247", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA248", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.248", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA249", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.HBTE, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.249", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VPA", DeviceTypeConfig = DeviceType.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA130", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA131", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.131", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA132", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.132", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA133", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.133", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA134", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.134", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA135", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.135", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA136", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.136", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA137", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.137", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA245", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.245", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA246", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.246", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA247", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.247", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA248", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.248", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "PA249", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.249", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VPA", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //终端 - new DeviceAddrConfig { DeviceNameConfig = "Android", DeviceTypeConfig = DeviceType.UserEquipment, DeviceModelConfig = (int)UserEquipmentType.Android, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VUE", DeviceTypeConfig = DeviceType.UserEquipment, DeviceModelConfig = (int)UserEquipmentType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "Android", DeviceTypeConfig = DeviceTypeEnum.UserEquipment, DeviceModelConfig = (int)UserEquipmentTypeEnum.Android, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VUE", DeviceTypeConfig = DeviceTypeEnum.UserEquipment, DeviceModelConfig = (int)UserEquipmentTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //终端模拟器 - new DeviceAddrConfig { DeviceNameConfig = "DoToutch", DeviceTypeConfig = DeviceType.UeMonitor, DeviceModelConfig = (int)UeMonitorType.DoToutch, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "E500", DeviceTypeConfig = DeviceType.UeMonitor, DeviceModelConfig = (int)UeMonitorType.E500, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VUM", DeviceTypeConfig = DeviceType.UeMonitor, DeviceModelConfig = (int)UeMonitorType.Virtual, CommunicationTypeConfig = CommunicationType.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "DoToutch", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.DoToutch, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "E500", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.E500, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { DeviceNameConfig = "VUM", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, }; } } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/SeedData/PAMappingSeedData.cs b/Admin.NET/MTNet.Application/SeedData/PAMappingSeedData.cs index 2ea9ab19..fd8ed15f 100644 --- a/Admin.NET/MTNet.Application/SeedData/PAMappingSeedData.cs +++ b/Admin.NET/MTNet.Application/SeedData/PAMappingSeedData.cs @@ -22,99 +22,99 @@ public class PAMappingSeedData : ISqlSugarEntitySeedData { //屏蔽房2 //9292-15 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 1, OutputPort = 2, InitialPower = -67, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9494-13 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 17, OutputPort = 2, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 17, OutputPort = 2, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 17, OutputPort = 2, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 17, OutputPort = 2, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9292-17 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 17, OutputPort = 2, InitialPower = -87, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 17, OutputPort = 2, InitialPower = -87, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 17, OutputPort = 2, InitialPower = -87, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 17, OutputPort = 2, InitialPower = -87, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9494-16 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 18, OutputPort = 2, InitialPower = -59, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9191-7 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 7, ShieldRoom = "2", Address = "192.168.1.245", InputPort = 21, OutputPort = 2, InitialPower = -79, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 10, ShieldRoom = "2", Address = "192.168.1.246", InputPort = 21, OutputPort = 2, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 7, ShieldRoom = "2", Address = "192.168.1.245", InputPort = 21, OutputPort = 2, InitialPower = -79, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 10, ShieldRoom = "2", Address = "192.168.1.246", InputPort = 21, OutputPort = 2, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9191-5 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 5, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 22, OutputPort = 2, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 5, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 22, OutputPort = 2, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 5, ShieldRoom = "2", Address = "192.168.1.134", InputPort = 22, OutputPort = 2, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 5, ShieldRoom = "2", Address = "192.168.1.135", InputPort = 22, OutputPort = 2, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9191-15 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 15, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 22, OutputPort = 2, InitialPower = -71, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9191, CellId = 15, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 22, OutputPort = 2, InitialPower = -71, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 15, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 22, OutputPort = 2, InitialPower = -71, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9191, CellId = 15, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 22, OutputPort = 2, InitialPower = -71, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //96-7 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 96, CellId = 7, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 17, OutputPort = 2, InitialPower = -75, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 96, CellId = 7, ShieldRoom = "2", Address = "192.168.1.136", InputPort = 17, OutputPort = 2, InitialPower = -75, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //96-8 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 96, CellId = 8, ShieldRoom = "2", Address = "192.168.1.247", InputPort = 8, OutputPort = 2, InitialPower = -74, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 96, CellId = 8, ShieldRoom = "2", Address = "192.168.1.247", InputPort = 8, OutputPort = 2, InitialPower = -74, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //96-9 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 96, CellId = 9, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 17, OutputPort = 2, InitialPower = -79, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 96, CellId = 9, ShieldRoom = "2", Address = "192.168.1.137", InputPort = 17, OutputPort = 2, InitialPower = -79, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //141-181 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 141, CellId = 181, ShieldRoom = "2", Address = "192.168.1.245", InputPort = 3, OutputPort = 2, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 141, CellId = 181, ShieldRoom = "2", Address = "192.168.1.246", InputPort = 3, OutputPort = 2, InitialPower = -70, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 141, CellId = 181, ShieldRoom = "2", Address = "192.168.1.245", InputPort = 3, OutputPort = 2, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 141, CellId = 181, ShieldRoom = "2", Address = "192.168.1.246", InputPort = 3, OutputPort = 2, InitialPower = -70, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //屏蔽房3 //9292-15 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.134", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.135", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.136", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.137", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.134", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.135", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.136", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "3", Address = "192.168.1.137", InputPort = 1, OutputPort = 3, InitialPower = -78, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9494-16 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.134", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.135", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.136", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.137", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.134", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.135", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.136", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "3", Address = "192.168.1.137", InputPort = 17, OutputPort = 3, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //屏蔽房6 //9292-15 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 15, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 1, OutputPort = 6, InitialPower = -80, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9494-16 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 16, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 18, OutputPort = 6, InitialPower = -72, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9494-13 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 17, OutputPort = 6, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 17, OutputPort = 6, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 17, OutputPort = 6, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 13, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 17, OutputPort = 6, InitialPower = -76, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9292-17 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 17, OutputPort = 6, InitialPower = -77, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 17, OutputPort = 6, InitialPower = -77, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 17, OutputPort = 6, InitialPower = -77, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9292, CellId = 17, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 17, OutputPort = 6, InitialPower = -77, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9494-3 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.247", InputPort = 12, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.248", InputPort = 12, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.247", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.248", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.247", InputPort = 12, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.248", InputPort = 12, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.247", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 3, ShieldRoom = "6", Address = "192.168.1.248", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9494-4 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9494, CellId = 4, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 2, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9090-3 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 3, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 13, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //9090-7 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 9090, CellId = 7, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 14, OutputPort = 6, InitialPower = -73, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //520001-12 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.134", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.135", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.136", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520001, CellId = 12, ShieldRoom = "6", Address = "192.168.1.137", InputPort = 4, OutputPort = 6, InitialPower = -54.32, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //520009-92 - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.130", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.131", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.132", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new PAMapping { BaseStationFactory = BaseStationTesterType.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.133", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.130", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.131", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.132", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new PAMapping { BaseStationFactory = BaseStationTesterTypeEnum.ZTE.GetDescription(), NodeBId = 520009, CellId = 92, ShieldRoom = "6", Address = "192.168.1.133", InputPort = 7, OutputPort = 6, InitialPower = -59.62, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, }; } diff --git a/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs index 64ff1402..efa05072 100644 --- a/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs +++ b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs @@ -69,7 +69,7 @@ public class DeviceService : IDynamicApiController /// [DisplayName("分页查询设备")] [ApiDescriptionSettings(Name = "Page"), HttpPost] - public async Task> Page(BasePageInput input) + public async Task> Page(DeviceAddrConfigInput input) { input.Keyword = input.Keyword?.Trim(); var query = _deviceRep.AsQueryable() @@ -81,6 +81,11 @@ public class DeviceService : IDynamicApiController .OrderBy(u => u.Id) .Select(); + if (input.Value != null) + { + query = query.Where(x => (int)x.DeviceTypeConfig == input.Value); + } + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); } diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceAddrConfigInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceAddrConfigInput.cs index cbd230cd..44698803 100644 --- a/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceAddrConfigInput.cs +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceAddrConfigInput.cs @@ -6,19 +6,27 @@ using System.Threading.Tasks; namespace MTNet.Application.Service; +public class DeviceAddrConfigInput : BasePageInput +{ + /// + /// 设备类型 + /// + public int? Value { get; set; } +} + public class AddDeviceAddrConfigInput { [Required(ErrorMessage = "设备名称不能为空")] public string DeviceNameConfig { get; set; } = ""; [Required(ErrorMessage = "设备类型不能为空")] - public virtual DeviceType DeviceTypeConfig { get; set; } = DeviceType.BaseStationTester; + public virtual DeviceTypeEnum DeviceTypeConfig { get; set; } = DeviceTypeEnum.BaseStationTester; [Required(ErrorMessage = "设备型号不能为空")] public int DeviceModelConfig { get; set; } = 0; [Required(ErrorMessage = "通讯方式不能为空")] - public CommunicationType CommunicationTypeConfig { get; set; } = CommunicationType.Socket; + public CommunicationTypeEnum CommunicationTypeConfig { get; set; } = CommunicationTypeEnum.Socket; [Required(ErrorMessage = "IP地址不能为空")] public string AddrConfig { get; set; } = ""; diff --git a/Admin.NET/MTNet.Application/Service/Setting/Dto/SettingInput.cs b/Admin.NET/MTNet.Application/Service/Setting/Dto/SettingInput.cs new file mode 100644 index 00000000..4e24b98c --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Setting/Dto/SettingInput.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class SettingInput +{ +} diff --git a/Admin.NET/MTNet.Application/Service/Setting/SettingService.cs b/Admin.NET/MTNet.Application/Service/Setting/SettingService.cs new file mode 100644 index 00000000..179e2984 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Setting/SettingService.cs @@ -0,0 +1,23 @@ +using Microsoft.AspNetCore.Authentication.JwtBearer; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 系统设置接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "Setting", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class SettingService : IDynamicApiController +{ + private readonly UserManager _userManager; + + public SettingService(UserManager userManager) + { + _userManager = userManager; + } +} diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs new file mode 100644 index 00000000..d96b185f --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class AddTemplateInput +{ +} + +public class UpdateTemplateInput : AddTemplateInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs index 570f13f0..971f5c59 100644 --- a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs +++ b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs @@ -1,4 +1,7 @@ -using System; +using Admin.NET.Core.Service; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -10,20 +13,113 @@ namespace MTNet.Application.Service; /// 模板接口 /// [ApiDescriptionSettings("自动化测试接口", Name = "Template", Order = 100)] -//[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] public class TemplateService : IDynamicApiController { + private readonly SqlSugarRepository _templateRep; + private readonly SysEnumService _enumService; private readonly UserManager _userManager; - public TemplateService(UserManager userManager) + public TemplateService(SqlSugarRepository templateRep, SysEnumService enumService, UserManager userManager) { + _templateRep = templateRep; + _enumService = enumService; _userManager = userManager; } - [ApiDescriptionSettings(Name = "Get"), HttpGet] - [DisplayName("获取模板列表")] - public Task GetTemplateList() + /// + /// 获取测试例列表 🔖 + /// + /// + [DisplayName("获取测试例列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList() { - return Task.FromResult($"Hello word. {_userManager.Account}"); + var query = _templateRep.AsQueryable() + .OrderBy(u => u.Id) + .Select(); + + var TestTypeList = _enumService.GetEnumDataList(new EnumInput() { EnumName = nameof(TestTypeEnum) }); + + return await query.ToListAsync(); + } + + /// + /// 分页查询测试例 🔖 + /// + /// + /// + [DisplayName("分页查询测试例")] + [ApiDescriptionSettings(Name = "Page"), HttpPost] + public async Task> Page(BasePageInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _templateRep.AsQueryable() + //.WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) + //|| u.TestType.ToString().Contains(input.Keyword) + .OrderBy(u => u.Id) + .Select(); + + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加设备 🔖 + /// + /// + /// + [DisplayName("增加设备")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddTemplateInput input) + { + var entity = input.Adapt(); + var dtNow = DateTime.Now; + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + return await _templateRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 更新设备 🔖 + /// + /// + /// + [DisplayName("更新设备")] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + public async Task Update(UpdateTemplateInput input) + { + _ = await _templateRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var entity = input.Adapt(); + entity.UpdateTime = DateTime.Now; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + await _templateRep.AsUpdateable(entity).ExecuteCommandAsync(); + } + + /// + /// 删除设备 🔖 + /// + /// + /// + [DisplayName("删除设备")] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + public async Task Delete(BaseIdInput input) + { + var entity = await _templateRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + //// 禁止删除存在关联租户的应用 + //if (await _deviceRep.Context.Queryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1001); + + //// 禁止删除存在关联菜单的应用 + //if (await _sysAppMenuRep.AsQueryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1002); + + await _templateRep.DeleteAsync(entity); } } \ No newline at end of file -- Gitee From fe91ca601af96023d8f6f6aa82b32e04f1e37b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=AD=A3=E5=85=B4?= <1016129865@qq.com> Date: Wed, 4 Dec 2024 10:31:45 +0800 Subject: [PATCH 05/84] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B0=8F=E5=8C=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=A1=A8=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=A7=8D?= =?UTF-8?q?=E5=AD=90=E6=95=B0=E6=8D=AE=20=E6=B7=BB=E5=8A=A0=E5=9F=BA?= =?UTF-8?q?=E7=AB=99Service=E5=92=8C=E5=B0=8F=E5=8C=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=A2=9E=E5=88=A0=E6=94=B9=E6=9F=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/MTNet.Application/Entity/Cell.cs | 3 + .../SeedData/CellSeedData.cs | 28 ++++ .../Service/Device/BaseStationService.cs | 148 ++++++++++++++++++ .../Service/Device/Dto/CellInput.cs | 62 ++++++++ 4 files changed, 241 insertions(+) create mode 100644 Admin.NET/MTNet.Application/SeedData/CellSeedData.cs create mode 100644 Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs create mode 100644 Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs diff --git a/Admin.NET/MTNet.Application/Entity/Cell.cs b/Admin.NET/MTNet.Application/Entity/Cell.cs index af0bd89e..2a97d092 100644 --- a/Admin.NET/MTNet.Application/Entity/Cell.cs +++ b/Admin.NET/MTNet.Application/Entity/Cell.cs @@ -10,6 +10,9 @@ namespace MTNet.Application.Entity; [SugarTable(null, "小区信息表")] public class Cell : EntityBase { + /// + /// 小区名称 + /// [SugarColumn(ColumnDescription = "名称", Length = 32), Required, MaxLength(32)] public string? Name { get; set; } diff --git a/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs b/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs new file mode 100644 index 00000000..d1c40f8c --- /dev/null +++ b/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs @@ -0,0 +1,28 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 小区表种子数据 +/// +public class CellSeedData : ISqlSugarEntitySeedData +{ + /// + /// 种子数据 + /// + /// + public IEnumerable HasData() + { + return new[] + { + new Cell { Name = "9292-15", NodeBId = 9292, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { Name = "9494-16", NodeBId = 9494, CellId = 16, PCI = 16, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { Name = "9292-17", NodeBId = 9292, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + }; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs new file mode 100644 index 00000000..e9b1f3da --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs @@ -0,0 +1,148 @@ +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 基站接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "BaseStation", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class BaseStationService : IDynamicApiController +{ + private readonly SqlSugarRepository _deviceRep; + private readonly SqlSugarRepository _cellRep; + private readonly UserManager _userManager; + + public BaseStationService(SqlSugarRepository deviceRep, SqlSugarRepository cellRep, UserManager userManager) + { + _deviceRep = deviceRep; + _cellRep = cellRep; + _userManager = userManager; + } + + /// + /// 查询小区列表 🔖 + /// + /// + [DisplayName("查询小区列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList() + { + var query = _cellRep.AsQueryable() + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 查询小区列表 🔖 + /// + /// + /// + [DisplayName("查询小区列表")] + [ApiDescriptionSettings(Name = "GetList"), HttpPost] + public async Task> GetList(string keyword) + { + keyword = keyword?.Trim(); + var query = _cellRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(keyword), u => u.Name.Contains(keyword) + || u.NodeBId.ToString().Contains(keyword) + || u.CellId.ToString().Contains(keyword)) + .OrderBy(u => u.Id) + .Select(); + + return await query.ToListAsync(); + } + + /// + /// 分页小区小区 🔖 + /// + /// + /// + [DisplayName("分页小区小区")] + [ApiDescriptionSettings(Name = "Page"), HttpPost] + public async Task> Page(CellInput input) + { + input.Keyword = input.Keyword?.Trim(); + var query = _cellRep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) + || u.NodeBId.ToString().Contains(input.Keyword) + || u.CellId.ToString().Contains(input.Keyword)) + .OrderBy(u => u.Id) + .Select(); + + if (input.Value != null) + { + query = query.Where(x => (int)x.FactoryType == input.Value); + } + + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加小区 🔖 + /// + /// + /// + [DisplayName("增加小区")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddCellInput input) + { + var entity = input.Adapt(); + var dtNow = DateTime.Now; + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + return await _cellRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 更新小区 🔖 + /// + /// + /// + [DisplayName("更新小区")] + [ApiDescriptionSettings(Name = "Update"), HttpPost] + public async Task Update(UpdateCellInput input) + { + _ = await _cellRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + var entity = input.Adapt(); + entity.UpdateTime = DateTime.Now; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + await _cellRep.AsUpdateable(entity).ExecuteCommandAsync(); + } + + /// + /// 删除小区 🔖 + /// + /// + /// + [DisplayName("删除小区")] + [ApiDescriptionSettings(Name = "Delete"), HttpPost] + public async Task Delete(BaseIdInput input) + { + var entity = await _cellRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + + //// 禁止删除存在关联租户的应用 + //if (await _deviceRep.Context.Queryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1001); + + //// 禁止删除存在关联菜单的应用 + //if (await _sysAppMenuRep.AsQueryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1002); + + await _cellRep.DeleteAsync(entity); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs new file mode 100644 index 00000000..1e6eb55f --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class CellInput : BasePageInput +{ + /// + /// 基站型号 + /// + public int? Value { get; set; } +} + +public class AddCellInput +{ + /// + /// 小区名称 + /// + public string? Name { get; set; } + + /// + /// 基站ID + /// + public int NodeBId { get; set; } + + /// + /// 小区ID + /// + public int CellId { get; set; } + + /// + /// PCI + /// + public int PCI { get; set; } + + /// + /// 小区状态 + /// + public int Status { get; set; } + + /// + /// 网络类型 + /// + public NetworkTypeEnum NetworkType { get; set; } + + /// + /// 厂家类型 + /// + public BaseStationTesterTypeEnum FactoryType { get; set; } +} + +public class UpdateCellInput : AddCellInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} \ No newline at end of file -- Gitee From 266fce95afcf4d032977d5152f1505e6d9da8475 Mon Sep 17 00:00:00 2001 From: wxh <906562008@qq.com> Date: Wed, 4 Dec 2024 15:39:18 +0800 Subject: [PATCH 06/84] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=AE=BE=E5=A4=87=E5=9E=8B=E5=8F=B7=E9=80=9A?= =?UTF-8?q?=E8=AE=AF=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/views/system/user/index.vue | 4 +- .../test/device/component/editDevice.vue | 19 ++- .../views/test/device/component/orgTree.vue | 146 ++++++++++++++++ Web/src/views/test/device/index.vue | 158 ++++++++++++------ Web/src/views/test/mapping/index.vue | 8 + Web/src/views/test/report/index.vue | 8 + Web/src/views/test/template/index.vue | 8 + Web/src/views/test/testing/index.vue | 8 + 8 files changed, 296 insertions(+), 63 deletions(-) create mode 100644 Web/src/views/test/device/component/orgTree.vue create mode 100644 Web/src/views/test/mapping/index.vue create mode 100644 Web/src/views/test/report/index.vue create mode 100644 Web/src/views/test/template/index.vue create mode 100644 Web/src/views/test/testing/index.vue diff --git a/Web/src/views/system/user/index.vue b/Web/src/views/system/user/index.vue index a2595636..7e690973 100644 --- a/Web/src/views/system/user/index.vue +++ b/Web/src/views/system/user/index.vue @@ -4,7 +4,7 @@ - + @@ -58,7 +58,7 @@ --> diff --git a/Web/src/views/test/device/component/editDevice.vue b/Web/src/views/test/device/component/editDevice.vue index e2525bd0..a1974407 100644 --- a/Web/src/views/test/device/component/editDevice.vue +++ b/Web/src/views/test/device/component/editDevice.vue @@ -15,18 +15,24 @@ - - + + + + - - + + + + - - + + + + @@ -113,6 +119,7 @@ import { auth } from '/@/utils/authFunction'; const props = defineProps({ title: String, + gather: Object, }); const emits = defineEmits(['handleQuery']); const ruleFormRef = ref(); diff --git a/Web/src/views/test/device/component/orgTree.vue b/Web/src/views/test/device/component/orgTree.vue new file mode 100644 index 00000000..056730b6 --- /dev/null +++ b/Web/src/views/test/device/component/orgTree.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/Web/src/views/test/device/index.vue b/Web/src/views/test/device/index.vue index cef15d4b..4631858e 100644 --- a/Web/src/views/test/device/index.vue +++ b/Web/src/views/test/device/index.vue @@ -1,68 +1,74 @@ @@ -70,10 +76,16 @@ import { onMounted, reactive, ref } from 'vue'; import { ElMessageBox, ElMessage } from 'element-plus'; import EditApp from '/@/views/test/device/component/editDevice.vue'; +import OrgTree from '/@/views/test/device/component/orgTree.vue'; import ModifyRecord from '/@/components/table/modifyRecord.vue'; +import { Splitpanes, Pane } from 'splitpanes'; +import 'splitpanes/dist/splitpanes.css'; + import { getAPI } from '/@/utils/axios-utils'; -import { TestDeviceApi } from '/@/api-services/api'; +import { TestDeviceApi, SysEnumApi } from '/@/api-services/api'; + +const orgTreeRef = ref>(); const editAppRef = ref>(); const state = reactive({ @@ -86,14 +98,42 @@ const state = reactive({ page: 1, pageSize: 50, total: 0 as any, + value: 0, }, editAppTitle: '', + deviceType: [] as any[], + communicationType: [] as any[], + deviceModelType: [] as any[], }); onMounted(async () => { + await getDeviceTypeConfig(); + await getCommunicationTypeConfig(); await handleQuery(); }); +//获取设备类型 +const getDeviceTypeConfig = async () => { + let res = await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('DeviceTypeEnum'); + state.deviceType = res.data.result ?? []; +}; +//设备类型转换 +const deviceConversion = (row: any) => { + return state.deviceType[row.deviceTypeConfig].describe; +}; +//获取通讯类型 +const getCommunicationTypeConfig = async () => { + let res = await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('CommunicationTypeEnum'); + state.communicationType = res.data.result ?? []; +}; +//通讯类型转换 +const communicationTypeConversion = (row: any) => { + return state.communicationType[row.communicationTypeConfig].describe; +}; +//设备型号类型转换 +const deviceModelType = (row: any) => { + return state.deviceModelType[row.deviceModelConfig]?.describe; +}; // 查询操作 const handleQuery = async () => { state.loading = true; @@ -148,4 +188,12 @@ const handleCurrentChange = async (val: number) => { state.tableParams.page = val; await handleQuery(); }; + +// 树组件点击 +const nodeClick = async (node: any) => { + let res = await getAPI(SysEnumApi).apiSysEnumEnumDataListGet(node.name + 'TypeEnum'); + state.deviceModelType = res.data.result ?? []; + state.tableParams.value = node.value; + await handleQuery(); +}; diff --git a/Web/src/views/test/mapping/index.vue b/Web/src/views/test/mapping/index.vue new file mode 100644 index 00000000..41e8711a --- /dev/null +++ b/Web/src/views/test/mapping/index.vue @@ -0,0 +1,8 @@ + + + + diff --git a/Web/src/views/test/report/index.vue b/Web/src/views/test/report/index.vue new file mode 100644 index 00000000..1242e05c --- /dev/null +++ b/Web/src/views/test/report/index.vue @@ -0,0 +1,8 @@ + + + + diff --git a/Web/src/views/test/template/index.vue b/Web/src/views/test/template/index.vue new file mode 100644 index 00000000..c7b1ed77 --- /dev/null +++ b/Web/src/views/test/template/index.vue @@ -0,0 +1,8 @@ + + + + diff --git a/Web/src/views/test/testing/index.vue b/Web/src/views/test/testing/index.vue new file mode 100644 index 00000000..87c361d7 --- /dev/null +++ b/Web/src/views/test/testing/index.vue @@ -0,0 +1,8 @@ + + + + -- Gitee From 970ae7e6d25deba242dfc515daf66fd57906c134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=97=BA=E5=91=80?= Date: Wed, 4 Dec 2024 16:34:00 +0800 Subject: [PATCH 07/84] =?UTF-8?q?feat:=20=E7=BB=99=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=A2=9E=E5=8A=A0=E6=A0=BC=E5=BC=8F=E5=8C=96?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E5=AD=97=E5=85=B8=E9=A1=B9=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/components/sysDict/sysDict.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Web/src/components/sysDict/sysDict.vue b/Web/src/components/sysDict/sysDict.vue index 31be4299..d0e1c90d 100644 --- a/Web/src/components/sysDict/sysDict.vue +++ b/Web/src/components/sysDict/sysDict.vue @@ -26,6 +26,10 @@ const props = defineProps({ type: Function, default: (dict: any): boolean => dict, }, + onItemFormatter: { + type: Function as (dict: any) => (string | undefined | null), + default: () => undefined + }, renderAs: { type: String, default: 'tag', @@ -58,19 +62,19 @@ watch( -- Gitee From f2bd70fa45bb41241c839dff0748c1e0dc746d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=97=BA=E5=91=80?= Date: Wed, 4 Dec 2024 17:35:00 +0800 Subject: [PATCH 08/84] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=A1=A8=E5=94=AF=E4=B8=80=E7=BA=A6=E6=9D=9F=E6=97=B6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AD=97=E6=AE=B5=E5=90=8D=E4=B8=8E?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E5=AD=97=E6=AE=B5=E5=90=8D=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/views/system/codeGen/component/editCodeGenDialog.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/src/views/system/codeGen/component/editCodeGenDialog.vue b/Web/src/views/system/codeGen/component/editCodeGenDialog.vue index 0970eece..9fcebad5 100644 --- a/Web/src/views/system/codeGen/component/editCodeGenDialog.vue +++ b/Web/src/views/system/codeGen/component/editCodeGenDialog.vue @@ -149,7 +149,7 @@ 字段 - + @@ -226,7 +226,7 @@ const tableChanged = (item: any) => { // 表唯一约束配置项字段改变事件 const changeTableUniqueColumn = (value: any, index: number) => { if (value?.length === 1 && !state.ruleForm.tableUniqueList[index].message) { - state.ruleForm.tableUniqueList[index].message = state.columnData.find((u: any) => u.columnName === value[0])?.columnComment; + state.ruleForm.tableUniqueList[index].message = state.columnData.find((u: any) => u.propertyName === value[0])?.columnComment; } } -- Gitee From 3388701e1fe01c7869c930b67fe75c285dbadf91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=AD=A3=E5=85=B4?= <1016129865@qq.com> Date: Wed, 4 Dec 2024 17:35:53 +0800 Subject: [PATCH 09/84] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=9F=BA=E7=AB=99=E5=B0=8F=E5=8C=BA=E5=92=8C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=EF=BC=8C=E5=BE=85=E5=AE=9E=E7=8E=B0=20=E6=98=A0?= =?UTF-8?q?=E5=B0=84=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=9F=BA=E7=AB=99=E5=92=8C=E5=B0=8F=E5=8C=BAID=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/MTNet.Application/Job/CellJob.cs | 65 +++++++++++++++++++ .../MTNet.Application/Job/ReportedDataJob.cs | 38 +++++++++++ .../Service/Device/BaseStationService.cs | 2 +- .../Service/Device/DeviceService.cs | 2 +- .../Service/Device/Dto/PAMappingInput.cs | 13 ++++ .../Service/Device/PAMappingService.cs | 9 ++- 6 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 Admin.NET/MTNet.Application/Job/CellJob.cs create mode 100644 Admin.NET/MTNet.Application/Job/ReportedDataJob.cs diff --git a/Admin.NET/MTNet.Application/Job/CellJob.cs b/Admin.NET/MTNet.Application/Job/CellJob.cs new file mode 100644 index 00000000..832aa02b --- /dev/null +++ b/Admin.NET/MTNet.Application/Job/CellJob.cs @@ -0,0 +1,65 @@ +using Furion.Schedule; +using Microsoft.Extensions.Logging; +using MTNet.Application.Entity; +using MTNet.Application.Service; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 查询基站小区作业任务 +/// +[JobDetail("job_cell", Description = "查询基站小区", GroupName = "default", Concurrent = false)] +[PeriodSeconds(60 * 60, TriggerId = "trigger_cell", Description = "查询基站小区", MaxNumberOfRuns = 1, RunOnStart = true)] +public class CellJob : IJob +{ + private readonly IServiceScopeFactory _scopeFactory; + private readonly ILogger _logger; + + public CellJob(IServiceScopeFactory scopeFactory, ILoggerFactory loggerFactory) + { + _scopeFactory = scopeFactory; + _logger = loggerFactory.CreateLogger(nameof(CellJob)); + } + + public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) + { + var cellList = GetCellList(); + + using var serviceScope = _scopeFactory.CreateScope(); + + var baseStationService = serviceScope.ServiceProvider.GetRequiredService(); + var db = serviceScope.ServiceProvider.GetRequiredService().CopyNew(); + await db.Deleteable().Where(u => u.CreateTime < DateTime.Now).ExecuteCommandAsync(stoppingToken); // 删除小区信息 + + foreach (var cell in cellList) + { + var id = await baseStationService.Add(cell); + + string msg = $"【{DateTime.Now}】写入小区信息成功,Id {id} [{cell.Name}]"; + + // 自定义日志 + _logger.LogInformation(msg); + } + } + + /// + /// 从各基站获取小区列表 + /// + /// + public List GetCellList() + { + List cellList = new() + { + new AddCellInput() { Name = $"9292-15", NodeBId = 9292, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { Name = $"9494-16", NodeBId = 9494, CellId = 16, PCI = 16, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { Name = $"9292-17", NodeBId = 9292, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { Name = $"9696-18", NodeBId = 9696, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + }; + return cellList; + } +} diff --git a/Admin.NET/MTNet.Application/Job/ReportedDataJob.cs b/Admin.NET/MTNet.Application/Job/ReportedDataJob.cs new file mode 100644 index 00000000..fcd35cba --- /dev/null +++ b/Admin.NET/MTNet.Application/Job/ReportedDataJob.cs @@ -0,0 +1,38 @@ +using Furion.Schedule; +using Microsoft.Extensions.Logging; +using MTNet.Application.Entity; +using MTNet.Application.Service; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +/// +/// 上报数据作业任务 +/// +[JobDetail("job_reported_data", Description = "上报数据", GroupName = "default", Concurrent = false)] +[PeriodSeconds(60, TriggerId = "trigger_reported_data", Description = "上报数据", RunOnStart = true)] +public class ReportedDataJob : IJob +{ + private readonly IServiceScopeFactory _scopeFactory; + private readonly ILogger _logger; + + public ReportedDataJob(IServiceScopeFactory scopeFactory, ILoggerFactory loggerFactory) + { + _scopeFactory = scopeFactory; + _logger = loggerFactory.CreateLogger(nameof(ReportedDataJob)); + } + + public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken) + { + string msg = $"【{DateTime.Now}】数据上报成功"; + + // 自定义日志 + _logger.LogInformation(msg); + + await Task.CompletedTask; + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs index e9b1f3da..f75a9c67 100644 --- a/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs +++ b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs @@ -13,7 +13,7 @@ namespace MTNet.Application.Service; /// [ApiDescriptionSettings("自动化测试接口", Name = "BaseStation", Order = 100)] [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] -public class BaseStationService : IDynamicApiController +public class BaseStationService : IDynamicApiController, ITransient { private readonly SqlSugarRepository _deviceRep; private readonly SqlSugarRepository _cellRep; diff --git a/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs index efa05072..8bd32b76 100644 --- a/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs +++ b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs @@ -14,7 +14,7 @@ namespace MTNet.Application.Service; /// [ApiDescriptionSettings("自动化测试接口", Name = "Device", Order = 100)] [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] -public class DeviceService : IDynamicApiController +public class DeviceService : IDynamicApiController, ITransient { private readonly SqlSugarRepository _deviceRep; private readonly UserManager _userManager; diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs index 2f1385e5..3be6b0dc 100644 --- a/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs @@ -6,6 +6,19 @@ using System.Threading.Tasks; namespace MTNet.Application.Service; +public class PAMappingInput : BasePageInput +{ + /// + /// 基站ID + /// + public int? NodeBId { get; set; } + + /// + /// 小区ID + /// + public int? CellId { get; set; } +} + public class AddPAMappingInput { /// diff --git a/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs b/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs index faaec362..de9dde72 100644 --- a/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs +++ b/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs @@ -14,7 +14,7 @@ namespace MTNet.Application.Service; /// [ApiDescriptionSettings("自动化测试接口", Name = "Mapping", Order = 100)] [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] -public class PAMappingService : IDynamicApiController +public class PAMappingService : IDynamicApiController, ITransient { private readonly SqlSugarRepository _mappingRep; private readonly UserManager _userManager; @@ -74,7 +74,7 @@ public class PAMappingService : IDynamicApiController /// [DisplayName("分页查询设备")] [ApiDescriptionSettings(Name = "Page"), HttpPost] - public async Task> Page(BasePageInput input) + public async Task> Page(PAMappingInput input) { input.Keyword = input.Keyword?.Trim(); var query = _mappingRep.AsQueryable() @@ -91,6 +91,11 @@ public class PAMappingService : IDynamicApiController .OrderBy(u => u.Id) .Select(); + if (input.NodeBId != null && input.CellId != null) + { + query = query.Where(x => x.NodeBId == input.NodeBId && x.CellId == input.CellId); + } + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); } -- Gitee From ce3033505f3dc068e6509bd979f3a504072a9110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=97=BA=E5=91=80?= Date: Wed, 4 Dec 2024 17:37:25 +0800 Subject: [PATCH 10/84] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=94=AF?= =?UTF-8?q?=E4=B8=80=E7=BA=A6=E6=9D=9F=E9=85=8D=E7=BD=AE=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E7=BC=96=E8=BE=91=E7=95=8C=E9=9D=A2=E4=B8=AD?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE=E9=A1=B9?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/views/system/codeGen/component/editCodeGenDialog.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/Web/src/views/system/codeGen/component/editCodeGenDialog.vue b/Web/src/views/system/codeGen/component/editCodeGenDialog.vue index 9fcebad5..b5c9deea 100644 --- a/Web/src/views/system/codeGen/component/editCodeGenDialog.vue +++ b/Web/src/views/system/codeGen/component/editCodeGenDialog.vue @@ -258,6 +258,7 @@ const getGlobalComponentSize = computed(() => { const openDialog = (row: any) => { state.ruleForm = JSON.parse(JSON.stringify(row)); dbChanged().then(() => getColumnInfoList()); + state.ruleForm.tableUniqueList ??= []; state.isShowDialog = true; ruleFormRef.value?.resetFields(); }; -- Gitee From ed1d7ad123d5312d758cac9dcaec0f8eac6b8f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=97=BA=E5=91=80?= Date: Wed, 4 Dec 2024 17:39:12 +0800 Subject: [PATCH 11/84] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=E4=B8=AD=E5=AF=BC=E5=85=A5=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=AD=97=E5=85=B8=E5=85=B3=E7=B3=BB=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E7=BC=BA=E5=A4=B1=E5=92=8C=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/template/Service.cs.vm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/Service.cs.vm b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/Service.cs.vm index 9985c735..d701d094 100644 --- a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/Service.cs.vm +++ b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/Service.cs.vm @@ -249,6 +249,17 @@ public class @(Model.ClassName)Service : IDynamicApiController, ITransient @:{ @:var list = (await Page(input)).Items?.Adapt>() ?? new(); @:if (input.SelectKeyList?.Count > 0) list = list.Where(x => input.SelectKeyList.Contains(x.@(Model.PrimaryKeyFieldList.First().PropertyName))).ToList(); + var dictFields = Model.TableField.Where(x => x.WhetherImport == "Y" && x.EffectType == "DictSelector") ?? default; + foreach (var column in dictFields) { + @:var @(column.LowerPropertyName)DictMap = _sysDictTypeService.GetDataList(new GetDataDictTypeInput { Code = "@(column.DictTypeCode)" }).Result.ToDictionary(x => x.Value, x => x.Label); + } + if (dictFields.Count() > 0) { + @:list.ForEach(e => { + foreach (var column in dictFields) { + @:e.@(column.ExtendedPropertyName) = @(column.LowerPropertyName)DictMap.GetValueOrDefault(e.@(column.PropertyName) ?? "", e.@(column.PropertyName)); + } + @:}); + } @:return ExcelHelper.ExportTemplate(list, "@(Model.BusName)导出记录"); @:} @: @@ -312,7 +323,7 @@ public class @(Model.ClassName)Service : IDynamicApiController, ITransient @:// 映射字典值 @:foreach(var item in pageItems) { foreach (var column in dictTableField) { - @:if (item.@(column.PropertyName) == null) continue; + @:if (string.IsNullOrWhiteSpace(item.@(column.ExtendedPropertyName))) continue; @:item.@(column.PropertyName) = @(column.LowerPropertyName)DictMap.GetValueOrDefault(item.@(column.ExtendedPropertyName)); @:if (item.@(column.PropertyName) == null) item.Error = "@(column.ColumnComment)字典映射失败"; } -- Gitee From 7e804eb294a42ffa49ca452a83b7e7d13c3c15f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=97=BA=E5=91=80?= Date: Wed, 4 Dec 2024 17:43:26 +0800 Subject: [PATCH 12/84] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=BD=BF=E7=94=A8=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/components/sysDict/sysDict.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/Web/src/components/sysDict/sysDict.vue b/Web/src/components/sysDict/sysDict.vue index d0e1c90d..a9c357d5 100644 --- a/Web/src/components/sysDict/sysDict.vue +++ b/Web/src/components/sysDict/sysDict.vue @@ -1,3 +1,4 @@ + -- Gitee From 54617ffa519f85b0b8ba000133a19806c5e96833 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Fri, 6 Dec 2024 01:50:40 +0800 Subject: [PATCH 25/84] =?UTF-8?q?=F0=9F=98=8E=E6=B8=85=E7=90=86=E5=8F=8A?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj | 5 ++--- Admin.NET/Admin.NET.Core/Entity/SysDictData.cs | 2 +- Admin.NET/Admin.NET.Core/Entity/SysPos.cs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj index 362c0cee..85fdf314 100644 --- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj +++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj @@ -29,10 +29,9 @@ - - + @@ -44,7 +43,7 @@ - + diff --git a/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs b/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs index 6d670497..11297f00 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs @@ -33,7 +33,7 @@ public partial class SysDictData : EntityBase [SugarColumn(ColumnDescription = "值", Length = 256)] [Required, MaxLength(256)] public virtual string Value { get; set; } - + /// /// 编码 /// diff --git a/Admin.NET/Admin.NET.Core/Entity/SysPos.cs b/Admin.NET/Admin.NET.Core/Entity/SysPos.cs index 9eb5877b..3986ed0e 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysPos.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysPos.cs @@ -47,7 +47,7 @@ public partial class SysPos : EntityTenant /// [SugarColumn(ColumnDescription = "状态")] public StatusEnum Status { get; set; } = StatusEnum.Enable; - + /// /// 在职人数 /// -- Gitee From 2a9d7e6fa67434cb5c16c6a9fecbd0df423135da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=AD=A3=E5=85=B4?= <1016129865@qq.com> Date: Fri, 6 Dec 2024 10:48:47 +0800 Subject: [PATCH 26/84] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E6=A0=91=E5=BD=A2=E5=9B=BE=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E5=B0=8F=E5=8C=BA=E6=A0=91=E5=BD=A2?= =?UTF-8?q?=E5=9B=BE=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=B5=8B=E8=AF=95=E6=A8=A1=E6=9D=BF=E5=A2=9E=E5=88=A0?= =?UTF-8?q?=E6=94=B9=E6=9F=A5=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=A8=A1=E6=9D=BF=E8=AE=BE=E5=A4=87=E5=92=8C?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=A8=A1=E6=9D=BF=E5=8A=A8=E4=BD=9C=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E4=B8=8E=E6=B5=8B=E8=AF=95=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=A2=9E=E5=88=A0=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/MTNet.Application/Entity/Cell.cs | 6 ++ .../MTNet.Application/Entity/TestAction.cs | 49 ++++++++++ .../MTNet.Application/Entity/TestDevice.cs | 24 +++++ .../MTNet.Application/Entity/TestTemplate.cs | 20 +++- .../Enum/DeviceActionEnum.cs | 36 +++++++ Admin.NET/MTNet.Application/Job/CellJob.cs | 10 +- .../SeedData/CellSeedData.cs | 9 +- .../Service/Device/BaseStationService.cs | 33 ++++++- .../Service/Device/DeviceService.cs | 36 ++++++- .../Service/Device/Dto/CellInput.cs | 19 +++- .../Service/Device/Dto/CellOutput.cs | 28 ++++++ ...eviceAddrConfigInput.cs => DeviceInput.cs} | 6 +- .../Service/Device/Dto/DeviceOutput.cs | 28 ++++++ .../Service/Device/Dto/PAMappingInput.cs | 5 + .../Service/Device/PAMappingService.cs | 7 +- .../Service/Template/Dto/TemplateInput.cs | 26 ++++- .../Template/Dto/TestCaseActionInput.cs | 51 ++++++++++ .../Template/Dto/TestCaseDeviceInput.cs | 32 ++++++ .../Service/Template/TemplateService.cs | 83 ++++++++++------ .../Service/Template/TestActionService.cs | 98 +++++++++++++++++++ .../Service/Template/TestDeviceService.cs | 98 +++++++++++++++++++ 21 files changed, 649 insertions(+), 55 deletions(-) create mode 100644 Admin.NET/MTNet.Application/Entity/TestAction.cs create mode 100644 Admin.NET/MTNet.Application/Entity/TestDevice.cs create mode 100644 Admin.NET/MTNet.Application/Enum/DeviceActionEnum.cs create mode 100644 Admin.NET/MTNet.Application/Service/Device/Dto/CellOutput.cs rename Admin.NET/MTNet.Application/Service/Device/Dto/{DeviceAddrConfigInput.cs => DeviceInput.cs} (91%) create mode 100644 Admin.NET/MTNet.Application/Service/Device/Dto/DeviceOutput.cs create mode 100644 Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseActionInput.cs create mode 100644 Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseDeviceInput.cs create mode 100644 Admin.NET/MTNet.Application/Service/Template/TestActionService.cs create mode 100644 Admin.NET/MTNet.Application/Service/Template/TestDeviceService.cs diff --git a/Admin.NET/MTNet.Application/Entity/Cell.cs b/Admin.NET/MTNet.Application/Entity/Cell.cs index 2a97d092..d58963d3 100644 --- a/Admin.NET/MTNet.Application/Entity/Cell.cs +++ b/Admin.NET/MTNet.Application/Entity/Cell.cs @@ -10,6 +10,12 @@ namespace MTNet.Application.Entity; [SugarTable(null, "小区信息表")] public class Cell : EntityBase { + /// + /// 基站配置参数ID + /// + [SugarColumn(ColumnDescription = "设备ID")] + public long DeviceId { get; set; } + /// /// 小区名称 /// diff --git a/Admin.NET/MTNet.Application/Entity/TestAction.cs b/Admin.NET/MTNet.Application/Entity/TestAction.cs new file mode 100644 index 00000000..b18bb964 --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/TestAction.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[TestTable] +[SugarTable(null, "测试动作表")] +public class TestAction : EntityBase +{ + /// + /// 模板Id + /// + [SugarColumn(ColumnDescription = "模板Id")] + public long TemplateId { get; set; } + + /// + /// 测试进度类型 + /// + [SugarColumn(ColumnDescription = "测试进度类型")] + public TestStepTypeEnum StepType { get; set; } + + /// + /// 设备类型 + /// + [SugarColumn(ColumnDescription = "设备类型")] + public DeviceTypeEnum DeviceType { get; set; } + + /// + /// 动作类型 + /// + [SugarColumn(ColumnDescription = "动作类型")] + public int ActionType { get; set; } + + /// + /// 排序 + /// + [SugarColumn(ColumnDescription = "排序")] + public int OrderNo { get; set; } = 100; + + /// + /// 备注 + /// + [SugarColumn(ColumnDescription = "备注", Length = 2048)] + [MaxLength(2048)] + public string? Remark { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Entity/TestDevice.cs b/Admin.NET/MTNet.Application/Entity/TestDevice.cs new file mode 100644 index 00000000..1b26f49e --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/TestDevice.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[DeviceTable] +[SugarTable(null, "测试设备表")] +public class TestDevice : EntityBase +{ + /// + /// 模板Id + /// + [SugarColumn(ColumnDescription = "模板Id")] + public long TemplateId { get; set; } + + /// + /// 设备Id + /// + [SugarColumn(ColumnDescription = "设备Id")] + public long DeviceId { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Entity/TestTemplate.cs b/Admin.NET/MTNet.Application/Entity/TestTemplate.cs index 8e655cb7..44490845 100644 --- a/Admin.NET/MTNet.Application/Entity/TestTemplate.cs +++ b/Admin.NET/MTNet.Application/Entity/TestTemplate.cs @@ -11,14 +11,26 @@ namespace MTNet.Application.Entity; public class TestTemplate : EntityBase { /// - /// 测试例名称 + /// 测试名称 /// - [SugarColumn(ColumnDescription = "测试例名称", Length = 32), Required, MaxLength(32)] + [SugarColumn(ColumnDescription = "测试名称", Length = 32), Required, MaxLength(32)] public string Name { get; set; } = string.Empty; /// - /// 测试例类型 + /// 测试类型 /// - [SugarColumn(ColumnDescription = "测试例类型")] + [SugarColumn(ColumnDescription = "测试类型")] public TestTypeEnum TestType { get; set; } + + /// + /// 设备集合 + /// + [Navigate(NavigateType.OneToMany, nameof(TestDevice.TemplateId))] + public List Devices { get; set; } + + /// + /// 动作集合 + /// + [Navigate(NavigateType.OneToMany, nameof(TestAction.TemplateId))] + public List Actions { get; set; } } diff --git a/Admin.NET/MTNet.Application/Enum/DeviceActionEnum.cs b/Admin.NET/MTNet.Application/Enum/DeviceActionEnum.cs new file mode 100644 index 00000000..7fccf3a9 --- /dev/null +++ b/Admin.NET/MTNet.Application/Enum/DeviceActionEnum.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application; + +[Description("测试步骤枚举")] +public enum TestStepTypeEnum +{ + [Description("连接")] + Connect, + [Description("初始化")] + Initial, + [Description("测试前")] + BeforTest, + [Description("测试中")] + Testing, + [Description("测试后")] + AfterTest, + [Description("关闭")] + Close, +} + +public enum BaseStationActionEnum +{ + [Description("闭塞")] + Lock, + [Description("解闭塞")] + Unlock, + [Description("修改PCI")] + PCI, + [Description("修改带宽")] + Bandwidth, +} diff --git a/Admin.NET/MTNet.Application/Job/CellJob.cs b/Admin.NET/MTNet.Application/Job/CellJob.cs index 832aa02b..b1939e92 100644 --- a/Admin.NET/MTNet.Application/Job/CellJob.cs +++ b/Admin.NET/MTNet.Application/Job/CellJob.cs @@ -55,10 +55,12 @@ public class CellJob : IJob { List cellList = new() { - new AddCellInput() { Name = $"9292-15", NodeBId = 9292, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { Name = $"9494-16", NodeBId = 9494, CellId = 16, PCI = 16, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { Name = $"9292-17", NodeBId = 9292, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { Name = $"9696-18", NodeBId = 9696, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9292-15", NodeBId = 9292, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-16", NodeBId = 9494, CellId = 16, PCI = 16, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9292-17", NodeBId = 9292, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9696-18", NodeBId = 9696, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000003, Name = $"50001-17", NodeBId = 50001, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia }, + new AddCellInput() { DeviceId = 1300000000004, Name = $"50001-18", NodeBId = 50001, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia }, }; return cellList; } diff --git a/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs b/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs index d1c40f8c..d1edff98 100644 --- a/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs +++ b/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs @@ -20,9 +20,12 @@ public class CellSeedData : ISqlSugarEntitySeedData { return new[] { - new Cell { Name = "9292-15", NodeBId = 9292, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new Cell { Name = "9494-16", NodeBId = 9494, CellId = 16, PCI = 16, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new Cell { Name = "9292-17", NodeBId = 9292, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9292-15", NodeBId = 9292, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9494-16", NodeBId = 9494, CellId = 16, PCI = 16, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9292-17", NodeBId = 9292, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9696-18", NodeBId = 9696, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000003, Name = "50001-17", NodeBId = 50001, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000004, Name = "50001-18", NodeBId = 50001, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, }; } } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs index f75a9c67..6ff888fd 100644 --- a/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs +++ b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs @@ -61,6 +61,31 @@ public class BaseStationService : IDynamicApiController, ITransient return await query.ToListAsync(); } + /// + /// 获取小区树列表 🔖 + /// + /// + [DisplayName("获取小区树列表")] + [ApiDescriptionSettings(Name = "GetTreeList"), HttpPost] + public async Task> GetTreeList() + { + List treeList = new List(); + var bsList = await _deviceRep.AsQueryable().Where(x => x.DeviceTypeConfig == DeviceTypeEnum.BaseStationTester).ToListAsync(); + var cellList = await _cellRep.AsQueryable().ToListAsync(); + if (bsList?.Any() == true) + { + foreach (var bs in bsList) + { + var children = cellList?.Where(x => x.DeviceId == bs.Id).ToList(); + if (children?.Any() == true) + { + treeList.Add(new CellTree { Name = bs.DeviceNameConfig, Children = children }); + } + } + } + return treeList; + } + /// /// 分页小区小区 🔖 /// @@ -78,9 +103,13 @@ public class BaseStationService : IDynamicApiController, ITransient .OrderBy(u => u.Id) .Select(); - if (input.Value != null) + if (input?.DeviceId != null) + { + query = query.Where(x => (int)x.DeviceId == input.DeviceId); + } + if (input?.NodeBId != null && input?.CellId != null) { - query = query.Where(x => (int)x.FactoryType == input.Value); + query = query.Where(x => x.NodeBId == input.NodeBId && x.CellId == input.CellId); } return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); diff --git a/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs index 8bd32b76..ecfd1662 100644 --- a/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs +++ b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs @@ -17,11 +17,13 @@ namespace MTNet.Application.Service; public class DeviceService : IDynamicApiController, ITransient { private readonly SqlSugarRepository _deviceRep; + private readonly SysEnumService _enumService; private readonly UserManager _userManager; - public DeviceService(SqlSugarRepository deviceRep, UserManager userManager) + public DeviceService(SqlSugarRepository deviceRep, SysEnumService enumService, UserManager userManager) { _deviceRep = deviceRep; + _enumService = enumService; _userManager = userManager; } @@ -62,6 +64,32 @@ public class DeviceService : IDynamicApiController, ITransient return await query.ToListAsync(); } + /// + /// 获取设备树列表 🔖 + /// + /// + [DisplayName("获取设备树列表")] + [ApiDescriptionSettings(Name = "GetTreeList"), HttpPost] + public async Task> GetTreeList() + { + List treeList = new List(); + + var deviceTypeList = _enumService.GetEnumDataList(new EnumInput() { EnumName = nameof(DeviceTypeEnum) }); + var deviceList = await _deviceRep.AsQueryable().ToListAsync(); + if (deviceTypeList?.Any() == true) + { + foreach (var type in deviceTypeList) + { + var children = deviceList?.Where(x => (int)x.DeviceTypeConfig == type.Value).ToList(); + if (children?.Any() == true) + { + treeList.Add(new DeviceTree { Name = type.Describe, Children = children }); + } + } + } + return treeList; + } + /// /// 分页查询设备 🔖 /// @@ -69,7 +97,7 @@ public class DeviceService : IDynamicApiController, ITransient /// [DisplayName("分页查询设备")] [ApiDescriptionSettings(Name = "Page"), HttpPost] - public async Task> Page(DeviceAddrConfigInput input) + public async Task> Page(DeviceInput input) { input.Keyword = input.Keyword?.Trim(); var query = _deviceRep.AsQueryable() @@ -96,7 +124,7 @@ public class DeviceService : IDynamicApiController, ITransient /// [DisplayName("增加设备")] [ApiDescriptionSettings(Name = "Add"), HttpPost] - public async Task Add(AddDeviceAddrConfigInput input) + public async Task Add(AddDeviceInput input) { var entity = input.Adapt(); var dtNow = DateTime.Now; @@ -117,7 +145,7 @@ public class DeviceService : IDynamicApiController, ITransient /// [DisplayName("更新设备")] [ApiDescriptionSettings(Name = "Update"), HttpPost] - public async Task Update(UpdateDeviceAddrConfigInput input) + public async Task Update(UpdateDeviceInput input) { _ = await _deviceRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs index 1e6eb55f..54d22f88 100644 --- a/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/CellInput.cs @@ -9,13 +9,28 @@ namespace MTNet.Application.Service; public class CellInput : BasePageInput { /// - /// 基站型号 + /// 基站配置参数ID /// - public int? Value { get; set; } + public long? DeviceId { get; set; } + + /// + /// 基站ID + /// + public int? NodeBId { get; set; } + + /// + /// 小区ID + /// + public int? CellId { get; set; } } public class AddCellInput { + /// + /// 基站配置参数ID + /// + public long DeviceId { get; set; } + /// /// 小区名称 /// diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/CellOutput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/CellOutput.cs new file mode 100644 index 00000000..bb1a099a --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/CellOutput.cs @@ -0,0 +1,28 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class CellOutput +{ +} + +/// +/// 小区树形图实体 +/// +public class CellTree +{ + /// + /// 设备名称 + /// + public string Name { get; set; } + + /// + /// 小区集合 + /// + public List Children { get; set; } = new List(); +} diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceAddrConfigInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceInput.cs similarity index 91% rename from Admin.NET/MTNet.Application/Service/Device/Dto/DeviceAddrConfigInput.cs rename to Admin.NET/MTNet.Application/Service/Device/Dto/DeviceInput.cs index 44698803..9f289b54 100644 --- a/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceAddrConfigInput.cs +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceInput.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace MTNet.Application.Service; -public class DeviceAddrConfigInput : BasePageInput +public class DeviceInput : BasePageInput { /// /// 设备类型 @@ -14,7 +14,7 @@ public class DeviceAddrConfigInput : BasePageInput public int? Value { get; set; } } -public class AddDeviceAddrConfigInput +public class AddDeviceInput { [Required(ErrorMessage = "设备名称不能为空")] public string DeviceNameConfig { get; set; } = ""; @@ -52,7 +52,7 @@ public class AddDeviceAddrConfigInput } } -public class UpdateDeviceAddrConfigInput : AddDeviceAddrConfigInput +public class UpdateDeviceInput : AddDeviceInput { /// /// 主键Id diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceOutput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceOutput.cs new file mode 100644 index 00000000..e1c3a9b7 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/DeviceOutput.cs @@ -0,0 +1,28 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class DeviceOutput +{ +} + +/// +/// 设备树形图实体 +/// +public class DeviceTree +{ + /// + /// 设备类型 + /// + public string Name { get; set; } + + /// + /// 设备集合 + /// + public List Children { get; set; } = new List(); +} diff --git a/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs b/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs index 3be6b0dc..1d6fc274 100644 --- a/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs +++ b/Admin.NET/MTNet.Application/Service/Device/Dto/PAMappingInput.cs @@ -8,6 +8,11 @@ namespace MTNet.Application.Service; public class PAMappingInput : BasePageInput { + /// + /// 屏蔽房 + /// + public string? ShieldRoom { get; set; } + /// /// 基站ID /// diff --git a/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs b/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs index de9dde72..7c687cd6 100644 --- a/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs +++ b/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs @@ -91,7 +91,12 @@ public class PAMappingService : IDynamicApiController, ITransient .OrderBy(u => u.Id) .Select(); - if (input.NodeBId != null && input.CellId != null) + + if (input?.ShieldRoom != null) + { + query = query.Where(x => x.ShieldRoom == input.ShieldRoom); + } + if (input?.NodeBId != null && input?.CellId != null) { query = query.Where(x => x.NodeBId == input.NodeBId && x.CellId == input.CellId); } diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs index d96b185f..ebc65cfb 100644 --- a/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs @@ -1,4 +1,5 @@ -using System; +using MTNet.Application.Entity; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,11 +7,30 @@ using System.Threading.Tasks; namespace MTNet.Application.Service; -public class AddTemplateInput +public class AddTestCaseTemplate { + /// + /// 测试例名称 + /// + public string Name { get; set; } = string.Empty; + + /// + /// 测试例类型 + /// + public TestTypeEnum TestType { get; set; } + + /// + /// 设备值集合 + /// + public List Devices { get; set; } + + /// + /// 动作值集合 + /// + public List Actions { get; set; } } -public class UpdateTemplateInput : AddTemplateInput +public class UpdateTestCaseTemplateInput : AddTestCaseTemplate { /// /// 主键Id diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseActionInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseActionInput.cs new file mode 100644 index 00000000..6e13aa53 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseActionInput.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class AddTestActionInput +{ + /// + /// 测试例Id + /// + [Required(ErrorMessage = "测试例Id不能为空")] + public long TestCaseId { get; set; } + + /// + /// 测试进度类型 + /// + public TestStepTypeEnum TestProcessType { get; set; } + + /// + /// 设备类型 + /// + public DeviceTypeEnum DeviceType { get; set; } + + /// + /// 动作类型 + /// + public int ActionType { get; set; } + + /// + /// 排序 + /// + public int OrderNo { get; set; } = 100; + + /// + /// 备注 + /// + [MaxLength(2048)] + public string? Remark { get; set; } +} + +public class UpdateTestActionInput : AddTestActionInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseDeviceInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseDeviceInput.cs new file mode 100644 index 00000000..84893124 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseDeviceInput.cs @@ -0,0 +1,32 @@ +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class AddTestDeviceInput +{ + /// + /// 测试例Id + /// + [Required(ErrorMessage = "测试例Id不能为空")] + public long TestCaseId { get; set; } + + /// + /// 设备Id + /// + [Required(ErrorMessage = "设备Id不能为空")] + public long DeviceId { get; set; } +} + +public class UpdateTestDeviceInput : AddTestDeviceInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs index 971f5c59..0ff8d5eb 100644 --- a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs +++ b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs @@ -10,53 +10,62 @@ using System.Threading.Tasks; namespace MTNet.Application.Service; /// -/// 模板接口 +/// 测试模板接口 /// [ApiDescriptionSettings("自动化测试接口", Name = "Template", Order = 100)] [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] -public class TemplateService : IDynamicApiController +public class TemplateService : IDynamicApiController, ITransient { private readonly SqlSugarRepository _templateRep; + private readonly TestDeviceService _deviceService; + private readonly TestActionService _actionService; private readonly SysEnumService _enumService; private readonly UserManager _userManager; - public TemplateService(SqlSugarRepository templateRep, SysEnumService enumService, UserManager userManager) + public TemplateService(SqlSugarRepository templateRep, TestDeviceService deviceService, TestActionService actionService, SysEnumService enumService, UserManager userManager) { _templateRep = templateRep; + _deviceService = deviceService; + _actionService = actionService; _enumService = enumService; _userManager = userManager; } /// - /// 获取测试例列表 🔖 + /// 获取测试模板列表 🔖 /// /// - [DisplayName("获取测试例列表")] + [DisplayName("获取测试模板列表")] [ApiDescriptionSettings(Name = "GetList"), HttpPost] public async Task> GetList() { - var query = _templateRep.AsQueryable() + var query = await _templateRep.AsQueryable() .OrderBy(u => u.Id) - .Select(); + .Select() + .ToListAsync(); - var TestTypeList = _enumService.GetEnumDataList(new EnumInput() { EnumName = nameof(TestTypeEnum) }); + query.ForEach(async x => + { + x.Devices = await _deviceService.GetDeviceListByTypeCaseId(x.Id); + x.Actions = await _actionService.GetActionListByTypeCaseId(x.Id); + }); - return await query.ToListAsync(); + return query; } /// - /// 分页查询测试例 🔖 + /// 分页查询测试模板 🔖 /// /// /// - [DisplayName("分页查询测试例")] + [DisplayName("分页查询测试模板")] [ApiDescriptionSettings(Name = "Page"), HttpPost] public async Task> Page(BasePageInput input) { input.Keyword = input.Keyword?.Trim(); var query = _templateRep.AsQueryable() - //.WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) - //|| u.TestType.ToString().Contains(input.Keyword) + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) + || u.TestType.GetDescription().Contains(input.Keyword)) .OrderBy(u => u.Id) .Select(); @@ -64,13 +73,13 @@ public class TemplateService : IDynamicApiController } /// - /// 增加设备 🔖 + /// 增加测试模板 🔖 /// /// /// - [DisplayName("增加设备")] + [DisplayName("增加测试模板")] [ApiDescriptionSettings(Name = "Add"), HttpPost] - public async Task Add(AddTemplateInput input) + public async Task Add(AddTestCaseTemplate input) { var entity = input.Adapt(); var dtNow = DateTime.Now; @@ -81,17 +90,27 @@ public class TemplateService : IDynamicApiController entity.UpdateUserId = _userManager.UserId; entity.UpdateUserName = _userManager.RealName; - return await _templateRep.InsertAsync(entity) ? entity.Id : 0; + var id = await _templateRep.InsertAsync(entity) ? entity.Id : 0; + if (id > 0) + { + input.Devices.ForEach(x => x.TestCaseId = id); + var deviceFlag = await _deviceService.AddList(input.Devices); + + input.Actions.ForEach(x => x.TestCaseId = id); + var actionFlag = await _actionService.AddList(input.Actions); + } + + return id; } /// - /// 更新设备 🔖 + /// 更新测试模板 🔖 /// /// /// - [DisplayName("更新设备")] + [DisplayName("更新测试模板")] [ApiDescriptionSettings(Name = "Update"), HttpPost] - public async Task Update(UpdateTemplateInput input) + public async Task Update(UpdateTestCaseTemplateInput input) { _ = await _templateRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); @@ -100,26 +119,32 @@ public class TemplateService : IDynamicApiController entity.UpdateUserId = _userManager.UserId; entity.UpdateUserName = _userManager.RealName; - await _templateRep.AsUpdateable(entity).ExecuteCommandAsync(); + var count = await _templateRep.AsUpdateable(entity).ExecuteCommandAsync(); + if (count > 0) + { + await _deviceService.DeleteDeviceListByTypeCaseId(input.Id); + input.Devices.ForEach(x => x.TestCaseId = input.Id); + var deviceFlag = await _deviceService.AddList(input.Devices); + + await _actionService.DeleteActionListByTypeCaseId(input.Id); + input.Actions.ForEach(x => x.TestCaseId = input.Id); + var actionFlag = await _actionService.AddList(input.Actions); + } } /// - /// 删除设备 🔖 + /// 删除测试模板 🔖 /// /// /// - [DisplayName("删除设备")] + [DisplayName("删除测试模板")] [ApiDescriptionSettings(Name = "Delete"), HttpPost] public async Task Delete(BaseIdInput input) { var entity = await _templateRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); - //// 禁止删除存在关联租户的应用 - //if (await _deviceRep.Context.Queryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1001); - - //// 禁止删除存在关联菜单的应用 - //if (await _sysAppMenuRep.AsQueryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1002); - await _templateRep.DeleteAsync(entity); + await _deviceService.DeleteDeviceListByTypeCaseId(input.Id); + await _actionService.DeleteActionListByTypeCaseId(input.Id); } } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/TestActionService.cs b/Admin.NET/MTNet.Application/Service/Template/TestActionService.cs new file mode 100644 index 00000000..e9023e86 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/TestActionService.cs @@ -0,0 +1,98 @@ +using Admin.NET.Core.Service; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 测试模板动作接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "TestAction", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class TestActionService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _testActionRep; + private readonly UserManager _userManager; + + public TestActionService(SqlSugarRepository testActionRep, UserManager userManager) + { + _testActionRep = testActionRep; + _userManager = userManager; + } + + /// + /// 增加模板动作 🔖 + /// + /// + /// + [DisplayName("增加模板动作")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddTestActionInput input) + { + var entity = input.Adapt(); + var dtNow = DateTime.Now; + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + return await _testActionRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 增加模板动作集合 🔖 + /// + /// + /// + [DisplayName("增加模板动作集合")] + [ApiDescriptionSettings(Name = "AddList"), HttpPost] + public async Task AddList(List inputList) + { + var entityList = inputList.Adapt>(); + var dtNow = DateTime.Now; + entityList.ForEach(entity => + { + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + }); + + return await _testActionRep.InsertRangeAsync(entityList); + } + + /// + /// 获取模板动作集合 + /// + /// + /// + [NonAction] + public async Task> GetActionListByTypeCaseId(long templateId) + { + var actionList = await _testActionRep.AsQueryable() + .Where(u => u.TemplateId == templateId) + .OrderBy(u => new { u.OrderNo, Code = u.Id }) + .ToListAsync(); + return actionList; + } + + /// + /// 删除模板动作集合 + /// + /// + /// + [NonAction] + public async Task DeleteActionListByTypeCaseId(long templateId) + { + await _testActionRep.DeleteAsync(u => u.TemplateId == templateId); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/TestDeviceService.cs b/Admin.NET/MTNet.Application/Service/Template/TestDeviceService.cs new file mode 100644 index 00000000..2df45562 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/TestDeviceService.cs @@ -0,0 +1,98 @@ +using Admin.NET.Core.Service; +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 测试模板设备接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "TestDevice", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class TestDeviceService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _testDeviceRep; + private readonly UserManager _userManager; + + public TestDeviceService(SqlSugarRepository testDeviceRep, UserManager userManager) + { + _testDeviceRep = testDeviceRep; + _userManager = userManager; + } + + /// + /// 增加模板设备 🔖 + /// + /// + /// + [DisplayName("增加模板设备")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddTestDeviceInput input) + { + var entity = input.Adapt(); + var dtNow = DateTime.Now; + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + return await _testDeviceRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 增加模板设备集合 🔖 + /// + /// + /// + [DisplayName("增加模板设备集合")] + [ApiDescriptionSettings(Name = "AddList"), HttpPost] + public async Task AddList(List inputList) + { + var entityList = inputList.Adapt>(); + var dtNow = DateTime.Now; + entityList.ForEach(entity => + { + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + }); + + return await _testDeviceRep.InsertRangeAsync(entityList); + } + + /// + /// 获取模板设备集合 + /// + /// + /// + [NonAction] + public async Task> GetDeviceListByTypeCaseId(long templateId) + { + var deviceList = await _testDeviceRep.AsQueryable() + .Where(u => u.TemplateId == templateId) + .OrderBy(u => new { Code = u.Id }) + .ToListAsync(); + return deviceList; + } + + /// + /// 删除模板设备集合 + /// + /// + /// + [NonAction] + public async Task DeleteDeviceListByTypeCaseId(long templateId) + { + await _testDeviceRep.DeleteAsync(u => u.TemplateId == templateId); + } +} \ No newline at end of file -- Gitee From cdb012177f2d347d1c7b28908c97a749730a9cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E4=BF=8A=E6=9D=B0?= Date: Fri, 6 Dec 2024 11:56:14 +0800 Subject: [PATCH 27/84] =?UTF-8?q?Revert=20"fix:=20=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=8F=9C=E5=8D=95=E5=A4=AA=E5=A4=9A=E6=97=B6?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=8F=9C=E5=8D=95=E5=88=97=E8=A1=A8=E6=85=A2?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c2485aca816d6cb8523fa38c8b8b1feb227a4e51. --- .../Service/Menu/SysMenuService.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs b/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs index be8a74f2..33b1e250 100644 --- a/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs @@ -52,15 +52,31 @@ public class SysMenuService : IDynamicApiController, ITransient .OrderBy(u => new { u.OrderNo, u.Id }).Distinct().ToTreeAsync(u => u.Children, u => u.Pid, 0); return menuList.Adapt>(); } - var menuIdList = await GetMenuIdList(); var menuTree = await _sysMenuRep.AsQueryable() .InnerJoin((u, am) => am.AppId == _userManager.AppId && u.Id == am.MenuId) - .Where(u => u.Type != MenuTypeEnum.Btn && u.Status == StatusEnum.Enable) + .Where(u => u.Status == StatusEnum.Enable) .OrderBy(u => new { u.OrderNo, u.Id }).Distinct().ToTreeAsync(u => u.Children, u => u.Pid, 0, menuIdList.Select(d => (object)d).ToArray()); + DeleteBtnFromMenuTree(menuTree); return menuTree.Adapt>(); } + /// + /// 删除登录菜单树里面的按钮 + /// + private static void DeleteBtnFromMenuTree(List menuList) + { + if (menuList == null) return; + for (var i = menuList.Count - 1; i >= 0; i--) + { + var menu = menuList[i]; + if (menu.Type == MenuTypeEnum.Btn) + menuList.Remove(menu); + else if (menu.Children.Count > 0) + DeleteBtnFromMenuTree(menu.Children); + } + } + /// /// 获取菜单列表 🔖 /// -- Gitee From d733fa114580fb3176dd9122027d77bf71521463 Mon Sep 17 00:00:00 2001 From: wxh <906562008@qq.com> Date: Fri, 6 Dec 2024 14:09:38 +0800 Subject: [PATCH 28/84] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/api-services/api.ts | 3 +- .../{sys-device-api.ts => test-device-api.ts} | 0 Web/src/api-services/apis/test-mapping-api.ts | 796 ++++++++++++++++++ Web/src/views/test/device/index.vue | 6 +- .../test/mapping/component/editMapping.vue | 206 +++++ .../test/mapping/component/mappingTree.vue | 145 ++++ Web/src/views/test/mapping/index.vue | 176 +++- 7 files changed, 1324 insertions(+), 8 deletions(-) rename Web/src/api-services/apis/{sys-device-api.ts => test-device-api.ts} (100%) create mode 100644 Web/src/api-services/apis/test-mapping-api.ts create mode 100644 Web/src/views/test/mapping/component/editMapping.vue create mode 100644 Web/src/views/test/mapping/component/mappingTree.vue diff --git a/Web/src/api-services/api.ts b/Web/src/api-services/api.ts index 38da1e56..72f66c5d 100644 --- a/Web/src/api-services/api.ts +++ b/Web/src/api-services/api.ts @@ -55,4 +55,5 @@ export * from './apis/sys-wechat-pay-api'; export * from './apis/sys-wechat-user-api'; export * from './apis/sys-wx-open-api'; /**----------------------------------------- */ -export * from './apis/sys-device-api'; +export * from './apis/test-device-api'; +export * from './apis/test-mapping-api'; diff --git a/Web/src/api-services/apis/sys-device-api.ts b/Web/src/api-services/apis/test-device-api.ts similarity index 100% rename from Web/src/api-services/apis/sys-device-api.ts rename to Web/src/api-services/apis/test-device-api.ts diff --git a/Web/src/api-services/apis/test-mapping-api.ts b/Web/src/api-services/apis/test-mapping-api.ts new file mode 100644 index 00000000..ad116524 --- /dev/null +++ b/Web/src/api-services/apis/test-mapping-api.ts @@ -0,0 +1,796 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { AddSysAppInput } from '../models'; +import { AdminResultInt64 } from '../models'; +import { AdminResultListInt64 } from '../models'; +import { AdminResultLoginOutput } from '../models'; +import { AdminResultObject } from '../models'; +import { AdminResultSqlSugarPagedListSysAppOutput } from '../models'; +import { BaseIdInput } from '../models'; +import { BasePageInput } from '../models'; +import { ChangeAppInput } from '../models'; +import { UpdateAppMenuInput } from '../models'; +import { UpdateSysAppInput } from '../models'; +/** + * TestMappingApi - axios parameter creator + * @export + */ +export const TestMappingApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingAddPost: async (body?: AddSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/mapping/add`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingChangeAppGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingChangeAppPost: async (body?: ChangeAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/mapping/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingGrantMenuGet: async (id?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingGrantMenuPost: async (body?: UpdateAppMenuInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingPagePost: async (body?: BasePageInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/mapping/page`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingUpdatePost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/mapping/update`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestMappingTreeListGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/baseStation/getTreeList`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TestMappingApi - functional programming interface + * @export + */ +export const TestMappingApiFp = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingAddPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingChangeAppGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingChangeAppGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingChangeAppPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingDeletePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingGrantMenuGet(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingGrantMenuPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingPagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingPagePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingTreeListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestMappingApiAxiosParamCreator(configuration).apiTestMappingTreeListGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * TestMappingApi - factory interface + * @export + */ +export const TestMappingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingChangeAppGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingChangeAppPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingGrantMenuGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingGrantMenuPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingPagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingPagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestMappingTreeListGet(options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(configuration).apiTestMappingTreeListGet(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TestMappingApi - object-oriented interface + * @export + * @class TestMappingApi + * @extends {BaseAPI} + */ +export class TestMappingApi extends BaseAPI { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingChangeAppGet(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingChangeAppPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingGrantMenuGet(id, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingGrantMenuPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingPagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingPagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestMappingApi + */ + public async apiTestMappingTreeListGet(options?: AxiosRequestConfig): Promise> { + return TestMappingApiFp(this.configuration).apiTestMappingTreeListGet(options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/views/test/device/index.vue b/Web/src/views/test/device/index.vue index 4631858e..34bc0822 100644 --- a/Web/src/views/test/device/index.vue +++ b/Web/src/views/test/device/index.vue @@ -152,19 +152,19 @@ const resetQuery = async () => { // 打开新增页面 const openAddApp = () => { - state.editAppTitle = '添加应用'; + state.editAppTitle = '添加设备参数'; editAppRef.value?.openDialog({ id: undefined, status: 1, orderNo: 100 }); }; // 打开编辑页面 const openEditApp = async (row: any) => { - state.editAppTitle = '编辑应用'; + state.editAppTitle = '编辑设备参数'; editAppRef.value?.openDialog(row); }; // 删除 const delApp = (row: any) => { - ElMessageBox.confirm(`确定删除应用:【${row.deviceNameConfig}】?`, '提示', { + ElMessageBox.confirm(`确定删除设备:【${row.deviceNameConfig}】?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', diff --git a/Web/src/views/test/mapping/component/editMapping.vue b/Web/src/views/test/mapping/component/editMapping.vue new file mode 100644 index 00000000..e347bda9 --- /dev/null +++ b/Web/src/views/test/mapping/component/editMapping.vue @@ -0,0 +1,206 @@ + + + + + diff --git a/Web/src/views/test/mapping/component/mappingTree.vue b/Web/src/views/test/mapping/component/mappingTree.vue new file mode 100644 index 00000000..c2021693 --- /dev/null +++ b/Web/src/views/test/mapping/component/mappingTree.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/Web/src/views/test/mapping/index.vue b/Web/src/views/test/mapping/index.vue index 41e8711a..fa592412 100644 --- a/Web/src/views/test/mapping/index.vue +++ b/Web/src/views/test/mapping/index.vue @@ -1,8 +1,176 @@ - - -- Gitee From 6a04007962372fd4a921e6b15daf4c5f2bea2f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=AD=A3=E5=85=B4?= <1016129865@qq.com> Date: Fri, 6 Dec 2024 16:10:48 +0800 Subject: [PATCH 29/84] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E6=88=BF=E4=B8=BA=E7=A9=BA=E6=97=B6=E6=9F=A5=E8=AF=A2=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98=20=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A8=A1=E6=9D=BF=E6=97=B6=EF=BC=8C=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=AE=BE=E5=A4=87=E5=92=8C=E6=B5=8B=E8=AF=95=E5=8A=A8?= =?UTF-8?q?=E4=BD=9C=E7=9A=84=E6=A8=A1=E6=9D=BFId=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/MTNet.Application/Job/CellJob.cs | 16 +++++++++++++++- .../SeedData/CellSeedData.cs | 19 ++++++++++++++++++- .../Service/Device/PAMappingService.cs | 2 +- .../Template/Dto/TestCaseActionInput.cs | 2 +- .../Template/Dto/TestCaseDeviceInput.cs | 2 +- .../Service/Template/TemplateService.cs | 8 ++++---- 6 files changed, 40 insertions(+), 9 deletions(-) diff --git a/Admin.NET/MTNet.Application/Job/CellJob.cs b/Admin.NET/MTNet.Application/Job/CellJob.cs index b1939e92..99713fed 100644 --- a/Admin.NET/MTNet.Application/Job/CellJob.cs +++ b/Admin.NET/MTNet.Application/Job/CellJob.cs @@ -58,7 +58,21 @@ public class CellJob : IJob new AddCellInput() { DeviceId = 1300000000002, Name = $"9292-15", NodeBId = 9292, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-16", NodeBId = 9494, CellId = 16, PCI = 16, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, new AddCellInput() { DeviceId = 1300000000002, Name = $"9292-17", NodeBId = 9292, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, - new AddCellInput() { DeviceId = 1300000000002, Name = $"9696-18", NodeBId = 9696, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-13", NodeBId = 9494, CellId = 13, PCI = 13, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-3", NodeBId = 9494, CellId = 3, PCI = 3, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9494-4", NodeBId = 9494, CellId = 4, PCI = 4, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9090-3", NodeBId = 9090, CellId = 3, PCI = 3, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9090-7", NodeBId = 9090, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-5", NodeBId = 9191, CellId = 5, PCI = 5, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-7", NodeBId = 9191, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-10", NodeBId = 9191, CellId = 10, PCI = 10, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"9191-15", NodeBId = 9191, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"96-7", NodeBId = 96, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"96-8", NodeBId = 96, CellId = 8, PCI = 8, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"96-9", NodeBId = 96, CellId = 9, PCI = 9, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"141-181", NodeBId = 141, CellId = 181, PCI = 181, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"520001-12", NodeBId = 520001, CellId = 12, PCI = 12, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, + new AddCellInput() { DeviceId = 1300000000002, Name = $"520001-92", NodeBId = 520001, CellId = 92, PCI = 92, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE }, new AddCellInput() { DeviceId = 1300000000003, Name = $"50001-17", NodeBId = 50001, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia }, new AddCellInput() { DeviceId = 1300000000004, Name = $"50001-18", NodeBId = 50001, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia }, }; diff --git a/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs b/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs index d1edff98..aaf08ab5 100644 --- a/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs +++ b/Admin.NET/MTNet.Application/SeedData/CellSeedData.cs @@ -1,4 +1,5 @@ using MTNet.Application.Entity; +using MTNet.Application.Service; using System; using System.Collections.Generic; using System.Linq; @@ -23,7 +24,23 @@ public class CellSeedData : ISqlSugarEntitySeedData new Cell { DeviceId = 1300000000002, Name = "9292-15", NodeBId = 9292, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, new Cell { DeviceId = 1300000000002, Name = "9494-16", NodeBId = 9494, CellId = 16, PCI = 16, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, new Cell { DeviceId = 1300000000002, Name = "9292-17", NodeBId = 9292, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new Cell { DeviceId = 1300000000002, Name = "9696-18", NodeBId = 9696, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9494-13", NodeBId = 9494, CellId = 13, PCI = 13, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9494-3", NodeBId = 9494, CellId = 3, PCI = 3, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9494-4", NodeBId = 9494, CellId = 4, PCI = 4, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9090-3", NodeBId = 9090, CellId = 3, PCI = 3, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9090-7", NodeBId = 9090, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9191-5", NodeBId = 9191, CellId = 5, PCI = 5, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9191-7", NodeBId = 9191, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9191-10", NodeBId = 9191, CellId = 10, PCI = 10, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "9191-15", NodeBId = 9191, CellId = 15, PCI = 15, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "96-7", NodeBId = 96, CellId = 7, PCI = 7, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "96-8", NodeBId = 96, CellId = 8, PCI = 8, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "96-9", NodeBId = 96, CellId = 9, PCI = 9, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "141-181", NodeBId = 141, CellId = 181, PCI = 181, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "520001-12", NodeBId = 520001, CellId = 12, PCI = 12, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000002, Name = "520001-92", NodeBId = 520001, CellId = 92, PCI = 92, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.ZTE, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000003, Name = "50001-17", NodeBId = 50001, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new Cell { DeviceId = 1300000000004, Name = "50001-18", NodeBId = 50001, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, new Cell { DeviceId = 1300000000003, Name = "50001-17", NodeBId = 50001, CellId = 17, PCI = 17, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, new Cell { DeviceId = 1300000000004, Name = "50001-18", NodeBId = 50001, CellId = 18, PCI = 18, Status = 0, NetworkType = NetworkTypeEnum.NR, FactoryType = BaseStationTesterTypeEnum.Nokia, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, }; diff --git a/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs b/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs index 7c687cd6..5ae4bbe9 100644 --- a/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs +++ b/Admin.NET/MTNet.Application/Service/Device/PAMappingService.cs @@ -92,7 +92,7 @@ public class PAMappingService : IDynamicApiController, ITransient .Select(); - if (input?.ShieldRoom != null) + if (!string.IsNullOrEmpty(input?.ShieldRoom)) { query = query.Where(x => x.ShieldRoom == input.ShieldRoom); } diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseActionInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseActionInput.cs index 6e13aa53..c178e169 100644 --- a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseActionInput.cs +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseActionInput.cs @@ -12,7 +12,7 @@ public class AddTestActionInput /// 测试例Id ///
[Required(ErrorMessage = "测试例Id不能为空")] - public long TestCaseId { get; set; } + public long TemplateId { get; set; } /// /// 测试进度类型 diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseDeviceInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseDeviceInput.cs index 84893124..2e13c3da 100644 --- a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseDeviceInput.cs +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseDeviceInput.cs @@ -13,7 +13,7 @@ public class AddTestDeviceInput /// 测试例Id /// [Required(ErrorMessage = "测试例Id不能为空")] - public long TestCaseId { get; set; } + public long TemplateId { get; set; } /// /// 设备Id diff --git a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs index 0ff8d5eb..e43dd803 100644 --- a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs +++ b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs @@ -93,10 +93,10 @@ public class TemplateService : IDynamicApiController, ITransient var id = await _templateRep.InsertAsync(entity) ? entity.Id : 0; if (id > 0) { - input.Devices.ForEach(x => x.TestCaseId = id); + input.Devices.ForEach(x => x.TemplateId = id); var deviceFlag = await _deviceService.AddList(input.Devices); - input.Actions.ForEach(x => x.TestCaseId = id); + input.Actions.ForEach(x => x.TemplateId = id); var actionFlag = await _actionService.AddList(input.Actions); } @@ -123,11 +123,11 @@ public class TemplateService : IDynamicApiController, ITransient if (count > 0) { await _deviceService.DeleteDeviceListByTypeCaseId(input.Id); - input.Devices.ForEach(x => x.TestCaseId = input.Id); + input.Devices.ForEach(x => x.TemplateId = input.Id); var deviceFlag = await _deviceService.AddList(input.Devices); await _actionService.DeleteActionListByTypeCaseId(input.Id); - input.Actions.ForEach(x => x.TestCaseId = input.Id); + input.Actions.ForEach(x => x.TemplateId = input.Id); var actionFlag = await _actionService.AddList(input.Actions); } } -- Gitee From b576433bbfd78e149cdce189b5b145b23c3efe8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=97=BA=E5=91=80?= Date: Fri, 6 Dec 2024 16:55:12 +0800 Subject: [PATCH 30/84] =?UTF-8?q?fix:=20=E5=8E=9F=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=B1=80=E9=A1=B5=E9=9D=A2=E5=A4=B1=E6=95=88=EF=BC=8C=E6=8D=A2?= =?UTF-8?q?=E6=BA=90=E9=87=8D=E5=86=99=E5=90=8C=E6=AD=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Region/SysRegionService.cs | 278 ++++++++++++------ 1 file changed, 181 insertions(+), 97 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs b/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs index 8b2b1664..fc4e1a87 100644 --- a/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs @@ -4,8 +4,8 @@ // // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! -using AngleSharp; -using AngleSharp.Html.Dom; +using NewLife.Http; +using NewLife.Serialization; namespace Admin.NET.Core.Service; @@ -145,119 +145,203 @@ public class SysRegionService : IDynamicApiController, ITransient { var syncLevel = await _sysConfigService.GetConfigValue(ConfigConst.SysRegionSyncLevel); if (syncLevel is < 1 or > 5) syncLevel = 3;//默认区县级 - var context = BrowsingContext.New(AngleSharp.Configuration.Default.WithDefaultLoader()); - var dom = await context.OpenAsync(_url); - - // 省级 - var itemList = dom.QuerySelectorAll("table.provincetable tr.provincetr td a"); - if (itemList.Length == 0) throw Oops.Oh(ErrorCodeEnum.R2005); - + await _sysRegionRep.DeleteAsync(u => u.Id > 0); + + await SyncByMap(syncLevel); + + // var context = BrowsingContext.New(AngleSharp.Configuration.Default.WithDefaultLoader()); + // var dom = await context.OpenAsync(_url); + // + // // 省级列表 + // var itemList = dom.QuerySelectorAll("table.provincetable tr.provincetr td a"); + // if (itemList.Length == 0) throw Oops.Oh(ErrorCodeEnum.R2005); + // + // await _sysRegionRep.DeleteAsync(u => u.Id > 0); + // + // foreach (var element in itemList) + // { + // var item = (IHtmlAnchorElement)element; + // var list = new List(); + // + // var region = new SysRegion + // { + // Id = YitIdHelper.NextId(), + // Pid = 0, + // Name = item.TextContent, + // Remark = item.Href, + // Level = 1, + // }; + // list.Add(region); + // + // // 市级 + // if (!string.IsNullOrEmpty(item.Href)) + // { + // var dom1 = await context.OpenAsync(item.Href); + // var itemList1 = dom1.QuerySelectorAll("table.citytable tr.citytr td a"); + // for (var i1 = 0; i1 < itemList1.Length; i1 += 2) + // { + // var item1 = (IHtmlAnchorElement)itemList1[i1 + 1]; + // var region1 = new SysRegion + // { + // Id = YitIdHelper.NextId(), + // Pid = region.Id, + // Name = item1.TextContent, + // Code = itemList1[i1].TextContent, + // Remark = item1.Href, + // Level = 2, + // }; + // + // // 若URL中查询的一级行政区域缺少Code则通过二级区域填充 + // if (list.Count == 1 && !string.IsNullOrEmpty(region1.Code)) + // region.Code = region1.Code.Substring(0, 2).PadRight(region1.Code.Length, '0'); + // + // // 同步层级为“1-省级”退出 + // if (syncLevel < 2) break; + // + // list.Add(region1); + // + // // 区县级 + // if (string.IsNullOrEmpty(item1.Href) || syncLevel <= 2) continue; + // + // var dom2 = await context.OpenAsync(item1.Href); + // var itemList2 = dom2.QuerySelectorAll("table.countytable tr.countytr td a"); + // for (var i2 = 0; i2 < itemList2.Length; i2 += 2) + // { + // var item2 = (IHtmlAnchorElement)itemList2[i2 + 1]; + // var region2 = new SysRegion + // { + // Id = YitIdHelper.NextId(), + // Pid = region1.Id, + // Name = item2.TextContent, + // Code = itemList2[i2].TextContent, + // Remark = item2.Href, + // Level = 3, + // }; + // list.Add(region2); + // + // // 街道级 + // if (string.IsNullOrEmpty(item2.Href) || syncLevel <= 3) continue; + // + // var dom3 = await context.OpenAsync(item2.Href); + // var itemList3 = dom3.QuerySelectorAll("table.towntable tr.towntr td a"); + // for (var i3 = 0; i3 < itemList3.Length; i3 += 2) + // { + // var item3 = (IHtmlAnchorElement)itemList3[i3 + 1]; + // var region3 = new SysRegion + // { + // Id = YitIdHelper.NextId(), + // Pid = region2.Id, + // Name = item3.TextContent, + // Code = itemList3[i3].TextContent, + // Remark = item3.Href, + // Level = 4, + // }; + // list.Add(region3); + // + // // 村级 + // if (string.IsNullOrEmpty(item3.Href) || syncLevel <= 4) continue; + // + // var dom4 = await context.OpenAsync(item3.Href); + // var itemList4 = dom4.QuerySelectorAll("table.villagetable tr.villagetr td"); + // for (var i4 = 0; i4 < itemList4.Length; i4 += 3) + // { + // list.Add(new SysRegion + // { + // Id = YitIdHelper.NextId(), + // Pid = region3.Id, + // Name = itemList4[i4 + 2].TextContent, + // Code = itemList4[i4].TextContent, + // CityCode = itemList4[i4 + 1].TextContent, + // Level = 5, + // }); + // } + // } + // } + // } + // } + // + // //按省份同步快速写入提升同步效率,全部一次性写入容易出现从统计局获取数据失败 + // await _sysRegionRep.Context.Fastest().BulkCopyAsync(list); + // } + } + + /// + /// 从统计局地图页面同步 + /// + /// + private async Task SyncByMap(int syncLevel) + { + var client = new HttpClient(); + client.DefaultRequestHeaders.Add("Referer", "http://xzqh.mca.gov.cn/map"); + var html = await client.GetStringAsync("http://xzqh.mca.gov.cn/map"); - foreach (var element in itemList) + var municipalityList = new List { "北京", "天津", "上海", "重庆" }; + var provList = Regex.Match(html, @"(?<=var json = )(\[\{.*?\}\])(?=;)").Value.ToJsonEntity>>(); + foreach (var dict1 in provList) { - var item = (IHtmlAnchorElement)element; var list = new List(); - - var region = new SysRegion + var provName = dict1.GetValueOrDefault("shengji"); + var province = new SysRegion { Id = YitIdHelper.NextId(), - Pid = 0, - Name = item.TextContent, - Remark = item.Href, + Name = Regex.Replace(provName, "[((].*?[))]", ""), + Code = dict1.GetValueOrDefault("quHuaDaiMa"), + CityCode = dict1.GetValueOrDefault("quhao"), Level = 1, + Pid = 0, }; - list.Add(region); + if (municipalityList.Any(m => province.Name.StartsWith(m))) province.Name += "(省)"; + list.Add(province); - // 市级 - if (!string.IsNullOrEmpty(item.Href)) + if (syncLevel <= 1) continue; + + var prefList = await GetSelectList(provName); + foreach (var dict2 in prefList) { - var dom1 = await context.OpenAsync(item.Href); - var itemList1 = dom1.QuerySelectorAll("table.citytable tr.citytr td a"); - for (var i1 = 0; i1 < itemList1.Length; i1 += 2) + var prefName = dict2.GetValueOrDefault("diji"); + var city = new SysRegion { - var item1 = (IHtmlAnchorElement)itemList1[i1 + 1]; - var region1 = new SysRegion + Id = YitIdHelper.NextId(), + Code = dict2.GetValueOrDefault("quHuaDaiMa"), + CityCode = dict2.GetValueOrDefault("quhao"), + Pid = province.Id, + Name = prefName, + Level = 2 + }; + if (municipalityList.Any(m => city.Name.StartsWith(m))) city.Name += "(地)"; + list.Add(city); + + if (syncLevel <= 2) continue; + + var countyList = await GetSelectList(provName, prefName); + foreach (var dict3 in countyList) + { + var countyName = dict3.GetValueOrDefault("xianji"); + var county = new SysRegion { Id = YitIdHelper.NextId(), - Pid = region.Id, - Name = item1.TextContent, - Code = itemList1[i1].TextContent, - Remark = item1.Href, - Level = 2, + Code = dict3.GetValueOrDefault("quHuaDaiMa"), + CityCode = dict3.GetValueOrDefault("quhao"), + Name = countyName, + Pid = city.Id, + Level = 3 }; - - // 若URL中查询的一级行政区域缺少Code则通过二级区域填充 - if (list.Count == 1 && !string.IsNullOrEmpty(region1.Code)) - region.Code = region1.Code.Substring(0, 2).PadRight(region1.Code.Length, '0'); - - // 同步层级为“1-省级”退出 - if (syncLevel < 2) break; - - list.Add(region1); - - // 区县级 - if (string.IsNullOrEmpty(item1.Href) || syncLevel <= 2) continue; - - var dom2 = await context.OpenAsync(item1.Href); - var itemList2 = dom2.QuerySelectorAll("table.countytable tr.countytr td a"); - for (var i2 = 0; i2 < itemList2.Length; i2 += 2) - { - var item2 = (IHtmlAnchorElement)itemList2[i2 + 1]; - var region2 = new SysRegion - { - Id = YitIdHelper.NextId(), - Pid = region1.Id, - Name = item2.TextContent, - Code = itemList2[i2].TextContent, - Remark = item2.Href, - Level = 3, - }; - list.Add(region2); - - // 街道级 - if (string.IsNullOrEmpty(item2.Href) || syncLevel <= 3) continue; - - var dom3 = await context.OpenAsync(item2.Href); - var itemList3 = dom3.QuerySelectorAll("table.towntable tr.towntr td a"); - for (var i3 = 0; i3 < itemList3.Length; i3 += 2) - { - var item3 = (IHtmlAnchorElement)itemList3[i3 + 1]; - var region3 = new SysRegion - { - Id = YitIdHelper.NextId(), - Pid = region2.Id, - Name = item3.TextContent, - Code = itemList3[i3].TextContent, - Remark = item3.Href, - Level = 4, - }; - list.Add(region3); - - // 村级 - if (string.IsNullOrEmpty(item3.Href) || syncLevel <= 4) continue; - - var dom4 = await context.OpenAsync(item3.Href); - var itemList4 = dom4.QuerySelectorAll("table.villagetable tr.villagetr td"); - for (var i4 = 0; i4 < itemList4.Length; i4 += 3) - { - list.Add(new SysRegion - { - Id = YitIdHelper.NextId(), - Pid = region3.Id, - Name = itemList4[i4 + 2].TextContent, - Code = itemList4[i4].TextContent, - CityCode = itemList4[i4 + 1].TextContent, - Level = 5, - }); - } - } - } + list.Add(county); } } - //按省份同步快速写入提升同步效率,全部一次性写入容易出现从统计局获取数据失败 await _sysRegionRep.Context.Fastest().BulkCopyAsync(list); } + + // 获取选择数据 + async Task>> GetSelectList(string prov, string prefecture=null) + { + var data = ""; + if (!string.IsNullOrWhiteSpace(prov)) data += $"shengji={prov}"; + if (!string.IsNullOrWhiteSpace(prefecture)) data += $"&diji={prefecture}"; + var json = await client.PostFormAsync("http://xzqh.mca.gov.cn/selectJson", data); + return json.ToJsonEntity>>(); + } } } \ No newline at end of file -- Gitee From 5827068e7cded6d33906f23694d9ac49a80dbfff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=97=BA=E5=91=80?= Date: Fri, 6 Dec 2024 21:12:13 +0800 Subject: [PATCH 31/84] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8C=89?= =?UTF-8?q?=E5=BA=93=E8=8E=B7=E5=8F=96=E8=A1=A8=E5=88=97=E8=A1=A8=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=8E=B7=E5=8F=96=E5=88=B0=E9=9D=9E=E6=9C=AC=E5=BA=93?= =?UTF-8?q?=E8=A1=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs index 7e91d685..0bd63d1f 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs @@ -152,6 +152,10 @@ public class SysCodeGenService : IDynamicApiController, ITransient var tableOutputList = new List(); foreach (var item in entityInfos) { + var tbConfigId = item.Type.GetCustomAttribute()?.configId as string ?? SqlSugarConst.MainConfigId ; + if (item.Type.IsDefined(typeof(LogTableAttribute))) tbConfigId = SqlSugarConst.LogConfigId; + if (tbConfigId != configId) continue; + var table = dbTableInfos.FirstOrDefault(u => string.Equals(u.Name, (config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(item.DbTableName) : item.DbTableName), StringComparison.CurrentCultureIgnoreCase)); if (table == null) continue; tableOutputList.Add(new TableOutput -- Gitee From f35b5b9e2d19d010b7997a085cc4a05b13ca901a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=97=BA=E5=91=80?= Date: Sat, 7 Dec 2024 20:19:13 +0800 Subject: [PATCH 32/84] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96bug=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=A8=A1=E6=9D=BF=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitee/ISSUE_TEMPLATE/bug.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitee/ISSUE_TEMPLATE/bug.yml b/.gitee/ISSUE_TEMPLATE/bug.yml index 81cd3b3b..b213862d 100644 --- a/.gitee/ISSUE_TEMPLATE/bug.yml +++ b/.gitee/ISSUE_TEMPLATE/bug.yml @@ -1,6 +1,6 @@ name: 🐞 Bug 反馈 description: 当你在代码中发现了一个 Bug,导致应用崩溃或抛出异常,或者有模块/组件存在问题、某些地方看起来不对劲。 -title: "🐞 bug: " +title: "🐞 " labels: [bug] assignees: - Argo @@ -55,14 +55,14 @@ body: 声明:请勿以其他任何方式提供复现工程,不符合要求的提交,一律视为无效问题,不予处理。 validations: required: true -- type: textarea - id: version +- type: dropdown + id: netVersion attributes: - label: .NET Version - description: | - Run `dotnet --version` - placeholder: | - [这里粘贴执行结果] + label: .NET Version + description: Run `dotnet --version` + options: + - .NET 6.0 + - .NET 8.0 validations: required: true - type: dropdown -- Gitee From e9e97fac9b3674ec80498226000ab57614bd2657 Mon Sep 17 00:00:00 2001 From: xin12023 Date: Sun, 8 Dec 2024 09:28:33 +0000 Subject: [PATCH 33/84] =?UTF-8?q?update=20Admin.NET/Admin.NET.Core/Service?= =?UTF-8?q?/Dict/SysDictTypeService.cs.=20fix:=20=20=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=89=80=E6=9C=89=E5=AD=97=E5=85=B8=E9=9B=86=E5=90=88=20?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xin12023 --- Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs b/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs index c333b7f3..f0f3ac74 100644 --- a/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs @@ -155,7 +155,7 @@ public class SysDictTypeService : IDynamicApiController, ITransient { var ds = await _sysDictTypeRep.AsQueryable() .InnerJoin((u, a) => u.Id == a.DictTypeId) - .Where((u, a) => u.IsDelete == false && a.IsDelete == false) + .Where((u, a) => u.IsDelete == false && a.Status == StatusEnum.Enable) .Select((u, a) => new { TypeCode = u.Code, a.Label, a.Value, a.Name, a.TagType, a.StyleSetting, a.ClassSetting, a.ExtData, a.Remark, a.OrderNo, a.Status }) .ToListAsync(); return ds.OrderBy(u => u.OrderNo).GroupBy(u => u.TypeCode).ToDictionary(u => u.Key, u => u); -- Gitee From 04010e0e289f6d0cc323ddb879a406cb258a2b0d Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Sun, 8 Dec 2024 22:29:34 +0800 Subject: [PATCH 34/84] =?UTF-8?q?=F0=9F=98=8E=E6=B8=85=E7=90=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=8F=8A=E5=8D=87=E7=BA=A7=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin.NET.Core/Admin.NET.Core.csproj | 6 +++--- .../Service/CodeGen/SysCodeGenService.cs | 4 ++-- .../Service/Region/SysRegionService.cs | 20 +++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj index 85fdf314..2b96f484 100644 --- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj +++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj @@ -38,12 +38,12 @@ - + - + - + diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs index 0bd63d1f..75291bf3 100644 --- a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs +++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs @@ -152,10 +152,10 @@ public class SysCodeGenService : IDynamicApiController, ITransient var tableOutputList = new List(); foreach (var item in entityInfos) { - var tbConfigId = item.Type.GetCustomAttribute()?.configId as string ?? SqlSugarConst.MainConfigId ; + var tbConfigId = item.Type.GetCustomAttribute()?.configId as string ?? SqlSugarConst.MainConfigId; if (item.Type.IsDefined(typeof(LogTableAttribute))) tbConfigId = SqlSugarConst.LogConfigId; if (tbConfigId != configId) continue; - + var table = dbTableInfos.FirstOrDefault(u => string.Equals(u.Name, (config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(item.DbTableName) : item.DbTableName), StringComparison.CurrentCultureIgnoreCase)); if (table == null) continue; tableOutputList.Add(new TableOutput diff --git a/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs b/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs index fc4e1a87..d4d781aa 100644 --- a/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs @@ -145,11 +145,11 @@ public class SysRegionService : IDynamicApiController, ITransient { var syncLevel = await _sysConfigService.GetConfigValue(ConfigConst.SysRegionSyncLevel); if (syncLevel is < 1 or > 5) syncLevel = 3;//默认区县级 - + await _sysRegionRep.DeleteAsync(u => u.Id > 0); - + await SyncByMap(syncLevel); - + // var context = BrowsingContext.New(AngleSharp.Configuration.Default.WithDefaultLoader()); // var dom = await context.OpenAsync(_url); // @@ -265,7 +265,7 @@ public class SysRegionService : IDynamicApiController, ITransient // await _sysRegionRep.Context.Fastest().BulkCopyAsync(list); // } } - + /// /// 从统计局地图页面同步 /// @@ -291,11 +291,11 @@ public class SysRegionService : IDynamicApiController, ITransient Level = 1, Pid = 0, }; - if (municipalityList.Any(m => province.Name.StartsWith(m))) province.Name += "(省)"; + if (municipalityList.Any(m => province.Name.StartsWith(m))) province.Name += "(省)"; list.Add(province); if (syncLevel <= 1) continue; - + var prefList = await GetSelectList(provName); foreach (var dict2 in prefList) { @@ -309,11 +309,11 @@ public class SysRegionService : IDynamicApiController, ITransient Name = prefName, Level = 2 }; - if (municipalityList.Any(m => city.Name.StartsWith(m))) city.Name += "(地)"; + if (municipalityList.Any(m => city.Name.StartsWith(m))) city.Name += "(地)"; list.Add(city); - + if (syncLevel <= 2) continue; - + var countyList = await GetSelectList(provName, prefName); foreach (var dict3 in countyList) { @@ -335,7 +335,7 @@ public class SysRegionService : IDynamicApiController, ITransient } // 获取选择数据 - async Task>> GetSelectList(string prov, string prefecture=null) + async Task>> GetSelectList(string prov, string prefecture = null) { var data = ""; if (!string.IsNullOrWhiteSpace(prov)) data += $"shengji={prov}"; -- Gitee From 07f372581115148b2ca1a8735072a1c20fbae319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=AD=A3=E5=85=B4?= <1016129865@qq.com> Date: Mon, 9 Dec 2024 10:55:07 +0800 Subject: [PATCH 35/84] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95=E5=B0=8F=E5=8C=BA=E9=9B=86?= =?UTF-8?q?=E5=90=88=20=E6=B7=BB=E5=8A=A0=E5=9F=BA=E7=AB=99=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseStation/ZTEBaseStationTester.cs | 36 +++++++ .../MTNet.Application/Entity/TestCell.cs | 24 +++++ .../MTNet.Application/Entity/TestTemplate.cs | 6 ++ .../IDAL/IBaseStationTester.cs | 11 +++ .../MTNet.Application/IDAL/IDeviceBase.cs | 34 +++++++ .../Service/Template/Dto/TemplateInput.cs | 9 +- ...tCaseActionInput.cs => TestActionInput.cs} | 0 .../Service/Template/Dto/TestCellInput.cs | 31 ++++++ ...tCaseDeviceInput.cs => TestDeviceInput.cs} | 0 .../Service/Template/TemplateService.cs | 25 +++-- .../Service/Template/TestActionService.cs | 4 +- .../Service/Template/TestCellService.cs | 97 +++++++++++++++++++ .../Service/Template/TestDeviceService.cs | 4 +- 13 files changed, 268 insertions(+), 13 deletions(-) create mode 100644 Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTEBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/Entity/TestCell.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/IBaseStationTester.cs create mode 100644 Admin.NET/MTNet.Application/IDAL/IDeviceBase.cs rename Admin.NET/MTNet.Application/Service/Template/Dto/{TestCaseActionInput.cs => TestActionInput.cs} (100%) create mode 100644 Admin.NET/MTNet.Application/Service/Template/Dto/TestCellInput.cs rename Admin.NET/MTNet.Application/Service/Template/Dto/{TestCaseDeviceInput.cs => TestDeviceInput.cs} (100%) create mode 100644 Admin.NET/MTNet.Application/Service/Template/TestCellService.cs diff --git a/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTEBaseStationTester.cs b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTEBaseStationTester.cs new file mode 100644 index 00000000..90f8afb8 --- /dev/null +++ b/Admin.NET/MTNet.Application/DriverLibrary/BaseStation/ZTEBaseStationTester.cs @@ -0,0 +1,36 @@ +using MTNet.Application.IDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.DriverLibrary.BaseStation; + +public class ZTEBaseStationTester : IBaseStationTester +{ + public int Connect() + { + throw new NotImplementedException(); + } + + public int Close() + { + throw new NotImplementedException(); + } + + public int BeforTest() + { + throw new NotImplementedException(); + } + + public int AfterTest() + { + throw new NotImplementedException(); + } + + public void Dispose() + { + throw new NotImplementedException(); + } +} diff --git a/Admin.NET/MTNet.Application/Entity/TestCell.cs b/Admin.NET/MTNet.Application/Entity/TestCell.cs new file mode 100644 index 00000000..b0ced7bc --- /dev/null +++ b/Admin.NET/MTNet.Application/Entity/TestCell.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Entity; + +[DeviceTable] +[SugarTable(null, "测试小区表")] +public class TestCell : EntityBase +{ + /// + /// 模板Id + /// + [SugarColumn(ColumnDescription = "模板Id")] + public long TemplateId { get; set; } + + /// + /// 小区Id + /// + [SugarColumn(ColumnDescription = "小区Id")] + public long CellId { get; set; } +} diff --git a/Admin.NET/MTNet.Application/Entity/TestTemplate.cs b/Admin.NET/MTNet.Application/Entity/TestTemplate.cs index 44490845..2b328899 100644 --- a/Admin.NET/MTNet.Application/Entity/TestTemplate.cs +++ b/Admin.NET/MTNet.Application/Entity/TestTemplate.cs @@ -28,6 +28,12 @@ public class TestTemplate : EntityBase [Navigate(NavigateType.OneToMany, nameof(TestDevice.TemplateId))] public List Devices { get; set; } + /// + /// 小区集合 + /// + [Navigate(NavigateType.OneToMany, nameof(TestCell.TemplateId))] + public List Cells { get; set; } + /// /// 动作集合 /// diff --git a/Admin.NET/MTNet.Application/IDAL/IBaseStationTester.cs b/Admin.NET/MTNet.Application/IDAL/IBaseStationTester.cs new file mode 100644 index 00000000..eab3c841 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IBaseStationTester.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL; + +public interface IBaseStationTester : IDeviceBase +{ +} diff --git a/Admin.NET/MTNet.Application/IDAL/IDeviceBase.cs b/Admin.NET/MTNet.Application/IDAL/IDeviceBase.cs new file mode 100644 index 00000000..e0522df8 --- /dev/null +++ b/Admin.NET/MTNet.Application/IDAL/IDeviceBase.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.IDAL; + +public interface IDeviceBase : IDisposable +{ + /// + /// 连接 + /// + /// 如果返回值小于0表示失败 + int Connect(); + + /// + /// 断开 + /// + /// 如果返回值小于0表示失败 + int Close(); + + /// + /// 测试开始前的操作 + /// + /// 如果返回值小于0表示失败 + int BeforTest(); + + /// + /// 测试结束后的操作 + /// + /// 如果返回值小于0表示失败 + int AfterTest(); +} diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs index ebc65cfb..8cb77516 100644 --- a/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TemplateInput.cs @@ -20,12 +20,17 @@ public class AddTestCaseTemplate public TestTypeEnum TestType { get; set; } /// - /// 设备值集合 + /// 设备集合 /// public List Devices { get; set; } /// - /// 动作值集合 + /// 小区集合 + /// + public List Cells { get; set; } + + /// + /// 动作集合 /// public List Actions { get; set; } } diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseActionInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestActionInput.cs similarity index 100% rename from Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseActionInput.cs rename to Admin.NET/MTNet.Application/Service/Template/Dto/TestActionInput.cs diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellInput.cs new file mode 100644 index 00000000..d93375b9 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellInput.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +public class AddTestCellInput +{ + /// + /// 测试例Id + /// + [Required(ErrorMessage = "测试例Id不能为空")] + public long TemplateId { get; set; } + + /// + /// 小区Id + /// + [Required(ErrorMessage = "小区Id不能为空")] + public long CellId { get; set; } +} + +public class UpdateTestCellInput : AddTestCellInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseDeviceInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestDeviceInput.cs similarity index 100% rename from Admin.NET/MTNet.Application/Service/Template/Dto/TestCaseDeviceInput.cs rename to Admin.NET/MTNet.Application/Service/Template/Dto/TestDeviceInput.cs diff --git a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs index e43dd803..e279710c 100644 --- a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs +++ b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs @@ -18,14 +18,16 @@ public class TemplateService : IDynamicApiController, ITransient { private readonly SqlSugarRepository _templateRep; private readonly TestDeviceService _deviceService; + private readonly TestCellService _cellService; private readonly TestActionService _actionService; private readonly SysEnumService _enumService; private readonly UserManager _userManager; - public TemplateService(SqlSugarRepository templateRep, TestDeviceService deviceService, TestActionService actionService, SysEnumService enumService, UserManager userManager) + public TemplateService(SqlSugarRepository templateRep, TestDeviceService deviceService, TestCellService cellService, TestActionService actionService, SysEnumService enumService, UserManager userManager) { _templateRep = templateRep; _deviceService = deviceService; + _cellService = cellService; _actionService = actionService; _enumService = enumService; _userManager = userManager; @@ -46,8 +48,9 @@ public class TemplateService : IDynamicApiController, ITransient query.ForEach(async x => { - x.Devices = await _deviceService.GetDeviceListByTypeCaseId(x.Id); - x.Actions = await _actionService.GetActionListByTypeCaseId(x.Id); + x.Devices = await _deviceService.GetListByTemplateId(x.Id); + x.Cells = await _cellService.GetListByTemplateId(x.Id); + x.Actions = await _actionService.GetListByTemplateId(x.Id); }); return query; @@ -96,6 +99,9 @@ public class TemplateService : IDynamicApiController, ITransient input.Devices.ForEach(x => x.TemplateId = id); var deviceFlag = await _deviceService.AddList(input.Devices); + input.Cells.ForEach(x => x.TemplateId = id); + var cellFlag = await _cellService.AddList(input.Cells); + input.Actions.ForEach(x => x.TemplateId = id); var actionFlag = await _actionService.AddList(input.Actions); } @@ -122,11 +128,15 @@ public class TemplateService : IDynamicApiController, ITransient var count = await _templateRep.AsUpdateable(entity).ExecuteCommandAsync(); if (count > 0) { - await _deviceService.DeleteDeviceListByTypeCaseId(input.Id); + await _deviceService.DeleteListByTemplateId(input.Id); input.Devices.ForEach(x => x.TemplateId = input.Id); var deviceFlag = await _deviceService.AddList(input.Devices); - await _actionService.DeleteActionListByTypeCaseId(input.Id); + await _cellService.DeleteListByTemplateId(input.Id); + input.Cells.ForEach(x => x.TemplateId = input.Id); + var cellFlag = await _cellService.AddList(input.Cells); + + await _actionService.DeleteListByTemplateId(input.Id); input.Actions.ForEach(x => x.TemplateId = input.Id); var actionFlag = await _actionService.AddList(input.Actions); } @@ -144,7 +154,8 @@ public class TemplateService : IDynamicApiController, ITransient var entity = await _templateRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); await _templateRep.DeleteAsync(entity); - await _deviceService.DeleteDeviceListByTypeCaseId(input.Id); - await _actionService.DeleteActionListByTypeCaseId(input.Id); + await _deviceService.DeleteListByTemplateId(input.Id); + await _cellService.DeleteListByTemplateId(input.Id); + await _actionService.DeleteListByTemplateId(input.Id); } } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/TestActionService.cs b/Admin.NET/MTNet.Application/Service/Template/TestActionService.cs index e9023e86..1292bcdc 100644 --- a/Admin.NET/MTNet.Application/Service/Template/TestActionService.cs +++ b/Admin.NET/MTNet.Application/Service/Template/TestActionService.cs @@ -76,7 +76,7 @@ public class TestActionService : IDynamicApiController, ITransient /// /// [NonAction] - public async Task> GetActionListByTypeCaseId(long templateId) + public async Task> GetListByTemplateId(long templateId) { var actionList = await _testActionRep.AsQueryable() .Where(u => u.TemplateId == templateId) @@ -91,7 +91,7 @@ public class TestActionService : IDynamicApiController, ITransient /// /// [NonAction] - public async Task DeleteActionListByTypeCaseId(long templateId) + public async Task DeleteListByTemplateId(long templateId) { await _testActionRep.DeleteAsync(u => u.TemplateId == templateId); } diff --git a/Admin.NET/MTNet.Application/Service/Template/TestCellService.cs b/Admin.NET/MTNet.Application/Service/Template/TestCellService.cs new file mode 100644 index 00000000..69daca76 --- /dev/null +++ b/Admin.NET/MTNet.Application/Service/Template/TestCellService.cs @@ -0,0 +1,97 @@ +using Microsoft.AspNetCore.Authentication.JwtBearer; +using MTNet.Application.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MTNet.Application.Service; + +/// +/// 测试模板设备接口 +/// +[ApiDescriptionSettings("自动化测试接口", Name = "TestCell", Order = 100)] +[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme + "," + SignatureAuthenticationDefaults.AuthenticationScheme)] +public class TestCellService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _testCellRep; + private readonly UserManager _userManager; + + public TestCellService(SqlSugarRepository testCellRep, UserManager userManager) + { + _testCellRep = testCellRep; + _userManager = userManager; + } + + /// + /// 增加模板小区 🔖 + /// + /// + /// + [DisplayName("增加模板小区")] + [ApiDescriptionSettings(Name = "Add"), HttpPost] + public async Task Add(AddTestCellInput input) + { + var entity = input.Adapt(); + var dtNow = DateTime.Now; + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + + return await _testCellRep.InsertAsync(entity) ? entity.Id : 0; + } + + /// + /// 增加模板小区集合 🔖 + /// + /// + /// + [DisplayName("增加模板小区集合")] + [ApiDescriptionSettings(Name = "AddList"), HttpPost] + public async Task AddList(List inputList) + { + var entityList = inputList.Adapt>(); + var dtNow = DateTime.Now; + entityList.ForEach(entity => + { + entity.CreateTime = dtNow; + entity.UpdateTime = dtNow; + entity.CreateUserId = _userManager.UserId; + entity.CreateUserName = _userManager.RealName; + entity.UpdateUserId = _userManager.UserId; + entity.UpdateUserName = _userManager.RealName; + }); + + return await _testCellRep.InsertRangeAsync(entityList); + } + + /// + /// 获取模板小区集合 + /// + /// + /// + [NonAction] + public async Task> GetListByTemplateId(long templateId) + { + var cellList = await _testCellRep.AsQueryable() + .Where(u => u.TemplateId == templateId) + .OrderBy(u => new { Code = u.Id }) + .ToListAsync(); + return cellList; + } + + /// + /// 删除模板小区集合 + /// + /// + /// + [NonAction] + public async Task DeleteListByTemplateId(long templateId) + { + await _testCellRep.DeleteAsync(u => u.TemplateId == templateId); + } +} \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Template/TestDeviceService.cs b/Admin.NET/MTNet.Application/Service/Template/TestDeviceService.cs index 2df45562..a4e1c939 100644 --- a/Admin.NET/MTNet.Application/Service/Template/TestDeviceService.cs +++ b/Admin.NET/MTNet.Application/Service/Template/TestDeviceService.cs @@ -76,7 +76,7 @@ public class TestDeviceService : IDynamicApiController, ITransient /// /// [NonAction] - public async Task> GetDeviceListByTypeCaseId(long templateId) + public async Task> GetListByTemplateId(long templateId) { var deviceList = await _testDeviceRep.AsQueryable() .Where(u => u.TemplateId == templateId) @@ -91,7 +91,7 @@ public class TestDeviceService : IDynamicApiController, ITransient /// /// [NonAction] - public async Task DeleteDeviceListByTypeCaseId(long templateId) + public async Task DeleteListByTemplateId(long templateId) { await _testDeviceRep.DeleteAsync(u => u.TemplateId == templateId); } -- Gitee From 13ae56f3fb63018ab6e2a59429fe77880219f3df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=AD=A3=E5=85=B4?= <1016129865@qq.com> Date: Mon, 9 Dec 2024 17:40:11 +0800 Subject: [PATCH 36/84] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=B1=9E=E6=80=A7=E5=AE=9A=E4=B9=89=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96=E6=8C=87=E5=AE=9A=E5=9F=BA?= =?UTF-8?q?=E7=AB=99=E4=B8=8B=E7=9A=84=E5=B0=8F=E5=8C=BA=E6=95=B0=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8E=A5=E5=8F=A3=20=E4=BF=AE=E6=94=B9=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=B0=8F=E5=8C=BA=E7=B1=BB=E5=9E=8B=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin.NET.Core/SeedData/SysAppSeedData.cs | 2 +- .../BaseStationTesterAddrConfig.cs | 2 +- .../ChannelEmulatorAddrConfig.cs | 2 +- .../CommunicationTesterAddrConfig.cs | 2 +- .../DeviceAddr Parameters/DeviceAddrConfig.cs | 4 +- .../HighSpeedSwitchBoxAddrConfig.cs | 2 +- .../InterferenceGeneratorAddrConfig.cs | 2 +- .../NetworkAnalyzerAddrConfig.cs | 2 +- .../NetworkDamageTesterAddrConfig.cs | 2 +- .../PhaseShifterAddrConfig.cs | 2 +- .../PowerConsumptionTesterAddrConfig.cs | 2 +- .../ProgrammableAttenuatorAddrConfig.cs | 2 +- .../ScannerAddrConfig.cs | 2 +- .../SignalGeneratorAddrConfig.cs | 2 +- .../SpecialEquipmentAddrConfig.cs | 2 +- .../SpectrumAnalyzerAddrConfig.cs | 2 +- .../SwitchBoxAddrConfig.cs | 2 +- .../TurntableAddrConfig.cs | 2 +- .../UEMonitorAddrConfig.cs | 2 +- .../UserEquipmentAddrConfig.cs | 2 +- ...relessRoadMeasuringInstrumentAddrConfig.cs | 2 +- .../MTNet.Application/Entity/TestCell.cs | 8 +- .../SeedData/DeviceSeedData.cs | 114 +++++++++--------- .../Service/Device/BaseStationService.cs | 29 ++++- .../Service/Device/DeviceService.cs | 4 +- .../Service/Template/Dto/TestCellInput.cs | 8 +- .../Service/Template/TemplateService.cs | 6 + 27 files changed, 128 insertions(+), 85 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs index cfb58e24..53edcee6 100644 --- a/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs +++ b/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs @@ -20,7 +20,7 @@ public class SysAppSeedData : ISqlSugarEntitySeedData return new[] { //new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="Admin.NET", ViceTitle="Admin.NET", ViceDesc="站在巨人肩膀上的 .NET 通用权限开发框架", Watermark="Admin.NET", Copyright="Copyright \u00a9 2021-present Admin.NET All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, - new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="OTA_Mirror", ViceTitle="MTNet", ViceDesc="自动化测试 V3.0", Watermark="OTA_Mirror", Copyright="Copyright \u00a9 2021-present MTNet All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, + new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="OTALL_Mirror", ViceTitle="MTNet", ViceDesc="自动化测试 V3.0", Watermark="OTALL_Mirror", Copyright="Copyright \u00a9 2021-present MTNet All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") }, }; } } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs index f14c4d73..72ac30db 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/BaseStationTesterAddrConfig.cs @@ -28,6 +28,6 @@ public class BaseStationTesterAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs index 8ca31aca..fbb58c04 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ChannelEmulatorAddrConfig.cs @@ -28,6 +28,6 @@ public class ChannelEmulatorAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs index 935c2684..f9c56da7 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/CommunicationTesterAddrConfig.cs @@ -28,6 +28,6 @@ public class CommunicationTesterAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs index e1b67dd8..fec53308 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/DeviceAddrConfig.cs @@ -14,7 +14,7 @@ public class DeviceAddrConfig : EntityBase { [SugarColumn(ColumnDescription = "设备名称", Length = 32), Required, MaxLength(32)] [Description("Set the name of the device,and it cannot be repeated."), Category("Basic Parameters"), DisplayName("Device Name"), Browsable(true)] - public string DeviceNameConfig { get; set; } = ""; + public string Name { get; set; } = ""; [SugarColumn(ColumnDescription = "设备类型")] [Description("Set the type of the device."), Category("Basic Parameters"), DisplayName("Device Type")] @@ -62,6 +62,6 @@ public class DeviceAddrConfig : EntityBase public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs index 96ed94ce..8bf0662d 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/HighSpeedSwitchBoxAddrConfig.cs @@ -28,6 +28,6 @@ public class HighSpeedSwitchBoxAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs index 5a2a1e96..249c3fa7 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/InterferenceGeneratorAddrConfig.cs @@ -28,6 +28,6 @@ public class InterferenceGeneratorAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs index 4922a2da..fd5030df 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkAnalyzerAddrConfig.cs @@ -28,6 +28,6 @@ public class NetworkAnalyzerAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs index 6b184923..b0d19e56 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/NetworkDamageTesterAddrConfig.cs @@ -28,6 +28,6 @@ public class NetworkDamageTesterAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs index 5869b4c7..616e3991 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PhaseShifterAddrConfig.cs @@ -28,6 +28,6 @@ public class PhaseShifterAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs index 2d899a13..d253449e 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/PowerConsumptionTesterAddrConfig.cs @@ -28,6 +28,6 @@ public class PowerConsumptionTesterAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs index ded70d85..1dfb9022 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ProgrammableAttenuatorAddrConfig.cs @@ -28,6 +28,6 @@ public class ProgrammableAttenuatorAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs index 9523f819..95d4ca7c 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/ScannerAddrConfig.cs @@ -28,6 +28,6 @@ public class ScannerAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs index 2a353535..d2198ca4 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SignalGeneratorAddrConfig.cs @@ -28,6 +28,6 @@ public class SignalGeneratorAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs index 933d66a1..c64956f6 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpecialEquipmentAddrConfig.cs @@ -28,6 +28,6 @@ public class SpecialEquipmentAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs index dc9acda0..072a91c2 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SpectrumAnalyzerAddrConfig.cs @@ -28,6 +28,6 @@ public class SpectrumAnalyzerAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs index 97e661f9..a5436320 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/SwitchBoxAddrConfig.cs @@ -28,6 +28,6 @@ public class SwitchBoxAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs index a71c6061..0fcb5a9c 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/TurntableAddrConfig.cs @@ -30,6 +30,6 @@ public class TurntableAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs index 9d93f631..3509b22b 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UEMonitorAddrConfig.cs @@ -28,6 +28,6 @@ public class UEMonitorAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs index b313fad1..9a859491 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/UserEquipmentAddrConfig.cs @@ -31,6 +31,6 @@ public class UserEquipmentAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs index 92c558c5..8db1bcdc 100644 --- a/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs +++ b/Admin.NET/MTNet.Application/Entity/DeviceAddr Parameters/WirelessRoadMeasuringInstrumentAddrConfig.cs @@ -28,6 +28,6 @@ public class WirelessRoadMeasuringInstrumentAddrConfig : DeviceAddrConfig public override string ToString() { - return string.Format("{0}", DeviceNameConfig.ToString()); + return string.Format("{0}", Name.ToString()); } } diff --git a/Admin.NET/MTNet.Application/Entity/TestCell.cs b/Admin.NET/MTNet.Application/Entity/TestCell.cs index b0ced7bc..d7ec753e 100644 --- a/Admin.NET/MTNet.Application/Entity/TestCell.cs +++ b/Admin.NET/MTNet.Application/Entity/TestCell.cs @@ -16,9 +16,15 @@ public class TestCell : EntityBase [SugarColumn(ColumnDescription = "模板Id")] public long TemplateId { get; set; } + /// + /// 基站Id + /// + [SugarColumn(ColumnDescription = "基站Id")] + public int NodeBId { get; set; } + /// /// 小区Id /// [SugarColumn(ColumnDescription = "小区Id")] - public long CellId { get; set; } + public int CellId { get; set; } } diff --git a/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs b/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs index b740999d..37c3a2d8 100644 --- a/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs +++ b/Admin.NET/MTNet.Application/SeedData/DeviceSeedData.cs @@ -22,99 +22,99 @@ public class DeviceSeedData : ISqlSugarEntitySeedData return new[] { //基站 - new DeviceAddrConfig { DeviceNameConfig = "ZTE", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.ZTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "10.92.243.190", PortConfig = 2443, UserName = "Test-op", Password = "123456Mt!@#", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Nokia74", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Nokia, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "180.18.132.74", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Nokia79", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Nokia, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "180.18.132.79", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Huawei", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Huawei, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "178.16.10.184", PortConfig = 31114, UserName = "mtnet_test", Password = "Caict123.", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Ericsson", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Ericsson, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.168.131", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VBS", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "ZTE", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.ZTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "10.92.243.190", PortConfig = 2443, UserName = "Test-op", Password = "123456Mt!@#", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Nokia74", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Nokia, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "180.18.132.74", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Nokia79", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Nokia, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "180.18.132.79", PortConfig = 443, UserName = "Nemuadmin", Password = "nemuuser", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Huawei", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Huawei, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "178.16.10.184", PortConfig = 31114, UserName = "mtnet_test", Password = "Caict123.", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Ericsson", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Ericsson, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.168.131", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VBS", DeviceTypeConfig = DeviceTypeEnum.BaseStationTester, DeviceModelConfig = (int)BaseStationTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 31114, UserName = "", Password = "", CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //信道仿真器 - new DeviceAddrConfig { DeviceNameConfig = "F64", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Keyseight_F64, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Vertex", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Spirent_Vertex, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VCE", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "F64", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Keyseight_F64, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Vertex", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Spirent_Vertex, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VCE", DeviceTypeConfig = DeviceTypeEnum.ChannelEmulator, DeviceModelConfig = (int)ChannelEmulatorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //综合测试仪 - new DeviceAddrConfig { DeviceNameConfig = "MT8000A", DeviceTypeConfig = DeviceTypeEnum.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterTypeEnum.MT8000A_NR, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VCT", DeviceTypeConfig = DeviceTypeEnum.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "MT8000A", DeviceTypeConfig = DeviceTypeEnum.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterTypeEnum.MT8000A_NR, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VCT", DeviceTypeConfig = DeviceTypeEnum.CommunicationTester, DeviceModelConfig = (int)CommunicationTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //网络分析仪 - new DeviceAddrConfig { DeviceNameConfig = "E5071C", DeviceTypeConfig = DeviceTypeEnum.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerTypeEnum.E5071C, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VNA", DeviceTypeConfig = DeviceTypeEnum.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "E5071C", DeviceTypeConfig = DeviceTypeEnum.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerTypeEnum.E5071C, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VNA", DeviceTypeConfig = DeviceTypeEnum.NetworkAnalyzer, DeviceModelConfig = (int)NetworkAnalyzerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //信号源 - new DeviceAddrConfig { DeviceNameConfig = "ZSA", DeviceTypeConfig = DeviceTypeEnum.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorTypeEnum.ZSA_S6000, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VSG", DeviceTypeConfig = DeviceTypeEnum.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "ZSA", DeviceTypeConfig = DeviceTypeEnum.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorTypeEnum.ZSA_S6000, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VSG", DeviceTypeConfig = DeviceTypeEnum.SignalGenerator, DeviceModelConfig = (int)SignalGeneratorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //特殊设备 - new DeviceAddrConfig { DeviceNameConfig = "VSE", DeviceTypeConfig = DeviceTypeEnum.SpecialEquipment, DeviceModelConfig = (int)SpecialEquipmentTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VSE", DeviceTypeConfig = DeviceTypeEnum.SpecialEquipment, DeviceModelConfig = (int)SpecialEquipmentTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //频谱分析仪 - new DeviceAddrConfig { DeviceNameConfig = "N9040B", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.N9040B, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "FSW", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.FSW, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "ZSA", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.ZSA_F6000, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VSA", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "N9040B", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.N9040B, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "FSW", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.FSW, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "ZSA", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.ZSA_F6000, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VSA", DeviceTypeConfig = DeviceTypeEnum.SpectrumAnalyzer, DeviceModelConfig = (int)SpectrumAnalyzerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //无线路测仪 - new DeviceAddrConfig { DeviceNameConfig = "WSW", DeviceTypeConfig = DeviceTypeEnum.WirelessRoadMeasuringInstrument, DeviceModelConfig = (int)WirelessRoadMeasuringInstrumentTypeEnum.WSW, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VRM", DeviceTypeConfig = DeviceTypeEnum.WirelessRoadMeasuringInstrument, DeviceModelConfig = (int)WirelessRoadMeasuringInstrumentTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "WSW", DeviceTypeConfig = DeviceTypeEnum.WirelessRoadMeasuringInstrument, DeviceModelConfig = (int)WirelessRoadMeasuringInstrumentTypeEnum.WSW, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VRM", DeviceTypeConfig = DeviceTypeEnum.WirelessRoadMeasuringInstrument, DeviceModelConfig = (int)WirelessRoadMeasuringInstrumentTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //功率测试仪 - new DeviceAddrConfig { DeviceNameConfig = "UDP3305S", DeviceTypeConfig = DeviceTypeEnum.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterTypeEnum.UDP3305S, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VPC", DeviceTypeConfig = DeviceTypeEnum.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "UDP3305S", DeviceTypeConfig = DeviceTypeEnum.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterTypeEnum.UDP3305S, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VPC", DeviceTypeConfig = DeviceTypeEnum.PowerConsumptionTester, DeviceModelConfig = (int)PowerConsumptionTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //网络损伤仪 - new DeviceAddrConfig { DeviceNameConfig = "Spirent", DeviceTypeConfig = DeviceTypeEnum.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterTypeEnum.Spirent, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VND", DeviceTypeConfig = DeviceTypeEnum.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Spirent", DeviceTypeConfig = DeviceTypeEnum.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterTypeEnum.Spirent, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VND", DeviceTypeConfig = DeviceTypeEnum.NetworkDamageTester, DeviceModelConfig = (int)NetworkDamageTesterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //干扰发生器 - new DeviceAddrConfig { DeviceNameConfig = "VIG", DeviceTypeConfig = DeviceTypeEnum.InterferenceGenerator, DeviceModelConfig = (int)InterferenceGeneratorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VIG", DeviceTypeConfig = DeviceTypeEnum.InterferenceGenerator, DeviceModelConfig = (int)InterferenceGeneratorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //转台 - new DeviceAddrConfig { DeviceNameConfig = "HBTE252", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.252", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "HBTE253", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.253", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "HBTE254", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "HansRobot", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HansRobot, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "Maturo", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.Maturo, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VTT", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "HBTE252", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.252", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "HBTE253", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.253", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "HBTE254", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "HansRobot", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.HansRobot, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Maturo", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.Maturo, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VTT", DeviceTypeConfig = DeviceTypeEnum.Turntable, DeviceModelConfig = (int)TurntableTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //扫描架 - new DeviceAddrConfig { DeviceNameConfig = "VSC", DeviceTypeConfig = DeviceTypeEnum.Scanner, DeviceModelConfig = (int)ScannerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VSC", DeviceTypeConfig = DeviceTypeEnum.Scanner, DeviceModelConfig = (int)ScannerTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //开关箱 - new DeviceAddrConfig { DeviceNameConfig = "VSB", DeviceTypeConfig = DeviceTypeEnum.SwitchBox, DeviceModelConfig = (int)SwitchBoxTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VSB", DeviceTypeConfig = DeviceTypeEnum.SwitchBox, DeviceModelConfig = (int)SwitchBoxTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //高速开关箱 - new DeviceAddrConfig { DeviceNameConfig = "VHS", DeviceTypeConfig = DeviceTypeEnum.HighSpeedSwitchBox, DeviceModelConfig = (int)HighSpeedSwitchBoxTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VHS", DeviceTypeConfig = DeviceTypeEnum.HighSpeedSwitchBox, DeviceModelConfig = (int)HighSpeedSwitchBoxTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //调相网络 - new DeviceAddrConfig { DeviceNameConfig = "HBTE", DeviceTypeConfig = DeviceTypeEnum.PhaseShifter, DeviceModelConfig = (int)PhaseShifterTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VSG", DeviceTypeConfig = DeviceTypeEnum.PhaseShifter, DeviceModelConfig = (int)PhaseShifterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "HBTE", DeviceTypeConfig = DeviceTypeEnum.PhaseShifter, DeviceModelConfig = (int)PhaseShifterTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.254", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VSG", DeviceTypeConfig = DeviceTypeEnum.PhaseShifter, DeviceModelConfig = (int)PhaseShifterTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //程控矩阵 - new DeviceAddrConfig { DeviceNameConfig = "PA130", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA131", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.131", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA132", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.132", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA133", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.133", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA134", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.134", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA135", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.135", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA136", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.136", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA137", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.137", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA245", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.245", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA246", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.246", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA247", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.247", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA248", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.248", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "PA249", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.249", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VPA", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA130", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.130", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA131", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.131", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA132", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.132", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA133", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.133", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA134", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.134", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA135", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.135", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA136", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.136", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA137", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.137", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA245", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.245", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA246", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.246", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA247", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.247", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA248", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.248", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "PA249", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.HBTE, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.249", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VPA", DeviceTypeConfig = DeviceTypeEnum.ProgrammableAttenuator, DeviceModelConfig = (int)ProgrammableAttenuatorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //终端 - new DeviceAddrConfig { DeviceNameConfig = "Android", DeviceTypeConfig = DeviceTypeEnum.UserEquipment, DeviceModelConfig = (int)UserEquipmentTypeEnum.Android, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VUE", DeviceTypeConfig = DeviceTypeEnum.UserEquipment, DeviceModelConfig = (int)UserEquipmentTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "Android", DeviceTypeConfig = DeviceTypeEnum.UserEquipment, DeviceModelConfig = (int)UserEquipmentTypeEnum.Android, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VUE", DeviceTypeConfig = DeviceTypeEnum.UserEquipment, DeviceModelConfig = (int)UserEquipmentTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, //终端模拟器 - new DeviceAddrConfig { DeviceNameConfig = "DoToutch", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.DoToutch, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "E500", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.E500, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, - new DeviceAddrConfig { DeviceNameConfig = "VUM", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "DoToutch", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.DoToutch, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "E500", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.E500, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "192.168.1.100", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, + new DeviceAddrConfig { Name = "VUM", DeviceTypeConfig = DeviceTypeEnum.UeMonitor, DeviceModelConfig = (int)UeMonitorTypeEnum.Virtual, CommunicationTypeConfig = CommunicationTypeEnum.Socket, AddrConfig = "127.0.0.1", PortConfig = 5000, CreateTime = DateTime.Parse("2022-02-10 00:00:00") }, }; } } \ No newline at end of file diff --git a/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs index 6ff888fd..61e3a730 100644 --- a/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs +++ b/Admin.NET/MTNet.Application/Service/Device/BaseStationService.cs @@ -71,15 +71,40 @@ public class BaseStationService : IDynamicApiController, ITransient { List treeList = new List(); var bsList = await _deviceRep.AsQueryable().Where(x => x.DeviceTypeConfig == DeviceTypeEnum.BaseStationTester).ToListAsync(); - var cellList = await _cellRep.AsQueryable().ToListAsync(); if (bsList?.Any() == true) { + var cellList = await _cellRep.AsQueryable().ToListAsync(); foreach (var bs in bsList) { var children = cellList?.Where(x => x.DeviceId == bs.Id).ToList(); if (children?.Any() == true) { - treeList.Add(new CellTree { Name = bs.DeviceNameConfig, Children = children }); + treeList.Add(new CellTree { Name = bs.Name, Children = children }); + } + } + } + return treeList; + } + + /// + /// 获取指定基站的小区树列表 🔖 + /// + /// + [DisplayName("获取指定基站的小区树列表")] + [ApiDescriptionSettings(Name = "GetTreeListById"), HttpPost] + public async Task> GetTreeListById(List deviceIdList) + { + List treeList = new List(); + var bsList = await _deviceRep.AsQueryable().Where(x => x.DeviceTypeConfig == DeviceTypeEnum.BaseStationTester).WhereIF(deviceIdList?.Any() == true, x => deviceIdList.Contains(x.Id)).ToListAsync(); + if (bsList?.Any() == true) + { + var cellList = await _cellRep.AsQueryable().ToListAsync(); + foreach (var bs in bsList) + { + var children = cellList?.Where(x => x.DeviceId == bs.Id).ToList(); + if (children?.Any() == true) + { + treeList.Add(new CellTree { Name = bs.Name, Children = children }); } } } diff --git a/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs index ecfd1662..8af741d0 100644 --- a/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs +++ b/Admin.NET/MTNet.Application/Service/Device/DeviceService.cs @@ -53,7 +53,7 @@ public class DeviceService : IDynamicApiController, ITransient { keyword = keyword?.Trim(); var query = _deviceRep.AsQueryable() - .WhereIF(!string.IsNullOrWhiteSpace(keyword), u => u.DeviceNameConfig.Contains(keyword) + .WhereIF(!string.IsNullOrWhiteSpace(keyword), u => u.Name.Contains(keyword) || u.DeviceTypeConfig.ToString().Contains(keyword) || u.AddrConfig.Contains(keyword) || u.UserName.Contains(keyword) @@ -101,7 +101,7 @@ public class DeviceService : IDynamicApiController, ITransient { input.Keyword = input.Keyword?.Trim(); var query = _deviceRep.AsQueryable() - .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.DeviceNameConfig.Contains(input.Keyword) + .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) || u.DeviceTypeConfig.ToString().Contains(input.Keyword) || u.AddrConfig.Contains(input.Keyword) || u.UserName.Contains(input.Keyword) diff --git a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellInput.cs b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellInput.cs index d93375b9..7977a62b 100644 --- a/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellInput.cs +++ b/Admin.NET/MTNet.Application/Service/Template/Dto/TestCellInput.cs @@ -14,11 +14,17 @@ public class AddTestCellInput [Required(ErrorMessage = "测试例Id不能为空")] public long TemplateId { get; set; } + /// + /// 基站Id + /// + [Required(ErrorMessage = "基站Id不能为空")] + public int NodeBId { get; set; } + /// /// 小区Id /// [Required(ErrorMessage = "小区Id不能为空")] - public long CellId { get; set; } + public int CellId { get; set; } } public class UpdateTestCellInput : AddTestCellInput diff --git a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs index e279710c..ebc35362 100644 --- a/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs +++ b/Admin.NET/MTNet.Application/Service/Template/TemplateService.cs @@ -1,4 +1,5 @@ using Admin.NET.Core.Service; +using Furion.DatabaseAccessor; using Microsoft.AspNetCore.Authentication.JwtBearer; using MTNet.Application.Entity; using System; @@ -37,6 +38,7 @@ public class TemplateService : IDynamicApiController, ITransient /// 获取测试模板列表 🔖 /// /// + [UnitOfWork] [DisplayName("获取测试模板列表")] [ApiDescriptionSettings(Name = "GetList"), HttpPost] public async Task> GetList() @@ -61,6 +63,7 @@ public class TemplateService : IDynamicApiController, ITransient ///
/// /// + [UnitOfWork] [DisplayName("分页查询测试模板")] [ApiDescriptionSettings(Name = "Page"), HttpPost] public async Task> Page(BasePageInput input) @@ -80,6 +83,7 @@ public class TemplateService : IDynamicApiController, ITransient ///
/// /// + [UnitOfWork] [DisplayName("增加测试模板")] [ApiDescriptionSettings(Name = "Add"), HttpPost] public async Task Add(AddTestCaseTemplate input) @@ -114,6 +118,7 @@ public class TemplateService : IDynamicApiController, ITransient /// /// /// + [UnitOfWork] [DisplayName("更新测试模板")] [ApiDescriptionSettings(Name = "Update"), HttpPost] public async Task Update(UpdateTestCaseTemplateInput input) @@ -147,6 +152,7 @@ public class TemplateService : IDynamicApiController, ITransient /// /// /// + [UnitOfWork] [DisplayName("删除测试模板")] [ApiDescriptionSettings(Name = "Delete"), HttpPost] public async Task Delete(BaseIdInput input) -- Gitee From 8a7d17bd427e8e1d14e6ffed1a4d1652429770c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=97=BA=E5=91=80?= Date: Mon, 9 Dec 2024 19:06:52 +0800 Subject: [PATCH 37/84] =?UTF-8?q?chore:=20=E5=BC=BA=E5=88=B6=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E6=89=80=E6=9C=89=E6=96=87=E6=9C=AC=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20LF=20=E8=A1=8C=E5=B0=BE=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..94f480de --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf \ No newline at end of file -- Gitee From a053d95e4f05cd860add440030495369a47c0197 Mon Sep 17 00:00:00 2001 From: wxh <906562008@qq.com> Date: Tue, 10 Dec 2024 11:06:11 +0800 Subject: [PATCH 38/84] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=B7=BB=E5=8A=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/api-services/api.ts | 1 + .../api-services/apis/test-template-api.ts | 879 ++++++++++++++++++ .../test/device/component/editDevice.vue | 4 +- Web/src/views/test/device/index.vue | 4 +- .../test/mapping/component/mappingTree.vue | 2 +- .../test/template/component/editTemplate.vue | 218 +++++ Web/src/views/test/template/index.vue | 159 +++- 7 files changed, 1258 insertions(+), 9 deletions(-) create mode 100644 Web/src/api-services/apis/test-template-api.ts create mode 100644 Web/src/views/test/template/component/editTemplate.vue diff --git a/Web/src/api-services/api.ts b/Web/src/api-services/api.ts index 72f66c5d..c99fa76d 100644 --- a/Web/src/api-services/api.ts +++ b/Web/src/api-services/api.ts @@ -57,3 +57,4 @@ export * from './apis/sys-wx-open-api'; /**----------------------------------------- */ export * from './apis/test-device-api'; export * from './apis/test-mapping-api'; +export * from './apis/test-template-api'; diff --git a/Web/src/api-services/apis/test-template-api.ts b/Web/src/api-services/apis/test-template-api.ts new file mode 100644 index 00000000..bdb38b30 --- /dev/null +++ b/Web/src/api-services/apis/test-template-api.ts @@ -0,0 +1,879 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Admin.NET 通用权限开发平台 + * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { AddSysAppInput } from '../models'; +import { AdminResultInt64 } from '../models'; +import { AdminResultListInt64 } from '../models'; +import { AdminResultLoginOutput } from '../models'; +import { AdminResultObject } from '../models'; +import { AdminResultSqlSugarPagedListSysAppOutput } from '../models'; +import { BaseIdInput } from '../models'; +import { BasePageInput } from '../models'; +import { ChangeAppInput } from '../models'; +import { UpdateAppMenuInput } from '../models'; +import { UpdateSysAppInput } from '../models'; +/** + * TestTemplateApi - axios parameter creator + * @export + */ +export const TestTemplateApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateAddPost: async (body?: AddSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/template/add`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateChangeAppGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateChangeAppPost: async (body?: ChangeAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/changeApp`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/template/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateGrantMenuGet: async (id?: number, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateGrantMenuPost: async (body?: UpdateAppMenuInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/sysApp/grantMenu`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplatePagePost: async (body?: BasePageInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/template/page`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateUpdatePost: async (body?: UpdateSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/template/update`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + + /** + * + * @summary 获取设备树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateTreeListGet: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/device/getTreeList`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary 获取基站树形列表 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiTestTemplateCellListPost: async (body?: AddSysAppInput, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/api/baseStation/getTreeListById`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication Bearer required + // http bearer authentication required + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; + } + + localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TestTemplateApi - functional programming interface + * @export + */ +export const TestTemplateApiFp = function (configuration?: Configuration) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateAddPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateChangeAppGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateChangeAppGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateChangeAppPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateDeletePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateGrantMenuGet(id, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateGrantMenuPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplatePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplatePagePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateUpdatePost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateTreeListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateTreeListGet(options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary 获取基站树形列表 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateCellListPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await TestTemplateApiAxiosParamCreator(configuration).apiTestTemplateCellListPost(body, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url }; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * TestTemplateApi - factory interface + * @export + */ +export const TestTemplateApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateAddPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateChangeAppGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateChangeAppPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateDeletePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateGrantMenuGet(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateGrantMenuPost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplatePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplatePagePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateUpdatePost(body, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateTreeListGet(options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateTreeListGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary 获取基站树形列表 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiTestTemplateCellListPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(configuration).apiTestTemplateCellListPost(body, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TestTemplateApi - object-oriented interface + * @export + * @class TestTemplateApi + * @extends {BaseAPI} + */ +export class TestTemplateApi extends BaseAPI { + /** + * + * @summary 增加应用 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateAddPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateAddPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取切换应用数据 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateChangeAppGet(options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateChangeAppGet(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 切换应用 🔖 + * @param {ChangeAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateChangeAppPost(body?: ChangeAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateChangeAppPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 删除应用 🔖 + * @param {BaseIdInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateDeletePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取授权菜单 🔖 + * @param {number} [id] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateGrantMenuGet(id?: number, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateGrantMenuGet(id, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 授权菜单 🔖 + * @param {UpdateAppMenuInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateGrantMenuPost(body?: UpdateAppMenuInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateGrantMenuPost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 分页查询应用 🔖 + * @param {BasePageInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplatePagePost(body?: BasePageInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplatePagePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 更新应用 🔖 + * @param {UpdateSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateUpdatePost(body?: UpdateSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateUpdatePost(body, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取小区树形列表 🔖 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateTreeListGet(options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateTreeListGet(options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary 获取基站树形列表 🔖 + * @param {AddSysAppInput} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestTemplateApi + */ + public async apiTestTemplateCellListPost(body?: AddSysAppInput, options?: AxiosRequestConfig): Promise> { + return TestTemplateApiFp(this.configuration).apiTestTemplateCellListPost(body, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/Web/src/views/test/device/component/editDevice.vue b/Web/src/views/test/device/component/editDevice.vue index d405a923..2969bea0 100644 --- a/Web/src/views/test/device/component/editDevice.vue +++ b/Web/src/views/test/device/component/editDevice.vue @@ -10,8 +10,8 @@ - - + + diff --git a/Web/src/views/test/device/index.vue b/Web/src/views/test/device/index.vue index 34bc0822..86f4426f 100644 --- a/Web/src/views/test/device/index.vue +++ b/Web/src/views/test/device/index.vue @@ -30,7 +30,7 @@ --> - + @@ -164,7 +164,7 @@ const openEditApp = async (row: any) => { // 删除 const delApp = (row: any) => { - ElMessageBox.confirm(`确定删除设备:【${row.deviceNameConfig}】?`, '提示', { + ElMessageBox.confirm(`确定删除设备:【${row.name}】?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', diff --git a/Web/src/views/test/mapping/component/mappingTree.vue b/Web/src/views/test/mapping/component/mappingTree.vue index c2021693..06086422 100644 --- a/Web/src/views/test/mapping/component/mappingTree.vue +++ b/Web/src/views/test/mapping/component/mappingTree.vue @@ -4,7 +4,7 @@
- +
+ + + + + 下一步 + + + + + + + + + + + + + + +
+ + + + + diff --git a/Web/src/views/test/template/index.vue b/Web/src/views/test/template/index.vue index c7b1ed77..67aa6369 100644 --- a/Web/src/views/test/template/index.vue +++ b/Web/src/views/test/template/index.vue @@ -1,8 +1,159 @@ - - -- Gitee From 54ab7a143982b47a24b6401603ab4c43aebaa5d0 Mon Sep 17 00:00:00 2001 From: wxh <906562008@qq.com> Date: Tue, 10 Dec 2024 14:34:36 +0800 Subject: [PATCH 39/84] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B0=8F=E5=8C=BA=E7=B1=BB=E5=9E=8B=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/views/test/template/component/editTemplate.vue | 6 +++--- Web/src/views/test/template/index.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Web/src/views/test/template/component/editTemplate.vue b/Web/src/views/test/template/component/editTemplate.vue index db854981..33a1e97e 100644 --- a/Web/src/views/test/template/component/editTemplate.vue +++ b/Web/src/views/test/template/component/editTemplate.vue @@ -121,7 +121,7 @@ const getDeviceCheck = () => { if (element != undefined) { let obj = reactive({} as any); obj.templateId = 0; - obj.deviceId = element; + obj.deviceId = +element; state.devices.push(obj); } } @@ -148,8 +148,8 @@ const getCellCheck = () => { if (ele != undefined) { let obj = reactive({} as any); obj.templateId = 0; - obj.nodeBId = ele[0]; - obj.cellId = ele[1]; + obj.nodeBId = +ele[0]; + obj.cellId = +ele[1]; state.cells.push(obj); } } diff --git a/Web/src/views/test/template/index.vue b/Web/src/views/test/template/index.vue index 67aa6369..3c1c94d6 100644 --- a/Web/src/views/test/template/index.vue +++ b/Web/src/views/test/template/index.vue @@ -120,7 +120,7 @@ const openEditRole = async (row: any) => { // 删除 const delRole = (row: any) => { - ElMessageBox.confirm(`确定删角色:【${row.name}】?`, '提示', { + ElMessageBox.confirm(`确定删除模板:【${row.name}】?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', -- Gitee From 8fecdc3eff14a40333e04fc8e35b15c0745f70d7 Mon Sep 17 00:00:00 2001 From: wxh <906562008@qq.com> Date: Tue, 10 Dec 2024 15:35:55 +0800 Subject: [PATCH 40/84] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=80=89=E6=8B=A9=E8=AE=BE=E5=A4=87=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=B0=8F=E5=8C=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/template/component/editTemplate.vue | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/Web/src/views/test/template/component/editTemplate.vue b/Web/src/views/test/template/component/editTemplate.vue index 33a1e97e..bcee19f2 100644 --- a/Web/src/views/test/template/component/editTemplate.vue +++ b/Web/src/views/test/template/component/editTemplate.vue @@ -10,18 +10,29 @@ - - + + + + - - + + - + + + @@ -25,14 +25,14 @@ - + - + diff --git a/Web/src/views/test/device/component/orgTree.vue b/Web/src/views/test/device/component/orgTree.vue index 056730b6..5d700618 100644 --- a/Web/src/views/test/device/component/orgTree.vue +++ b/Web/src/views/test/device/component/orgTree.vue @@ -32,7 +32,7 @@ class="filter-tree" :data="state.orgData" node-key="value" - :props="{ label: 'describe' }" + :props="{ label: 'label' }" :filter-node-method="filterNode" @node-click="nodeClick" :show-checkbox="state.isShowCheckbox" @@ -58,6 +58,7 @@ import { Search, MoreFilled } from '@element-plus/icons-vue'; import { getAPI } from '/@/utils/axios-utils'; import { SysOrgApi, SysEnumApi } from '/@/api-services/api'; +import { useUserInfo } from '/@/stores/userInfo'; const filterText = ref(''); const treeRef = ref>(); @@ -79,8 +80,9 @@ watch(filterText, (val) => { const initTreeData = async () => { state.loading = true; - let res = await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('DeviceTypeEnum'); - state.orgData = res.data.result ?? []; + // let res = await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('DeviceTypeEnum'); + // state.orgData = res.data.result ?? []; + state.orgData = useUserInfo().dictList.DeviceTypeEnum; state.loading = false; await nodeClick(state.orgData[0]); }; diff --git a/Web/src/views/test/device/index.vue b/Web/src/views/test/device/index.vue index 86f4426f..4737a631 100644 --- a/Web/src/views/test/device/index.vue +++ b/Web/src/views/test/device/index.vue @@ -78,6 +78,7 @@ import { ElMessageBox, ElMessage } from 'element-plus'; import EditApp from '/@/views/test/device/component/editDevice.vue'; import OrgTree from '/@/views/test/device/component/orgTree.vue'; import ModifyRecord from '/@/components/table/modifyRecord.vue'; +import { useUserInfo } from '/@/stores/userInfo'; import { Splitpanes, Pane } from 'splitpanes'; import 'splitpanes/dist/splitpanes.css'; @@ -105,6 +106,8 @@ const state = reactive({ communicationType: [] as any[], deviceModelType: [] as any[], }); +//获取所有枚举缓存 +const dictList = useUserInfo().dictList; onMounted(async () => { await getDeviceTypeConfig(); @@ -114,25 +117,27 @@ onMounted(async () => { //获取设备类型 const getDeviceTypeConfig = async () => { - let res = await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('DeviceTypeEnum'); - state.deviceType = res.data.result ?? []; + // let res = await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('DeviceTypeEnum'); + // state.deviceType = res.data.result ?? []; + state.deviceType = dictList.DeviceTypeEnum; }; //设备类型转换 const deviceConversion = (row: any) => { - return state.deviceType[row.deviceTypeConfig].describe; + return state.deviceType[row.deviceTypeConfig].label; }; //获取通讯类型 const getCommunicationTypeConfig = async () => { - let res = await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('CommunicationTypeEnum'); - state.communicationType = res.data.result ?? []; + // let res = await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('CommunicationTypeEnum'); + // state.communicationType = res.data.result ?? []; + state.communicationType = dictList.CommunicationTypeEnum; }; //通讯类型转换 const communicationTypeConversion = (row: any) => { - return state.communicationType[row.communicationTypeConfig].describe; + return state.communicationType[row.communicationTypeConfig].label; }; //设备型号类型转换 const deviceModelType = (row: any) => { - return state.deviceModelType[row.deviceModelConfig]?.describe; + return state.deviceModelType[row.deviceModelConfig]?.label; }; // 查询操作 const handleQuery = async () => { @@ -191,8 +196,9 @@ const handleCurrentChange = async (val: number) => { // 树组件点击 const nodeClick = async (node: any) => { - let res = await getAPI(SysEnumApi).apiSysEnumEnumDataListGet(node.name + 'TypeEnum'); - state.deviceModelType = res.data.result ?? []; + // let res = await getAPI(SysEnumApi).apiSysEnumEnumDataListGet(node.name + 'TypeEnum'); + // state.deviceModelType = res.data.result ?? []; + state.deviceModelType = dictList[node.name + 'TypeEnum']; state.tableParams.value = node.value; await handleQuery(); }; -- Gitee From db53d1fa6a428624c884cd910d66f2d86ab62fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=B1=AA?= Date: Wed, 11 Dec 2024 06:48:46 +0000 Subject: [PATCH 42/84] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E9=80=89=E9=A1=B9=E5=8D=A1=E6=97=B6=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 喵你个汪 --- Web/src/layout/routerView/parent.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Web/src/layout/routerView/parent.vue b/Web/src/layout/routerView/parent.vue index 8894e3e9..7430f84d 100644 --- a/Web/src/layout/routerView/parent.vue +++ b/Web/src/layout/routerView/parent.vue @@ -66,16 +66,17 @@ const getIframeListRoutes = async () => { onBeforeMount(() => { state.keepAliveNameList = keepAliveNames.value; mittBus.on('onTagsViewRefreshRouterView', (fullPath: string) => { + const cacheList = cachedViews.value; + if (route.meta.isKeepAlive) cachedViews.value = cachedViews.value?.filter((name: string) => route.name !== name); state.keepAliveNameList = keepAliveNames.value.filter((name: string) => route.name !== name); state.refreshRouterViewKey = ''; state.iframeRefreshKey = ''; - cachedViews.value = []; - setTimeout(() => { - state.iframeRefreshKey = fullPath; - state.refreshRouterViewKey = fullPath; - cachedViews.value = [route.name]; - state.keepAliveNameList = keepAliveNames.value; - }, 10); + nextTick(() => { + if (route.meta.isKeepAlive) cachedViews.value = cacheList; + state.keepAliveNameList = keepAliveNames.value; + state.refreshRouterViewKey = fullPath; + state.iframeRefreshKey = fullPath; + }); }); }); // 页面加载时 -- Gitee From b4710f7bb2fae89e57657ddcd113f052f1a258d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=B5=E4=BD=A0=E4=B8=AA=E6=B1=AA?= Date: Wed, 11 Dec 2024 07:03:18 +0000 Subject: [PATCH 43/84] =?UTF-8?q?fix:=20=F0=9F=98=80=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=94=B9=E5=8F=98=E6=97=B6=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E4=B8=8D=E6=9B=B4=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 喵你个汪 --- Web/src/components/scEcharts/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Web/src/components/scEcharts/index.vue b/Web/src/components/scEcharts/index.vue index d81a7af8..6a1155d0 100644 --- a/Web/src/components/scEcharts/index.vue +++ b/Web/src/components/scEcharts/index.vue @@ -31,7 +31,9 @@ export default { option: { deep: true, handler(v) { - unwarp(this.myChart).setOption(v); + this.$nextTick(() => { + unwarp(this.myChart).setOption(v); + }); }, }, }, -- Gitee From c873312c67a24920b745ed697b20c64979e418cb Mon Sep 17 00:00:00 2001 From: wxh <906562008@qq.com> Date: Wed, 11 Dec 2024 17:18:12 +0800 Subject: [PATCH 44/84] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=88=97=E8=A1=A8=E8=AE=BE=E5=A4=87=E9=9B=86?= =?UTF-8?q?=E5=90=88=E4=B8=8E=E5=B0=8F=E5=8C=BA=E9=9B=86=E5=90=88=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/template/component/editTemplate.vue | 16 +++++++- Web/src/views/test/template/index.vue | 37 +++++++++++++++++-- 2 files changed, 48 insertions(+), 5 deletions(-) diff --git a/Web/src/views/test/template/component/editTemplate.vue b/Web/src/views/test/template/component/editTemplate.vue index bcee19f2..b8fe6aaf 100644 --- a/Web/src/views/test/template/component/editTemplate.vue +++ b/Web/src/views/test/template/component/editTemplate.vue @@ -30,9 +30,11 @@ node-key="id" :props="{ children: 'children', label: 'name' }" default-expand-all + :default-checked-keys="state.deviceCheckedKeys" show-checkbox @check-change="checkClick" /> + - - + + + + + + - + + - --> + @@ -75,12 +76,13 @@ import { onMounted, reactive, ref } from 'vue'; import { ElMessageBox, ElMessage } from 'element-plus'; import EditRole from '/@/views/test/template/component/editTemplate.vue'; -import ModifyRecord from '/@/components/table/modifyRecord.vue'; +import TestTypeConfig from '/@/views/test/template/component/testTypeConfig.vue'; import { getAPI } from '/@/utils/axios-utils'; import { TestTemplateApi } from '/@/api-services/api'; import { useUserInfo } from '/@/stores/userInfo'; const editRoleRef = ref>(); +const testTypeConfigRef = ref>(); const state = reactive({ loading: false, templateData: [] as any[], @@ -181,6 +183,11 @@ const clickCell = (row: any) => { // row.status = row.status == 1 ? 2 : 1; // }); // }; +//测试类型参数配置 +const testTypeParameterConfiguration = (row: any) => { + state.editRoleTitle = row.testConfigDetail.name; + testTypeConfigRef.value?.openDialog(row); +}; diff --git a/Web/src/views/test/template/component/testTypeConfig.vue b/Web/src/views/test/template/component/testTypeConfig.vue index eb499cee..0811c3c2 100644 --- a/Web/src/views/test/template/component/testTypeConfig.vue +++ b/Web/src/views/test/template/component/testTypeConfig.vue @@ -11,12 +11,18 @@ - + - - + + diff --git a/Web/src/views/test/template/index.vue b/Web/src/views/test/template/index.vue index 676704da..b5f981ee 100644 --- a/Web/src/views/test/template/index.vue +++ b/Web/src/views/test/template/index.vue @@ -37,16 +37,6 @@ {{ `${item.nodeBId}-${item.cellId}` }} - - @@ -77,12 +68,14 @@ import { onMounted, reactive, ref } from 'vue'; import { ElMessageBox, ElMessage } from 'element-plus'; import EditRole from '/@/views/test/template/component/editTemplate.vue'; import TestTypeConfig from '/@/views/test/template/component/testTypeConfig.vue'; +import DeviceDetailConfig from '/@/views/test/template/component/deviceDetailConfig.vue'; import { getAPI } from '/@/utils/axios-utils'; import { TestTemplateApi } from '/@/api-services/api'; import { useUserInfo } from '/@/stores/userInfo'; const editRoleRef = ref>(); const testTypeConfigRef = ref>(); +const deviceDetailConfigRef = ref>(); const state = reactive({ loading: false, templateData: [] as any[], @@ -165,12 +158,14 @@ const getTestTypeConversion = (row: any) => { //点击设备集合设置参数 const clickDevice = (row: any) => { - console.log('row: ', row); + state.editRoleTitle = row.name; + deviceDetailConfigRef.value?.openDialog(row); }; //点击小区集合设置参数 const clickCell = (row: any) => { - console.log('row: ', row); + state.editRoleTitle = `${row.nodeBId}-${row.cellId}`; + deviceDetailConfigRef.value?.openDialog(row); }; // 修改状态 // const changeStatus = async (row: any) => { -- Gitee From d3a38ef71fd068d0b509a1579189b82da68ffab5 Mon Sep 17 00:00:00 2001 From: KaneLeung Date: Fri, 13 Dec 2024 06:06:10 +0000 Subject: [PATCH 56/84] =?UTF-8?q?=F0=9F=8F=9A=EF=B8=8F=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=9F=9F=E7=94=A8=E6=88=B7=E6=97=B6=E7=BC=BA=E5=B0=91=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E8=A7=A3=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: KaneLeung --- Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs b/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs index 54188faf..cd044c92 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs @@ -190,7 +190,8 @@ public class SysLdapService : IDynamicApiController, ITransient try { ldapConn.Connect(sysLdap.Host, sysLdap.Port); - ldapConn.Bind(sysLdap.Version, sysLdap.BindDn, sysLdap.BindPass); + string bindPass = CryptogramUtil.Decrypt(sysLdap.BindPass); + ldapConn.Bind(sysLdap.Version, sysLdap.BindDn, bindPass); var ldapSearchResults = ldapConn.Search(sysLdap.BaseDn, LdapConnection.ScopeOne, "(objectClass=*)", null, false); var userLdapList = new List(); while (ldapSearchResults.HasMore()) -- Gitee From 97d3de31d696d60145f9af3664a2f41154c63973 Mon Sep 17 00:00:00 2001 From: wxh <906562008@qq.com> Date: Fri, 13 Dec 2024 14:36:48 +0800 Subject: [PATCH 57/84] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=8F=82=E6=95=B0=E7=82=B9=E5=87=BB=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E9=97=AE=E9=A2=98=E3=80=81=E4=BF=AE=E6=94=B9=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=B1=BB=E5=9E=8B=E4=B8=BABoolean=E7=9A=84=E6=8D=A2?= =?UTF-8?q?=E6=88=90=E5=A4=9A=E9=80=89=E6=A1=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/component/deviceDetailConfig.vue | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/Web/src/views/test/template/component/deviceDetailConfig.vue b/Web/src/views/test/template/component/deviceDetailConfig.vue index e7aa9106..d91d05da 100644 --- a/Web/src/views/test/template/component/deviceDetailConfig.vue +++ b/Web/src/views/test/template/component/deviceDetailConfig.vue @@ -9,24 +9,20 @@ - - - - - - - - - - - - + + @@ -65,9 +61,10 @@ const state = reactive({ // 打开弹窗 const openDialog = async (row: any) => { console.log('row: ', row); - // ruleFormRef.value?.resetFields(); - state.ruleForm = JSON.parse(JSON.stringify(row)); - state.isShowDialog = true; + if (row.parameterDetail.items.length != 0) { + state.ruleForm = JSON.parse(JSON.stringify(row)); + state.isShowDialog = true; + } }; // 关闭弹窗 -- Gitee From a6f2b1ce170c04aac9800d248a7ad2f6d3f59f16 Mon Sep 17 00:00:00 2001 From: KaneLeung Date: Fri, 13 Dec 2024 07:32:40 +0000 Subject: [PATCH 58/84] =?UTF-8?q?=F0=9F=8C=9A=E9=98=B2=E6=AD=A2pwdLastSet?= =?UTF-8?q?=E4=B8=BAnull=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: KaneLeung --- .../Service/Auth/SysLdapService.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs b/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs index cd044c92..170deb44 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs @@ -266,15 +266,15 @@ public class SysLdapService : IDynamicApiController, ITransient { var userLdap = new SysUserLdap { - Account = !attrs.ContainsKey(bindAttrAccount) ? null : attrs.GetAttribute(bindAttrAccount)?.StringValue, - EmployeeId = !attrs.ContainsKey(bindAttrEmployeeId) ? null : attrs.GetAttribute(bindAttrEmployeeId)?.StringValue, + Account = attrs.ContainsKey(bindAttrAccount) ? attrs.GetAttribute(bindAttrAccount)?.StringValue : null, + EmployeeId = attrs.ContainsKey(bindAttrEmployeeId) ? attrs.GetAttribute(bindAttrEmployeeId)?.StringValue : null, DeptCode = deptCode, - UserName = !attrs.ContainsKey("name") ? null : attrs.GetAttribute("name")?.StringValue, - Mail = !attrs.ContainsKey("mail") ? null : attrs.GetAttribute("mail")?.StringValue + UserName = attrs.ContainsKey("name") ? attrs.GetAttribute("name")?.StringValue : null, + Mail = attrs.ContainsKey("mail") ? attrs.GetAttribute("mail")?.StringValue : null }; - var pwdLastSet = !attrs.ContainsKey("pwdLastSet") ? null : attrs.GetAttribute("pwdLastSet")?.StringValue; - if (!pwdLastSet!.Equals("0")) userLdap.PwdLastSetTime = DateTime.FromFileTime(Convert.ToInt64(pwdLastSet)); - var userAccountControl = !attrs.ContainsKey("userAccountControl") ? null : attrs.GetAttribute("userAccountControl")?.StringValue; + var pwdLastSet = attrs.ContainsKey("pwdLastSet") ? attrs.GetAttribute("pwdLastSet")?.StringValue : null; + if (pwdLastSet != null && !pwdLastSet.Equals("0")) userLdap.PwdLastSetTime = DateTime.FromFileTime(Convert.ToInt64(pwdLastSet)); + var userAccountControl = attrs.ContainsKey("userAccountControl") ? attrs.GetAttribute("userAccountControl")?.StringValue : null; if ((Convert.ToInt32(userAccountControl) & 0x2) == 0x2) // 检查账户是否已过期(通过检查userAccountControl属性的特定位) userLdap.AccountExpiresFlag = true; if ((Convert.ToInt32(userAccountControl) & 0x10000) == 0x10000) // 检查账户密码设置是否永不过期 @@ -428,9 +428,9 @@ public class SysLdapService : IDynamicApiController, ITransient { Pid = org.Id, Id = YitIdHelper.NextId(), - Code = !attrs.ContainsKey(sysLdap.BindAttrCode) ? null : new Guid(attrs.GetAttribute(sysLdap.BindAttrCode)?.ByteValue).ToString(), + Code = attrs.ContainsKey(sysLdap.BindAttrCode) ? new Guid(attrs.GetAttribute(sysLdap.BindAttrCode)?.ByteValue).ToString() : null, Level = org.Level + 1, - Name = !attrs.ContainsKey(sysLdap.BindAttrAccount) ? null : attrs.GetAttribute(sysLdap.BindAttrAccount)?.StringValue, + Name = attrs.ContainsKey(sysLdap.BindAttrAccount) ? attrs.GetAttribute(sysLdap.BindAttrAccount)?.StringValue : null, OrderNo = listOrgs.Count + 1, }; } -- Gitee From 445548eafefe52d3c0667b5b78fc564ca9fd4353 Mon Sep 17 00:00:00 2001 From: KaneLeung Date: Fri, 13 Dec 2024 07:57:45 +0000 Subject: [PATCH 59/84] =?UTF-8?q?=F0=9F=AB=92=E8=B0=83=E6=95=B4SysLdap?= =?UTF-8?q?=E4=B8=ADBindDn=E7=9A=84=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: KaneLeung --- Admin.NET/Admin.NET.Core/Entity/SysLdap.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs b/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs index a8d629b7..0b6ce8f4 100644 --- a/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs +++ b/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs @@ -1,4 +1,4 @@ -// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 // // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 // @@ -36,7 +36,7 @@ public class SysLdap : EntityTenant /// /// 绑定DN(有管理权限制的用户) /// - [SugarColumn(ColumnDescription = "绑定DN", Length = 32)] + [SugarColumn(ColumnDescription = "绑定DN", Length = 128)] [Required] public virtual string BindDn { get; set; } -- Gitee From 5587ed8c2602e6a1776e5e8a6de09322ed8821a3 Mon Sep 17 00:00:00 2001 From: KaneLeung Date: Fri, 13 Dec 2024 07:58:53 +0000 Subject: [PATCH 60/84] =?UTF-8?q?=F0=9F=93=8D=E8=B0=83=E6=95=B4=E5=89=8D?= =?UTF-8?q?=E7=AB=AFbindDn=E5=AD=97=E7=AC=A6=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: KaneLeung --- Web/src/views/system/ldap/component/editLdap.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/src/views/system/ldap/component/editLdap.vue b/Web/src/views/system/ldap/component/editLdap.vue index 682092a5..d8bdd813 100644 --- a/Web/src/views/system/ldap/component/editLdap.vue +++ b/Web/src/views/system/ldap/component/editLdap.vue @@ -1,4 +1,4 @@ -