feat(bll, dal): WeekendDayService + БД. CalendarService - получение рабочих дней за период
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.EsppApi;
|
||||
using PARR.EsppApi.Constants;
|
||||
using PARR.EsppApi.Models.Query;
|
||||
@@ -12,18 +13,21 @@ namespace PARR.Test
|
||||
private readonly IEsppApiService esppApiService;
|
||||
private readonly IIntervalService intervalService;
|
||||
private readonly ICalendarService calendarService;
|
||||
private readonly IServiceProvider serviceProvider;
|
||||
|
||||
public Worker(
|
||||
ILogger<Worker> logger,
|
||||
IEsppApiService esppApiService,
|
||||
IIntervalService intervalService,
|
||||
ICalendarService calendarService
|
||||
ICalendarService calendarService,
|
||||
IServiceProvider serviceProvider
|
||||
)
|
||||
{
|
||||
_logger = logger;
|
||||
this.esppApiService = esppApiService;
|
||||
this.intervalService = intervalService;
|
||||
this.calendarService = calendarService;
|
||||
this.serviceProvider = serviceProvider;
|
||||
}
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
@@ -38,9 +42,18 @@ namespace PARR.Test
|
||||
|
||||
#region Calendar
|
||||
|
||||
var testCalendar = new BLL.Services.Implementations.Test(calendarService);
|
||||
//var testCalendar = new BLL.Services.Implementations.Test(calendarService);
|
||||
|
||||
testCalendar.Ttt() ;
|
||||
//testCalendar.Ttt() ;
|
||||
//using (var scope = serviceProvider.CreateScope())
|
||||
//{
|
||||
// var weekendDayService = scope.ServiceProvider.GetService<IWeekendDayService>();
|
||||
|
||||
// var workDays = calendarService.GetWorkDatesForPeriod(new DateOnly(2024, 07, 01), TimeSpan.Parse("30:00:00:00"), weekendDayService!.GetWeekends);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user