using JiShe.IoT.CommonServices; using JiShe.IoT.Jobs; using JiShe.ServicePro.CTWingManagement; using JiShe.ServicePro.DeviceManagement; using JiShe.ServicePro.DynamicMenuManagement; using JiShe.ServicePro.FileManagement; using JiShe.ServicePro.FreeRedisProvider; using JiShe.ServicePro.FreeSqlProvider; using JiShe.ServicePro.IoTDBManagement; using JiShe.ServicePro.OneNETManagement; using JiShe.ServicePro.OneNETManagement.Subscribers; using JiShe.ServicePro.TemplateManagement; using Microsoft.Extensions.DependencyInjection; using Volo.Abp; namespace JiShe.IoT { [DependsOn( typeof(IoTDomainModule), typeof(IoTApplicationContractsModule), typeof(BasicManagementApplicationModule), typeof(NotificationManagementApplicationModule), typeof(DataDictionaryManagementApplicationModule), typeof(LanguageManagementApplicationModule), typeof(TemplateManagementApplicationModule), typeof(DynamicMenuManagementApplicationModule), typeof(FileManagementApplicationModule), typeof(IoTDBManagementApplicationModule), typeof(ServiceProFreeRedisProviderModule), typeof(CTWingManagementApplicationModule), typeof(OneNETManagementApplicationModule), typeof(DeviceManagementApplicationModule) )] public class IoTApplicationModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => { options.AddMaps(); }); } public override void PostConfigureServices(ServiceConfigurationContext context) { // 定时任务 ConfigureBackgroundJob(context); } private static void ConfigureBackgroundJob(ServiceConfigurationContext context) { context.Services.AddHostedService(); } public override void OnApplicationInitialization(ApplicationInitializationContext context) { var commonService = context.ServiceProvider.GetRequiredService(); commonService.InitSelectTypetList(); var serviceCommunicationChannelSubscriberService = context.ServiceProvider.GetRequiredService(); serviceCommunicationChannelSubscriberService.ServiceCommunicationDeviceStatusSubscriber(); } } }