diff --git a/SlnMesnac.Business/base/BaseBusiness.cs b/SlnMesnac.Business/base/BaseBusiness.cs index 1cbb470..0af791b 100644 --- a/SlnMesnac.Business/base/BaseBusiness.cs +++ b/SlnMesnac.Business/base/BaseBusiness.cs @@ -57,13 +57,19 @@ namespace SlnMesnac.Business.@base /// public readonly List _rfidFactories; + /// + /// 容器 + /// + private IServiceProvider _serviceProvider; + + #region 本地缓存信息 private List palletTasks; private List barCodeTasks; private List baseConfigInfos; + #endregion - private IServiceProvider _serviceProvider; /// /// 刷新日志信息 @@ -251,6 +257,5 @@ namespace SlnMesnac.Business.@base throw new InvalidOperationException($"根据Key获取PLC地址异常:{ex.Message}"); } } - } } diff --git a/SlnMesnac.Extensions/SqlsugarSetup.cs b/SlnMesnac.Extensions/SqlsugarSetup.cs index e566024..c2ddaba 100644 --- a/SlnMesnac.Extensions/SqlsugarSetup.cs +++ b/SlnMesnac.Extensions/SqlsugarSetup.cs @@ -67,16 +67,9 @@ namespace SlnMesnac.Extensions return Db; }); - //private IServiceProvider _serviceProvider; - //using (var scope = _serviceProvider.CreateScope()) - //{ - // var configInfos = scope.ServiceProvider.GetRequiredService>(); - //} - //缓存本机配置 services.AddSingleton>(x => { - var service = x.GetService(); var info = service.Query(x => x.IsFlag == 1);