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

页面修改

parent 4dcf5214
......@@ -207,11 +207,6 @@ namespace Edu.Module.Course
/// </summary>
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>
......
......@@ -811,14 +811,15 @@ WHERE g.`Status` =0 and g.Group_Id ={groupId} and o.OrderState <>3 and o.OrderTy
/// <returns></returns>
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
inner 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
FROM rb_class_check
WHERE `Status`=0 and CheckStatus <>0 and ClassId ={classId} GROUP BY OrderGuestId
) AS gc on gc.OrderGuestId=a.Id
where A.Id ={guestId}
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
FROM rb_class_check
WHERE `Status`=0 and CheckStatus <>0 and ClassId ={classId} GROUP BY OrderGuestId
) AS gc on gc.OrderGuestId=a.Id
WHERE A.Id ={guestId}
";
return Get<RB_Order_Guest_Extend>(sql).FirstOrDefault();
}
......
......@@ -55,20 +55,27 @@ namespace Edu.WebApi.Controllers.Applet
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetMyCenterInfo() {
public ApiResult GetMyCenterInfo()
{
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();
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();
if (stuModel == null) { return ApiResult.Failed("账号不存在"); }
if (stuModel == null)
{
return ApiResult.Failed("账号不存在");
}
//获取协助人员
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
{
AssistId = stuModel.EnterID,
......@@ -79,7 +86,8 @@ namespace Edu.WebApi.Controllers.Applet
});
}
var assistList = studentModule.GetStuAssistListModule(accountModel.AccountId);
foreach (var item in assistList) {
foreach (var item in assistList)
{
var empModel = accountModule.GetEmployeeInfo(item.AssistId);
RAssistList.Add(new
{
......@@ -116,7 +124,8 @@ namespace Edu.WebApi.Controllers.Applet
LearningInfo.ClassName
};
}
else {
else
{
CourseInfo = new
{
State = 2//没有课程信息
......
......@@ -482,8 +482,8 @@ namespace Edu.WebApi.Controllers.Applet
NextCourseNo=0,
ReviewWord = 0,
ReviewCourseNo=0,
CourseId = CourseId,
ClassId= ClassId,
CourseId,
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