|
@@ -142,7 +142,7 @@ namespace TEAMModelOS.SDK
|
|
|
// list.members.RemoveAll(x => codes.Contains(x.code));
|
|
|
// }
|
|
|
// else {
|
|
|
- // list.members.RemoveAll(x => x.code.Equals(list.school));
|
|
|
+ // list.members.RemoveAll(x => !x.code.Equals(list.school));
|
|
|
// }
|
|
|
//}
|
|
|
if (string.IsNullOrWhiteSpace(list.school) && smembers.Count() >= 1) {
|
|
@@ -410,24 +410,25 @@ namespace TEAMModelOS.SDK
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Teacher").GetItemQueryIterator<GroupListDto>(queryText: $"select {SummarySql} from c where c.id in ({sql})",
|
|
|
requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"GroupList") }))
|
|
|
{
|
|
|
- if (string.IsNullOrWhiteSpace(school))
|
|
|
- {
|
|
|
- privateList.Add(item);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (!string.IsNullOrWhiteSpace(item.school))
|
|
|
- {
|
|
|
- if (item.school.Equals(school))
|
|
|
- {
|
|
|
- privateList.Add(item);
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- privateList.Add(item);
|
|
|
- }
|
|
|
- }
|
|
|
+ privateList.Add(item);
|
|
|
+ //if (string.IsNullOrWhiteSpace(school))
|
|
|
+ //{
|
|
|
+ // privateList.Add(item);
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // if (!string.IsNullOrWhiteSpace(item.school))
|
|
|
+ // {
|
|
|
+ // if (item.school.Equals(school))
|
|
|
+ // {
|
|
|
+ // privateList.Add(item);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // privateList.Add(item);
|
|
|
+ // }
|
|
|
+ //}
|
|
|
}
|
|
|
if (privateList.IsNotEmpty())
|
|
|
{
|
|
@@ -558,24 +559,25 @@ namespace TEAMModelOS.SDK
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Teacher").GetItemQueryIterator<RGroupList>(queryText: $"select value(c) from c where c.id in ({sql})",
|
|
|
requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"GroupList") }))
|
|
|
{
|
|
|
- if (string.IsNullOrWhiteSpace(school))
|
|
|
- {
|
|
|
- privateList.Add(item);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (!string.IsNullOrWhiteSpace(item.school))
|
|
|
- {
|
|
|
- if (item.school.Equals(school))
|
|
|
- {
|
|
|
- privateList.Add(item);
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- privateList.Add(item);
|
|
|
- }
|
|
|
- }
|
|
|
+ privateList.Add(item);
|
|
|
+ //if (string.IsNullOrWhiteSpace(school))
|
|
|
+ //{
|
|
|
+ // privateList.Add(item);
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // if (!string.IsNullOrWhiteSpace(item.school))
|
|
|
+ // {
|
|
|
+ // if (item.school.Equals(school))
|
|
|
+ // {
|
|
|
+ // privateList.Add(item);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // privateList.Add(item);
|
|
|
+ // }
|
|
|
+ //}
|
|
|
}
|
|
|
if (privateList.IsNotEmpty())
|
|
|
{
|
|
@@ -697,23 +699,24 @@ namespace TEAMModelOS.SDK
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Teacher").GetItemQueryIterator<RGroupList>(queryText: sql.ToString(),
|
|
|
requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"GroupList") }))
|
|
|
{
|
|
|
- if (string.IsNullOrWhiteSpace(school))
|
|
|
- {
|
|
|
- groupLists.Add(item);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (!string.IsNullOrWhiteSpace(item.school))
|
|
|
- {
|
|
|
- if (item.school.Equals(school))
|
|
|
- {
|
|
|
- groupLists.Add(item);
|
|
|
- }
|
|
|
- }
|
|
|
- else {
|
|
|
- groupLists.Add(item);
|
|
|
- }
|
|
|
- }
|
|
|
+ groupLists.Add(item);
|
|
|
+ //if (string.IsNullOrWhiteSpace(school))
|
|
|
+ //{
|
|
|
+ // groupLists.Add(item);
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // if (!string.IsNullOrWhiteSpace(item.school))
|
|
|
+ // {
|
|
|
+ // if (item.school.Equals(school))
|
|
|
+ // {
|
|
|
+ // groupLists.Add(item);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // else {
|
|
|
+ // groupLists.Add(item);
|
|
|
+ // }
|
|
|
+ //}
|
|
|
}
|
|
|
groups.Add("Teacher", groupLists);
|
|
|
}
|