|
@@ -243,7 +243,7 @@ namespace TEAMModelOS.FunctionV4.CosmosDB
|
|
|
{
|
|
|
if (art.owner.Equals("area") && string.IsNullOrEmpty(art.pId))
|
|
|
{
|
|
|
- List<(string id, string code, List<Tasks> settings)> artSchools = new();
|
|
|
+ /* List<(string id, string code, List<Tasks> settings)> artSchools = new();
|
|
|
string ql = $"select c.id,c.school,c.settings,c.classes from c where c.pk = 'Art' and c.pId = '{art.id}'";
|
|
|
await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(queryText: ql))
|
|
|
{
|
|
@@ -291,13 +291,13 @@ namespace TEAMModelOS.FunctionV4.CosmosDB
|
|
|
|
|
|
}
|
|
|
art.pass = 1;
|
|
|
- await client.GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync<ArtEvaluation>(art, art.id, new PartitionKey(art.code));
|
|
|
+ await client.GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync<ArtEvaluation>(art, art.id, new PartitionKey(art.code));*/
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
//获取当前艺术评价相关评测ID目前暂时排除区级发布的评测信息
|
|
|
|
|
|
- List<(string eId, string sId)> ids = new();
|
|
|
+ /*List<(string eId, string sId)> ids = new();
|
|
|
var examId = art.settings.SelectMany(x => x.task).Where(c => c.type == 1).Select(z => new { z.acId, z.subject }).ToList();
|
|
|
examId.ForEach(x =>
|
|
|
{
|
|
@@ -326,7 +326,7 @@ namespace TEAMModelOS.FunctionV4.CosmosDB
|
|
|
art.miss.Add(stus.Count);
|
|
|
//art.miss = stus.Count;
|
|
|
art.pass = 1;
|
|
|
- await client.GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync<ArtEvaluation>(art, art.id, new PartitionKey(art.code));
|
|
|
+ await client.GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync<ArtEvaluation>(art, art.id, new PartitionKey(art.code));*/
|
|
|
}
|
|
|
}
|
|
|
List<StudentArtResult> studentArtResults = new();
|
|
@@ -362,30 +362,6 @@ namespace TEAMModelOS.FunctionV4.CosmosDB
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- public static async Task<List<(string code, string subject, List<string> stus)>> getLostAsync(List<(string eId, string sId)> examIds, CosmosClient client, string code)
|
|
|
- {
|
|
|
- List<(string code, string sub, List<string> stu)> stuInfo = new();
|
|
|
- if (examIds.Any())
|
|
|
- {
|
|
|
- string examSql = $"select c.id,c.school,c.lostStu from c where c.id in ({string.Join(",", examIds.Select(o => $"'{o.eId}'"))})";
|
|
|
- await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(queryText: examSql, requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey($"Exam-{code}") }))
|
|
|
- {
|
|
|
- using var json = await JsonDocument.ParseAsync(item.ContentStream);
|
|
|
- if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
|
|
|
- {
|
|
|
- var accounts = json.RootElement.GetProperty("Documents").EnumerateArray();
|
|
|
- while (accounts.MoveNext())
|
|
|
- {
|
|
|
- JsonElement account = accounts.Current;
|
|
|
- List<string> lostStu = account.GetProperty("lostStu").ToObject<List<string>>();
|
|
|
- string id = account.GetProperty("id").GetString();
|
|
|
- string sub = examIds.Where(c => c.eId.Equals(id)).FirstOrDefault().sId;
|
|
|
- stuInfo.Add((account.GetProperty("school").GetString(), sub, lostStu));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return stuInfo;
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|