Commit fb5f91ea authored by liudong1993's avatar liudong1993

1

parent 32f95555
......@@ -672,8 +672,13 @@ namespace EduSpider.Services
int eNum = examList.Count();//考试数量
List<RB_Exam_Score_Extend> TRankList = new List<RB_Exam_Score_Extend>();//统计排名
foreach (var stuId in StuIdList) {
decimal TScore = Math.Round(scoreList.Where(x => x.StuId == stuId).Sum(x => x.TScore) / eNum, 2, MidpointRounding.AwayFromZero);// 平均几次考试 得到总分
decimal ExamScore = Math.Round(scoreList.Where(x => x.StuId == stuId).Sum(x => x.ExamScore) / eNum, 2, MidpointRounding.AwayFromZero);
eNum = scoreList.Where(x => x.StuId == stuId).Select(x => x.ExamId).Distinct().Count();//学生参与考试的数量
decimal TScore = 0, ExamScore = 0;
if (eNum > 0)
{
TScore = Math.Floor(scoreList.Where(x => x.StuId == stuId).Sum(x => x.TScore) / eNum);// 平均几次考试 得到总分
ExamScore = Math.Round(scoreList.Where(x => x.StuId == stuId).Sum(x => x.ExamScore) / eNum, 2, MidpointRounding.AwayFromZero);
}
TRankList.Add(new RB_Exam_Score_Extend()
{
......
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