Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
7107818b
Commit
7107818b
authored
Jan 20, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
df06a19d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
TimerJobj.cs
Edu.WebApi/Timers/TimerJobj.cs
+36
-0
No files found.
Edu.WebApi/Timers/TimerJobj.cs
View file @
7107818b
using
Edu.Common.Plugin
;
using
Edu.Common.Plugin
;
using
Edu.Module.Course
;
using
Edu.Module.Course
;
using
Edu.Module.Customer
;
using
Edu.Module.Duty
;
using
Edu.Module.Duty
;
using
Edu.Module.EduTask
;
using
Edu.Module.EduTask
;
using
Edu.Module.Exam
;
using
Edu.Module.Exam
;
...
@@ -39,6 +40,11 @@ namespace Edu.WebApi.Timers
...
@@ -39,6 +40,11 @@ namespace Edu.WebApi.Timers
/// </summary>
/// </summary>
private
static
readonly
PaperModule
paperModule
=
new
PaperModule
();
private
static
readonly
PaperModule
paperModule
=
new
PaperModule
();
/// <summary>
/// 课程顾问部和市场部数据统计
/// </summary>
private
static
readonly
MarketConsultantModule
marketConsultantModule
=
new
MarketConsultantModule
();
static
System
.
Timers
.
Timer
timer1
;
//计时器
static
System
.
Timers
.
Timer
timer1
;
//计时器
static
System
.
Timers
.
Timer
timer2
;
//定期处理未值班数据
static
System
.
Timers
.
Timer
timer2
;
//定期处理未值班数据
...
@@ -53,6 +59,8 @@ namespace Edu.WebApi.Timers
...
@@ -53,6 +59,8 @@ namespace Edu.WebApi.Timers
static
System
.
Timers
.
Timer
finishGuest
;
//处理学生毕业状态
static
System
.
Timers
.
Timer
finishGuest
;
//处理学生毕业状态
static
System
.
Timers
.
Timer
marketTimer
;
//处理市场部和课程顾问部数据统计
public
static
void
RunTimer
()
public
static
void
RunTimer
()
{
{
timer1
=
new
System
.
Timers
.
Timer
timer1
=
new
System
.
Timers
.
Timer
...
@@ -104,6 +112,13 @@ namespace Edu.WebApi.Timers
...
@@ -104,6 +112,13 @@ namespace Edu.WebApi.Timers
};
};
finishGuest
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
DealGuestFinish
);
finishGuest
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
DealGuestFinish
);
finishGuest
.
Enabled
=
true
;
finishGuest
.
Enabled
=
true
;
marketTimer
=
new
System
.
Timers
.
Timer
()
{
Interval
=
(
1000
*
60
)
*
(
1
)
//1分钟检测一次
};
marketTimer
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
DealMarketConsultantData
);
marketTimer
.
Enabled
=
true
;
}
}
public
static
void
RunStop
()
public
static
void
RunStop
()
...
@@ -115,6 +130,7 @@ namespace Edu.WebApi.Timers
...
@@ -115,6 +130,7 @@ namespace Edu.WebApi.Timers
changeOrder
.
Enabled
=
false
;
changeOrder
.
Enabled
=
false
;
examTimer
.
Enabled
=
false
;
examTimer
.
Enabled
=
false
;
finishGuest
.
Enabled
=
false
;
finishGuest
.
Enabled
=
false
;
marketTimer
.
Enabled
=
false
;
}
}
/// <summary>
/// <summary>
...
@@ -127,6 +143,26 @@ namespace Edu.WebApi.Timers
...
@@ -127,6 +143,26 @@ namespace Edu.WebApi.Timers
private
static
int
changeOrder_Timer
=
0
;
private
static
int
changeOrder_Timer
=
0
;
private
static
int
examPublish_Timer
=
0
;
private
static
int
examPublish_Timer
=
0
;
private
static
int
guestfinish_Timer
=
0
;
private
static
int
guestfinish_Timer
=
0
;
private
static
int
marketconsultant_Timer
=
0
;
/// <summary>
/// 定时生成市场部和课程顾问部数据统计
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public
static
void
DealMarketConsultantData
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
if
(
Interlocked
.
Exchange
(
ref
marketconsultant_Timer
,
1
)
==
0
)
{
//凌晨00:30执行
if
(
DateTime
.
Now
.
Hour
==
0
&&
DateTime
.
Now
.
Minute
==
30
)
{
marketConsultantModule
.
CreateConsultantDataModule
(
DateTime
.
Now
);
marketConsultantModule
.
CreateMarketDataModule
(
DateTime
.
Now
);
}
Interlocked
.
Exchange
(
ref
marketconsultant_Timer
,
0
);
}
}
/// <summary>
/// <summary>
/// 处理学员毕业状态
/// 处理学员毕业状态
...
...
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