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
c0824e36
Commit
c0824e36
authored
Sep 09, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
约课相关调整
parent
e31e717b
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
104 additions
and
52 deletions
+104
-52
RB_Class_Check.cs
Edu.Model/Entity/Grade/RB_Class_Check.cs
+5
-0
ScheduleResult.cs
Edu.Model/ViewModel/Scroll/ScheduleResult.cs
+5
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+5
-1
ScheduleCourseModule.cs
Edu.Module.Course/ScheduleCourseModule.cs
+1
-0
ScrollClassCommonModule.cs
Edu.Module.Course/ScrollClassCommonModule.cs
+1
-2
ScrollClassModule.cs
Edu.Module.Course/ScrollClassModule.cs
+6
-6
RB_Class_CheckRepository.cs
Edu.Repository/Grade/RB_Class_CheckRepository.cs
+12
-2
RB_Student_OrderGuestRepository.cs
Edu.Repository/User/RB_Student_OrderGuestRepository.cs
+1
-1
ScheduleCourseController.cs
Edu.WebApi/Controllers/Course/ScheduleCourseController.cs
+1
-0
ScrollController.cs
Edu.WebApi/Controllers/Course/ScrollController.cs
+67
-40
No files found.
Edu.Model/Entity/Grade/RB_Class_Check.cs
View file @
c0824e36
...
...
@@ -109,5 +109,10 @@ namespace Edu.Model.Entity.Grade
/// 是否计算老师课时费(1-计算,0-不计算)
/// </summary>
public
int
IsCalcTeacFee
{
get
;
set
;
}
/// <summary>
/// 签到备注
/// </summary>
public
string
CheckRemark
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Scroll/ScheduleResult.cs
View file @
c0824e36
...
...
@@ -137,6 +137,11 @@ namespace Edu.Model.ViewModel.Scroll
/// </summary>
public
string
TeacherName
{
get
;
set
;
}
/// <summary>
/// 老师编号
/// </summary>
public
int
TeacherId
{
get
;
set
;
}
/// <summary>
/// 报名课程ID
/// </summary>
...
...
Edu.Module.Course/ClassModule.cs
View file @
c0824e36
...
...
@@ -4228,7 +4228,11 @@ namespace Edu.Module.Course
qitem
.
LearnCourseName
,
qitem
.
CourseGradeNo
,
FinishChapterNoName
=
chatperList
?.
FirstOrDefault
(
sItem
=>
sItem
.
CourseId
==
qitem
.
LearnCourseId
&&
sItem
.
ChapterNo
==
qitem
.
CourseChapterNo
.
ToString
())?.
ChapterName
,
CourseChapterNoName
=
chatperList
?.
FirstOrDefault
(
sItem
=>
sItem
.
CourseId
==
qitem
.
LearnCourseId
&&
sItem
.
ChapterNo
==
qitem
.
CourseGradeNo
.
ToString
())?.
ChapterName
CourseChapterNoName
=
chatperList
?.
FirstOrDefault
(
sItem
=>
sItem
.
CourseId
==
qitem
.
LearnCourseId
&&
sItem
.
ChapterNo
==
qitem
.
CourseGradeNo
.
ToString
())?.
ChapterName
,
IsChecked
=
false
,
qitem
.
IsCalcStuCheck
,
qitem
.
State
,
StateName
=
qitem
.
State
.
ToName
(),
}),
AppointState
=
item
.
Where
(
x
=>
x
.
State
==
CourseAppointStateEnum
.
WaitSure
).
Any
()
?
1
:
2
,
item
.
Key
.
ShiftSort
,
...
...
Edu.Module.Course/ScheduleCourseModule.cs
View file @
c0824e36
...
...
@@ -107,6 +107,7 @@ namespace Edu.Module.Course
foreach
(
var
subItem
in
item
.
CourseItems
)
{
subItem
.
TeacherName
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
subItem
.
AccountId
)?.
AccountName
??
""
;
subItem
.
TeacherId
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
subItem
.
AccountId
)?.
AccountId
??
0
;
if
(
subItem
.
ClassRoomId
>
0
)
{
subItem
.
RoomName
=
roomList
?.
FirstOrDefault
(
qitem
=>
qitem
.
RoomId
==
subItem
.
ClassRoomId
)?.
RoomName
??
""
;
...
...
Edu.Module.Course/ScrollClassCommonModule.cs
View file @
c0824e36
...
...
@@ -675,8 +675,7 @@ namespace Edu.Module.Course
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
);
class_CheckRepository
.
AppointStuCheckRepository
(
tempList
,
1
);
}
}
}
...
...
Edu.Module.Course/ScrollClassModule.cs
View file @
c0824e36
...
...
@@ -1759,7 +1759,7 @@ namespace Edu.Module.Course
var
firstModel
=
list
.
FirstOrDefault
();
if
(
list
.
Where
(
x
=>
x
.
AppointType
!=
3
).
Count
()
<
firstModel
.
ScrollMinNum
)
{
return
"最小成班人数:"
+
firstModel
.
ScrollMinNum
;
//
return "最小成班人数:" + firstModel.ScrollMinNum;
}
var
planList
=
class_PlanRepository
.
GetClassPlanListRepository
(
new
RB_Class_Plan_ViewModel
()
...
...
@@ -2469,9 +2469,9 @@ namespace Edu.Module.Course
/// </summary>
/// <param name="group_Id"></param>
/// <returns></returns>
public
List
<
RB_Student_OrderGuest_ViewModel
>
GetCanAppointmentStuList_V2
(
string
stuName
,
int
NextChapterGradeNo
,
int
CourseGradeId
,
int
SchoolId
,
int
group_Id
)
public
List
<
RB_Student_OrderGuest_ViewModel
>
GetCanAppointmentStuList
Module
_V2
(
string
stuName
,
int
NextChapterGradeNo
,
int
CourseGradeId
,
int
SchoolId
,
int
group_Id
)
{
var
list
=
student_OrderGuestRepository
.
GetCanAppointmentStuList_V2
(
stuName
,
NextChapterGradeNo
,
CourseGradeId
,
SchoolId
,
group_Id
);
var
list
=
student_OrderGuestRepository
.
GetCanAppointmentStuList
Repository
_V2
(
stuName
,
NextChapterGradeNo
,
CourseGradeId
,
SchoolId
,
group_Id
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
string
courseIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
CourseId
).
Distinct
());
...
...
@@ -2803,7 +2803,7 @@ namespace Edu.Module.Course
{
List
<
RB_Scroll_Appointment_ViewModel
>
list
=
new
List
<
RB_Scroll_Appointment_ViewModel
>();
list
.
Add
(
demodel
);
class_CheckRepository
.
AppointStuCheckRepository
(
list
);
class_CheckRepository
.
AppointStuCheckRepository
(
list
,
2
);
}
return
flag
?
""
:
"出错了,请联系管理员"
;
#
endregion
...
...
@@ -2824,8 +2824,8 @@ namespace Edu.Module.Course
//查询当日 所有的预约记录
var
alllist
=
scroll_AppointmentRepository
.
GetAppointList
(
new
RB_Scroll_Appointment_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
StartTime
=
date
,
EntTime
=
date
,
TeacherId
=
teacherId
,
ShiftSort
=
shiftSort
});
var
list
=
alllist
.
Where
(
x
=>
appointList
.
Contains
(
x
.
Id
)).
ToList
();
//
if (list.Count() != appointList.Count()) { return "取消数量对不上"; }
//
if (list.Where(x => x.State != Common.Enum.Course.CourseAppointStateEnum.WaitCourse && x.State != Common.Enum.Course.CourseAppointStateEnum.Coursed).Any()) { return "非已确认预约,无法取消"; }
if
(
list
.
Count
()
!=
appointList
.
Count
())
{
return
"取消数量对不上"
;
}
if
(
list
.
Where
(
x
=>
x
.
State
!=
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
WaitCourse
&&
x
.
State
!=
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
Coursed
).
Any
())
{
return
"非已确认预约,无法取消"
;
}
#
region
获取
token
推送订阅消息
string
Appid
=
Config
.
JiaXiaoHeAppId
;
...
...
Edu.Repository/Grade/RB_Class_CheckRepository.cs
View file @
c0824e36
...
...
@@ -1023,6 +1023,7 @@ WHERE 1=1 AND A.Status=0 {1} ", builderMakeUp.ToString(), builderWhere.ToString
}
else
{
item
.
CheckRemark
=
"班课签到"
;
item
.
IsCalcTeacFee
=
1
;
item
.
CurrentDeductionHours
=
currentDeductionHours
;
item
.
MakeUpStatus
=
1
;
...
...
@@ -1338,8 +1339,9 @@ WHERE 1=1 AND A.Status=0 {1} ", builderMakeUp.ToString(), builderWhere.ToString
/// 约课学员签到
/// </summary>
/// <param name="list"></param>
/// <param name="checkType">1-定时任务自动签到,2-后台补录手动签到</param>
/// <returns></returns>
public
bool
AppointStuCheckRepository
(
List
<
RB_Scroll_Appointment_ViewModel
>
list
)
public
bool
AppointStuCheckRepository
(
List
<
RB_Scroll_Appointment_ViewModel
>
list
,
int
checkType
)
{
bool
flag
=
false
;
if
(
list
.
Any
())
...
...
@@ -1379,7 +1381,6 @@ WHERE 1=1 AND A.Status=0 {1} ", builderMakeUp.ToString(), builderWhere.ToString
}
if
(
gmodel
!=
null
)
{
//ld 2022-03-08 修改为学员上课最大课时
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>();
var
completeHours
=
guestOldFinishHours
+
clist
.
Sum
(
x
=>
x
.
ClassHours
);
keyValues1
.
Add
(
nameof
(
Model
.
ViewModel
.
Sell
.
RB_Order_Guest_ViewModel
.
CourseChapterNo
),
item
.
ChapterNo
);
...
...
@@ -1437,7 +1438,16 @@ WHERE 1=1 AND A.Status=0 {1} ", builderMakeUp.ToString(), builderWhere.ToString
IsAbsentHours
=
0
,
ClassTimeId
=
qitem
.
ClassTimeId
,
IsCalcTeacFee
=
1
,
CheckRemark
=
""
};
if
(
checkType
==
1
)
{
checkModel
.
CheckRemark
=
"定时任务自动签到"
;
}
else
{
checkModel
.
CheckRemark
=
"后台补录手动签到"
;
}
if
(
item
.
State
==
Common
.
Enum
.
Course
.
CourseAppointStateEnum
.
StuCheck
)
{
checkModel
.
IsCalcTeacFee
=
0
;
...
...
Edu.Repository/User/RB_Student_OrderGuestRepository.cs
View file @
c0824e36
...
...
@@ -1001,7 +1001,7 @@ and og.TotalChapterNo > og.CourseChapterNo and (og.CourseChapterNo + 1 + IFNULL(
/// </summary>
/// <param name="group_Id"></param>
/// <returns></returns>
public
List
<
RB_Student_OrderGuest_ViewModel
>
GetCanAppointmentStuList_V2
(
string
stuName
,
int
NextChapterGradeNo
,
int
CourseGradeId
,
int
SchoolId
,
int
group_Id
)
public
List
<
RB_Student_OrderGuest_ViewModel
>
GetCanAppointmentStuList
Repository
_V2
(
string
stuName
,
int
NextChapterGradeNo
,
int
CourseGradeId
,
int
SchoolId
,
int
group_Id
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
string
sql
=
$@"
...
...
Edu.WebApi/Controllers/Course/ScheduleCourseController.cs
View file @
c0824e36
...
...
@@ -85,6 +85,7 @@ namespace Edu.WebApi.Controllers.Course
qitem
.
AppointId
,
qitem
.
AccountId
,
qitem
.
ShiftSort
,
qitem
.
TeacherId
,
}));
if
(
query
.
QCourseRate
==
Common
.
Enum
.
Course
.
CourseRateEnum
.
N5
...
...
Edu.WebApi/Controllers/Course/ScrollController.cs
View file @
c0824e36
...
...
@@ -740,7 +740,7 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
ParamIsNull
();
}
var
list
=
scrollClassModule
.
GetCanAppointmentStuList_V2
(
StuName
,
NextCourseGradeNo
,
CourseGradeId
,
SchoolId
,
userInfo
.
Group_Id
);
var
list
=
scrollClassModule
.
GetCanAppointmentStuList
Module
_V2
(
StuName
,
NextCourseGradeNo
,
CourseGradeId
,
SchoolId
,
userInfo
.
Group_Id
);
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
StuId
=
x
.
Student_Id
,
...
...
@@ -996,51 +996,51 @@ namespace Edu.WebApi.Controllers.Course
public
ApiResult
CancelSureAppointment
()
{
var
userInfo
=
base
.
UserInfo
;
//string AppointIds = base.ParmJObj.GetStringValue("AppointIds");
//int TeacherId = base.ParmJObj.GetInt("TeacherId", 0);
//string Date = base.ParmJObj.GetStringValue("Date");
//string ShiftSort = base.ParmJObj.GetStringValue("ShiftSort");
//if (string.IsNullOrEmpty(AppointIds) || TeacherId <= 0 || string.IsNullOrEmpty(Date) || string.IsNullOrEmpty(ShiftSort))
//{
// return ApiResult.ParamIsNull();
//}
//string msg = scrollClassModule.CancelSureAppointmentModuleAsync(AppointIds, TeacherId, Date, ShiftSort, userInfo).Result;
//if (msg == "")
//{
// return ApiResult.Success();
//}
//else
//{
// return ApiResult.Failed(msg);
//}
CancelAppointmentModel
model
=
new
CancelAppointmentModel
()
{
AccountId
=
base
.
ParmJObj
.
GetInt
(
"AccountId"
,
0
),
ShiftSort
=
base
.
ParmJObj
.
GetStringValue
(
"ShiftSort"
),
StuList
=
new
List
<
StuAppointItem
>(),
};
var
Date
=
base
.
ParmJObj
.
GetStringValue
(
"Date"
);
if
(!
string
.
IsNullOrEmpty
(
Date
))
string
AppointIds
=
base
.
ParmJObj
.
GetStringValue
(
"AppointIds"
);
int
TeacherId
=
base
.
ParmJObj
.
GetInt
(
"TeacherId"
,
0
);
string
Date
=
base
.
ParmJObj
.
GetStringValue
(
"Date"
);
string
ShiftSort
=
base
.
ParmJObj
.
GetStringValue
(
"ShiftSort"
);
if
(
string
.
IsNullOrEmpty
(
AppointIds
)
||
TeacherId
<=
0
||
string
.
IsNullOrEmpty
(
Date
)
||
string
.
IsNullOrEmpty
(
ShiftSort
))
{
model
.
Date
=
Common
.
ConvertHelper
.
FormatDate
(
Convert
.
ToDateTime
(
Date
)
);
return
ApiResult
.
ParamIsNull
(
);
}
string
StuListStr
=
base
.
ParmJObj
.
GetStringValue
(
"ChooseStuList"
)
;
if
(
!
string
.
IsNullOrEmpty
(
StuListStr
)
)
string
msg
=
scrollClassModule
.
CancelSureAppointmentModuleAsync
(
AppointIds
,
TeacherId
,
Date
,
ShiftSort
,
userInfo
).
Result
;
if
(
msg
==
""
)
{
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"
)
});
}
return
ApiResult
.
Success
();
}
if
(
model
.
StuList
.
Count
<=
0
)
else
{
return
ApiResult
.
ParamIsNull
(
message
:
"请选择要取消的学员!"
);
return
ApiResult
.
Failed
(
msg
);
}
bool
flag
=
scrollClassModule
.
CancelSureAppointmentNewModule
(
model
,
userInfo
,
out
string
message
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
message
:
message
);
//CancelAppointmentModel model = new CancelAppointmentModel()
//{
// AccountId = base.ParmJObj.GetInt("AccountId", 0),
// ShiftSort = base.ParmJObj.GetStringValue("ShiftSort"),
// StuList = new List<StuAppointItem>(),
//};
//var Date = base.ParmJObj.GetStringValue("Date");
//if (!string.IsNullOrEmpty(Date))
//{
// model.Date = Common.ConvertHelper.FormatDate(Convert.ToDateTime(Date));
//}
//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>
...
...
@@ -1067,6 +1067,33 @@ namespace Edu.WebApi.Controllers.Course
{
return
ApiResult
.
Failed
(
msg
);
}
//CancelAppointmentModel model = new CancelAppointmentModel()
//{
// AccountId = base.ParmJObj.GetInt("AccountId", 0),
// ShiftSort = base.ParmJObj.GetStringValue("ShiftSort"),
// StuList = new List<StuAppointItem>(),
//};
//var Date = base.ParmJObj.GetStringValue("Date");
//if (!string.IsNullOrEmpty(Date))
//{
// model.Date = Common.ConvertHelper.FormatDate(Convert.ToDateTime(Date));
//}
//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);
}
...
...
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