Ver código fonte

缺考状态

zhouj1203@hotmail.com 3 anos atrás
pai
commit
3dfd886b83

+ 1 - 0
TEAMModelOS.FunctionV4/CosmosDB/TriggerExam.cs

@@ -477,6 +477,7 @@ namespace TEAMModelOS.FunctionV4
                             {
                             {
                                 classResult.studentScores[index][i] = 0;
                                 classResult.studentScores[index][i] = 0;
                             }
                             }
+                            classResult.status[index] = 1;
                         }
                         }
                         else {
                         else {
                             for (int i = 0; i < classResult.studentScores[index].Count; i++)
                             for (int i = 0; i < classResult.studentScores[index].Count; i++)

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/ExamClassResult.cs

@@ -36,6 +36,7 @@ namespace TEAMModelOS.SDK.Models
         //记录学生原始学校ID
         //记录学生原始学校ID
         //public List<string> scIds { get; set; } = new List<string>();
         //public List<string> scIds { get; set; } = new List<string>();
         //继续学生作答状态
         //继续学生作答状态
+        //0 未完成 1缺考 2补考 3补考完成
         public List<int> status { get; set; } = new List<int>();
         public List<int> status { get; set; } = new List<int>();
         //批注
         //批注
         public List<List<List<Details>>> mark { get; set; }
         public List<List<List<Details>>> mark { get; set; }

+ 1 - 1
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -1248,7 +1248,7 @@ namespace TEAMModelOS.Controllers
                 //string code = school_code.ToString().Substring(5);
                 //string code = school_code.ToString().Substring(5);
                 //ExamInfo info = await client.GetContainer(Constant.TEAMModelOS, "Common").ReadItemAsync<ExamInfo>(id.ToString(), new PartitionKey($"{school_code}"));
                 //ExamInfo info = await client.GetContainer(Constant.TEAMModelOS, "Common").ReadItemAsync<ExamInfo>(id.ToString(), new PartitionKey($"{school_code}"));
                 List<ExamClassResult> examClassResults = new List<ExamClassResult>();
                 List<ExamClassResult> examClassResults = new List<ExamClassResult>();
-                await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryIterator<ExamClassResult>(queryText: $"select c.id,c.subjectId,c.code,c.scIds,c.info,c.studentIds,c.studentAnswers,c.studentScores,c.mark from c where c.examId = '{id}' and c.subjectId = '{subjectId}' and c.info.id = '{classId}'",
+                await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryIterator<ExamClassResult>(queryText: $"select c.id,c.subjectId,c.code,c.scIds,c.info,c.studentIds,c.studentAnswers,c.studentScores,c.mark,c.status from c where c.examId = '{id}' and c.subjectId = '{subjectId}' and c.info.id = '{classId}'",
                     requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ExamClassResult-{school_code}") }))
                     requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ExamClassResult-{school_code}") }))
                 {
                 {
                     examClassResults.Add(item);
                     examClassResults.Add(item);