feat(bll,dal,common): в common - DateResolver - проверка даты на текущие сутки относительно часового пояса МСК. Dal - EsppScheduleTransformService - рассчет NextRun с учетом выходных дней
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PARR.Common\PARR.Common.csproj" />
|
||||
<ProjectReference Include="..\PARR.Constants\PARR.Constants.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.Common;
|
||||
using PARR.Constants;
|
||||
|
||||
namespace PARR.BLL.Services.Implementations
|
||||
@@ -76,7 +77,8 @@ namespace PARR.BLL.Services.Implementations
|
||||
|
||||
//Так как в базе всё храним в UTC то время с 21 часа уже соответствует следующими суткам в календаре Москвы
|
||||
//просто сдвигаем на день весь список
|
||||
if (refTime.Hour > 21)
|
||||
//if (refTime.Hour > 21)
|
||||
if (DateResolver.IsCurrentDayRelativeMskTime(refTime.Hour) == false)
|
||||
return workDays.Select(wd => wd.AddDays(-1)).ToList();
|
||||
|
||||
//иначе просто отдаём как есть
|
||||
@@ -84,6 +86,8 @@ namespace PARR.BLL.Services.Implementations
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Возвращает список дней между датами
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user