Commit 6d994ccf authored by 黄奎's avatar 黄奎

页面修改

parent f5aaf467
......@@ -186,6 +186,11 @@ namespace Edu.Model.ViewModel.Sell
/// </summary>
public string CourseName { get; set; }
/// <summary>
/// 课程封面图
/// </summary>
public string CourseImg { get; set; }
/// <summary>
/// 开班时间
/// </summary>
......
......@@ -4801,9 +4801,12 @@ namespace Edu.Module.Course
/// </summary>
/// <param name="student_stuId"></param>
/// <returns></returns>
public List<object> AppCustomerGetClassPlan(int student_stuId)
public object AppCustomerGetClassPlan(int student_stuId)
{
List<object> result = new List<object>();
decimal SurplusClassHours = 0;
ClassStatusEnum classStatus = 0;
GuestStateEnum StuGuestState = 0;
List<object> list = new List<object>();
var stuOrderList= student_OrderGuestRepository.GetStrOrderGuestListRepository(new RB_Student_OrderGuest_ViewModel()
{
Student_Id = student_stuId
......@@ -4817,6 +4820,13 @@ namespace Edu.Module.Course
?.OrderBy(qitem => qitem.OrderId)
?.FirstOrDefault();
int classId = firstModel?.ClassId??0;
classStatus = firstModel?.ClassStatus ?? 0;
StuGuestState = firstModel?.StuGuestState ?? 0;
SurplusClassHours = (firstModel?.TotalHours ?? 0) - (firstModel?.CompleteHours ?? 0);
if (SurplusClassHours < 0)
{
SurplusClassHours = 0;
}
if (classId > 0)
{
var planList = class_PlanRepository.GetClassPlanListExtRepository(new RB_Class_Plan_ViewModel()
......@@ -4828,7 +4838,7 @@ namespace Edu.Module.Course
foreach (var item in disList)
{
var tempModel = planList.Where(qitem => qitem.ClassId == item.ClassId && qitem.ClassDate == item.ClassDate)?.OrderBy(qitem => qitem.StartTime)?.FirstOrDefault();
result.Add(new
list.Add(new
{
tempModel?.CourseName,
tempModel?.RoomName,
......@@ -4839,6 +4849,15 @@ namespace Edu.Module.Course
}
}
}
var result = new
{
classStatus,
classStatusName = classStatus.ToName(),
StuGuestState,
StuGuestStateName = StuGuestState.ToName(),
SurplusClassHours,
PlanList = list
};
return result;
}
}
......
......@@ -274,7 +274,7 @@ ORDER BY {orderBy}
string sql = $@"
SELECT o.*,c.ClassName,c.ClassNo,c.School_Id as ClassSchoolId,t.TeacherName,t.TeacherIcon,IFNULL(course.CourseName,'') AS CourseName
,C.OpenTime,course.CourseSubject,IFNULL(csubject.SubjectName,'') AS CourseSubjectName,IFNULL(school.SName,'') AS SchoolName
,IFNULL(c.ClassStatus,0) AS ClassStatus
,IFNULL(c.ClassStatus,0) AS ClassStatus,IFNULL(course.CoverImg,'') AS CourseImg
FROM RB_Order o LEFT JOIN rb_class c on o.ClassId = c.ClassId
LEFT JOIN rb_teacher t on c.Teacher_Id = t.TId
LEFT JOIN rb_course AS course ON (o.CourseId=course.CourseId AND o.CourseId>0 AND o.OrderType=1)
......
......@@ -64,6 +64,7 @@ namespace Edu.WebApi.Controllers.B2BApp
{
item.CourseId,
item.CourseName,
item.CourseImg,
item.ClassId,
item.ClassName,
item.ClassNo,
......@@ -97,6 +98,7 @@ namespace Edu.WebApi.Controllers.B2BApp
{
var customer = base.AppletCustomerInfo;
int StuId = base.ParmJObj.GetInt("StuId");
var obj = classModule.AppCustomerGetClassPlan(StuId);
return ApiResult.Success(data: obj);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment