|
@@ -323,7 +323,7 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
if (types.IsEmpty() || types.Contains("class"))
|
|
|
{
|
|
|
- StringBuilder classsql = new StringBuilder($"SELECT c.id,c.name,c.periodId ,c.year FROM c ");
|
|
|
+ StringBuilder classsql = new StringBuilder($"SELECT c.id,c.name,c.periodId ,c.year FROM c where c.graduate = 0 or IS_DEFINED(c.graduate) = false ");
|
|
|
if (!string.IsNullOrEmpty($"{periodId}"))
|
|
|
{
|
|
|
classsql.Append($" where c.periodId='{periodId}' ");
|
|
@@ -424,9 +424,9 @@ namespace TEAMModelOS.Controllers
|
|
|
if (classIds.IsNotEmpty())
|
|
|
{
|
|
|
string insql = string.Join(",", classIds.Select(x => $"'{x}'"));
|
|
|
- query = new StringBuilder($"SELECT c.id,c.name,c.periodId ,c.year FROM c where c.id in ({insql}) ");
|
|
|
+ query = new StringBuilder($"SELECT c.id,c.name,c.periodId ,c.year FROM c where c.id in ({insql}) and ( c.graduate = 0 or IS_DEFINED(c.graduate) = false) ");
|
|
|
///行政班(学生搜寻classId动态返回)class
|
|
|
- await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<ClassInfo>(queryText: $"select c.id,c.name ,c.periodId ,c.year from c where c.id in ({insql})",
|
|
|
+ await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<ClassInfo>(queryText: query.ToString(),
|
|
|
requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"Class-{schoolId}") }))
|
|
|
{
|
|
|
HashSet<string> groupNames = new HashSet<string>();
|