Commit 56b06d92 authored by 黄奎's avatar 黄奎

页面修改

parent 4dcf5214
...@@ -207,11 +207,6 @@ namespace Edu.Module.Course ...@@ -207,11 +207,6 @@ namespace Edu.Module.Course
/// </summary> /// </summary>
private readonly RB_Class_FeedBackRepository class_FeedBackRepository = new RB_Class_FeedBackRepository(); private readonly RB_Class_FeedBackRepository class_FeedBackRepository = new RB_Class_FeedBackRepository();
/// <summary>
/// 学员单词预习仓储层对象
/// </summary>
private readonly RB_StuWords_PrepRepository stuWords_PrepRepository = new RB_StuWords_PrepRepository();
/// <summary> /// <summary>
/// 获取班级列表 /// 获取班级列表
/// </summary> /// </summary>
......
...@@ -811,14 +811,15 @@ WHERE g.`Status` =0 and g.Group_Id ={groupId} and o.OrderState <>3 and o.OrderTy ...@@ -811,14 +811,15 @@ WHERE g.`Status` =0 and g.Group_Id ={groupId} and o.OrderState <>3 and o.OrderTy
/// <returns></returns> /// <returns></returns>
public RB_Order_Guest_Extend GetOrderGusetHoursInfo(int guestId, int classId) public RB_Order_Guest_Extend GetOrderGusetHoursInfo(int guestId, int classId)
{ {
string sql = $@"select A.* ,gc.AbsenceNum,gc.LeaveNum string sql = $@"
SELECT A.* ,IFNULL(gc.AbsenceNum,0) AS AbsenceNum,IFNULL(gc.LeaveNum,0) AS LeaveNum
FROM RB_Order_Guest AS A FROM RB_Order_Guest AS A
inner JOIN ( LEFT JOIN (
SELECT OrderGuestId,SUM(CASE CheckStatus WHEN 1 THEN 1 ELSE 0 END) AS AbsenceNum,SUM(CASE CheckStatus WHEN 2 THEN 1 ELSE 0 END) AS LeaveNum SELECT OrderGuestId,SUM(CASE CheckStatus WHEN 1 THEN 1 ELSE 0 END) AS AbsenceNum,SUM(CASE CheckStatus WHEN 2 THEN 1 ELSE 0 END) AS LeaveNum
FROM rb_class_check FROM rb_class_check
WHERE `Status`=0 and CheckStatus <>0 and ClassId ={classId} GROUP BY OrderGuestId WHERE `Status`=0 and CheckStatus <>0 and ClassId ={classId} GROUP BY OrderGuestId
) AS gc on gc.OrderGuestId=a.Id ) AS gc on gc.OrderGuestId=a.Id
where A.Id ={guestId} WHERE A.Id ={guestId}
"; ";
return Get<RB_Order_Guest_Extend>(sql).FirstOrDefault(); return Get<RB_Order_Guest_Extend>(sql).FirstOrDefault();
} }
......
...@@ -55,20 +55,27 @@ namespace Edu.WebApi.Controllers.Applet ...@@ -55,20 +55,27 @@ namespace Edu.WebApi.Controllers.Applet
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult GetMyCenterInfo() { public ApiResult GetMyCenterInfo()
{
var userInfo = base.AppletUserInfo; var userInfo = base.AppletUserInfo;
var accountModel = accountModule.GetAccountListModule(new RB_Account_ViewModel() { Group_Id = userInfo.Group_Id, Id = userInfo.Id, AccountType = Common.Enum.User.AccountTypeEnum.Student }).FirstOrDefault(); var accountModel = accountModule.GetAccountListModule(new RB_Account_ViewModel() { Group_Id = userInfo.Group_Id, Id = userInfo.Id, AccountType = Common.Enum.User.AccountTypeEnum.Student }).FirstOrDefault();
if (accountModel == null) { return ApiResult.Failed("账号不存在"); } if (accountModel == null)
{
return ApiResult.Failed("账号不存在");
}
//获取学生信息 //获取学生信息
var stuModel = studentModule.GetStudentListModule(new RB_Student_ViewModel() { Group_Id = userInfo.Group_Id, StuId = accountModel.AccountId }).FirstOrDefault(); var stuModel = studentModule.GetStudentListModule(new RB_Student_ViewModel() { Group_Id = userInfo.Group_Id, StuId = accountModel.AccountId }).FirstOrDefault();
if (stuModel == null) { return ApiResult.Failed("账号不存在"); } if (stuModel == null)
{
return ApiResult.Failed("账号不存在");
}
//获取协助人员 //获取协助人员
List<object> RAssistList = new List<object>(); List<object> RAssistList = new List<object>();
//首先获取学员的创建人 (市场经理) //首先获取学员的创建人 (市场经理)
if (stuModel.EnterID > 0) if (stuModel.CreateBy > 0)
{ {
var EnterModel = UserReidsCache.GetUserLoginInfo(stuModel.EnterID); var EnterModel = UserReidsCache.GetUserLoginInfo(stuModel.CreateBy);
RAssistList.Add(new RAssistList.Add(new
{ {
AssistId = stuModel.EnterID, AssistId = stuModel.EnterID,
...@@ -79,7 +86,8 @@ namespace Edu.WebApi.Controllers.Applet ...@@ -79,7 +86,8 @@ namespace Edu.WebApi.Controllers.Applet
}); });
} }
var assistList = studentModule.GetStuAssistListModule(accountModel.AccountId); var assistList = studentModule.GetStuAssistListModule(accountModel.AccountId);
foreach (var item in assistList) { foreach (var item in assistList)
{
var empModel = accountModule.GetEmployeeInfo(item.AssistId); var empModel = accountModule.GetEmployeeInfo(item.AssistId);
RAssistList.Add(new RAssistList.Add(new
{ {
...@@ -116,7 +124,8 @@ namespace Edu.WebApi.Controllers.Applet ...@@ -116,7 +124,8 @@ namespace Edu.WebApi.Controllers.Applet
LearningInfo.ClassName LearningInfo.ClassName
}; };
} }
else { else
{
CourseInfo = new CourseInfo = new
{ {
State = 2//没有课程信息 State = 2//没有课程信息
......
...@@ -482,8 +482,8 @@ namespace Edu.WebApi.Controllers.Applet ...@@ -482,8 +482,8 @@ namespace Edu.WebApi.Controllers.Applet
NextCourseNo=0, NextCourseNo=0,
ReviewWord = 0, ReviewWord = 0,
ReviewCourseNo=0, ReviewCourseNo=0,
CourseId = CourseId, CourseId,
ClassId= ClassId, ClassId,
}; };
} }
......
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