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
db70f5b4
Commit
db70f5b4
authored
Sep 06, 2024
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
89935a88
87c3468d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
699 additions
and
247 deletions
+699
-247
CourseAppointStateEnum.cs
Edu.Common/Enum/Course/CourseAppointStateEnum.cs
+7
-1
RB_Scroll_Appointment.cs
Edu.Model/Entity/Scroll/RB_Scroll_Appointment.cs
+10
-5
CancelAppointmentModel.cs
Edu.Model/ViewModel/Scroll/CancelAppointmentModel.cs
+46
-0
ScheduleResult.cs
Edu.Model/ViewModel/Scroll/ScheduleResult.cs
+20
-0
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+5
-2
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
+424
-195
RB_Class_CheckRepository.cs
Edu.Repository/Grade/RB_Class_CheckRepository.cs
+32
-27
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 @
db70f5b4
...
...
@@ -27,6 +27,7 @@ namespace Edu.Common.Enum.Course
/// </summary>
[
EnumField
(
"已上课"
)]
Coursed
=
3
,
/// <summary>
/// 缺席
/// </summary>
...
...
@@ -39,5 +40,10 @@ namespace Edu.Common.Enum.Course
[
EnumField
(
"取消"
)]
Cancel
=
5
,
/// <summary>
/// 学员消课专用,不计算老师课时费,计算学员签到
/// </summary>
[
EnumField
(
"学员消课"
)]
StuCheck
=
6
}
}
Edu.Model/Entity/Scroll/RB_Scroll_Appointment.cs
View file @
db70f5b4
...
...
@@ -47,7 +47,7 @@ namespace Edu.Model.Entity.Scroll
public
string
ShiftSort
{
get
;
set
;
}
/// <summary>
/// 状态 1待确认 2待上课 3已上课 4缺席 5取消
/// 状态 1待确认 2待上课 3已上课 4缺席 5取消 6学员消课专用,不计算老师课时费,计算学员签到
/// </summary>
public
CourseAppointStateEnum
State
{
get
;
set
;
}
...
...
@@ -145,5 +145,10 @@ namespace Edu.Model.Entity.Scroll
/// 课程等级 对应的章节 与CourseGradeId 组成唯一 【hk2022-07-07直接修改为rb_course_chapter 中的chapterNo 需要消课的章节】
/// </summary>
public
int
CourseGradeNo
{
get
;
set
;
}
/// <summary>
/// 是否扣除学员课时(1-扣除,0-不扣)
/// </summary>
public
int
IsCalcStuCheck
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/Scroll/CancelAppointmentModel.cs
0 → 100644
View file @
db70f5b4
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Scroll
{
/// <summary>
/// 学员取消上课参数
/// </summary>
[
Serializable
]
public
class
CancelAppointmentModel
{
/// <summary>
/// 上课老师Id(RB_Teacher表TId)
/// </summary>
public
int
AccountId
{
get
;
set
;
}
/// <summary>
/// 上课日期
/// </summary>
public
string
Date
{
get
;
set
;
}
/// <summary>
/// 预约时段
/// </summary>
public
string
ShiftSort
{
get
;
set
;
}
/// <summary>
/// 取消学员
/// </summary>
public
List
<
StuAppointItem
>
StuList
{
get
;
set
;
}
}
public
class
StuAppointItem
{
/// <summary>
/// rb_scroll_appointment表Id
/// </summary>
public
int
AppointId
{
get
;
set
;
}
/// <summary>
/// 是否扣除学员课时
/// </summary>
public
int
IsCalcStuCheck
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Scroll/ScheduleResult.cs
View file @
db70f5b4
...
...
@@ -186,6 +186,26 @@ namespace Edu.Model.ViewModel.Scroll
/// 上课结束时间
/// </summary>
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/OrderModule.cs
View file @
db70f5b4
...
...
@@ -5190,11 +5190,14 @@ namespace Edu.Module.Course
#
endregion
var
stuModel
=
stuTimeList
.
Where
(
x
=>
x
.
OrderGuestId
==
item
.
GuestId
).
FirstOrDefault
();
item
.
UseClassHours
=
(
stuModel
?.
CurrentDeductionHours
??
0
);
item
.
Unit_Price
=
0
;
item
.
Unit_Price
=
guestModel
?.
ClassUnitPrice
??
0
;
item
.
UseCourseFee
=
0
;
if
(
item
.
TotalClassHours2
>
0
)
{
if
(
item
.
Unit_Price
<=
0
)
{
item
.
Unit_Price
=
Math
.
Round
(
item
.
TotalCourseFee2
/
item
.
TotalClassHours2
,
6
,
MidpointRounding
.
AwayFromZero
);
//根据合同计算(包含优惠, 需减去课件费等)
}
item
.
UseCourseFee
=
Math
.
Round
((
Convert
.
ToDecimal
(
item
.
UseClassHours
)
/
item
.
TotalClassHours2
)
*
item
.
TotalCourseFee2
,
6
,
MidpointRounding
.
AwayFromZero
);
//if (item.TotalDiscountMoney2 > 0)
//{
...
...
Edu.Module.Course/ScheduleCourseModule.cs
View file @
db70f5b4
using
Edu.Model.Entity.Grade
;
using
Edu.Common.Plugin
;
using
Edu.Model.Entity.Grade
;
using
Edu.Model.Entity.Sell
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Grade
;
using
Edu.Model.ViewModel.Question
;
using
Edu.Model.ViewModel.Scroll
;
using
Edu.Model.ViewModel.Sell
;
...
...
@@ -32,6 +34,8 @@ namespace Edu.Module.Course
private
RB_Order_GuestRepository
guestRepository
=
new
RB_Order_GuestRepository
();
private
RB_Class_CheckRepository
checkRepository
=
new
RB_Class_CheckRepository
();
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>
/// 排课计划表
...
...
@@ -44,10 +48,16 @@ namespace Edu.Module.Course
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
List
<
int
>
IdList
=
new
List
<
int
>();
List
<
int
>
roomIdList
=
new
List
<
int
>();
foreach
(
var
item
in
list
)
{
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
();
if
(
tempArray
!=
null
&&
tempArray
.
Count
()
>
0
)
{
...
...
@@ -71,6 +81,15 @@ namespace Edu.Module.Course
string
Ids
=
string
.
Join
(
","
,
IdList
.
Distinct
());
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
)
{
...
...
@@ -88,6 +107,10 @@ namespace Edu.Module.Course
foreach
(
var
subItem
in
item
.
CourseItems
)
{
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
return
flag
;
}
/// <summary>
/// 修改学员,学管备注
/// </summary>
...
...
@@ -169,7 +191,6 @@ namespace Edu.Module.Course
return
flag
;
}
/// <summary>
/// 修改学员上课方式
/// </summary>
...
...
@@ -227,5 +248,46 @@ namespace Edu.Module.Course
}
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
{
CourseId
=
qitem
.
LearnCourseId
,
qitem
.
StuId
,
qitem
.
CourseGradeId
,
qitem
.
GuestId
,
qitem
.
CourseGradeNo
,
AppointmentId
=
qitem
.
Id
,
qitem
.
StuName
,
qitem
.
IsCalcStuCheck
,
qitem
.
State
,
StateName
=
qitem
.
State
.
ToName
()
}),
};
}
return
obj
;
}
}
}
Edu.Module.Course/ScrollClassCommonModule.cs
View file @
db70f5b4
...
...
@@ -669,10 +669,15 @@ namespace Edu.Module.Course
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
())
{
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
...
...
Edu.Module.Course/ScrollClassModule.cs
View file @
db70f5b4
This diff is collapsed.
Click to expand it.
Edu.Repository/Grade/RB_Class_CheckRepository.cs
View file @
db70f5b4
This diff is collapsed.
Click to expand it.
Edu.Repository/Grade/RB_Class_RoomRepository.cs
View file @
db70f5b4
...
...
@@ -4,6 +4,7 @@ using Edu.Model.Entity.Grade;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Grade
;
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
...
...
@@ -78,10 +79,6 @@ WHERE 1=1
{
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
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @RoomName "
,
nameof
(
RB_Class_Room_ViewModel
.
RoomName
));
...
...
@@ -134,5 +131,24 @@ WHERE 1=1 ");
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 @
db70f5b4
...
...
@@ -92,7 +92,7 @@ WHERE 1=1 AND B.OrderState=1 AND B.OrderType=1 AND E.ClassScrollType=2
appointBuilder
.
AppendFormat
(
@"
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(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
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)
...
...
Edu.WebApi/Controllers/Course/EducationContractController.cs
View file @
db70f5b4
...
...
@@ -462,6 +462,7 @@ namespace Edu.WebApi.Controllers.Course
var
ID
=
base
.
ParmJObj
.
GetInt
(
"ContractId"
);
var
CType
=
base
.
ParmJObj
.
GetInt
(
"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
);
return
ApiResult
.
Success
(
""
,
path
);
}
...
...
Edu.WebApi/Controllers/Course/ScheduleCourseController.cs
View file @
db70f5b4
...
...
@@ -6,6 +6,7 @@ using Edu.Module.Course;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
using
Org.BouncyCastle.Bcpg.OpenPgp
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -49,7 +50,7 @@ namespace Edu.WebApi.Controllers.Course
List
<
Dictionary
<
string
,
object
>>
list
=
new
List
<
Dictionary
<
string
,
object
>>();
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
(
"StuId"
,
item
.
StuId
);
jobj
.
Add
(
"GuestId"
,
item
.
GuestId
);
...
...
@@ -80,7 +81,12 @@ namespace Edu.WebApi.Controllers.Course
StartTime
=
!
string
.
IsNullOrEmpty
(
qitem
.
StartTime
)
?
qitem
.
StartTime
:
""
,
EndTime
=
!
string
.
IsNullOrEmpty
(
qitem
.
EndTime
)
?
qitem
.
EndTime
:
""
,
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
||
query
.
QCourseRate
==
Common
.
Enum
.
Course
.
CourseRateEnum
.
N4
||
query
.
QCourseRate
==
Common
.
Enum
.
Course
.
CourseRateEnum
.
N3
...
...
@@ -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>
...
...
@@ -176,8 +196,8 @@ namespace Edu.WebApi.Controllers.Course
{
var
pageModel
=
new
ResultPageModel
()
{
PageIndex
=
base
.
ParmJObj
.
GetInt
(
"PageIndex"
),
PageSize
=
base
.
ParmJObj
.
GetInt
(
"PageSize"
),
PageIndex
=
base
.
ParmJObj
.
GetInt
(
"PageIndex"
),
PageSize
=
base
.
ParmJObj
.
GetInt
(
"PageSize"
),
};
var
query
=
new
ScrollAppointmentQuery
()
{
...
...
Edu.WebApi/Controllers/Course/ScrollController.cs
View file @
db70f5b4
...
...
@@ -874,6 +874,7 @@ namespace Edu.WebApi.Controllers.Course
newModel
.
UpdateTime
=
DateTime
.
Now
;
newModel
.
Id
=
sObj
.
GetInt
(
"AppointmentId"
);
newModel
.
StuName
=
sObj
.
GetStringValue
(
"StuName"
);
newModel
.
IsCalcStuCheck
=
sObj
.
GetInt
(
"IsCalcStuCheck"
);
list
.
Add
(
newModel
);
}
}
...
...
@@ -1003,7 +1004,7 @@ namespace Edu.WebApi.Controllers.Course
{
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
==
""
)
{
return
ApiResult
.
Success
();
...
...
@@ -1015,7 +1016,7 @@ namespace Edu.WebApi.Controllers.Course
}
/// <summary>
/// 取消预约
/// 取消预约
(单个取消学生预约)
/// </summary>
/// <returns></returns>
[
HttpPost
]
...
...
@@ -1029,8 +1030,7 @@ namespace Edu.WebApi.Controllers.Course
{
return
ApiResult
.
ParamIsNull
();
}
string
msg
=
scrollClassModule
.
CancelAppointment
(
AppointIds
,
TeacherId
,
Date
,
userInfo
);
string
msg
=
scrollClassModule
.
CancelAppointmentModule
(
AppointIds
,
TeacherId
,
Date
,
userInfo
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
...
...
@@ -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>
...
...
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