|
@@ -152,12 +152,24 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
}
|
|
|
//获取本次评测所有班级作答结果
|
|
|
List<ExamClassResult> examClassResults = new List<ExamClassResult>();
|
|
|
- var queryClass = $"select c.id,c.name,c.subjectId,c.studentScores,c.studentIds,c.gradeId,c.info,c.standard,c.krate,c.phc,c.plc,c.pc,c.frate,c.fphc,c.fplc,c.fpc from c where c.examId = '{id}' and c.progress = true ";
|
|
|
- await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryIterator<ExamClassResult>(queryText: queryClass, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ExamClassResult-{code}") }))
|
|
|
+ if (info.owner.Equals("teacher"))
|
|
|
{
|
|
|
- examClassResults.Add(item);
|
|
|
+ var queryClass = $"select c.id,c.name,c.subjectId,c.studentScores,c.studentIds,c.gradeId,c.info,c.standard,c.krate,c.phc,c.plc,c.pc,c.frate,c.fphc,c.fplc,c.fpc from c where c.examId = '{id}' and c.progress = true ";
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryIterator<ExamClassResult>(queryText: queryClass, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ExamClassResult-{info.school}") }))
|
|
|
+ {
|
|
|
+ examClassResults.Add(item);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ var queryClass = $"select c.id,c.name,c.subjectId,c.studentScores,c.studentIds,c.gradeId,c.info,c.standard,c.krate,c.phc,c.plc,c.pc,c.frate,c.fphc,c.fplc,c.fpc from c where c.examId = '{id}' and c.progress = true ";
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryIterator<ExamClassResult>(queryText: queryClass, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ExamClassResult-{code}") }))
|
|
|
+ {
|
|
|
+ examClassResults.Add(item);
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
touch = info.touch;
|
|
|
income = info.income;
|
|
|
/*foreach (Period period in school.period)
|
|
@@ -552,7 +564,10 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
}
|
|
|
grades.Add(gradeAys);
|
|
|
//处理学生年级相关的pr值
|
|
|
- var studentAys = students.Where(x => x.gradeId.Equals(gid)).ToList();
|
|
|
+ var studentAys = students;
|
|
|
+ if (!gid.Equals("-")) {
|
|
|
+ studentAys = students.Where(x => x.gradeId.Equals(gid)).ToList();
|
|
|
+ }
|
|
|
var stuGradeTotal = studentAys.Select(x => x.total).ToList();
|
|
|
stuGradeTotal.Sort((s1, s2) => { return s2.CompareTo(s1); });
|
|
|
var stuCount = stuGradeTotal.Count;
|