Files
f9-web-ai-test/backend/F9WebAiTest.Application/DependencyInjection.cs
T
yanpeng200212 69c4052a64 新增生产-前缫看台记录,并导入车头工/挡车工看台记录历史数据
功能:
- 后端新增 KtjlCtgs / KtjlDcgs 两张表、KtjlService 与 api/prod/ktjl 接口
  (按日期+车间+班次查询、整组先删后建保存、整组删除、按看台排班带出默认记录、工种下拉)
- 挡车数按 F9 口径自动重算(与他人接壤的边界车位各扣 0.5),机组由车位反查机组车台
- 前端新增 /prod/qianxian/ktjl 看台记录页:挡车工/车头工双页签、删除、录入(新增)、录入(指定日期)
- 录入弹窗校验对齐 F9:个人时长不超标准、挡车数/看台时长匹配、车头工每机组≥2 人且时长为标准时长整数倍
- 生产-前缫菜单新增「看台记录」,权限 prod:ktjl:list

数据导入:
- 新增内嵌资源 biz_prod_qs_ktjl_ctg.csv / biz_prod_qs_ktjl_dcg.csv(约 5 万行,采用紧凑 CSV)
- 剔除软删除行、日期异常行、部门无法映射与职工不存在的行;日期由 Excel 序列号转换
- 车头工 12693 行、挡车工 38048 行入库,日期范围 2025-12-16 ~ 2026-09-11
- 表内已有数据则整体跳过,分批 1000 行插入

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

52 lines
2.3 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<IKtjlService, KtjlService>();
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;
}
}