|
@@ -388,13 +388,20 @@ namespace TEAMModelFunction
|
|
|
}
|
|
|
if (studentss.IsNotEmpty()) {
|
|
|
List<string> inidstus = new List<string>();
|
|
|
- studentss.Select(x => x.id).ToList().ForEach(x => { inidstus.Add($"'{x}'"); });
|
|
|
+ foreach (Students stu in studentss) {
|
|
|
+ var querystu = $"SELECT c.id,c.code,c.name,c.picture,c.classId,c.year,c.schoolId FROM c where c.id = '{stu.id}'";
|
|
|
+ await foreach (var item in client.GetContainer("TEAMModelOS", "Student").GetItemQueryIterator<StuInfo>(queryText: querystu, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"{stu.code}") }))
|
|
|
+ {
|
|
|
+ stuInfos.Add(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /*studentss.Select(x => x.id).ToList().ForEach(x => { inidstus.Add($"'{x}'"); });
|
|
|
var insqlstu = string.Join(",", inidstus);
|
|
|
var querystu = $"SELECT c.id,c.code,c.name,c.picture,c.classId,c.year,c.schoolId FROM c where c.id in ({insqlstu})";
|
|
|
await foreach (var item in client.GetContainer("TEAMModelOS", "Student").GetItemQueryIterator<StuInfo>(queryText: querystu, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Base-{school}") }))
|
|
|
{
|
|
|
stuInfos.Add(item);
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
students.ForEach(x =>
|
|
|
{
|