Skip to content
Snippets Groups Projects
Commit 2bde6367 authored by Александр Миролюбов's avatar Александр Миролюбов
Browse files

.

parent 4e7f015b
No related branches found
No related tags found
No related merge requests found
......@@ -11,3 +11,5 @@
Запуск от пользователя
.\RLTReport.exe --system Test
.\RLTReportCron.exe --system Test
5. В адресной строке браузера после порта следует додавлять /editor/ или /viewer/
http://192.168.207.128:4205/editor/
\ No newline at end of file
......@@ -224,14 +224,20 @@ namespace RLT.Report
//}
public bool CreateDirectory(System.DateTime now)
{
string dir = CurrentPath(now);
try
{
System.IO.Directory.CreateDirectory(CurrentPath(now));
if (!System.IO.Directory.Exists(dir))
{
Report.MessageService.Write(MessageStatus.Ok, LogStatus.Debug, $"Создании директории '{dir}'");
System.IO.Directory.CreateDirectory(dir);
}
Cronos.CronExpression cronExpression = Cronos.CronExpression.Parse(CronTab());
return true;
}
catch (System.Exception exc)
{
Report.MessageService.Write(MessageStatus.FileError, LogStatus.Error, $"Ошибка при создании директории '{dir}'", exc);
return false;
}
}
......
......@@ -101,14 +101,14 @@ namespace RLT.Report
_messageService.Write(MessageStatus.Ok, LogStatus.Trace, $"Подготовка '{cron.Description}' '{cron.Report.Name}'");
fastReport.Prepare();
cron.CreateDirectory(now);
_messageService.Write(MessageStatus.Ok, LogStatus.Trace, $"Экпорт '{cron.Description}' '{cron.Report.Name}'");
ExportFastReport(cron, fastReport, now);
}
System.GC.Collect();
}
static void ExportFastReport(Cron cron, FastReport.Report fastReport, System.DateTime now)
void ExportFastReport(Cron cron, FastReport.Report fastReport, System.DateTime now)
{
_messageService.Write(MessageStatus.Ok, LogStatus.Trace, $"Экпорт '{cron.Description}' '{cron.Report.Name}'");
string savePath = System.IO.Path.Combine(cron.CurrentPath(now), now.ToString("HH.mm"));
switch (cron.Format)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment