Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
universal-report
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
report
universal-report
Commits
2bde6367
Commit
2bde6367
authored
2 years ago
by
Александр Миролюбов
Browse files
Options
Downloads
Patches
Plain Diff
.
parent
4e7f015b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README
+2
-0
2 additions, 0 deletions
README
UniversalReportsLibrary/Base/Report/Cron.cs
+7
-1
7 additions, 1 deletion
UniversalReportsLibrary/Base/Report/Cron.cs
report-cron/Cron.cs
+2
-2
2 additions, 2 deletions
report-cron/Cron.cs
with
11 additions
and
3 deletions
README
+
2
−
0
View file @
2bde6367
...
...
@@ -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
This diff is collapsed.
Click to expand it.
UniversalReportsLibrary/Base/Report/Cron.cs
+
7
−
1
View file @
2bde6367
...
...
@@ -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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
report-cron/Cron.cs
+
2
−
2
View file @
2bde6367
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment