Files
f9-web-ai-test/backend/F9WebAiTest.Application/DependencyInjection.cs
T
yanpeng200212 1f1b184411 新增工资/仓储/生产日报等模块,移除旧考勤模块
- 新增 PayRoll(工资)、Wms(仓储)、Prod(车速/缫丝/考勤/丝片检测/丝片台账/纤检日报/质量日报) 模块
- 新增对应 Domain 实体、Application DTO/Service、Api Controller 与前端页面
- 移除旧 Attendance 考勤模块(Controller/Service/Entity/DTO 及 5 个前端页面),由 Prod/Kaoqin 取代
- 调整路由、仪表盘、Lsjl 流丝记录实体与服务
- 更新业务种子数据与 DbSeeder
- 补充工作进度文档 14-27
2026-10-27 09:09:57 +08:00

75 lines
4.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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<IJwtService, JwtService>();
services.AddScoped<IAuthService, AuthService>();
services.AddScoped<ICraftZhuangKouService, CraftZhuangKouService>();
services.AddScoped<IShengsiGuigeService, ShengsiGuigeService>();
services.AddScoped<IShengsiDingjizhibiaoService, ShengsiDingjizhibiaoService>();
services.AddScoped<IJizuChetaiService, JizuChetaiService>();
services.AddScoped<ILsjlService, LsjlService>();
services.AddScoped<IXdjyService, XdjyService>();
services.AddScoped<IHbjyService, HbjyService>();
services.AddScoped<IChejianBanciService, ChejianBanciService>();
services.AddScoped<IKtpbService, KtpbService>();
services.AddScoped<IKtjlService, KtjlService>();
services.AddScoped<IZjrbService, ZjrbService>();
// 生产-选剥茧:选茧日报(含盈亏 / 联统率)/ 选茧计划及其明细 / 选茧班组及职工
// (对齐 F9 WinClient\F9.Business.Prod\XBJ)
services.AddScoped<IXjrbService, XjrbService>();
// 生产-后缫:秤大丝 / 公量纤度 / 丝片检查 / 丝片台帐(对齐 F9 WinClient\F9.Business.Prod\HS)
services.AddScoped<ICdsService, CdsService>();
services.AddScoped<IGlxdService, GlxdService>();
services.AddScoped<ISpjcService, SpjcService>();
services.AddScoped<ISptzService, SptzService>();
// 生产-考勤:考勤登记 + 考勤统计(对齐 F9 WinClient\F9.Business.Prod\KQ\CQDJ / CQTJ)
services.AddScoped<IKaoqinService, KaoqinService>();
// 薪资:挡车/车头产量计算及其依赖配置(对齐 F9 WinClient\F9.Business.PayRoll\PAYROLL)
services.AddScoped<F9WebAiTest.Application.Services.PayRoll.ICalcLdcctService, F9WebAiTest.Application.Services.PayRoll.CalcLdcctService>();
services.AddScoped<F9WebAiTest.Application.Services.PayRoll.IConfGyzkService, F9WebAiTest.Application.Services.PayRoll.ConfGyzkService>();
services.AddScoped<F9WebAiTest.Application.Services.PayRoll.IConfGzService, F9WebAiTest.Application.Services.PayRoll.ConfGzService>();
services.AddScoped<F9WebAiTest.Application.Services.PayRoll.IConfDcgService, F9WebAiTest.Application.Services.PayRoll.ConfDcgService>();
services.AddScoped<F9WebAiTest.Application.Services.PayRoll.IDcxdjkService, F9WebAiTest.Application.Services.PayRoll.DcxdjkService>();
services.AddScoped<F9WebAiTest.Application.Services.PayRoll.IXzjgService, F9WebAiTest.Application.Services.PayRoll.XzjgService>();
// 考勤统计依赖:薪资配置-账期 / 薪资配置-职工 / 岗位胜任考核
services.AddScoped<F9WebAiTest.Application.Services.PayRoll.IConfZqService, F9WebAiTest.Application.Services.PayRoll.ConfZqService>();
services.AddScoped<F9WebAiTest.Application.Services.PayRoll.IConfEmployeeService, F9WebAiTest.Application.Services.PayRoll.ConfEmployeeService>();
services.AddScoped<F9WebAiTest.Application.Services.PayRoll.IGwsrkhService, F9WebAiTest.Application.Services.PayRoll.GwsrkhService>();
services.AddScoped<INotificationService, NotificationService>();
services.AddScoped<IReportService, ReportService>();
// 质量模块:工艺执行书 / 样茧试缫
services.AddScoped<IGyzxsService, GyzxsService>();
services.AddScoped<IYjssService, YjssService>();
// 仓储模块:原料 / 副产品 / 中间品 / 生丝 / 物资(对齐 F9 WinClient\F9.Business.WMS)
services.AddScoped<F9WebAiTest.Application.Services.Wms.IWmsService, F9WebAiTest.Application.Services.Wms.WmsService>();
// 报表数据提供者(按 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;
}
}