Commit 404af261 authored by 黄奎's avatar 黄奎

页面修改

parent 56b06d92
......@@ -579,5 +579,16 @@ namespace Edu.Module.Exam
}
return flag;
}
/// <summary>
/// 获取学员单词考试列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_StuWords_Exam_Extend> GetStuWordsExamListModule(RB_StuWords_Exam_Extend query)
{
var list = stuWords_ExamRepository.GetStuWordsExamListRepository(query);
return list;
}
}
}
......@@ -49,5 +49,41 @@ WHERE 1=1
}
return GetPage<RB_StuWords_Exam_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
}
/// <summary>
/// 获取学员单词考试列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_StuWords_Exam_Extend> GetStuWordsExamListRepository(RB_StuWords_Exam_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_StuWords_Exam AS A
WHERE 1=1
");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_StuWords_Exam_Extend.Group_Id), query.Group_Id);
}
if (query.Stu_Account_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_StuWords_Exam_Extend.Stu_Account_Id), query.Stu_Account_Id);
}
if (query.CourseId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_StuWords_Exam_Extend.CourseId), query.CourseId);
}
if (query.ChapterId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_StuWords_Exam_Extend.ChapterId), query.ChapterId);
}
}
return Get<RB_StuWords_Exam_Extend>(builder.ToString()).ToList();
}
}
}
......@@ -54,7 +54,7 @@ namespace Edu.WebApi.Controllers.Applet
/// <summary>
/// 试卷处理类对象
/// </summary>
private readonly Module.Exam.PaperModule paperModule = AOP.AOPHelper.CreateAOPObject<Module.Exam.PaperModule>();
private readonly PaperModule paperModule = AOP.AOPHelper.CreateAOPObject<PaperModule>();
/// <summary>
/// 学习园地处理类对象
/// </summary>
......@@ -545,6 +545,13 @@ namespace Edu.WebApi.Controllers.Applet
Group_Id = appletUserInfo.Group_Id,
Stu_Account_Id = appletUserInfo.Id
});
//单词测试列表
var wordsExamList = courseExamModule.GetStuWordsExamListModule(new RB_StuWords_Exam_Extend()
{
ClassId = ClassId,
CourseId=CourseId,
Stu_Account_Id= appletUserInfo.Id
});
//组装数据
var RList = new List<object>();
foreach (var item in ctList)
......@@ -558,6 +565,13 @@ namespace Edu.WebApi.Controllers.Applet
StudyProgress = (int)(Convert.ToDecimal(tempPrepWords.StudyNum) / Convert.ToDecimal(tempPrepWords.TotalNum) * 100);
}
int Num = 1;
decimal Score = 0;//单词测试得分
if (wordsExamList != null && wordsExamList.Count > 0)
{
Score = wordsExamList?.Where(qitem => qitem.ChapterId.ToString() == item.ChapterNo)?.OrderByDescending(qitem => qitem.CreateTime)?.FirstOrDefault()?.Score ?? 0;
}
RList.Add(new
{
planModel?.ClassPlanId,
......@@ -570,8 +584,11 @@ namespace Edu.WebApi.Controllers.Applet
x.VideoUrl
}),
ChapterTree = item,
Score=tempPrepWords?.Score??0,
Score,
StudyProgress,
ClassId,
CourseId,
item.ChapterNo,
NextChapterNo = chapterTreeList.Where(x => Convert.ToInt32(x.ChapterNo) > Convert.ToInt32(item.ChapterNo)).OrderBy(x => Convert.ToInt32(x.ChapterNo)).FirstOrDefault()?.ChapterNo ?? ""
});
}
......
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