From bab87e00f35511fdbafd32be5cfbc9c56941e0b2 Mon Sep 17 00:00:00 2001 From: quowingwang Date: Wed, 21 Jan 2026 15:09:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RIZO.Admin.WebApi/PLC/Service/PlcHostedService.cs | 2 +- RIZO.Admin.WebApi/appsettings.Development.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RIZO.Admin.WebApi/PLC/Service/PlcHostedService.cs b/RIZO.Admin.WebApi/PLC/Service/PlcHostedService.cs index 921bf7b..45c997d 100644 --- a/RIZO.Admin.WebApi/PLC/Service/PlcHostedService.cs +++ b/RIZO.Admin.WebApi/PLC/Service/PlcHostedService.cs @@ -28,7 +28,7 @@ namespace RIZO.Admin.WebApi.PLC.Service // 可配置参数(建议放到配置文件中,通过IOptions注入) private readonly int _parallelDegree = 10; // 并行度(20+PLC建议8-12) private readonly int _pollingIntervalSeconds = 5; // 轮询间隔 - private readonly int _connectTimeoutSeconds = 2; // 单个PLC连接超时时间 + private readonly int _connectTimeoutSeconds = 1; // 单个PLC连接超时时间 private readonly int _stateCacheExpireSeconds = 10; // 连接状态缓存有效期 private PlantWorkstationService plantWorkstationService = new PlantWorkstationService(); diff --git a/RIZO.Admin.WebApi/appsettings.Development.json b/RIZO.Admin.WebApi/appsettings.Development.json index d993e6c..6bffdb6 100644 --- a/RIZO.Admin.WebApi/appsettings.Development.json +++ b/RIZO.Admin.WebApi/appsettings.Development.json @@ -6,7 +6,7 @@ // "Conn": "Server=43.142.238.124,1433;Database=valeo_lmes_2;User Id=sa;Password=MSSQLP0ss_MBTc7D;Encrypt=True;TrustServerCertificate=True;", //"Conn": "Server=127.0.0.1,1433;Database=valeo_lmes;User Id=root;Password=123456;Encrypt=True;TrustServerCertificate=True;", //"Conn": "Server=192.168.1.48,1433;Database=valeo_lmes;User Id=sa;Password=RIZOtech123;Encrypt=True;TrustServerCertificate=True;", - "Conn": "Server=47.101.40.214,1433;Database=valeo_lmes;User Id=sa;Password=RIZOtech123;Encrypt=True;TrustServerCertificate=True;", + "Conn": "Server=47.101.40.214,1433;Database=valeo_lmes;User Id=root;Password=RIZOtech123;Encrypt=True;TrustServerCertificate=True;", //"Conn": "Data Source=127.0.0.1;User ID=root;Password=123456;Initial Catalog=valeo_lmes;Port=3306;", "DbType": 1, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4 "ConfigId": "0", //多租户唯一标识 @@ -22,7 +22,7 @@ //"Conn": "Data Source=127.0.0.1;User ID=root;Password=123456;Initial Catalog={dbName};Port=3306;", //"Conn": "Server=127.0.0.1,1433;Database={dbName};User Id=root;Password=123456;Encrypt=True;TrustServerCertificate=True;", //"Conn": "Server=192.168.1.48,1433;Database={dbName};User Id=sa;Password=RIZOtech123;Encrypt=True;TrustServerCertificate=True;", - "Conn": "Server=47.101.40.214,1433;Database={dbName};User Id=sa;Password=RIZOtech123;Encrypt=True;TrustServerCertificate=True;", + "Conn": "Server=47.101.40.214,1433;Database={dbName};User Id=root;Password=RIZOtech123;Encrypt=True;TrustServerCertificate=True;", "IsAutoCloseConnection": true, "DbName": "valeo_lmes", //代码生成默认连接数据库,Oracle库是实例的名称 "DbType": 1