Files
f9-web-ai-test/backend/F9WebAiTest.Application/DependencyInjection.cs
T
yanpeng200212 a30d1cdcce 新增生产-前缫看台排班,并导入机组车台与看台排班数据
功能:
- 后端新增 KtpbCtgs / KtpbDcgs / KtpbZbzs 三张表、KtpbService 与 api/prod/ktpb 接口
  (车头工、挡车工、值班长分页查询与维护,挡车工按车间+班次+机组整组替换保存)
- 挡车数按 F9 口径自动重算:接壤车台各计 0.5,保存时服务端重新计算并校验车台范围
- 前端新增 /prod/qianxian/ktpb 看台排班页(三页签 + 车间/班次/机组过滤 + 批量编辑弹窗)
- 新增通用职工选择弹窗 EmployeeSelect(单选/多选,按部门过滤)
- 生产-前缫菜单下新增「看台排班」,权限 prod:ktpb:list

数据导入:
- 重新生成 biz_prod_qs_jzct.json,新增 ktpb_ctg / ktpb_dcg / ktpb_zbz 三个内嵌资源
- F9 部门 Id 经 DeptData 映射到本系统部门;职工按原始雪花 Id 关联
- 剔除软删除/脏数据:机组车台 24 条、车头工 33 条、挡车工 202 条(34 组)、值班长 7 条
- 导入幂等:机组车台按车间+机组 upsert,排班按业务唯一键去重,已维护的组不覆盖

其他:同步工作进度-12 文档与开发数据库快照
2026-10-22 10:49:13 +08:00

51 lines
2.2 KiB
C#

using F9WebAiTest.Application.Services;
using F9WebAiTest.Application.Services.Attendance;
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<IAttendanceService, AttendanceService>();
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<INotificationService, NotificationService>();
services.AddScoped<IReportService, ReportService>();
// 质量模块:工艺执行书 / 样茧试缫
services.AddScoped<IGyzxsService, GyzxsService>();
services.AddScoped<IYjssService, YjssService>();
// 报表数据提供者(按 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;
}
}