|
@@ -92,6 +92,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
"examScoreRate"
|
|
"examScoreRate"
|
|
};
|
|
};
|
|
ExamInfo info = null;
|
|
ExamInfo info = null;
|
|
|
|
+ double ipoint = 0;
|
|
Dictionary<string, dynamic> gpoint = new Dictionary<string, dynamic>();
|
|
Dictionary<string, dynamic> gpoint = new Dictionary<string, dynamic>();
|
|
List<KeyValuePair<string, List<List<string>>>> subjectPaperDatas = new List<KeyValuePair<string, List<List<string>>>>();
|
|
List<KeyValuePair<string, List<List<string>>>> subjectPaperDatas = new List<KeyValuePair<string, List<List<string>>>>();
|
|
List<KeyValuePair<string, List<KeyValuePair<string, List<double>>>>> classSubjectPaperDatas = new List<KeyValuePair<string, List<KeyValuePair<string, List<double>>>>>();
|
|
List<KeyValuePair<string, List<KeyValuePair<string, List<double>>>>> classSubjectPaperDatas = new List<KeyValuePair<string, List<KeyValuePair<string, List<double>>>>>();
|
|
@@ -177,7 +178,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
subjectPaperDatas.Add(subjectData);
|
|
subjectPaperDatas.Add(subjectData);
|
|
classSubjectPaperDatas.Add(classSubjectData);
|
|
classSubjectPaperDatas.Add(classSubjectData);
|
|
subjectScatter.Add(DoSubjectScatter(examResult));
|
|
subjectScatter.Add(DoSubjectScatter(examResult));
|
|
- //gpoint = DoKnowledgePoint(examResult,info);
|
|
|
|
|
|
+ gpoint = DoKnowledgePoint(examResult,info);
|
|
//获取一张试卷的满分
|
|
//获取一张试卷的满分
|
|
paperScore.Add(examResult.subjectId, examResult.paper.point.Sum());
|
|
paperScore.Add(examResult.subjectId, examResult.paper.point.Sum());
|
|
List<double> StuSubjectTotals = new List<double>();
|
|
List<double> StuSubjectTotals = new List<double>();
|
|
@@ -227,7 +228,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
}
|
|
}
|
|
//处理进线分数
|
|
//处理进线分数
|
|
gradeTotal.Sort((s1, s2) => { return s2.CompareTo(s1); });
|
|
gradeTotal.Sort((s1, s2) => { return s2.CompareTo(s1); });
|
|
- double ipoint = gradeTotal[personCount];
|
|
|
|
|
|
+ ipoint = gradeTotal[personCount];
|
|
//以班级为单位
|
|
//以班级为单位
|
|
foreach (string classId in info.targetClassIds)
|
|
foreach (string classId in info.targetClassIds)
|
|
{
|
|
{
|
|
@@ -277,7 +278,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
//标准差
|
|
//标准差
|
|
powSum += Math.Pow(x.total - totalAverage, 2);
|
|
powSum += Math.Pow(x.total - totalAverage, 2);
|
|
//进线人数
|
|
//进线人数
|
|
- if (x.total > ipoint) {
|
|
|
|
|
|
+ if (x.total >= ipoint) {
|
|
lineCount++;
|
|
lineCount++;
|
|
}
|
|
}
|
|
//班级全科的pr
|
|
//班级全科的pr
|
|
@@ -407,12 +408,12 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
|
|
|
}
|
|
}
|
|
var sub = info.subjects.Select(x => new { id = x.id, name = x.name });
|
|
var sub = info.subjects.Select(x => new { id = x.id, name = x.name });
|
|
- return Ok(new { students, classes, grades , paper= subjectPaperDatas, subjects=sub, scatterKey = scatterKey,paperKey=paperKey, pointKey = gpoint });
|
|
|
|
|
|
+ return Ok(new { students, classes, grades , paper= subjectPaperDatas, subjects=sub, scatterKey = scatterKey,paperKey=paperKey, pointKey = gpoint, ipoint = ipoint });
|
|
}
|
|
}
|
|
|
|
|
|
private static (KeyValuePair<string,List<List<string>>>, KeyValuePair<string, List<KeyValuePair<string, List<double>>>>, Dictionary<string, List<double>>) DoExerciseScatteres(ExamResult e, List<string > paperKey)
|
|
private static (KeyValuePair<string,List<List<string>>>, KeyValuePair<string, List<KeyValuePair<string, List<double>>>>, Dictionary<string, List<double>>) DoExerciseScatteres(ExamResult e, List<string > paperKey)
|
|
{
|
|
{
|
|
- List<double> examAnswer = new List<double>();
|
|
|
|
|
|
+ List<int> examAnswer = new List<int>();
|
|
List<string> examPersent = new List<string>();
|
|
List<string> examPersent = new List<string>();
|
|
for (int n = 0; n < e.paper.point.Count; n++)
|
|
for (int n = 0; n < e.paper.point.Count; n++)
|
|
{
|
|
{
|
|
@@ -475,8 +476,16 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
classdatas.Add(new KeyValuePair<string, List<double>>(c.id, persent));
|
|
classdatas.Add(new KeyValuePair<string, List<double>>(c.id, persent));
|
|
if (gradeItemScore.ContainsKey(c.gradeId))
|
|
if (gradeItemScore.ContainsKey(c.gradeId))
|
|
{
|
|
{
|
|
- int index = 0;
|
|
|
|
- gradeItemScore[c.gradeId].ForEach(x => { x = x + answerCount[index]; index += 1; });
|
|
|
|
|
|
+
|
|
|
|
+ var we = gradeItemScore[c.gradeId];
|
|
|
|
+
|
|
|
|
+ List<int> count = we;
|
|
|
|
+ for (int index =0;index<count.Count;index++) {
|
|
|
|
+ count[index] = count[index] + answerCount[index];
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ gradeItemScore[c.gradeId] = count;
|
|
|
|
+ // gradeItemScore[c.gradeId].ForEach(x => { x = x + answerCount[index]; index += 1; });
|
|
gradeItemStuCount[c.gradeId]= gradeItemStuCount[c.gradeId] + peopleCount;
|
|
gradeItemStuCount[c.gradeId]= gradeItemStuCount[c.gradeId] + peopleCount;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -706,8 +715,39 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
List<List<double>> result = new List<List<double>>();
|
|
List<List<double>> result = new List<List<double>>();
|
|
List<ClassRange> classes = new List<ClassRange>();
|
|
List<ClassRange> classes = new List<ClassRange>();
|
|
List<string> ids = new List<string>();
|
|
List<string> ids = new List<string>();
|
|
- //定位试卷信息
|
|
|
|
- int index = 0;
|
|
|
|
|
|
+
|
|
|
|
+ //求单个知识点所占分数
|
|
|
|
+ List<string> per = new List<string>();
|
|
|
|
+ List<string> gper = new List<string>();
|
|
|
|
+ List<string> knowPer = new List<string>();
|
|
|
|
+ List<Dictionary<string, double>> eper = new List<Dictionary<string, double>>();
|
|
|
|
+ Dictionary<string, object> knowledgeALL = new Dictionary<string, object>();
|
|
|
|
+ Dictionary<string, object> knowledgeMap = new Dictionary<string, object>();
|
|
|
|
+ Dictionary<string, object> classMap = new Dictionary<string, object>();
|
|
|
|
+ Dictionary<string, object> wrongMap = new Dictionary<string, object>();
|
|
|
|
+ HashSet<string> className = new HashSet<string>();
|
|
|
|
+ List<List<string>> wrongPersent = new List<List<string>>();
|
|
|
|
+ List<string> key = new List<string>
|
|
|
|
+ {
|
|
|
|
+ "id",
|
|
|
|
+ "className",
|
|
|
|
+ "seatNO",
|
|
|
|
+ "point",
|
|
|
|
+ "anwPoint",
|
|
|
|
+ "persent"
|
|
|
|
+ };
|
|
|
|
+ List<string> keyWrong = new List<string>
|
|
|
|
+ {
|
|
|
|
+ "name",
|
|
|
|
+ "point",
|
|
|
|
+ "itemNO",
|
|
|
|
+ "persent",
|
|
|
|
+ "wrong",
|
|
|
|
+ "rhw",
|
|
|
|
+ "rlw"
|
|
|
|
+ };
|
|
|
|
+ //定位试卷信息
|
|
|
|
+ int index = 0;
|
|
foreach (ExamSubject subject in info.subjects)
|
|
foreach (ExamSubject subject in info.subjects)
|
|
{
|
|
{
|
|
if (subject.id.Equals(exam.subjectId))
|
|
if (subject.id.Equals(exam.subjectId))
|
|
@@ -719,6 +759,8 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
index++;
|
|
index++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (info.papers[index].knowledge != null && info.papers[index].knowledge.Count > 0)
|
|
|
|
+ {
|
|
info.papers[index].knowledge.ForEach(k =>
|
|
info.papers[index].knowledge.ForEach(k =>
|
|
{
|
|
{
|
|
k.ForEach(e =>
|
|
k.ForEach(e =>
|
|
@@ -726,10 +768,21 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
knowledge.Add(e);
|
|
knowledge.Add(e);
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ return knowledgeALL;
|
|
|
|
+ }
|
|
|
|
+ if (info.papers[index].field != null && info.papers[index].field.Count > 0)
|
|
|
|
+ {
|
|
info.papers[index].field.ForEach(f =>
|
|
info.papers[index].field.ForEach(f =>
|
|
{
|
|
{
|
|
area.Add(f.ToString());
|
|
area.Add(f.ToString());
|
|
});
|
|
});
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ return knowledgeALL;
|
|
|
|
+ }
|
|
|
|
+
|
|
double Qnum = 0;
|
|
double Qnum = 0;
|
|
point = info.papers[index].point;
|
|
point = info.papers[index].point;
|
|
result = exam.studentScores;
|
|
result = exam.studentScores;
|
|
@@ -820,36 +873,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
double fieldPersent = fieldPoint / TotalPoint;
|
|
double fieldPersent = fieldPoint / TotalPoint;
|
|
fper.Add(fieldPersent.ToString("0.00"));
|
|
fper.Add(fieldPersent.ToString("0.00"));
|
|
}
|
|
}
|
|
- //求单个知识点所占分数
|
|
|
|
- List<string> per = new List<string>();
|
|
|
|
- List<string> gper = new List<string>();
|
|
|
|
- List<string> knowPer = new List<string>();
|
|
|
|
- List<Dictionary<string, double>> eper = new List<Dictionary<string, double>>();
|
|
|
|
- Dictionary<string, object> knowledgeALL = new Dictionary<string, object>();
|
|
|
|
- Dictionary<string, object> knowledgeMap = new Dictionary<string, object>();
|
|
|
|
- Dictionary<string, object> classMap = new Dictionary<string, object>();
|
|
|
|
- Dictionary<string, object> wrongMap = new Dictionary<string, object>();
|
|
|
|
- HashSet<string> className = new HashSet<string>();
|
|
|
|
- List<List<string>> wrongPersent = new List<List<string>>();
|
|
|
|
- List<string> key = new List<string>
|
|
|
|
- {
|
|
|
|
- "id",
|
|
|
|
- "className",
|
|
|
|
- "seatNO",
|
|
|
|
- "point",
|
|
|
|
- "anwPoint",
|
|
|
|
- "persent"
|
|
|
|
- };
|
|
|
|
- List<string> keyWrong = new List<string>
|
|
|
|
- {
|
|
|
|
- "name",
|
|
|
|
- "point",
|
|
|
|
- "itemNO",
|
|
|
|
- "persent",
|
|
|
|
- "wrong",
|
|
|
|
- "rhw",
|
|
|
|
- "rlw"
|
|
|
|
- };
|
|
|
|
|
|
+
|
|
for (int k = 0; k < knowledgeName.Count; k++)
|
|
for (int k = 0; k < knowledgeName.Count; k++)
|
|
{
|
|
{
|
|
List<string> knowledgeClass = new List<string>();
|
|
List<string> knowledgeClass = new List<string>();
|