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
806e6f5f
Commit
806e6f5f
authored
Aug 11, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增教师备课消息推送
parent
1397b2a2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
8 deletions
+52
-8
Edu.EducationCore.csproj.user
Edu.EducationCore/Edu.EducationCore.csproj.user
+1
-1
QuarzHelper.cs
Edu.EducationCore/Helper/QuarzHelper.cs
+1
-1
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+45
-3
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+5
-3
No files found.
Edu.EducationCore/Edu.EducationCore.csproj.user
View file @
806e6f5f
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<_LastSelectedProfileId>
E:\LDWork\LiuDongWork\OnLineItem\E
ducation\Edu.EducationCore\Properties\PublishProfiles\FolderProfile.pubxml
</_LastSelectedProfileId>
<_LastSelectedProfileId>
D:\线上代码\e
ducation\Edu.EducationCore\Properties\PublishProfiles\FolderProfile.pubxml
</_LastSelectedProfileId>
</PropertyGroup>
<ItemGroup>
<Compile
Update=
"EducationTimerServer.cs"
>
...
...
Edu.EducationCore/Helper/QuarzHelper.cs
View file @
806e6f5f
...
...
@@ -166,7 +166,7 @@ namespace Edu.Education.Helper
await
scheduler
.
Start
();
IJobDetail
job
=
JobBuilder
.
Create
<
NotifyTeachPerparing
>()
.
WithIdentity
(
"
job4"
,
"group4
"
)
.
WithIdentity
(
"
trigger5"
,
"group5
"
)
.
Build
();
ICronTrigger
trigger
=
(
ICronTrigger
)
TriggerBuilder
.
Create
()
.
WithIdentity
(
"trigger5"
,
"group5"
)
...
...
Edu.Module.Course/ClassModule.cs
View file @
806e6f5f
...
...
@@ -2806,7 +2806,7 @@ namespace Edu.Module.Course
/// <param name="model"></param>
/// <returns></returns>
[
TransactionCallHandler
]
public
bool
SetClassLessPlan
(
Class_LessonPlan_ViewModel
model
)
public
bool
SetClassLessPlan
(
Class_LessonPlan_ViewModel
model
,
UserInfo
user
)
{
bool
flag
=
false
;
if
(
model
.
LessonPlanList
!=
null
&&
model
.
LessonPlanList
.
Any
())
...
...
@@ -2862,12 +2862,38 @@ namespace Edu.Module.Course
{
ClassLessonPlanProjectsRepository
.
DeleteBatch
(
projectsList
);
}
#
region
备课通知
var
classInfo
=
classRepository
.
GetEntity
(
item
.
ClassId
);
var
recipientPath
=
HttpUtility
.
UrlEncode
(
$"/course/prepareclassDetails?ClassId=
{
item
.
ClassId
}
&ClassPlanId=
{
item
.
ClassPlanId
}
&TeacherId=
{
user
.
AccountId
}
"
);
var
notifyObjs
=
accountRepository
.
GetWorkUserIdByDictRepository
(
"Push_TeachPreparing"
);
if
(
notifyObjs
!=
null
&&
notifyObjs
.
Any
())
{
notifyObjs
.
ForEach
(
x
=>
{
var
content
=
$"<font color='info'>修改备课通知</font> 有老师对备课内容进行了修改调整\n>**概要信息** \n>备课老师:<font color='comment'>
{
user
.
AccountName
}
</font>\n>备课标题:<font color='comment'>
{
item
.
LessonPlan
}
(第
{
item
.
CourseNum
}
课)</font>\n>目标班级:<font color='comment'>
{
classInfo
.
ClassName
}
</font> \n>上课日期:<font color='warning'>
{
item
.
ClassDate
.
Value
.
ToString
(
"yyyy年MM月dd日"
)}
</font>\n>请点击:[查看备课内容](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
x
.
Id
}
&target=
{
recipientPath
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
x
.
WorkUserId
,
"修改备课通知"
);
});
}
#
endregion
}
else
{
LessonPlanId
=
ClassLessonPlanRepository
.
Insert
(
item
);
flag
=
LessonPlanId
>
0
;
#
region
备课通知
var
classInfo
=
classRepository
.
GetEntity
(
item
.
ClassId
);
var
recipientPath
=
HttpUtility
.
UrlEncode
(
$"/course/prepareclassDetails?ClassId=
{
item
.
ClassId
}
&ClassPlanId=
{
item
.
ClassPlanId
}
&TeacherId=
{
user
.
AccountId
}
"
);
var
notifyObjs
=
accountRepository
.
GetWorkUserIdByDictRepository
(
"Push_TeachPreparing"
);
if
(
notifyObjs
!=
null
&&
notifyObjs
.
Any
())
{
notifyObjs
.
ForEach
(
x
=>
{
var
content
=
$"<font color='info'>备课通知</font> 有老师完成了备课工作\n>**概要信息** \n>备课老师:<font color='comment'>
{
user
.
AccountName
}
</font>\n>备课标题:<font color='comment'>
{
item
.
LessonPlan
}
(第
{
item
.
CourseNum
}
课)</font>\n>目标班级:<font color='comment'>
{
classInfo
.
ClassName
}
</font> \n>上课日期:<font color='warning'>
{
item
.
ClassDate
.
Value
.
ToString
(
"yyyy年MM月dd日"
)}
</font>\n>请点击:[查看备课内容](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
x
.
Id
}
&target=
{
recipientPath
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
x
.
WorkUserId
,
"新增备课通知"
);
});
}
#
endregion
}
if
(
flag
)
{
...
...
@@ -2916,7 +2942,7 @@ namespace Edu.Module.Course
/// <param name="model"></param>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
UpdateClassLessPlan
(
Class_LessonPlan_ViewModel
model
)
public
virtual
bool
UpdateClassLessPlan
(
Class_LessonPlan_ViewModel
model
,
UserInfo
user
)
{
bool
flag
=
true
;
if
(
model
.
LessonPlanList
!=
null
&&
model
.
LessonPlanList
.
Any
())
...
...
@@ -2934,6 +2960,8 @@ namespace Edu.Module.Course
flag
=
ClassLessonPlanDetailsRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_LessonPlanDetails_ViewModel
.
LessonPlanDetailsId
),
itemDetails
.
LessonPlanDetailsId
));
}
}
}
}
return
flag
;
...
...
@@ -2946,7 +2974,7 @@ namespace Edu.Module.Course
/// <param name="model"></param>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
GetUpdateClassLessPlanSummary
(
Class_LessonPlan_ViewModel
model
)
public
virtual
bool
GetUpdateClassLessPlanSummary
(
Class_LessonPlan_ViewModel
model
,
UserInfo
user
)
{
bool
flag
=
true
;
if
(
model
.
LessonPlanList
!=
null
&&
model
.
LessonPlanList
.
Any
())
...
...
@@ -2962,6 +2990,20 @@ namespace Edu.Module.Course
{
flag
=
ClassLessonPlanRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_LessonPlan_ViewModel
.
LessonPlanId
),
item
.
LessonPlanId
));
}
#
region
备课通知
var
classInfo
=
classRepository
.
GetEntity
(
item
.
ClassId
);
var
recipientPath
=
HttpUtility
.
UrlEncode
(
$"/course/prepareclassDetails?ClassId=
{
item
.
ClassId
}
&ClassPlanId=
{
item
.
ClassPlanId
}
&TeacherId=
{
user
.
AccountId
}
"
);
var
notifyObjs
=
accountRepository
.
GetWorkUserIdByDictRepository
(
"Push_TeachPreparing"
);
if
(
notifyObjs
!=
null
&&
notifyObjs
.
Any
())
{
notifyObjs
.
ForEach
(
x
=>
{
var
content
=
$"<font color='info'>课后反馈通知</font> 有老师完成了课后反馈工作\n>**概要信息** \n>反馈老师:<font color='comment'>
{
user
.
AccountName
}
</font>\n>备课标题:<font color='comment'>
{
item
.
LessonPlan
}
(第
{
item
.
CourseNum
}
课)</font>\n>目标班级:<font color='comment'>
{
classInfo
.
ClassName
}
`</font> \n>上课日期:<font color='warning'>
{
item
.
ClassDate
.
Value
.
ToString
(
"yyyy年MM月dd日"
)}
</font>\n>请点击:[查看反馈内容](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
x
.
Id
}
&target=
{
recipientPath
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
x
.
WorkUserId
,
"课后反馈通知"
);
});
}
#
endregion
}
if
(
flag
)
{
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
806e6f5f
...
...
@@ -1529,7 +1529,9 @@ namespace Edu.WebApi.Controllers.Course
item
.
LessonPlanDetailsList
.
ForEach
(
x
=>
x
.
ProjectPic
=
(
x
.
ProjectPicList
!=
null
&&
x
.
ProjectPicList
.
Any
())
?
JsonConvert
.
SerializeObject
(
x
.
ProjectPicList
)
:
""
);
}
}
bool
flag
=
classModule
.
SetClassLessPlan
(
query
);
bool
flag
=
classModule
.
SetClassLessPlan
(
query
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
@@ -1574,7 +1576,7 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Failed
(
"老师教案信息为空必须更新"
);
}
bool
flag
=
classModule
.
UpdateClassLessPlan
(
query
);
bool
flag
=
classModule
.
UpdateClassLessPlan
(
query
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
@@ -1971,7 +1973,7 @@ namespace Edu.WebApi.Controllers.Course
}
query
.
LessonPlanList
.
ForEach
(
x
=>
x
.
ProjectPic
=
(
x
.
ProjectPicList
!=
null
&&
x
.
ProjectPicList
.
Any
())
?
JsonConvert
.
SerializeObject
(
x
.
ProjectPicList
)
:
""
);
bool
flag
=
classModule
.
GetUpdateClassLessPlanSummary
(
query
);
bool
flag
=
classModule
.
GetUpdateClassLessPlanSummary
(
query
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
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