fix(esppScheduleSync): при автораспределении по месяцу, дата месяца теперь берется правильно

This commit is contained in:
Mikhail Trubnikov
2024-08-02 15:25:43 +10:00
parent aa5cf63fca
commit 0dcda12c01

View File

@@ -139,7 +139,15 @@ namespace PARR.EsppScheduleSync
esppObject.Dayofweek = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue;
break;
case EsppSchTypeScheduleEnum.Monthly:
esppObject.Dayofmonth = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue;
//если включено автораспределение, подставляем дату месяца из NextRun
if (template.ApplicationsInWork?.IsAutoDistributionEnabled == true)
{
esppObject.Dayofmonth = template.NextRun.Day.ToString();
}
else
{
esppObject.Dayofmonth = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue;
}
break;
case EsppSchTypeScheduleEnum.Monthly2:
esppObject.Md1 = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue;