Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.Package
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.Package
Commits
2b364f7d
Commit
2b364f7d
authored
Mar 01, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 任务日志
parent
ee36a959
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletions
+43
-1
VIZ.Package.Domain/RecordLogConstants.cs
+25
-1
VIZ.Package.Module/Task/PackageTask/ViewModel/PackageTaskViewModel.cs
+18
-0
No files found.
VIZ.Package.Domain/RecordLogConstants.cs
View file @
2b364f7d
...
...
@@ -35,6 +35,30 @@ namespace VIZ.Package.Domain
/// </summary>
public
const
string
SYSTEM_HOT_KEY
=
"触发快捷键"
;
// =============================================================================
// Task
// =============================================================================
/// <summary>
/// 注册任务
/// </summary>
public
const
string
SYSTEM_TASK_REGISTER
=
"注册任务"
;
/// <summary>
/// 取消任务
/// </summary>
public
const
string
SYSTEM_TASK_CANCEL
=
"取消任务"
;
/// <summary>
/// 开始任务
/// </summary>
public
const
string
SYSTEM_TASK_START
=
"开始任务"
;
/// <summary>
/// 停止任务
/// </summary>
public
const
string
SYSTEM_TASK_STOP
=
"停止任务"
;
// ===============================================================================================
// 操作
// ===============================================================================================
...
...
@@ -362,7 +386,7 @@ namespace VIZ.Package.Domain
/// <summary>
/// 文件列表
/// </summary>
public
const
string
OPERATE_FILE_LIST
=
"文件:列表"
;
/// <summary>
...
...
VIZ.Package.Module/Task/PackageTask/ViewModel/PackageTaskViewModel.cs
View file @
2b364f7d
...
...
@@ -12,6 +12,7 @@ using VIZ.Framework.Core;
using
VIZ.Package.Domain
;
using
VIZ.Package.Plugin
;
using
VIZ.Package.Service
;
using
VIZ.Package.Storage
;
namespace
VIZ.Package.Module
{
...
...
@@ -69,6 +70,11 @@ namespace VIZ.Package.Module
/// </summary>
private
VizCommandControlObjectService
vizCommandControlObjectService
=
new
VizCommandControlObjectService
();
/// <summary>
/// 操作日志服务
/// </summary>
private
RecordLogService
recordLogService
=
new
RecordLogService
();
// ==============================================================
// Property
// ==============================================================
...
...
@@ -105,6 +111,9 @@ namespace VIZ.Package.Module
private
void
Start
(
PackageTaskModel
task
)
{
task
.
IsRunning
=
true
;
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
SYSTEM_TASK_START
,
task
.
Name
);
}
#
endregion
...
...
@@ -123,6 +132,9 @@ namespace VIZ.Package.Module
private
void
Stop
(
PackageTaskModel
task
)
{
task
.
IsRunning
=
false
;
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
Operate
,
RecordLogTrigger
.
Human
,
RecordLogConstants
.
SYSTEM_TASK_STOP
,
task
.
Name
);
}
#
endregion
...
...
@@ -189,6 +201,9 @@ namespace VIZ.Package.Module
string
key
=
$"PackageTask_
{
task
.
ID
}
"
;
task
.
TimerInfo
=
ApplicationDomainEx
.
TimerManager
.
Register
(
key
,
task
.
Interval
,
()
=>
this
.
ExecuteTask
(
task
));
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
System
,
RecordLogTrigger
.
System
,
RecordLogConstants
.
SYSTEM_TASK_REGISTER
,
task
.
Name
);
}
/// <summary>
...
...
@@ -209,6 +224,9 @@ namespace VIZ.Package.Module
task
.
TimerInfo
?.
Dispose
();
}
}
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
System
,
RecordLogTrigger
.
System
,
RecordLogConstants
.
SYSTEM_TASK_CANCEL
,
task
.
Name
);
}
// ==============================================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment