From bf3dca6782b60312457f1b341d7b1d0c7ef1460d Mon Sep 17 00:00:00 2001 From: Mikhail Trubnikov Date: Fri, 13 Sep 2024 12:17:09 +1000 Subject: [PATCH] =?UTF-8?q?fix(bll):=20CalendarService=20=D0=B8=D1=81?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=20=D1=80=D0=B0=D1=81?= =?UTF-8?q?=D1=81=D1=87=D0=B5=D1=82=20=D0=B2=D1=8B=D1=85=D0=BE=D0=B4=D0=BD?= =?UTF-8?q?=D1=8B=D1=85=20=D0=B4=D0=BD=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PARR.BLL/Services/Implementations/CalendarService.cs | 2 +- PARR.TemplateDistributor/TemplateDistributor.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/PARR.BLL/Services/Implementations/CalendarService.cs b/PARR.BLL/Services/Implementations/CalendarService.cs index 143e0174..93d972fb 100644 --- a/PARR.BLL/Services/Implementations/CalendarService.cs +++ b/PARR.BLL/Services/Implementations/CalendarService.cs @@ -68,7 +68,7 @@ namespace PARR.BLL.Services.Implementations //Убираем праздники if (weekends.Any()) - workDays = workDays.Where(t => weekends.Any(x => x != t)).ToList(); + workDays = workDays.Where(t => !weekends.Any(x => x == t)).ToList(); //Убираем числа старше 28, чтобы сравнять продолжительность с февралем workDays.RemoveAll(t => t.Day > 28); diff --git a/PARR.TemplateDistributor/TemplateDistributor.cs b/PARR.TemplateDistributor/TemplateDistributor.cs index 91ac0ed1..86f25f74 100644 --- a/PARR.TemplateDistributor/TemplateDistributor.cs +++ b/PARR.TemplateDistributor/TemplateDistributor.cs @@ -283,7 +283,6 @@ namespace PARR.TemplateDistributor /// public async Task> GetWorkDaysAsync(ApplicationsInWork appInWork) { - var period = appInWork.EsppSchValues.FirstOrDefault()?.EsppSchTypeValue?.DistributionPeriod; var periodType = ParseDistributionPeriodType(period!.Type); var startPeriod = await esppScheduleTransformService.GetStartPeriodForDateAsync(appInWork.Id, appInWork.ReferenceDate, appInWork.ReferenceDate, periodType, period.Duration);