|
@@ -207,6 +207,8 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
Dictionary<string, double> paperScore = new Dictionary<string, double>();
|
|
|
List<KeyValuePair<string, List<KeyValuePair<string, List<string>>>>> subjectScatter = new List<KeyValuePair<string, List<KeyValuePair<string, List<string>>>>>();
|
|
|
List<KeyValuePair<string, Dictionary<string, List<double>>>> gscores = new List<KeyValuePair<string, Dictionary<string, List<double>>>>();
|
|
|
+ //声明全科总分
|
|
|
+ double totalAll = 0;
|
|
|
foreach (ExamResult examResult in examResults)
|
|
|
{
|
|
|
(KeyValuePair<string, List<List<string>>> subjectData, KeyValuePair<string, List<KeyValuePair<string, List<double>>>> classSubjectData , Dictionary<string, List<double>> gscore) =DoExerciseScatteres(examResult, paperKey);
|
|
@@ -237,6 +239,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
//gpointList.Add("levelKey", DoLevel(examResult, info));
|
|
|
valuePairs.Add(gpointList);
|
|
|
//获取一张试卷的满分
|
|
|
+ totalAll += examResult.paper.point.Sum();
|
|
|
paperScore.Add(examResult.subjectId, examResult.paper.point.Sum());
|
|
|
List<double> StuSubjectTotals = new List<double>();
|
|
|
classReses = examResult.classes;
|
|
@@ -264,6 +267,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
if (y.id.Equals(examResult.subjectId))
|
|
|
{
|
|
|
y.score = score;
|
|
|
+ y.sRate = Math.Round(examResult.paper.point.Sum() > 0 ? score / examResult.paper.point.Sum(): 0,2);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -277,6 +281,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
fieldPoint = fieldStuPerDatas.Where(x => x.Key == examResult.subjectId).SelectMany(va => va.Value).Where(stu => stu.Key == stuid).Select(pi => pi.Value).First()
|
|
|
};
|
|
|
subject.score = score;
|
|
|
+ subject.sRate = Math.Round(examResult.paper.point.Sum() > 0 ? score / examResult.paper.point.Sum() : 0, 2);
|
|
|
student.subjects.Add(subject);
|
|
|
}
|
|
|
}
|
|
@@ -284,6 +289,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
}
|
|
|
foreach (StudentAys student1 in students) {
|
|
|
gradeTotal.Add(student1.total);
|
|
|
+ student1.sRate = totalAll > 0 ? Math.Round(student1.total / totalAll, 2) : 0;
|
|
|
}
|
|
|
//处理进线分数
|
|
|
gradeTotal.Sort((s1, s2) => { return s2.CompareTo(s1); });
|
|
@@ -359,7 +365,8 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
x.name =x.id;
|
|
|
x.no = "-";
|
|
|
}
|
|
|
-
|
|
|
+ //班级得分率
|
|
|
+ x.csRate = totalAll > 0 ? Math.Round(totalAverage / totalAll,2) : 0;
|
|
|
//标准差
|
|
|
powSum += Math.Pow(x.total - totalAverage, 2);
|
|
|
//进线人数
|
|
@@ -442,7 +449,8 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
passPercent= passPercent,
|
|
|
passCount= passCount,
|
|
|
average= average ,
|
|
|
- name= info.subjects.Where(x => x.id == key).FirstOrDefault().name,
|
|
|
+ sRate = paperScore[key]> 0 ? Math.Round(average / paperScore[key],2) : 0,
|
|
|
+ name = info.subjects.Where(x => x.id == key).FirstOrDefault().name,
|
|
|
item = classSubjectPaperDatas.Where(subd => subd.Key == key).First().Value.Where(cls => cls.Key == classId).First().Value
|
|
|
});
|
|
|
}
|
|
@@ -1093,10 +1101,6 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
}
|
|
|
int stuNo = 0;
|
|
|
exam.studentIds.ForEach(e => {
|
|
|
-
|
|
|
- //values.Add(e);
|
|
|
-
|
|
|
-
|
|
|
List<double> valueKnow = new List<double>();
|
|
|
foreach (string know in knowledge) {
|
|
|
double anwPoint = 0;
|