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
b9390c88
Commit
b9390c88
authored
Feb 21, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
35ac9e84
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
ScrollClassCommonModule.cs
Edu.Module.Course/ScrollClassCommonModule.cs
+2
-7
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+3
-2
No files found.
Edu.Module.Course/ScrollClassCommonModule.cs
View file @
b9390c88
...
...
@@ -227,15 +227,12 @@ namespace Edu.Module.Course
var
CourseTimeList
=
JsonHelper
.
DeserializeObject
<
List
<
CourseTimeModel
>>(
item
.
FirstOrDefault
().
CourseTime
);
string
CourseTime
=
CourseTimeList
.
Min
(
x
=>
x
.
StartTime
)
+
"~"
+
CourseTimeList
.
Max
(
x
=>
x
.
EndTime
);
string
StartTime
=
item
.
Key
.
Date
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
CourseTimeList
.
Min
(
x
=>
x
.
StartTime
);
Console
.
WriteLine
(
JsonHelper
.
Serialize
(
CancelStuId
));
//开始验证学生的数量是否达标
if
(
item
.
Where
(
x
=>
!
CancelStuId
.
Contains
(
x
.
StuId
)).
Count
()
<
item
.
Key
.
ScrollMinNum
)
{
Console
.
WriteLine
(
"不达标"
);
//人数未达标 取消课程
foreach
(
var
qitem
in
item
.
Where
(
x
=>
!
CancelStuId
.
Contains
(
x
.
StuId
)))
{
Console
.
WriteLine
(
"不达标:"
+
qitem
.
StuId
);
CancelStuId
.
Add
(
qitem
.
StuId
);
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
State
),
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Cancel
},
...
...
@@ -258,7 +255,6 @@ namespace Edu.Module.Course
var
clist
=
scroll_AppointmentRepository
.
GetAppointList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
groupId
,
StartTime
=
qitem
.
Date
.
ToString
(
"yyyy-MM-dd"
),
StuId
=
qitem
.
StuId
,
State
=
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
WaitSure
});
foreach
(
var
qcitem
in
clist
)
{
Console
.
WriteLine
(
"之后的取消:"
+
qcitem
.
StuId
);
bool
IsCancel
=
false
;
if
(
qitem
.
Date
==
qcitem
.
Date
)
{
...
...
@@ -306,12 +302,11 @@ namespace Edu.Module.Course
上课时段:<font color='warning'>
{
CourseTime
}
</font>\n>
取消原因:<font color='comment'>截止仅有
{
item
.
Count
()}
报名,预约人数未达到最低成班人数
{
item
.
Key
.
ScrollMinNum
}
人</font>\n>
请 点 击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
item
.
Key
.
AccountId
}
&target=
{
recipientPath
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
"LiuDong"
,
"课程取消通知"
);
PushWorkChatHelper
.
PushToWorkChat
(
content
,
item
.
Key
.
WorkUserId
,
"课程取消通知"
);
}
}
else
{
Console
.
WriteLine
(
"达标"
);
#
region
写入
class_plan
计划表
//先查询计划是否已存在
...
...
@@ -390,7 +385,7 @@ namespace Edu.Module.Course
上课教室:<font color='warning'>
{
item
.
Key
.
RoomName
}
(
{
item
.
Key
.
RoomSchoolName
}
)</font>\n>
上课人数:<font color='comment'>
{
item
.
Count
()}
人</font>\n>
请 点 击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
item
.
Key
.
AccountId
}
&target=
{
recipientPath
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
"LiuDong"
,
"课程预约成功通知"
);
PushWorkChatHelper
.
PushToWorkChat
(
content
,
item
.
Key
.
WorkUserId
,
"课程预约成功通知"
);
}
}
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
b9390c88
...
...
@@ -349,8 +349,9 @@ namespace Edu.WebApi.Controllers.Course
var
query
=
new
RB_Course_ViewModel
()
{
IsQPrice
=
base
.
ParmJObj
.
GetInt
(
"IsQPrice"
,
0
),
CourseSubject
=
base
.
ParmJObj
.
GetInt
(
"CourseSubject"
),
IsQuerySalePlat
=
base
.
ParmJObj
.
GetInt
(
"IsQuerySalePlat"
),
CourseSubject
=
base
.
ParmJObj
.
GetInt
(
"CourseSubject"
),
IsQuerySalePlat
=
base
.
ParmJObj
.
GetInt
(
"IsQuerySalePlat"
),
IsScrollClass
=
base
.
ParmJObj
.
GetInt
(
"IsScrollClass"
,
0
)
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
...
...
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