feat(api,bll,dal,esppScheduleSync,TemplateGenerator): изменен рассчет nextRun для задания роботу и синхронизатору, подставляется в зависимости от настроек ЗО и таймзоны УЗ робота ЕСПП. Переименование полей в БД

This commit is contained in:
Mikhail Trubnikov
2026-02-03 16:15:19 +10:00
parent c0210656d9
commit ead4653ad0
36 changed files with 13010 additions and 290 deletions

View File

@@ -3,26 +3,26 @@ using PARR.API.Contracts.V1.Responses;
using PARR.BLL.Helpers;
using PARR.DAL.Contracts;
using PARR.DAL.Models;
using PARR.DAL.TransformServices;
namespace PARR.API.MappingProfiles.Resolvers
{
public class RobotTaskScheduleGenerationTimeResolver : IValueResolver<RobotConfiguration, RobotTaskScheduleResponse, string>
{
private readonly SettingsFromDb settingsFromDb;
private readonly INextRunModifierService nextRunModifierService;
//public class RobotTaskScheduleGenerationTimeResolver : IValueResolver<RobotConfiguration, RobotTaskScheduleResponse, string>
//{
// private readonly SettingsFromDb settingsFromDb;
// private readonly INextRunModifierService nextRunModifierService;
public RobotTaskScheduleGenerationTimeResolver(SettingsFromDb settingsFromDb, INextRunModifierService nextRunModifierService)
{
this.settingsFromDb = settingsFromDb;
this.nextRunModifierService = nextRunModifierService;
}
// public RobotTaskScheduleGenerationTimeResolver(SettingsFromDb settingsFromDb, INextRunModifierService nextRunModifierService)
// {
// this.settingsFromDb = settingsFromDb;
// this.nextRunModifierService = nextRunModifierService;
// }
public string Resolve(RobotConfiguration source, RobotTaskScheduleResponse destination, string destMember, ResolutionContext context)
{
var nextRunForRobot = nextRunModifierService.GetNextRunByAccountRobotTimeZone(source.Template!.NextRun);
// public string Resolve(RobotConfiguration source, RobotTaskScheduleResponse destination, string destMember, ResolutionContext context)
// {
// var nextRunForRobot = nextRunModifierService.GetNextRunByAccountRobotTimeZone(source.Template!.NextRun);
return EsppScheduleHelpers.GetGenerationTime(nextRunForRobot);
}
}
// return EsppScheduleHelpers.GetGenerationTime(nextRunForRobot);
// }
//}
}