JiShe.IOT.Admin/src/JiShe.IoT.Application/IoTApplicationModule.cs

67 lines
2.5 KiB
C#
Raw Normal View History

2025-07-09 11:58:18 +08:00
using JiShe.IoT.CommonServices;
2025-06-12 17:56:24 +08:00
using JiShe.IoT.Jobs.ToRedis;
using JiShe.ServicePro.CTWingManagement;
2025-06-05 11:49:13 +08:00
using JiShe.ServicePro.DeviceManagement;
2025-05-27 14:02:24 +08:00
using JiShe.ServicePro.DynamicMenuManagement;
2025-05-27 22:53:46 +08:00
using JiShe.ServicePro.FileManagement;
2025-05-27 16:16:07 +08:00
using JiShe.ServicePro.FreeRedisProvider;
using JiShe.ServicePro.FreeSqlProvider;
2025-06-04 17:09:21 +08:00
using JiShe.ServicePro.IoTDBManagement;
2025-07-07 13:45:55 +08:00
using JiShe.ServicePro.OneNETManagement;
2025-08-14 14:40:32 +08:00
using JiShe.ServicePro.OneNETManagement.Subscribers;
2025-05-27 14:02:24 +08:00
using JiShe.ServicePro.TemplateManagement;
using Microsoft.Extensions.DependencyInjection;
2025-07-09 11:58:18 +08:00
using Volo.Abp;
2025-05-27 14:02:24 +08:00
2025-05-27 14:27:50 +08:00
namespace JiShe.IoT
2025-05-27 14:02:24 +08:00
{
[DependsOn(
2025-05-27 14:27:50 +08:00
typeof(IoTDomainModule),
typeof(IoTApplicationContractsModule),
2025-05-27 14:02:24 +08:00
typeof(BasicManagementApplicationModule),
typeof(NotificationManagementApplicationModule),
typeof(DataDictionaryManagementApplicationModule),
typeof(LanguageManagementApplicationModule),
typeof(TemplateManagementApplicationModule),
typeof(DynamicMenuManagementApplicationModule),
2025-05-27 22:53:46 +08:00
typeof(FileManagementApplicationModule),
2025-06-04 17:09:21 +08:00
typeof(IoTDBManagementApplicationModule),
2025-06-05 11:49:13 +08:00
typeof(ServiceProFreeRedisProviderModule),
typeof(CTWingManagementApplicationModule),
2025-07-07 13:45:55 +08:00
typeof(OneNETManagementApplicationModule),
2025-06-05 11:49:13 +08:00
typeof(DeviceManagementApplicationModule)
2025-05-27 14:02:24 +08:00
)]
2025-05-27 14:27:50 +08:00
public class IoTApplicationModule : AbpModule
2025-05-27 14:02:24 +08:00
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
2025-05-27 14:27:50 +08:00
options.AddMaps<IoTApplicationModule>();
2025-05-27 14:02:24 +08:00
});
}
public override void PostConfigureServices(ServiceConfigurationContext context)
{
// <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
//ConfigureBackgroundJob(context);
}
private static void ConfigureBackgroundJob(ServiceConfigurationContext context)
{
context.Services.AddHostedService<CacheDeviceDataToRedisJob>();
2025-05-27 14:02:24 +08:00
}
2025-07-09 11:58:18 +08:00
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var commonService = context.ServiceProvider.GetRequiredService<ICommonService>();
2025-08-14 14:40:32 +08:00
commonService.InitSelectTypetList();
var serviceCommunicationChannelSubscriberService = context.ServiceProvider.GetRequiredService<IServiceCommunicationChannelSubscriberService>();
serviceCommunicationChannelSubscriberService.ServiceCommunicationDeviceStatusSubscriber();
2025-07-09 11:58:18 +08:00
}
2025-05-27 14:02:24 +08:00
}
}