|
@@ -172,12 +172,21 @@ namespace TEAMModelFunction
|
|
|
//await client.GetContainer("TEAMModelOS", "Common").CreateItemAsync(changeRecord, new Azure.Cosmos.PartitionKey($"{changeRecord.code}"));
|
|
|
}
|
|
|
}
|
|
|
+ else {
|
|
|
+ for (int j = 0; j < info.subjects.Count; j++)
|
|
|
+ {
|
|
|
+ if (info.subjects[j].classCount == info.targetClassIds.Count)
|
|
|
+ {
|
|
|
+ info.progress = "finish";
|
|
|
+ await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync(info, info.id, new Azure.Cosmos.PartitionKey($"{code}"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
break;
|
|
|
case "finish":
|
|
|
for (int j = 0; j < info.subjects.Count; j++)
|
|
|
{
|
|
|
- if (info.subjects[j].classCount == info.targetClassIds.Count)
|
|
|
- {
|
|
|
+
|
|
|
ExamResult result = new ExamResult();
|
|
|
//人数总和
|
|
|
int Count = 0;
|
|
@@ -233,7 +242,7 @@ namespace TEAMModelFunction
|
|
|
result.time = info.startTime;
|
|
|
result.ttl = -1;
|
|
|
await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Common").UpsertItemAsync(result, new Azure.Cosmos.PartitionKey($"ExamResult-{info.id}"));
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
break;
|
|
|
}
|