a46782920b
GET /api/basis-requests?requestTypeId=&basisKey= читает заявки от имени приложения по всем партициям, а по каждой проверяет, может ли вызывающий её открыть. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42 lines
1.7 KiB
C#
42 lines
1.7 KiB
C#
using System.Reflection;
|
|
using FluentValidation;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Tnsu.ApprovalRoute.Application.Approvals;
|
|
using Tnsu.ApprovalRoute.Application.BasisRequests;
|
|
using Tnsu.ApprovalRoute.Application.Reminders;
|
|
using Tnsu.ApprovalRoute.Application.ListPartitioning;
|
|
using Tnsu.ApprovalRoute.Application.Reports;
|
|
using Tnsu.ApprovalRoute.Application.RequestManage;
|
|
using Tnsu.ApprovalRoute.Application.RequestTypeAccesses;
|
|
using Tnsu.ApprovalRoute.Application.RequestTypes;
|
|
using Tnsu.ApprovalRoute.Application.TemplateRoutes;
|
|
using Tnsu.ApprovalRoute.Application.TemplateRouteSteps;
|
|
|
|
namespace Tnsu.ApprovalRoute.Application;
|
|
|
|
public static class ApplicationServiceCollectionExtensions
|
|
{
|
|
public static IServiceCollection AddApprovalRouteApplication(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<ReminderService>();
|
|
services.AddScoped<RequestTypeService>();
|
|
services.AddScoped<RequestTypeAccessService>();
|
|
services.AddScoped<RequestManageService>();
|
|
services.AddScoped<BasisRequestsService>();
|
|
services.AddScoped<ListPartitionRegistry>();
|
|
services.AddScoped<ListPartitionService>();
|
|
// Джоба резолвится Hangfire'ом из scope на каждое выполнение.
|
|
services.AddScoped<CreateNextListPartitionJob>();
|
|
services.AddScoped<AutoApproveService>();
|
|
services.AddScoped<AutoApproveJob>();
|
|
services.AddScoped<VacancyReportService>();
|
|
services.AddScoped<RouteExportService>();
|
|
services.AddScoped<TemplateRouteService>();
|
|
services.AddScoped<TemplateRouteStepService>();
|
|
|
|
services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly());
|
|
|
|
return services;
|
|
}
|
|
}
|