using F9WebAiTest.Application.Services; using F9WebAiTest.Application.Services.Auth; using F9WebAiTest.Application.Services.Base; using F9WebAiTest.Application.Services.Notice; using F9WebAiTest.Application.Services.Prod; using F9WebAiTest.Application.Services.QC; using F9WebAiTest.Application.Services.Reports; using F9WebAiTest.Application.Interfaces.Reports; using MediatR; using Microsoft.Extensions.DependencyInjection; namespace F9WebAiTest.Application; public static class DependencyInjection { public static IServiceCollection AddApplication(this IServiceCollection services) { services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); // 生产-选剥茧:选茧日报(含盈亏 / 联统率)/ 选茧计划及其明细 / 选茧班组及职工 // (对齐 F9 WinClient\F9.Business.Prod\XBJ) services.AddScoped(); // 生产-后缫:秤大丝 / 公量纤度 / 丝片检查 / 丝片台帐(对齐 F9 WinClient\F9.Business.Prod\HS) services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); // 生产-考勤:考勤登记 + 考勤统计(对齐 F9 WinClient\F9.Business.Prod\KQ\CQDJ / CQTJ) services.AddScoped(); // 薪资:挡车/车头产量计算及其依赖配置(对齐 F9 WinClient\F9.Business.PayRoll\PAYROLL) services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); // 考勤统计依赖:薪资配置-账期 / 薪资配置-职工 / 岗位胜任考核 services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); // 质量模块:工艺执行书 / 样茧试缫 services.AddScoped(); services.AddScoped(); // 仓储模块:原料 / 副产品 / 中间品 / 生丝 / 物资(对齐 F9 WinClient\F9.Business.WMS) services.AddScoped(); // 报表数据提供者(按 Config.DsName 解析,自动注册所有实现) foreach (var t in typeof(DependencyInjection).Assembly.GetTypes() .Where(t => !t.IsAbstract && typeof(IReportDataProvider).IsAssignableFrom(t))) { services.AddScoped(typeof(IReportDataProvider), t); } // MediatR:注册命令/查询 Handler services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(NotificationService).Assembly)); return services; } }