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
e0eeb659
Commit
e0eeb659
authored
Sep 06, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增取消接口
parent
cac1edbe
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
620 additions
and
239 deletions
+620
-239
CourseAppointStateEnum.cs
Edu.Common/Enum/Course/CourseAppointStateEnum.cs
+7
-1
RB_Scroll_Appointment.cs
Edu.Model/Entity/Scroll/RB_Scroll_Appointment.cs
+10
-5
ScheduleResult.cs
Edu.Model/ViewModel/Scroll/ScheduleResult.cs
+20
-0
ScheduleCourseModule.cs
Edu.Module.Course/ScheduleCourseModule.cs
+65
-3
ScrollClassCommonModule.cs
Edu.Module.Course/ScrollClassCommonModule.cs
+7
-2
ScrollClassModule.cs
Edu.Module.Course/ScrollClassModule.cs
+410
-195
RB_Class_CheckRepository.cs
Edu.Repository/Grade/RB_Class_CheckRepository.cs
+18
-21
RB_Class_RoomRepository.cs
Edu.Repository/Grade/RB_Class_RoomRepository.cs
+20
-4
ScheduleCourseRepository.cs
Edu.Repository/Scroll/ScheduleCourseRepository.cs
+1
-1
EducationContractController.cs
Edu.WebApi/Controllers/Course/EducationContractController.cs
+1
-0
ScheduleCourseController.cs
Edu.WebApi/Controllers/Course/ScheduleCourseController.cs
+23
-3
ScrollController.cs
Edu.WebApi/Controllers/Course/ScrollController.cs
+38
-4
No files found.
Edu.Common/Enum/Course/CourseAppointStateEnum.cs
View file @
e0eeb659
...
@@ -27,6 +27,7 @@ namespace Edu.Common.Enum.Course
...
@@ -27,6 +27,7 @@ namespace Edu.Common.Enum.Course
/// </summary>
/// </summary>
[
EnumField
(
"已上课"
)]
[
EnumField
(
"已上课"
)]
Coursed
=
3
,
Coursed
=
3
,
/// <summary>
/// <summary>
/// 缺席
/// 缺席
/// </summary>
/// </summary>
...
@@ -38,6 +39,11 @@ namespace Edu.Common.Enum.Course
...
@@ -38,6 +39,11 @@ namespace Edu.Common.Enum.Course
/// </summary>
/// </summary>
[
EnumField
(
"取消"
)]
[
EnumField
(
"取消"
)]
Cancel
=
5
,
Cancel
=
5
,
/// <summary>
/// 学员消课专用,不计算老师课时费,计算学员签到
/// </summary>
[
EnumField
(
"学员消课"
)]
StuCheck
=
6
}
}
}
}
Edu.Model/Entity/Scroll/RB_Scroll_Appointment.cs
View file @
e0eeb659
...
@@ -46,10 +46,10 @@ namespace Edu.Model.Entity.Scroll
...
@@ -46,10 +46,10 @@ namespace Edu.Model.Entity.Scroll
/// </summary>
/// </summary>
public
string
ShiftSort
{
get
;
set
;
}
public
string
ShiftSort
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 状态 1待确认 2待上课 3已上课 4缺席 5取消
/// 状态 1待确认 2待上课 3已上课 4缺席 5取消 6学员消课专用,不计算老师课时费,计算学员签到
/// </summary>
/// </summary>
public
CourseAppointStateEnum
State
{
get
;
set
;
}
public
CourseAppointStateEnum
State
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 删除
/// 删除
...
@@ -145,5 +145,10 @@ namespace Edu.Model.Entity.Scroll
...
@@ -145,5 +145,10 @@ namespace Edu.Model.Entity.Scroll
/// 课程等级 对应的章节 与CourseGradeId 组成唯一 【hk2022-07-07直接修改为rb_course_chapter 中的chapterNo 需要消课的章节】
/// 课程等级 对应的章节 与CourseGradeId 组成唯一 【hk2022-07-07直接修改为rb_course_chapter 中的chapterNo 需要消课的章节】
/// </summary>
/// </summary>
public
int
CourseGradeNo
{
get
;
set
;
}
public
int
CourseGradeNo
{
get
;
set
;
}
}
/// <summary>
/// 是否扣除学员课时(1-扣除,0-不扣)
/// </summary>
public
int
IsCalcStuCheck
{
get
;
set
;
}
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/Scroll/ScheduleResult.cs
View file @
e0eeb659
...
@@ -186,6 +186,26 @@ namespace Edu.Model.ViewModel.Scroll
...
@@ -186,6 +186,26 @@ namespace Edu.Model.ViewModel.Scroll
/// 上课结束时间
/// 上课结束时间
/// </summary>
/// </summary>
public
string
EndTime
{
get
;
set
;
}
public
string
EndTime
{
get
;
set
;
}
/// <summary>
/// 上课教师
/// </summary>
public
int
ClassRoomId
{
get
;
set
;
}
/// <summary>
/// 上课教室
/// </summary>
public
string
RoomName
{
get
;
set
;
}
/// <summary>
/// 预约编号
/// </summary>
public
int
AppointId
{
get
;
set
;
}
/// <summary>
/// 预约班次
/// </summary>
public
string
ShiftSort
{
get
;
set
;
}
}
}
...
...
Edu.Module.Course/ScheduleCourseModule.cs
View file @
e0eeb659
using
Edu.Model.Entity.Grade
;
using
Edu.Common.Plugin
;
using
Edu.Model.Entity.Grade
;
using
Edu.Model.Entity.Sell
;
using
Edu.Model.Entity.Sell
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Grade
;
using
Edu.Model.ViewModel.Question
;
using
Edu.Model.ViewModel.Question
;
using
Edu.Model.ViewModel.Scroll
;
using
Edu.Model.ViewModel.Scroll
;
using
Edu.Model.ViewModel.Sell
;
using
Edu.Model.ViewModel.Sell
;
...
@@ -32,6 +34,8 @@ namespace Edu.Module.Course
...
@@ -32,6 +34,8 @@ namespace Edu.Module.Course
private
RB_Order_GuestRepository
guestRepository
=
new
RB_Order_GuestRepository
();
private
RB_Order_GuestRepository
guestRepository
=
new
RB_Order_GuestRepository
();
private
RB_Class_CheckRepository
checkRepository
=
new
RB_Class_CheckRepository
();
private
RB_Class_CheckRepository
checkRepository
=
new
RB_Class_CheckRepository
();
private
RB_CourseRepository
courseRepository
=
new
RB_CourseRepository
();
private
RB_CourseRepository
courseRepository
=
new
RB_CourseRepository
();
private
RB_Class_RoomRepository
class_RoomRepository
=
new
RB_Class_RoomRepository
();
private
RB_Scroll_AppointmentRepository
appointmentRepository
=
new
RB_Scroll_AppointmentRepository
();
/// <summary>
/// <summary>
/// 排课计划表
/// 排课计划表
...
@@ -44,10 +48,16 @@ namespace Edu.Module.Course
...
@@ -44,10 +48,16 @@ namespace Edu.Module.Course
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
{
List
<
int
>
IdList
=
new
List
<
int
>();
List
<
int
>
IdList
=
new
List
<
int
>();
List
<
int
>
roomIdList
=
new
List
<
int
>();
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
if
(
item
.
CourseItems
!=
null
&&
item
.
CourseItems
.
Count
>
0
)
if
(
item
.
CourseItems
!=
null
&&
item
.
CourseItems
.
Count
>
0
)
{
{
var
tempRoomArray
=
item
.
CourseItems
.
Select
(
qitem
=>
qitem
.
ClassRoomId
).
Distinct
();
if
(
tempRoomArray
!=
null
&&
tempRoomArray
.
Count
()
>
0
)
{
roomIdList
.
AddRange
(
tempRoomArray
);
}
var
tempArray
=
item
.
CourseItems
.
Select
(
qitem
=>
qitem
.
AccountId
).
Distinct
();
var
tempArray
=
item
.
CourseItems
.
Select
(
qitem
=>
qitem
.
AccountId
).
Distinct
();
if
(
tempArray
!=
null
&&
tempArray
.
Count
()
>
0
)
if
(
tempArray
!=
null
&&
tempArray
.
Count
()
>
0
)
{
{
...
@@ -71,6 +81,15 @@ namespace Edu.Module.Course
...
@@ -71,6 +81,15 @@ namespace Edu.Module.Course
string
Ids
=
string
.
Join
(
","
,
IdList
.
Distinct
());
string
Ids
=
string
.
Join
(
","
,
IdList
.
Distinct
());
empList
=
accountRepository
.
GetAccountListExtRepository
(
new
Model
.
ViewModel
.
User
.
RB_Account_ViewModel
()
{
QIds
=
Ids
});
empList
=
accountRepository
.
GetAccountListExtRepository
(
new
Model
.
ViewModel
.
User
.
RB_Account_ViewModel
()
{
QIds
=
Ids
});
}
}
List
<
RB_Class_Room_ViewModel
>
roomList
=
new
List
<
RB_Class_Room_ViewModel
>();
if
(
roomIdList
!=
null
&&
roomIdList
.
Count
>
0
)
{
string
roomIds
=
string
.
Join
(
","
,
roomIdList
.
Distinct
());
if
(!
string
.
IsNullOrEmpty
(
roomIds
))
{
roomList
=
class_RoomRepository
.
GetClassRoomListExtRepository
(
roomIds
);
}
}
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
...
@@ -88,6 +107,10 @@ namespace Edu.Module.Course
...
@@ -88,6 +107,10 @@ namespace Edu.Module.Course
foreach
(
var
subItem
in
item
.
CourseItems
)
foreach
(
var
subItem
in
item
.
CourseItems
)
{
{
subItem
.
TeacherName
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
subItem
.
AccountId
)?.
AccountName
??
""
;
subItem
.
TeacherName
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
subItem
.
AccountId
)?.
AccountName
??
""
;
if
(
subItem
.
ClassRoomId
>
0
)
{
subItem
.
RoomName
=
roomList
?.
FirstOrDefault
(
qitem
=>
qitem
.
RoomId
==
subItem
.
ClassRoomId
)?.
RoomName
??
""
;
}
}
}
}
}
}
}
...
@@ -121,7 +144,6 @@ namespace Edu.Module.Course
...
@@ -121,7 +144,6 @@ namespace Edu.Module.Course
return
flag
;
return
flag
;
}
}
/// <summary>
/// <summary>
/// 修改学员,学管备注
/// 修改学员,学管备注
/// </summary>
/// </summary>
...
@@ -169,7 +191,6 @@ namespace Edu.Module.Course
...
@@ -169,7 +191,6 @@ namespace Edu.Module.Course
return
flag
;
return
flag
;
}
}
/// <summary>
/// <summary>
/// 修改学员上课方式
/// 修改学员上课方式
/// </summary>
/// </summary>
...
@@ -227,5 +248,46 @@ namespace Edu.Module.Course
...
@@ -227,5 +248,46 @@ namespace Edu.Module.Course
}
}
return
list
;
return
list
;
}
}
/// <summary>
/// 获取预约详情
/// </summary>
/// <param name="Date"></param>
/// <param name="AccountId"></param>
/// <param name="ShiftSort"></param>
/// <returns></returns>
public
object
GetStuAppointPlanModule
(
string
Date
,
int
AccountId
,
string
ShiftSort
)
{
object
obj
=
new
object
();
var
tempList
=
appointmentRepository
.
GetList
(
new
RB_Scroll_Appointment_ViewModel
{
StartTime
=
Date
,
EntTime
=
Date
,
AccountId
=
AccountId
,
ShiftSort
=
ShiftSort
});
if
(
tempList
!=
null
&&
tempList
.
Count
>
0
)
{
var
firstModel
=
tempList
.
FirstOrDefault
();
obj
=
new
{
firstModel
.
CourseId
,
firstModel
.
CourseGradeNo
,
firstModel
.
Date
,
firstModel
.
RoomId
,
firstModel
.
ShiftSort
,
firstModel
.
TeacherId
,
firstModel
.
ChapterNo
,
ChooseStuList
=
tempList
.
Select
(
qitem
=>
new
{
qitem
.
LearnCourseId
,
qitem
.
StuId
,
qitem
.
CourseGradeId
,
qitem
.
GuestId
,
qitem
.
CourseGradeNo
,
qitem
.
Id
,
qitem
.
StuName
,
qitem
.
IsCalcStuCheck
,
qitem
.
State
,
StateName
=
qitem
.
State
.
ToName
()
}),
};
}
return
obj
;
}
}
}
}
}
Edu.Module.Course/ScrollClassCommonModule.cs
View file @
e0eeb659
...
@@ -669,10 +669,15 @@ namespace Edu.Module.Course
...
@@ -669,10 +669,15 @@ namespace Edu.Module.Course
public
void
CreateScrollChapter
(
int
groupId
=
100000
)
public
void
CreateScrollChapter
(
int
groupId
=
100000
)
{
{
//查询当前时间已结束的预约课
//查询当前时间已结束的预约课
var
list
=
scroll_AppointmentRepository
.
GetList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
groupId
,
CourseEndTimeStr
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
,
State
=
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
WaitCourse
});
var
list
=
scroll_AppointmentRepository
.
GetList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
groupId
,
CourseEndTimeStr
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
});
if
(
list
.
Any
())
if
(
list
.
Any
())
{
{
class_CheckRepository
.
AppointStuCheckRepository
(
list
);
var
tempList
=
list
.
Where
(
qitem
=>
qitem
.
State
==
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
WaitCourse
||
qitem
.
State
==
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
StuCheck
)?.
ToList
();
if
(
tempList
.
Any
())
{
class_CheckRepository
.
AppointStuCheckRepository
(
tempList
);
}
}
}
}
}
#
endregion
#
endregion
...
...
Edu.Module.Course/ScrollClassModule.cs
View file @
e0eeb659
...
@@ -1732,201 +1732,7 @@ namespace Edu.Module.Course
...
@@ -1732,201 +1732,7 @@ namespace Edu.Module.Course
#
endregion
#
endregion
}
}
/// <summary>
/// 后台取消预约
/// </summary>
/// <param name="stuIds"></param>
/// <param name="teacherId"></param>
/// <param name="date"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
string
CancelAppointment
(
string
AppointIds
,
int
teacherId
,
string
date
,
UserInfo
userInfo
)
{
bool
flag
=
false
;
//查询当日 所有的预约记录
var
list
=
scroll_AppointmentRepository
.
GetAppointList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
StartTime
=
date
,
EntTime
=
date
,
TeacherId
=
teacherId
,
AppointIds
=
AppointIds
});
if
(
list
.
Where
(
x
=>
x
.
State
!=
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
WaitSure
).
Any
())
{
return
"已确认预约,无法取消"
;
}
if
(
list
.
Select
(
x
=>
x
.
ShiftSort
).
Distinct
().
Count
()
>
1
)
{
return
"只能单次约课取消"
;
}
#
region
获取
token
推送订阅消息
string
Appid
=
Config
.
JiaXiaoHeAppId
;
var
Secret
=
Config
.
JiaXiaoHeAppSecret
;
string
tokenKey
=
"DATA_JiaXiaoHeToken_"
+
Appid
;
string
token
=
Cache
.
WeChat
.
WeChatReidsCache2
.
GetToken
(
tokenKey
);
if
(
Config
.
IsLocal
==
1
)
{
token
=
""
;
}
else
{
if
(
string
.
IsNullOrEmpty
(
token
))
{
token
=
WeChatHelper
.
GetAccessToken
(
Appid
,
Secret
);
Cache
.
WeChat
.
WeChatReidsCache2
.
Set
(
tokenKey
,
token
);
}
if
(
string
.
IsNullOrEmpty
(
token
))
{
return
"取消失败,请联系管理员(token)"
;
}
}
#
endregion
foreach
(
var
item
in
list
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
State
),
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Cancel
},
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
Remark
),
item
.
Remark
+
";后台管理取消"
},
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
UpdateBy
),
userInfo
.
Id
},
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
UpdateTime
),
DateTime
.
Now
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Scroll_Appointment_ViewModel
.
Id
),
FiledValue
=
item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
scroll_AppointmentRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
//给学生推送 取消课程的订阅消息
SendAppointmentCancelMsg
(
token
,
item
.
StuOpenId
,
item
,
item
.
Date
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
item
.
CourseSTime
,
"老师操作取消预约"
);
if
(
item
.
AppointType
==
2
)
{
//更新补课
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
State
),
1
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
StuId
),
FiledValue
=
item
.
StuId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
GuestId
),
FiledValue
=
item
.
GuestId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
ChapterNo
),
FiledValue
=
item
.
ChapterNo
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
State
),
FiledValue
=
2
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
scroll_SkipCourseRepository
.
Update
(
keyValues1
,
wheres1
);
}
#
region
之后的取消
// 暂时先屏蔽了 因为改为随机约课了 没必要再取消后面的了
if
(
item
.
AppointType
==
-
1
)
{
var
clist
=
scroll_AppointmentRepository
.
GetAppointList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
StartTime
=
item
.
Date
.
ToString
(
"yyyy-MM-dd"
),
StuId
=
item
.
StuId
,
State
=
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
WaitSure
});
foreach
(
var
qitem
in
clist
)
{
bool
IsCancel
=
false
;
if
(
qitem
.
Date
==
item
.
Date
)
{
//验证时段
if
(
Convert
.
ToInt32
(
qitem
.
ShiftSort
.
Replace
(
","
,
""
))
>
Convert
.
ToInt32
(
item
.
ShiftSort
.
Replace
(
","
,
""
)))
{
IsCancel
=
true
;
}
}
else
{
IsCancel
=
true
;
}
if
(
IsCancel
)
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
State
),
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Cancel
},
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
UpdateTime
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Scroll_Appointment_ViewModel
.
Id
),
FiledValue
=
qitem
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag1
=
scroll_AppointmentRepository
.
Update
(
keyValues1
,
wheres1
);
if
(
flag1
)
{
//给学生推送 取消课程的订阅消息
SendAppointmentCancelMsg
(
token
,
qitem
.
StuOpenId
,
qitem
,
qitem
.
Date
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
qitem
.
CourseSTime
,
"老师操作取消预约"
);
if
(
qitem
.
AppointType
==
2
)
{
//更新补课
Dictionary
<
string
,
object
>
keyValues12
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
State
),
1
}
};
List
<
WhereHelper
>
wheres12
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
StuId
),
FiledValue
=
qitem
.
StuId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
GuestId
),
FiledValue
=
qitem
.
GuestId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
ChapterNo
),
FiledValue
=
qitem
.
ChapterNo
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
State
),
FiledValue
=
2
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
scroll_SkipCourseRepository
.
Update
(
keyValues12
,
wheres12
);
}
}
}
}
}
#
endregion
}
else
{
return
"出错了,请联系管理员"
;
}
}
if
(
flag
)
{
var
firstModel
=
list
.
FirstOrDefault
();
string
CourseTime
=
firstModel
.
CourseSTime
+
"~"
+
firstModel
.
CourseETime
;
string
StuName
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
StuName
));
string
Scroll_Notice
=
dictvalueRepository
.
GetList
(
new
RB_Dictvalue_Extend
()
{
RB_Group_id
=
userInfo
.
Group_Id
,
DictKey
=
"Scroll_Notice"
}).
FirstOrDefault
()?.
Content
??
""
;
if
(!
string
.
IsNullOrEmpty
(
Scroll_Notice
))
{
//查询推送老师
var
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
QIds
=
Scroll_Notice
});
foreach
(
var
empModel
in
empList
)
{
//给老师推送取消课程 信息
if
(!
string
.
IsNullOrEmpty
(
empModel
.
WorkUserId
))
{
var
recipientPath
=
HttpUtility
.
UrlEncode
(
$"/stu/subscribe"
);
//地址需要后台功能做了之后吧
var
content
=
$"<font color='info'>取消学生预约通知</font>\n>**概要信息** \n>上课日期:<font color='warning'>
{
Common
.
ConvertHelper
.
FormatDate
(
firstModel
.
Date
)}
</font>\n>上课时段:<font color='warning'>
{
CourseTime
}
</font>\n>上课老师:<font color='warning'>
{
firstModel
.
TeacherName
}
</font>\n>取消原因:<font color='comment'>后台管理取消
{
StuName
}
的约课</font>\n>请 点 击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
empModel
.
Id
}
&target=
{
recipientPath
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
empModel
.
WorkUserId
,
"取消学生预约通知"
);
}
}
}
}
return
""
;
}
/// <summary>
/// <summary>
/// 后台确认预约
/// 后台确认预约
...
@@ -2884,6 +2690,8 @@ namespace Edu.Module.Course
...
@@ -2884,6 +2690,8 @@ namespace Edu.Module.Course
//验证都OK了 插入预约数据
//验证都OK了 插入预约数据
if
(
demodel
.
Id
<=
0
)
if
(
demodel
.
Id
<=
0
)
{
{
//默认扣除学生课时
demodel
.
IsCalcStuCheck
=
1
;
AppointId
=
scroll_AppointmentRepository
.
Insert
(
demodel
);
AppointId
=
scroll_AppointmentRepository
.
Insert
(
demodel
);
}
}
else
else
...
@@ -3001,7 +2809,7 @@ namespace Edu.Module.Course
...
@@ -3001,7 +2809,7 @@ namespace Edu.Module.Course
/// <param name="date"></param>
/// <param name="date"></param>
/// <param name="userInfo"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
/// <returns></returns>
public
async
Task
<
string
>
CancelSureAppointmentAsync
(
string
AppointIds
,
int
teacherId
,
string
date
,
string
shiftSort
,
UserInfo
userInfo
)
public
async
Task
<
string
>
CancelSureAppointment
Module
Async
(
string
AppointIds
,
int
teacherId
,
string
date
,
string
shiftSort
,
UserInfo
userInfo
)
{
{
bool
flag
=
false
;
bool
flag
=
false
;
List
<
int
>
appointList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
AppointIds
+
"]"
);
List
<
int
>
appointList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
AppointIds
+
"]"
);
...
@@ -3157,6 +2965,413 @@ namespace Edu.Module.Course
...
@@ -3157,6 +2965,413 @@ namespace Edu.Module.Course
return
""
;
return
""
;
}
}
/// <summary>
/// 后台取消预约(取消单个学生预约)
/// </summary>
/// <param name="stuIds"></param>
/// <param name="teacherId"></param>
/// <param name="date"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
string
CancelAppointmentModule
(
string
AppointIds
,
int
teacherId
,
string
date
,
UserInfo
userInfo
)
{
bool
flag
=
false
;
//查询当日 所有的预约记录
var
list
=
scroll_AppointmentRepository
.
GetAppointList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
StartTime
=
date
,
EntTime
=
date
,
TeacherId
=
teacherId
,
AppointIds
=
AppointIds
});
if
(
list
.
Where
(
x
=>
x
.
State
!=
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
WaitSure
).
Any
())
{
return
"已确认预约,无法取消"
;
}
if
(
list
.
Select
(
x
=>
x
.
ShiftSort
).
Distinct
().
Count
()
>
1
)
{
return
"只能单次约课取消"
;
}
#
region
获取
token
推送订阅消息
string
Appid
=
Config
.
JiaXiaoHeAppId
;
var
Secret
=
Config
.
JiaXiaoHeAppSecret
;
string
tokenKey
=
"DATA_JiaXiaoHeToken_"
+
Appid
;
string
token
=
Cache
.
WeChat
.
WeChatReidsCache2
.
GetToken
(
tokenKey
);
if
(
Config
.
IsLocal
==
1
)
{
token
=
""
;
}
else
{
if
(
string
.
IsNullOrEmpty
(
token
))
{
token
=
WeChatHelper
.
GetAccessToken
(
Appid
,
Secret
);
Cache
.
WeChat
.
WeChatReidsCache2
.
Set
(
tokenKey
,
token
);
}
if
(
string
.
IsNullOrEmpty
(
token
))
{
return
"取消失败,请联系管理员(token)"
;
}
}
#
endregion
foreach
(
var
item
in
list
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
State
),
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Cancel
},
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
Remark
),
item
.
Remark
+
";后台管理取消"
},
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
UpdateBy
),
userInfo
.
Id
},
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
UpdateTime
),
DateTime
.
Now
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_Appointment_ViewModel
.
Id
),
FiledValue
=
item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
scroll_AppointmentRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
//给学生推送 取消课程的订阅消息
SendAppointmentCancelMsg
(
token
,
item
.
StuOpenId
,
item
,
item
.
Date
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
item
.
CourseSTime
,
"老师操作取消预约"
);
if
(
item
.
AppointType
==
2
)
{
//更新补课
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
State
),
1
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
StuId
),
FiledValue
=
item
.
StuId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
GuestId
),
FiledValue
=
item
.
GuestId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
ChapterNo
),
FiledValue
=
item
.
ChapterNo
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
State
),
FiledValue
=
2
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
scroll_SkipCourseRepository
.
Update
(
keyValues1
,
wheres1
);
}
#
region
之后的取消
// 暂时先屏蔽了 因为改为随机约课了 没必要再取消后面的了
if
(
item
.
AppointType
==
-
1
)
{
var
clist
=
scroll_AppointmentRepository
.
GetAppointList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
StartTime
=
item
.
Date
.
ToString
(
"yyyy-MM-dd"
),
StuId
=
item
.
StuId
,
State
=
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
WaitSure
});
foreach
(
var
qitem
in
clist
)
{
bool
IsCancel
=
false
;
if
(
qitem
.
Date
==
item
.
Date
)
{
//验证时段
if
(
Convert
.
ToInt32
(
qitem
.
ShiftSort
.
Replace
(
","
,
""
))
>
Convert
.
ToInt32
(
item
.
ShiftSort
.
Replace
(
","
,
""
)))
{
IsCancel
=
true
;
}
}
else
{
IsCancel
=
true
;
}
if
(
IsCancel
)
{
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
State
),
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Cancel
},
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
UpdateTime
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_Appointment_ViewModel
.
Id
),
FiledValue
=
qitem
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag1
=
scroll_AppointmentRepository
.
Update
(
keyValues1
,
wheres1
);
if
(
flag1
)
{
//给学生推送 取消课程的订阅消息
SendAppointmentCancelMsg
(
token
,
qitem
.
StuOpenId
,
qitem
,
qitem
.
Date
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
qitem
.
CourseSTime
,
"老师操作取消预约"
);
if
(
qitem
.
AppointType
==
2
)
{
//更新补课
Dictionary
<
string
,
object
>
keyValues12
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
State
),
1
}
};
List
<
WhereHelper
>
wheres12
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
StuId
),
FiledValue
=
qitem
.
StuId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
GuestId
),
FiledValue
=
qitem
.
GuestId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
ChapterNo
),
FiledValue
=
qitem
.
ChapterNo
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
State
),
FiledValue
=
2
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
scroll_SkipCourseRepository
.
Update
(
keyValues12
,
wheres12
);
}
}
}
}
}
#
endregion
}
else
{
return
"出错了,请联系管理员"
;
}
}
if
(
flag
)
{
var
firstModel
=
list
.
FirstOrDefault
();
string
CourseTime
=
firstModel
.
CourseSTime
+
"~"
+
firstModel
.
CourseETime
;
string
StuName
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
StuName
));
string
Scroll_Notice
=
dictvalueRepository
.
GetList
(
new
RB_Dictvalue_Extend
()
{
RB_Group_id
=
userInfo
.
Group_Id
,
DictKey
=
"Scroll_Notice"
}).
FirstOrDefault
()?.
Content
??
""
;
if
(!
string
.
IsNullOrEmpty
(
Scroll_Notice
))
{
//查询推送老师
var
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
QIds
=
Scroll_Notice
});
foreach
(
var
empModel
in
empList
)
{
//给老师推送取消课程 信息
if
(!
string
.
IsNullOrEmpty
(
empModel
.
WorkUserId
))
{
var
recipientPath
=
HttpUtility
.
UrlEncode
(
$"/stu/subscribe"
);
//地址需要后台功能做了之后吧
var
content
=
$"<font color='info'>取消学生预约通知</font>\n>**概要信息** \n>上课日期:<font color='warning'>
{
Common
.
ConvertHelper
.
FormatDate
(
firstModel
.
Date
)}
</font>\n>上课时段:<font color='warning'>
{
CourseTime
}
</font>\n>上课老师:<font color='warning'>
{
firstModel
.
TeacherName
}
</font>\n>取消原因:<font color='comment'>后台管理取消
{
StuName
}
的约课</font>\n>请 点 击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
empModel
.
Id
}
&target=
{
recipientPath
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
empModel
.
WorkUserId
,
"取消学生预约通知"
);
}
}
}
}
return
""
;
}
/// <summary>
/// 后台取消预约(取消已确认约课)
/// </summary>
/// <param name="AppointIds">预约编号</param>
/// <param name="teacherId"></param>
/// <param name="date"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
bool
CancelSureAppointmentNewModule
(
CancelAppointmentModel
model
,
UserInfo
userInfo
,
out
string
message
)
{
message
=
""
;
bool
flag
=
false
;
List
<
int
>
appointList
=
model
.
StuList
.
Select
(
qitem
=>
qitem
.
AppointId
).
ToList
();
//查询当日 所有的预约记录
var
alllist
=
scroll_AppointmentRepository
.
GetAppointList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
StartTime
=
model
.
Date
,
EntTime
=
model
.
Date
,
AccountId
=
model
.
AccountId
,
ShiftSort
=
model
.
ShiftSort
});
var
list
=
alllist
.
Where
(
x
=>
appointList
.
Contains
(
x
.
Id
)).
ToList
();
if
(
list
.
Count
()
!=
appointList
.
Count
())
{
message
=
"取消数量对不上"
;
return
false
;
}
if
(
list
.
Where
(
x
=>
x
.
State
!=
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
WaitCourse
&&
x
.
State
!=
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Coursed
).
Any
())
{
message
=
"非已确认预约,无法取消"
;
return
false
;
}
#
region
获取
token
推送订阅消息
string
Appid
=
Config
.
JiaXiaoHeAppId
;
var
Secret
=
Config
.
JiaXiaoHeAppSecret
;
string
tokenKey
=
"DATA_JiaXiaoHeToken_"
+
Appid
;
string
token
=
Cache
.
WeChat
.
WeChatReidsCache2
.
GetToken
(
tokenKey
);
if
(
Config
.
IsLocal
==
1
)
{
token
=
""
;
}
else
{
if
(
string
.
IsNullOrEmpty
(
token
))
{
token
=
WeChatHelper
.
GetAccessToken
(
Appid
,
Secret
);
Cache
.
WeChat
.
WeChatReidsCache2
.
Set
(
tokenKey
,
token
);
}
}
#
endregion
bool
isCancelAll
=
false
;
//判断是否是全部取消
if
(
list
.
Count
()
==
alllist
.
Count
())
{
isCancelAll
=
true
;
//全部取消
}
foreach
(
var
item
in
list
)
{
var
currentStu
=
model
.
StuList
.
FirstOrDefault
(
qitem
=>
qitem
.
AppointId
==
item
.
Id
);
item
.
IsCalcStuCheck
=
currentStu
.
IsCalcStuCheck
;
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
IsCalcStuCheck
),
item
.
IsCalcStuCheck
},
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
UpdateBy
),
userInfo
.
Id
},
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
UpdateTime
),
DateTime
.
Now
}
};
if
(
item
.
IsCalcStuCheck
==
1
)
{
keyValues
.
Add
(
nameof
(
RB_Scroll_Appointment_ViewModel
.
Remark
),
item
.
Remark
+
";后台管理取消,并扣除学生课时"
);
keyValues
.
Add
(
nameof
(
RB_Scroll_Appointment_ViewModel
.
State
),
(
int
)
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
StuCheck
);
}
else
{
keyValues
.
Add
(
nameof
(
RB_Scroll_Appointment_ViewModel
.
Remark
),
item
.
Remark
+
";后台管理取消已确认的约课"
);
keyValues
.
Add
(
nameof
(
RB_Scroll_Appointment_ViewModel
.
State
),
(
int
)
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Cancel
);
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_Appointment_ViewModel
.
Id
),
FiledValue
=
item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
scroll_AppointmentRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
//给学生推送 取消课程的订阅消息
SendAppointmentCancelMsg
(
token
,
item
.
StuOpenId
,
item
,
item
.
Date
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
item
.
CourseSTime
,
"老师操作取消预约"
);
if
(
item
.
AppointType
==
2
)
{
//更新补课
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
State
),
1
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
StuId
),
FiledValue
=
item
.
StuId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
GuestId
),
FiledValue
=
item
.
GuestId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
ChapterNo
),
FiledValue
=
item
.
ChapterNo
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Scroll_SkipCourse_ViewModel
.
State
),
FiledValue
=
2
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
scroll_SkipCourseRepository
.
Update
(
keyValues1
,
wheres1
);
}
if
(
item
.
State
==
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Coursed
)
{
//已上课 要删除 签到记录
var
checkList
=
class_CheckRepository
.
GetClassCheckListRepository
(
new
RB_Class_Check_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
OrderGuestId
=
item
.
GuestId
,
QClassPlanIds
=
item
.
ClassPlanId
.
ToString
()
});
foreach
(
var
qitem
in
checkList
)
{
if
(
item
.
IsCalcStuCheck
==
0
)
{
class_CheckRepository
.
Delete
(
qitem
);
}
}
}
}
else
{
return
false
;
}
}
if
(
flag
)
{
if
(
isCancelAll
)
{
var
newList
=
scroll_AppointmentRepository
.
GetAppointList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
StartTime
=
model
.
Date
,
EntTime
=
model
.
Date
,
AccountId
=
model
.
AccountId
,
ShiftSort
=
model
.
ShiftSort
});
//全都都消耗学员课时 就删除上课计划
if
(((
newList
?.
Where
(
qitem
=>
qitem
.
IsCalcStuCheck
==
1
)?.
Count
())
??
0
)
==
0
)
{
//全部取消了 删除对应 计划 + 上课时段
string
planIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
ClassPlanId
).
Distinct
());
var
planlist
=
class_PlanRepository
.
GetClassPlanListRepository
(
new
RB_Class_Plan_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
QClassPlanIds
=
planIds
,
PlanType
=
2
});
var
timelist
=
class_TimeRepository
.
GetClassTimeListRepository
(
new
RB_Class_Time_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
QClassPlanIds
=
planIds
});
foreach
(
var
item
in
planlist
)
{
class_PlanRepository
.
Delete
(
item
);
var
tlist
=
timelist
.
Where
(
x
=>
x
.
ClassPlanId
==
item
.
ClassPlanId
).
ToList
();
foreach
(
var
qitem
in
tlist
)
{
class_TimeRepository
.
Delete
(
qitem
);
}
}
}
}
var
firstModel
=
list
.
FirstOrDefault
();
string
CourseTime
=
firstModel
.
CourseSTime
+
"~"
+
firstModel
.
CourseETime
;
string
StuName
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
StuName
));
string
Scroll_Notice
=
dictvalueRepository
.
GetList
(
new
RB_Dictvalue_Extend
()
{
RB_Group_id
=
userInfo
.
Group_Id
,
DictKey
=
"Scroll_Notice"
}).
FirstOrDefault
()?.
Content
??
""
;
if
(!
string
.
IsNullOrEmpty
(
Scroll_Notice
))
{
//查询推送老师
var
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
QIds
=
Scroll_Notice
});
foreach
(
var
empModel
in
empList
)
{
//给老师推送取消课程 信息
if
(!
string
.
IsNullOrEmpty
(
empModel
.
WorkUserId
))
{
var
recipientPath
=
HttpUtility
.
UrlEncode
(
$"/stu/subscribe"
);
var
content
=
$"<font color='info'>取消学生预约通知</font>\n>**概要信息** \n>上课日期:<font color='warning'>
{
Common
.
ConvertHelper
.
FormatDate
(
firstModel
.
Date
)}
</font>\n>上课时段:<font color='warning'>
{
CourseTime
}
</font>\n>上课老师:<font color='warning'>
{
firstModel
.
TeacherName
}
</font>\n>取消原因:<font color='comment'>后台管理取消
{
StuName
}
的约课</font>\n>请 点 击:[查看详情](
{
Config
.
ErpUrl
}
/autologin?loginId=
{
empModel
.
Id
}
&target=
{
recipientPath
}
)"
;
PushWorkChatHelper
.
PushToWorkChat
(
content
,
empModel
.
WorkUserId
,
"取消学生预约通知"
);
}
}
}
}
return
flag
;
}
/// <summary>
/// <summary>
/// 修改上课教室
/// 修改上课教室
/// </summary>
/// </summary>
...
...
Edu.Repository/Grade/RB_Class_CheckRepository.cs
View file @
e0eeb659
...
@@ -1345,30 +1345,22 @@ WHERE 1=1 AND A.Status=0 {1} ", builderMakeUp.ToString(), builderWhere.ToString
...
@@ -1345,30 +1345,22 @@ WHERE 1=1 AND A.Status=0 {1} ", builderMakeUp.ToString(), builderWhere.ToString
string
orderGuestIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
GuestId
).
Distinct
());
string
orderGuestIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
GuestId
).
Distinct
());
var
guestList
=
GetOrderGuestListRepository
(
orderGuestIds
);
var
guestList
=
GetOrderGuestListRepository
(
orderGuestIds
);
var
oldCheckList
=
GetClassCheckList
(
new
RB_Class_Check_ViewModel
()
{
QOrderGuestIds
=
orderGuestIds
});
var
oldCheckList
=
GetClassCheckList
(
new
RB_Class_Check_ViewModel
()
{
QOrderGuestIds
=
orderGuestIds
});
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
//更新约课为已上课
string
tempSql
=
" UPDATE RB_Scroll_Appointment SET State={0} WHERE Id={1} "
;
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
string
newSql
=
""
;
if
(
item
.
State
==
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
WaitSure
)
{
{
{
nameof
(
RB_Scroll_Appointment_ViewModel
.
State
),
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Coursed
}
newSql
=
string
.
Format
(
tempSql
,
(
int
)
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Coursed
,
item
.
Id
);
}
;
}
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>(
)
else
if
(
item
.
State
==
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
StuCheck
)
{
{
new
WhereHelper
()
newSql
=
string
.
Format
(
tempSql
,
(
int
)
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
StuCheck
,
item
.
Id
);
{
}
FiledName
=
nameof
(
RB_Scroll_Appointment_ViewModel
.
Id
),
flag
=
base
.
Execute
(
newSql
)
>
0
;
FiledValue
=
item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
string
appointSql
=
string
.
Format
(
" UPDATE RB_Scroll_Appointment SET State={0} WHERE Id={1} "
,
(
int
)
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Coursed
,
item
.
Id
);
flag
=
base
.
Execute
(
appointSql
)
>
0
;
if
(
flag
)
if
(
flag
)
{
{
var
clist
=
JsonHelper
.
DeserializeObject
<
List
<
CourseTimeModel
>>(
item
.
CourseTime
);
var
clist
=
JsonHelper
.
DeserializeObject
<
List
<
CourseTimeModel
>>(
item
.
CourseTime
);
//更新 order_guest 表 上课章节 请假也暂时先算完成课时(请假应该是有补课的)
var
gmodel
=
guestList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
GuestId
);
var
gmodel
=
guestList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
GuestId
);
var
tempClassTimeList
=
timeList
?.
Where
(
qitem
=>
qitem
.
ClassPlanId
==
item
.
ClassPlanId
)?.
ToList
()
??
new
List
<
RB_Class_Time_ViewModel
>();
var
tempClassTimeList
=
timeList
?.
Where
(
qitem
=>
qitem
.
ClassPlanId
==
item
.
ClassPlanId
)?.
ToList
()
??
new
List
<
RB_Class_Time_ViewModel
>();
var
guestOldCheckList
=
oldCheckList
?.
Where
(
qitem
=>
qitem
.
OrderGuestId
==
item
.
GuestId
&&
!
tempClassTimeList
.
Any
(
sItem
=>
sItem
.
ClassTimeId
==
qitem
.
ClassTimeId
))?.
ToList
()
??
new
List
<
RB_Class_Check_ViewModel
>();
var
guestOldCheckList
=
oldCheckList
?.
Where
(
qitem
=>
qitem
.
OrderGuestId
==
item
.
GuestId
&&
!
tempClassTimeList
.
Any
(
sItem
=>
sItem
.
ClassTimeId
==
qitem
.
ClassTimeId
))?.
ToList
()
??
new
List
<
RB_Class_Check_ViewModel
>();
...
@@ -1417,8 +1409,7 @@ WHERE 1=1 AND A.Status=0 {1} ", builderMakeUp.ToString(), builderWhere.ToString
...
@@ -1417,8 +1409,7 @@ WHERE 1=1 AND A.Status=0 {1} ", builderMakeUp.ToString(), builderWhere.ToString
var
ccModel
=
clist
.
Where
(
x
=>
x
.
StartTime
==
qitem
.
StartTime
).
FirstOrDefault
();
var
ccModel
=
clist
.
Where
(
x
=>
x
.
StartTime
==
qitem
.
StartTime
).
FirstOrDefault
();
if
(
ccModel
!=
null
&&
!
oldCheckList
.
Where
(
x
=>
x
.
OrderGuestId
==
item
.
GuestId
&&
x
.
ClassTimeId
==
qitem
.
ClassTimeId
).
Any
())
if
(
ccModel
!=
null
&&
!
oldCheckList
.
Where
(
x
=>
x
.
OrderGuestId
==
item
.
GuestId
&&
x
.
ClassTimeId
==
qitem
.
ClassTimeId
).
Any
())
{
{
//没有数据的插入 (有数据情况 =》 请假数据)
var
checkModel
=
new
RB_Class_Check
()
base
.
Insert
(
new
RB_Class_Check
()
{
{
ClassCheckId
=
0
,
ClassCheckId
=
0
,
ClassId
=
0
,
ClassId
=
0
,
...
@@ -1437,8 +1428,14 @@ WHERE 1=1 AND A.Status=0 {1} ", builderMakeUp.ToString(), builderWhere.ToString
...
@@ -1437,8 +1428,14 @@ WHERE 1=1 AND A.Status=0 {1} ", builderMakeUp.ToString(), builderWhere.ToString
CurrentDeductionHours
=
ccModel
.
ClassHours
,
CurrentDeductionHours
=
ccModel
.
ClassHours
,
IsAbsentHours
=
0
,
IsAbsentHours
=
0
,
ClassTimeId
=
qitem
.
ClassTimeId
,
ClassTimeId
=
qitem
.
ClassTimeId
,
IsCalcTeacFee
=
1
,
IsCalcTeacFee
=
1
,
});
};
if
(
item
.
State
==
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
StuCheck
)
{
checkModel
.
IsCalcTeacFee
=
0
;
}
//没有数据的插入 (有数据情况 =》 请假数据)
base
.
Insert
(
checkModel
);
}
}
}
}
}
}
...
...
Edu.Repository/Grade/RB_Class_RoomRepository.cs
View file @
e0eeb659
...
@@ -4,6 +4,7 @@ using Edu.Model.Entity.Grade;
...
@@ -4,6 +4,7 @@ using Edu.Model.Entity.Grade;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Grade
;
using
Edu.Model.ViewModel.Grade
;
using
System
;
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
@@ -78,10 +79,6 @@ WHERE 1=1
...
@@ -78,10 +79,6 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Room_ViewModel
.
Group_Id
),
query
.
Group_Id
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Room_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
}
//if (query.School_Id > 0)
//{
// builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_Room_ViewModel.School_Id), query.School_Id);
//}
if
(!
string
.
IsNullOrEmpty
(
query
.
RoomName
))
if
(!
string
.
IsNullOrEmpty
(
query
.
RoomName
))
{
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @RoomName "
,
nameof
(
RB_Class_Room_ViewModel
.
RoomName
));
builder
.
AppendFormat
(
" AND A.{0} LIKE @RoomName "
,
nameof
(
RB_Class_Room_ViewModel
.
RoomName
));
...
@@ -134,5 +131,24 @@ WHERE 1=1 ");
...
@@ -134,5 +131,24 @@ WHERE 1=1 ");
return
Get
<
RB_Class_Room_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
return
Get
<
RB_Class_Room_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
/// <summary>
/// 根据教室编号获取教室列表
/// </summary>
/// <param name="RoomIds"></param>
/// <returns></returns>
public
List
<
RB_Class_Room_ViewModel
>
GetClassRoomListExtRepository
(
string
RoomIds
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,B.SName AS SchoolName
FROM RB_Class_Room AS A LEFT JOIN rb_school AS B ON A.School_Id=B.SId
WHERE 1=1 "
);
if
(!
string
.
IsNullOrEmpty
(
RoomIds
))
{
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Class_Room_ViewModel
.
RoomId
),
RoomIds
);
}
return
Get
<
RB_Class_Room_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
}
}
\ No newline at end of file
Edu.Repository/Scroll/ScheduleCourseRepository.cs
View file @
e0eeb659
...
@@ -92,7 +92,7 @@ WHERE 1=1 AND B.OrderState=1 AND B.OrderType=1 AND E.ClassScrollType=2
...
@@ -92,7 +92,7 @@ WHERE 1=1 AND B.OrderState=1 AND B.OrderType=1 AND E.ClassScrollType=2
appointBuilder
.
AppendFormat
(
@"
appointBuilder
.
AppendFormat
(
@"
SELECT A.Date,A.AccountId,A.State,A.GuestId,A.LearnCourseId,A.CourseGradeId,A.CourseGradeNo,IFNULL(C.ClassCheckId,0) AS ClassCheckId
SELECT A.Date,A.AccountId,A.State,A.GuestId,A.LearnCourseId,A.CourseGradeId,A.CourseGradeNo,IFNULL(C.ClassCheckId,0) AS ClassCheckId
,IFNULL(C.CurrentDeductionHours,0) AS CurrentDeductionHours,IFNULL(C.AttendanceMethod,0) AS AttendanceMethod,IFNULL(A.CourseSTime,'') AS StartTime
,IFNULL(C.CurrentDeductionHours,0) AS CurrentDeductionHours,IFNULL(C.AttendanceMethod,0) AS AttendanceMethod,IFNULL(A.CourseSTime,'') AS StartTime
,IFNULL(A.CourseETime,'') AS EndTime
,IFNULL(A.CourseETime,'') AS EndTime
,IFNULL(A.RoomId,0) AS ClassRoomId,A.Id AS AppointId,A.ShiftSort
FROM rb_scroll_appointment AS A LEFT JOIN rb_class_time AS B ON A.ClassPlanId=B.ClassPlanId
FROM rb_scroll_appointment AS A LEFT JOIN rb_class_time AS B ON A.ClassPlanId=B.ClassPlanId
LEFT JOIN rb_class_check AS C ON B.ClassTimeId=C.ClassTimeId AND A.GuestId=C.OrderGuestId
LEFT JOIN rb_class_check AS C ON B.ClassTimeId=C.ClassTimeId AND A.GuestId=C.OrderGuestId
WHERE 1=1 AND A.State IN(1,2,3) AND A.AppointType IN(1,2)
WHERE 1=1 AND A.State IN(1,2,3) AND A.AppointType IN(1,2)
...
...
Edu.WebApi/Controllers/Course/EducationContractController.cs
View file @
e0eeb659
...
@@ -462,6 +462,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -462,6 +462,7 @@ namespace Edu.WebApi.Controllers.Course
var
ID
=
base
.
ParmJObj
.
GetInt
(
"ContractId"
);
var
ID
=
base
.
ParmJObj
.
GetInt
(
"ContractId"
);
var
CType
=
base
.
ParmJObj
.
GetInt
(
"CType"
);
var
CType
=
base
.
ParmJObj
.
GetInt
(
"CType"
);
string
curl
=
Common
.
Config
.
UploadSiteUrl
+
string
.
Format
(
@"/Home/EducationContractInfo?ID={0}&CType={1}"
,
ID
,
CType
);
string
curl
=
Common
.
Config
.
UploadSiteUrl
+
string
.
Format
(
@"/Home/EducationContractInfo?ID={0}&CType={1}"
,
ID
,
CType
);
Common
.
Plugin
.
LogHelper
.
WriteInfo
(
"合同下载:"
+
curl
);
var
flag
=
new
ToPdfHelper
().
HtmlWJtoPdf
(
tempPath
,
curl
);
var
flag
=
new
ToPdfHelper
().
HtmlWJtoPdf
(
tempPath
,
curl
);
return
ApiResult
.
Success
(
""
,
path
);
return
ApiResult
.
Success
(
""
,
path
);
}
}
...
...
Edu.WebApi/Controllers/Course/ScheduleCourseController.cs
View file @
e0eeb659
...
@@ -6,6 +6,7 @@ using Edu.Module.Course;
...
@@ -6,6 +6,7 @@ using Edu.Module.Course;
using
Edu.WebApi.Filter
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.AspNetCore.Mvc
;
using
Org.BouncyCastle.Bcpg.OpenPgp
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
...
@@ -49,7 +50,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -49,7 +50,7 @@ namespace Edu.WebApi.Controllers.Course
List
<
Dictionary
<
string
,
object
>>
list
=
new
List
<
Dictionary
<
string
,
object
>>();
List
<
Dictionary
<
string
,
object
>>
list
=
new
List
<
Dictionary
<
string
,
object
>>();
foreach
(
var
item
in
dataList
)
foreach
(
var
item
in
dataList
)
{
{
Dictionary
<
string
,
object
>
jobj
=
new
Dictionary
<
string
,
object
>
();
Dictionary
<
string
,
object
>
jobj
=
new
Dictionary
<
string
,
object
>
();
jobj
.
Add
(
"OrderId"
,
item
.
OrderId
);
jobj
.
Add
(
"OrderId"
,
item
.
OrderId
);
jobj
.
Add
(
"StuId"
,
item
.
StuId
);
jobj
.
Add
(
"StuId"
,
item
.
StuId
);
jobj
.
Add
(
"GuestId"
,
item
.
GuestId
);
jobj
.
Add
(
"GuestId"
,
item
.
GuestId
);
...
@@ -80,7 +81,12 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -80,7 +81,12 @@ namespace Edu.WebApi.Controllers.Course
StartTime
=
!
string
.
IsNullOrEmpty
(
qitem
.
StartTime
)
?
qitem
.
StartTime
:
""
,
StartTime
=
!
string
.
IsNullOrEmpty
(
qitem
.
StartTime
)
?
qitem
.
StartTime
:
""
,
EndTime
=
!
string
.
IsNullOrEmpty
(
qitem
.
EndTime
)
?
qitem
.
EndTime
:
""
,
EndTime
=
!
string
.
IsNullOrEmpty
(
qitem
.
EndTime
)
?
qitem
.
EndTime
:
""
,
TeacherName
=
!
string
.
IsNullOrEmpty
(
qitem
.
TeacherName
)
?
qitem
.
TeacherName
:
""
,
TeacherName
=
!
string
.
IsNullOrEmpty
(
qitem
.
TeacherName
)
?
qitem
.
TeacherName
:
""
,
RoomName
=
!
string
.
IsNullOrEmpty
(
qitem
.
RoomName
)
?
qitem
.
RoomName
:
""
,
qitem
.
AppointId
,
qitem
.
AccountId
,
qitem
.
ShiftSort
,
}));
}));
if
(
query
.
QCourseRate
==
Common
.
Enum
.
Course
.
CourseRateEnum
.
N5
if
(
query
.
QCourseRate
==
Common
.
Enum
.
Course
.
CourseRateEnum
.
N5
||
query
.
QCourseRate
==
Common
.
Enum
.
Course
.
CourseRateEnum
.
N4
||
query
.
QCourseRate
==
Common
.
Enum
.
Course
.
CourseRateEnum
.
N4
||
query
.
QCourseRate
==
Common
.
Enum
.
Course
.
CourseRateEnum
.
N3
||
query
.
QCourseRate
==
Common
.
Enum
.
Course
.
CourseRateEnum
.
N3
...
@@ -99,6 +105,20 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -99,6 +105,20 @@ namespace Edu.WebApi.Controllers.Course
}
}
/// <summary>
/// 获取学员预约上课计划
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStuAppointPlan
()
{
string
Date
=
base
.
ParmJObj
.
GetStringValue
(
"Date"
);
int
AccountId
=
base
.
ParmJObj
.
GetInt
(
"AccountId"
);
string
ShiftSort
=
base
.
ParmJObj
.
GetStringValue
(
"ShiftSort"
);
var
obj
=
scheduleCourse
.
GetStuAppointPlanModule
(
Date
,
AccountId
,
ShiftSort
);
return
ApiResult
.
Success
(
data
:
obj
);
}
/// <summary>
/// <summary>
/// 修改学员,排课状态
/// 修改学员,排课状态
/// </summary>
/// </summary>
...
@@ -176,8 +196,8 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -176,8 +196,8 @@ namespace Edu.WebApi.Controllers.Course
{
{
var
pageModel
=
new
ResultPageModel
()
var
pageModel
=
new
ResultPageModel
()
{
{
PageIndex
=
base
.
ParmJObj
.
GetInt
(
"PageIndex"
),
PageIndex
=
base
.
ParmJObj
.
GetInt
(
"PageIndex"
),
PageSize
=
base
.
ParmJObj
.
GetInt
(
"PageSize"
),
PageSize
=
base
.
ParmJObj
.
GetInt
(
"PageSize"
),
};
};
var
query
=
new
ScrollAppointmentQuery
()
var
query
=
new
ScrollAppointmentQuery
()
{
{
...
...
Edu.WebApi/Controllers/Course/ScrollController.cs
View file @
e0eeb659
...
@@ -874,6 +874,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -874,6 +874,7 @@ namespace Edu.WebApi.Controllers.Course
newModel
.
UpdateTime
=
DateTime
.
Now
;
newModel
.
UpdateTime
=
DateTime
.
Now
;
newModel
.
Id
=
sObj
.
GetInt
(
"AppointmentId"
);
newModel
.
Id
=
sObj
.
GetInt
(
"AppointmentId"
);
newModel
.
StuName
=
sObj
.
GetStringValue
(
"StuName"
);
newModel
.
StuName
=
sObj
.
GetStringValue
(
"StuName"
);
newModel
.
IsCalcStuCheck
=
sObj
.
GetInt
(
"IsCalcStuCheck"
);
list
.
Add
(
newModel
);
list
.
Add
(
newModel
);
}
}
}
}
...
@@ -1003,7 +1004,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1003,7 +1004,7 @@ namespace Edu.WebApi.Controllers.Course
{
{
return
ApiResult
.
ParamIsNull
();
return
ApiResult
.
ParamIsNull
();
}
}
string
msg
=
scrollClassModule
.
CancelSureAppointmentAsync
(
AppointIds
,
TeacherId
,
Date
,
ShiftSort
,
userInfo
).
Result
;
string
msg
=
scrollClassModule
.
CancelSureAppointment
Module
Async
(
AppointIds
,
TeacherId
,
Date
,
ShiftSort
,
userInfo
).
Result
;
if
(
msg
==
""
)
if
(
msg
==
""
)
{
{
return
ApiResult
.
Success
();
return
ApiResult
.
Success
();
...
@@ -1015,7 +1016,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1015,7 +1016,7 @@ namespace Edu.WebApi.Controllers.Course
}
}
/// <summary>
/// <summary>
/// 取消预约
/// 取消预约
(单个取消学生预约)
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
...
@@ -1029,8 +1030,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1029,8 +1030,7 @@ namespace Edu.WebApi.Controllers.Course
{
{
return
ApiResult
.
ParamIsNull
();
return
ApiResult
.
ParamIsNull
();
}
}
string
msg
=
scrollClassModule
.
CancelAppointmentModule
(
AppointIds
,
TeacherId
,
Date
,
userInfo
);
string
msg
=
scrollClassModule
.
CancelAppointment
(
AppointIds
,
TeacherId
,
Date
,
userInfo
);
if
(
msg
==
""
)
if
(
msg
==
""
)
{
{
return
ApiResult
.
Success
();
return
ApiResult
.
Success
();
...
@@ -1042,6 +1042,40 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1042,6 +1042,40 @@ namespace Edu.WebApi.Controllers.Course
}
}
/// <summary>
/// 取消学员上课 {HK New}
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
CancelStuAppointment
()
{
var
userInfo
=
base
.
UserInfo
;
CancelAppointmentModel
model
=
new
CancelAppointmentModel
()
{
AccountId
=
base
.
ParmJObj
.
GetInt
(
"AccountId"
,
0
),
Date
=
base
.
ParmJObj
.
GetStringValue
(
"Date"
),
ShiftSort
=
base
.
ParmJObj
.
GetStringValue
(
"ShiftSort"
),
StuList
=
new
List
<
StuAppointItem
>(),
};
string
StuListStr
=
base
.
ParmJObj
.
GetStringValue
(
"ChooseStuList"
);
if
(!
string
.
IsNullOrEmpty
(
StuListStr
))
{
JArray
jarray
=
JArray
.
Parse
(
StuListStr
);
foreach
(
var
jItem
in
jarray
)
{
JObject
jobj
=
JObject
.
Parse
(
Common
.
Plugin
.
JsonHelper
.
Serialize
(
jItem
));
model
.
StuList
.
Add
(
new
StuAppointItem
()
{
AppointId
=
jobj
.
GetInt
(
"AppointId"
),
IsCalcStuCheck
=
jobj
.
GetInt
(
"IsCalcStuCheck"
)
});
}
}
if
(
model
.
StuList
.
Count
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
message
:
"请选择要取消的学员!"
);
}
bool
flag
=
scrollClassModule
.
CancelSureAppointmentNewModule
(
model
,
userInfo
,
out
string
message
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
message
:
message
);
}
/// <summary>
/// <summary>
/// 切换约课老师
/// 切换约课老师
/// </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