|
@@ -1541,7 +1541,7 @@ namespace TEAMModelOS.Controllers
|
|
|
//ResponseBuilder builder = ResponseBuilder.custom();
|
|
|
//var (id, school) = HttpContext.GetAuthTokenInfo();
|
|
|
if (!requert.TryGetProperty("id", out JsonElement id)) return BadRequest();
|
|
|
- //if (!requert.TryGetProperty("code", out JsonElement code)) return BadRequest();
|
|
|
+ if (!requert.TryGetProperty("cIds", out JsonElement cIds)) return BadRequest();
|
|
|
if (!requert.TryGetProperty("studentId", out JsonElement studentId)) return BadRequest();
|
|
|
if (!requert.TryGetProperty("code", out JsonElement school)) return BadRequest();
|
|
|
if (!requert.TryGetProperty("scode", out JsonElement scode)) return BadRequest();
|
|
@@ -1554,7 +1554,7 @@ namespace TEAMModelOS.Controllers
|
|
|
List<string> classIds = new List<string>();
|
|
|
//List<string> stus = new List<string>();
|
|
|
//存放当前学生所在班级ID或者名单ID
|
|
|
- HashSet<string> resultIds = new();
|
|
|
+ /*HashSet<string> resultIds = new();
|
|
|
//List<string> ids = new List<string>();
|
|
|
//处理班级人数(公共部分的校本名单)
|
|
|
//List<Student> students = new List<Student>();
|
|
@@ -1616,8 +1616,8 @@ namespace TEAMModelOS.Controllers
|
|
|
{
|
|
|
infoIds.Add(ids);
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
+ }*/
|
|
|
+ List<string> infoIds = cIds.ToObject<List<string>>();
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryIterator<PaperSimple>(queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"{scode}") }))
|
|
|
{
|
|
|
papers.Add(item);
|
|
@@ -1700,7 +1700,7 @@ namespace TEAMModelOS.Controllers
|
|
|
int index = subId.IndexOf(exam.subjectId);
|
|
|
//根据索引找到试卷分数
|
|
|
List<double> points = papers[index].point;
|
|
|
- List<double> wn = await getWrongNum(exam, points);
|
|
|
+ List<double> wn = await getWrongNum(exam, points,infoIds);
|
|
|
wno.Add(wn);
|
|
|
}
|
|
|
if (papers.IsNotEmpty())
|
|
@@ -3539,7 +3539,7 @@ namespace TEAMModelOS.Controllers
|
|
|
return (ansBlob, scores);
|
|
|
}
|
|
|
|
|
|
- private Task<List<double>> getWrongNum(ExamResult result, List<double> points)
|
|
|
+ private Task<List<double>> getWrongNum(ExamResult result, List<double> points,List<string> infoIds)
|
|
|
{
|
|
|
int num = 0;
|
|
|
List<double> wn = new List<double>();
|
|
@@ -3549,6 +3549,7 @@ namespace TEAMModelOS.Controllers
|
|
|
double p = point * 0.8;
|
|
|
foreach (ClassRange range in result.classes)
|
|
|
{
|
|
|
+ if (!infoIds.Contains(range.id)) continue;
|
|
|
for (int i = range.range[0]; i <= range.range[1]; i++)
|
|
|
{
|
|
|
//判断推送的数据中,学生正常得分数据
|