CrazyIter_Bin 3 éve
szülő
commit
2ebb4251ad
1 módosított fájl, 57 hozzáadás és 54 törlés
  1. 57 54
      TEAMModelOS.SDK/Models/Service/GroupListService.cs

+ 57 - 54
TEAMModelOS.SDK/Models/Service/GroupListService.cs

@@ -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);
             }