Explorar o código

Merge branch 'develop3.0-tmd' of http://106.12.23.251:10080/TEAMMODEL/TEAMModelOS into develop3.0-tmd

zhousheng %!s(int64=4) %!d(string=hai) anos
pai
achega
a8fc419269
Modificáronse 1 ficheiros con 6 adicións e 8 borrados
  1. 6 8
      TEAMModelOS/Controllers/School/ClassRoomController.cs

+ 6 - 8
TEAMModelOS/Controllers/School/ClassRoomController.cs

@@ -452,9 +452,7 @@ namespace TEAMModelOS.Controllers
                         }
                     }
                 }
-                var grpBalance = listStudent.GroupBy(m => new { m.classId }).Distinct().Select(t => new 
-                {
-                    classId = t.ToList().Select(o =>
+                var grpBalance = listStudent.GroupBy(m => new { m.classId }).Distinct().Select(t =>t.ToList().Select(o =>
                                     new
                                     {
                                         o.id,
@@ -467,8 +465,8 @@ namespace TEAMModelOS.Controllers
                                         o.groupName,
                                         o.no
                                     })
-                });
-                suList.AddRange(grpBalance);              
+                );
+                stus.AddRange(grpBalance);              
                 List<(string id, string code, string stuId, string name)> listStuList = new List<(string id, string code, string stuId, string name)>();
                 if (scope.ToString().Equals("school", StringComparison.OrdinalIgnoreCase))
                 {
@@ -509,7 +507,7 @@ namespace TEAMModelOS.Controllers
                                         o.stuId,
                                         o.name
                                     });*/
-                        suList.AddRange(infos);
+                        stus.AddRange(infos);
                         //stus.Add(suList);
                     }
                 }
@@ -555,11 +553,11 @@ namespace TEAMModelOS.Controllers
                                         o.name
                                     })
                         });
-                        suList.AddRange(infos);
+                        stus.AddRange(infos);
                         //stus.Add(suList);
                     }
                 }             
-                return Ok(new { suList });
+                return Ok(new { stus });
             }
             catch (Exception ex)
             {