|
@@ -96,7 +96,7 @@ namespace TEAMModelOS.Controllers
|
|
|
int acount = 0;
|
|
|
if (!string.IsNullOrWhiteSpace(school) && classes.ToList().IsNotEmpty())
|
|
|
{
|
|
|
- string querySchool = $" SELECT distinct c.owner, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime FROM c {joinSqlClasses} where {pksql} {classesSql}";
|
|
|
+ string querySchool = $" SELECT distinct c.owner, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime FROM c {joinSqlClasses} where {pksql} {classesSql} and (c.status<>404 or IS_DEFINED(c.status) = false ) ";
|
|
|
//查询数据归属学校的
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryIterator<MQActivity>(querySchool, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"{type}-{school}") }))
|
|
|
{
|
|
@@ -115,7 +115,7 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(school) && stulist.ToList().IsNotEmpty())
|
|
|
{
|
|
|
- string querySchool = $" SELECT distinct c.owner, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime FROM c {joinSqlStulist} where {pksql} {stuListsSql}";
|
|
|
+ string querySchool = $" SELECT distinct c.owner, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime FROM c {joinSqlStulist} where {pksql} {stuListsSql} and (c.status<>404 or IS_DEFINED(c.status) = false ) ";
|
|
|
//查询数据归属学校的
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryIterator<MQActivity>(querySchool, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"{type}-{school}") }))
|
|
|
{
|
|
@@ -126,7 +126,7 @@ namespace TEAMModelOS.Controllers
|
|
|
acount += 1;
|
|
|
}
|
|
|
}
|
|
|
- string queryTeacher = $" SELECT distinct c.owner, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime FROM c where {pksql} ";
|
|
|
+ string queryTeacher = $" SELECT distinct c.owner, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime FROM c where {pksql} and (c.status<>404 or IS_DEFINED(c.status) = false ) ";
|
|
|
//查询数据归属个人的
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryIterator<MQActivity>(queryTeacher, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"{type}-{id}") }))
|
|
|
{
|
|
@@ -291,7 +291,7 @@ namespace TEAMModelOS.Controllers
|
|
|
if (!string.IsNullOrWhiteSpace(school) && classes.IsNotEmpty())
|
|
|
{
|
|
|
//string querySchool = $" SELECT distinct value c FROM c {joinSqlClasses} {joinSqlSubjects} where {stimesql} {etimesql} {progresssql} {typesql} {andSqlSubjects} {tgSql}";
|
|
|
- string querySchoolclss = $" SELECT distinct c.owner,c.sStatus, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime,c.source,c.type FROM c {joinSqlClasses} where {pksql} {classesSql}";
|
|
|
+ string querySchoolclss = $" SELECT distinct c.owner,c.sStatus, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime,c.source,c.type FROM c {joinSqlClasses} where {pksql} {classesSql} and (c.status<>404 or IS_DEFINED(c.status) = false ) ";
|
|
|
//查询数据归属学校的
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(querySchoolclss, continuationToken: continuationTokenSchool, requestOptions: new QueryRequestOptions() { MaxItemCount = topcout, PartitionKey = new PartitionKey($"{type}-{school}") }))
|
|
|
{
|
|
@@ -310,7 +310,7 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- string querySchoollist = $" SELECT distinct c.owner,c.sStatus, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime ,c.source,c.type FROM c {joinSqlStulist} where {pksql} {stuListsSql}";
|
|
|
+ string querySchoollist = $" SELECT distinct c.owner,c.sStatus, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime ,c.source,c.type FROM c {joinSqlStulist} where {pksql} {stuListsSql} and (c.status<>404 or IS_DEFINED(c.status) = false ) ";
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(querySchoollist, continuationToken: continuationTokenSchool, requestOptions: new QueryRequestOptions() { MaxItemCount = topcout, PartitionKey = new PartitionKey($"{type}-{school}") }))
|
|
|
{
|
|
|
using var json = await JsonDocument.ParseAsync(item.ContentStream);
|
|
@@ -340,7 +340,7 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- string queryTeacher = $" SELECT distinct c.owner,c.sStatus, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime ,c.source,c.type FROM c where {pksql} ";
|
|
|
+ string queryTeacher = $" SELECT distinct c.owner,c.sStatus, c.id,c.code, c.classes,c.stuLists,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime ,c.source,c.type FROM c where {pksql} and (c.status<>404 or IS_DEFINED(c.status) = false ) ";
|
|
|
//查询数据归属学校的
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryStreamIterator(queryTeacher, continuationToken: continuationTokenSchool, requestOptions: new QueryRequestOptions() { MaxItemCount = topcout, PartitionKey = new PartitionKey($"{type}-{id}") }))
|
|
|
{
|