Przeglądaj źródła

完成调整阅卷客户端及学生名单变更方法的数据结构返回

CrazyIter_Bin 3 lat temu
rodzic
commit
d69295d54f

+ 4 - 4
TEAMModelFunction/CourseServiceBus.cs

@@ -44,7 +44,7 @@ namespace TEAMModelFunction
                     return;
                     return;
                 }
                 }
                 foreach (var cls in courseChange.addClass) {
                 foreach (var cls in courseChange.addClass) {
-                    (List<TmdInfo> addTmdidsCls, List<Students> addStudentsCls) = await TriggerStuActivity.GetStuList(client, _dingDing,new List<string> { cls}, courseChange.school);
+                    (List<TmdInfo> addTmdidsCls, List<StuInfo> addStudentsCls) = await TriggerStuActivity.GetStuList(client, _dingDing,new List<string> { cls}, courseChange.school);
                     foreach (var stu in addStudentsCls) {
                     foreach (var stu in addStudentsCls) {
                         try
                         try
                         {
                         {
@@ -109,7 +109,7 @@ namespace TEAMModelFunction
 
 
                 foreach (var list in courseChange.addList)
                 foreach (var list in courseChange.addList)
                 {
                 {
-                    (List<TmdInfo> addTmdidsCls, List<Students> addStudentsCls) = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string> { list }, courseChange.school);
+                    (List<TmdInfo> addTmdidsCls, List<StuInfo> addStudentsCls) = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string> { list }, courseChange.school);
                     foreach (var stu in addStudentsCls)
                     foreach (var stu in addStudentsCls)
                     {
                     {
                         try
                         try
@@ -176,7 +176,7 @@ namespace TEAMModelFunction
                 }
                 }
 
 
                 foreach (var delCls in courseChange.delClass) {
                 foreach (var delCls in courseChange.delClass) {
-                    (List<TmdInfo> delTmdidsCls, List<Students> delStudentsCls) = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string> { delCls }, courseChange.school);
+                    (List<TmdInfo> delTmdidsCls, List<StuInfo> delStudentsCls) = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string> { delCls }, courseChange.school);
                     foreach (var stu in delStudentsCls)
                     foreach (var stu in delStudentsCls)
                     {
                     {
                         try
                         try
@@ -233,7 +233,7 @@ namespace TEAMModelFunction
                 }
                 }
                 foreach (var delList in courseChange.delList)
                 foreach (var delList in courseChange.delList)
                 {
                 {
-                    (List<TmdInfo> delTmdidsCls, List<Students> delStudentsCls) = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string> { delList }, courseChange.school);
+                    (List<TmdInfo> delTmdidsCls, List<StuInfo> delStudentsCls) = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string> { delList }, courseChange.school);
                     foreach (var stu in delStudentsCls)
                     foreach (var stu in delStudentsCls)
                     {
                     {
                         try
                         try

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/ExamClassResult.cs

@@ -64,6 +64,7 @@ namespace TEAMModelOS.SDK.Models
     public class ClassInfo {
     public class ClassInfo {
         public string id { get; set; }
         public string id { get; set; }
         public string name { get; set; }
         public string name { get; set; }
+        public string from { get; set; }
         //public string code { get; set; }
         //public string code { get; set; }
     }
     }
 }
 }

+ 15 - 6
TEAMModelOS.SDK/Models/Service/TriggerStuActivity.cs

@@ -104,29 +104,38 @@ namespace TEAMModelFunction
             }
             }
             return ""; 
             return ""; 
         }
         }
-
-        public static async Task<List<ClassInfo>> GetClassInfo(CosmosClient client, DingDing _dingDing, List<string> classes, string school)
+        public class ClassListInfo
+        {
+            public string id { get; set; }
+            public string name { get; set; }
+            public string from { get; set; }
+            //public string code { get; set; }
+        }
+        public static async Task<List<ClassListInfo>> GetClassInfo(CosmosClient client, DingDing _dingDing, List<string> classes, string school)
         {
         {
-            List<ClassInfo> classInfos = new List<ClassInfo>();
+            List<ClassListInfo> classInfos = new List<ClassListInfo>();
             List<string> sqlList = new List<string>();
             List<string> sqlList = new List<string>();
             classes.ForEach(x => { sqlList.Add($" '{x}' "); });
             classes.ForEach(x => { sqlList.Add($" '{x}' "); });
             string sql = string.Join(" , ", sqlList);
             string sql = string.Join(" , ", sqlList);
             if (!string.IsNullOrEmpty(school)) {
             if (!string.IsNullOrEmpty(school)) {
-                await foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<ClassInfo>(queryText: $"select c.id,c.name from c where c.id in ({sql})",
+                await foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<ClassListInfo>(queryText: $"select c.id,c.name from c where c.id in ({sql})",
                    requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"Class-{school}") }))
                    requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"Class-{school}") }))
                 {
                 {
+                    item.from = "ClsStuList";
                     classInfos.Add(item);
                     classInfos.Add(item);
                 }
                 }
-                await foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<ClassInfo>(queryText: $"select c.id,c.name from c where c.id in ({sql})",
+                await foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<ClassListInfo>(queryText: $"select c.id,c.name from c where c.id in ({sql})",
                   requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"StuList-{school}") }))
                   requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"StuList-{school}") }))
                 {
                 {
+                    item.from = "SchStuList";
                     classInfos.Add(item);
                     classInfos.Add(item);
                 }
                 }
             }
             }
             List<StuList> tchLists = new List<StuList>();
             List<StuList> tchLists = new List<StuList>();
-            await foreach (var item in client.GetContainer("TEAMModelOS", "Teacher").GetItemQueryIterator<ClassInfo>(queryText: $"select c.id,c.name from c where c.id in ({sql})",
+            await foreach (var item in client.GetContainer("TEAMModelOS", "Teacher").GetItemQueryIterator<ClassListInfo>(queryText: $"select c.id,c.name from c where c.id in ({sql})",
                 requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"StuList") }))
                 requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"StuList") }))
             {
             {
+                item.from = "TchStuList";
                 classInfos.Add(item);
                 classInfos.Add(item);
             }
             }
             return classInfos;
             return classInfos;

+ 130 - 73
TEAMModelOS/Controllers/Client/HiScanController.cs

@@ -97,67 +97,70 @@ namespace TEAMModelOS.Controllers.Core
                 if (!request.TryGetProperty("id", out JsonElement id)) return BadRequest();
                 if (!request.TryGetProperty("id", out JsonElement id)) return BadRequest();
                 //TODO 取得Teacher 個人相關數據(課程清單、虛擬教室清單、歷史紀錄清單等),學校數據另外API處理,多校切換時不同
                 //TODO 取得Teacher 個人相關數據(課程清單、虛擬教室清單、歷史紀錄清單等),學校數據另外API處理,多校切換時不同
                 var client = _azureCosmos.GetCosmosClient();
                 var client = _azureCosmos.GetCosmosClient();
-                    var response = await client.GetContainer("TEAMModelOS", "Teacher").ReadItemStreamAsync($"{id}", new PartitionKey("Base"));
-                    int size = 0;
-                    //老師個人資料(含初始化)
-                    if (response.Status == 200)
-                    {
-                        var json = await JsonDocument.ParseAsync(response.ContentStream);
+                var response = await client.GetContainer("TEAMModelOS", "Teacher").ReadItemStreamAsync($"{id}", new PartitionKey("Base"));
+                int size = 0;
+                //老師個人資料(含初始化)
+                if (response.Status == 200)
+                {
+                    List<dynamic> schoolExam = new List<dynamic>();
+                    var json = await JsonDocument.ParseAsync(response.ContentStream);
                     string name = $"{json.RootElement.GetProperty("name")}";
                     string name = $"{json.RootElement.GetProperty("name")}";
                     string picture = $"{json.RootElement.GetProperty("picture")}";
                     string picture = $"{json.RootElement.GetProperty("picture")}";
                     if (json.RootElement.TryGetProperty("schools", out JsonElement value))
                     if (json.RootElement.TryGetProperty("schools", out JsonElement value))
-                        {
+                    {
                            
                            
                         if (json.RootElement.TryGetProperty("size", out JsonElement _size) && _size.ValueKind.Equals(JsonValueKind.Number))
                         if (json.RootElement.TryGetProperty("size", out JsonElement _size) && _size.ValueKind.Equals(JsonValueKind.Number))
+                        {
+                            size = _size.GetInt32();
+                        }
+                       
+                        foreach (var obj in value.EnumerateArray())
+                        {
+                            string statusNow = obj.GetProperty("status").ToString();
+                            //正式加入才会有
+                            if (statusNow == "join")
                             {
                             {
-                                size = _size.GetInt32();
-                            }
-                            foreach (var obj in value.EnumerateArray())
-                            {
-                                string statusNow = obj.GetProperty("status").ToString();
-                                //正式加入才会有
-                                if (statusNow == "join")
+                                //dynamic schoolExtobj = new ExpandoObject();
+                                var schoolJson = await client.GetContainer("TEAMModelOS", "School").ReadItemStreamAsync($"{obj.GetProperty("schoolId")}", new PartitionKey("Base"));
+                                var school = await JsonDocument.ParseAsync(schoolJson.ContentStream);
+                                var schoolId = obj.GetProperty("schoolId");
+                                var schoolName = obj.GetProperty("name");
+                                var schoolStatus = obj.GetProperty("status");
+                                var schoolPicture = school.RootElement.GetProperty("picture");
+                                //检查学校购买的模组是否包含阅卷模组
+                                int count = 0;
+                                string sql = $" SELECT value(count(product))  FROM c join product in c.service.product      where c.id ='{schoolId}'  and  c.pk='Product'  and product.prodCode='YMPCVCIM' ";
+                                await  foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<int>(sql, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("Product") })) {
+                                    count = item;
+                                }
+                                if (count > 0) 
                                 {
                                 {
-                                    //dynamic schoolExtobj = new ExpandoObject();
-                                    var schoolJson = await client.GetContainer("TEAMModelOS", "School").ReadItemStreamAsync($"{obj.GetProperty("schoolId")}", new PartitionKey("Base"));
-                                    var school = await JsonDocument.ParseAsync(schoolJson.ContentStream);
-                                    var schoolId = obj.GetProperty("schoolId");
-                                    var schoolName = obj.GetProperty("name");
-                                    var schoolStatus = obj.GetProperty("status");
-                                    var schoolPicture = school.RootElement.GetProperty("picture");
-                                    //检查学校购买的模组是否包含阅卷模组
-                                    int count = 0;
-                                    string sql = $" SELECT value(count(product))  FROM c join product in c.service.product      where c.id ='{schoolId}'  and  c.pk='Product'  and product.prodCode='YMPCVCIM' ";
-                                    await  foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<int>(sql, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("Product") })) {
-                                        count = item;
-                                    }
-                                    if (count > 0) {
-                                        //生成token
-                                        var  stoken = JwtAuthExtension.CreateAuthToken(_option.HostName, $"{id}", name?.ToString(), picture?.ToString(), _option.JwtSecretKey, roles: new[] { "teacher" }, schoolID: $"{schoolId}");
-                                        //获取学校线下阅卷评测
-                                        var sexams= await GetExam($"{schoolId}", "school", client);
-                                        var container = _azureStorage.GetBlobContainerClient($"{schoolId}");
-                                        await container.CreateIfNotExistsAsync(PublicAccessType.None); //嘗試創建School容器,如存在則不做任何事,保障容器一定存在
-                                        var (sblob_uri, sblob_sas) =   _azureStorage.GetBlobContainerSAS($"{schoolId}", BlobContainerSasPermissions.Read | BlobContainerSasPermissions.List | BlobContainerSasPermissions.Write);
-                                        schools.Add(new ScanSchool { name = $"schoolName", picture = $"{schoolPicture}", code = $"{schoolId}", status = $"{schoolStatus}" ,token= stoken, exams = sexams, bloburl=sblob_uri ,blobsas=sblob_sas});
+                                    //生成token
+                                    var  stoken = JwtAuthExtension.CreateAuthToken(_option.HostName, $"{id}", name?.ToString(), picture?.ToString(), _option.JwtSecretKey, roles: new[] { "teacher" }, schoolID: $"{schoolId}");
+                                    //获取学校线下阅卷评测
+                                    var sexams= await GetExam($"{schoolId}", "school", client);
+                                    if (sexams.IsNotEmpty())
+                                    {
+                                        schoolExam.Add(new { schoolCode = schoolId, exams= sexams });
                                     }
                                     }
+                                       
+                                    var container = _azureStorage.GetBlobContainerClient($"{schoolId}");
+                                    await container.CreateIfNotExistsAsync(PublicAccessType.None); //嘗試創建School容器,如存在則不做任何事,保障容器一定存在
+                                    var (sblob_uri, sblob_sas) =   _azureStorage.GetBlobContainerSAS($"{schoolId}", BlobContainerSasPermissions.Read | BlobContainerSasPermissions.List | BlobContainerSasPermissions.Write);
+                                    schools.Add(new ScanSchool { name = $"{schoolName}", picture = $"{schoolPicture}", code = $"{schoolId}",token= stoken, bloburl=sblob_uri ,blobsas=sblob_sas});
                                 }
                                 }
                             }
                             }
-                        }
-                        var ttoken = JwtAuthExtension.CreateAuthToken(_option.HostName, $"{id}", name?.ToString(), picture?.ToString(), _option.JwtSecretKey, roles: new[] { "teacher" });
-                        var (tblob_uri, tblob_sas) = _azureStorage.GetBlobContainerSAS($"{id}", BlobContainerSasPermissions.Write | BlobContainerSasPermissions.Read | BlobContainerSasPermissions.List | BlobContainerSasPermissions.Delete);
-                        //获取个人线下阅卷评测
-                        var exams = await GetExam($"{id}", "private", client);
-                        //換取AuthToken,提供給前端
-                        var data = new { name, picture, id, schools , exams, bloburl= tblob_uri, blobsas = tblob_sas, token= ttoken };
-                        //await sseClient.SendEventAsync(data.ToJsonString());
-                        return Ok(data);
-                        /////////////////////////////TODO 返回TMDID和学生的头像 名字 id  
-                   // }
-                    //else
-                    //{
-                    //    return Ok(new { status = 404 });
-                    //}
+                         }
+                    }
+                    var ttoken = JwtAuthExtension.CreateAuthToken(_option.HostName, $"{id}", name?.ToString(), picture?.ToString(), _option.JwtSecretKey, roles: new[] { "teacher" });
+                    var (tblob_uri, tblob_sas) = _azureStorage.GetBlobContainerSAS($"{id}", BlobContainerSasPermissions.Write | BlobContainerSasPermissions.Read | BlobContainerSasPermissions.List | BlobContainerSasPermissions.Delete);
+                    //获取个人线下阅卷评测
+                    var privateExam = await GetExam($"{id}", "private", client);
+                    //換取AuthToken,提供給前端
+                    var data = new { name, picture, id, schools , privateExam, schoolExam, bloburl= tblob_uri, blobsas = tblob_sas, token= ttoken };
+                    //await sseClient.SendEventAsync(data.ToJsonString());
+                    return Ok(data);
+                  
                 }
                 }
             } catch (Exception ex ) {
             } catch (Exception ex ) {
                 await _dingDing.SendBotMsg($"IES5,{_option.Location},hiscan/verify-qrcode()\n{ex.Message}{ex.StackTrace}", GroupNames.醍摩豆服務運維群組);
                 await _dingDing.SendBotMsg($"IES5,{_option.Location},hiscan/verify-qrcode()\n{ex.Message}{ex.StackTrace}", GroupNames.醍摩豆服務運維群組);
@@ -187,18 +190,51 @@ namespace TEAMModelOS.Controllers.Core
                         foreach (var cls in exam.classes)
                         foreach (var cls in exam.classes)
                         {
                         {
                             (List<TmdInfo> tmdids, List<StuInfo> students) stulist = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string> { cls }, code);
                             (List<TmdInfo> tmdids, List<StuInfo> students) stulist = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string> { cls }, code);
-                            classes.Add(new ExamClass { classId = cls, tmdids = stulist.tmdids, stulist = stulist.students });
+                            List<dynamic> dynamics = new List<dynamic>();
+                            stulist.students.ForEach(x => { dynamics.Add(new { x.name, x.picture, x.id }); });
+                            var clssinfo = await TriggerStuActivity.GetClassInfo(client, _dingDing, new List<string> { cls }, code);
+                            classes.Add(new ExamClass { classId = cls, className = clssinfo.IsNotEmpty() ? clssinfo[0].name : null, tmdids = stulist.tmdids, stulist = dynamics });
                         }
                         }
-                        corrects.Add(new   { exam = new { name= exam.name, school =exam.school,
-                            startTime =exam.startTime , endTime =exam.endTime , classes =exam.classes,
-                            type = exam.type,
-                            period = exam.period,
-                            grades = exam.grades,
-                            subjects = exam.subjects,
-                            progress = exam.progress,
-                            examType = exam.examType,
-                            creatorId = exam.creatorId,
-                            papers =exam.papers.Select(x=> new { x.name,x.sheet})},   classes = classes });
+                        List<dynamic> dys = new List<dynamic>();
+                        foreach (var pap in exam.papers)
+                        {
+                            dynamic dy = new { pap.name, pap.answers, pap.point, sheet = pap.sheet };
+                            if (!string.IsNullOrEmpty(pap.sheet))
+                            {
+                                if (scope == "school")
+                                {
+                                    SheetConfig config = await client.GetContainer("TEAMModelOS", "School").ReadItemAsync<SheetConfig>($"{pap.sheet}", new PartitionKey($"SheetConfig-{code}"));
+                                    dy.sheet = config;
+                                }
+                                else
+                                {
+                                    SheetConfig config = await client.GetContainer("TEAMModelOS", "Teacher").ReadItemAsync<SheetConfig>($"{pap.sheet}", new PartitionKey($"SheetConfig-{code}"));
+                                    dy.sheet = config;
+                                }
+                            }
+                            dys.Add(dy);
+                        }
+
+                        corrects.Add(new
+                        {
+                            exam = new
+                            {
+                                name = exam.name,
+                               // school = exam.school,
+                                startTime = exam.startTime,
+                                endTime = exam.endTime,
+                                // type = exam.type,
+                                period = exam.period,
+                                grades = exam.grades,
+                                subjects = exam.subjects,
+                                //progress = exam.progress,
+                                //examType = exam.examType,
+                                // creatorId = exam.creatorId,
+                                //   papers =exam.papers.Select(x=> new { x.name,x.sheet})
+                                papers = dys
+                            },
+                            classes = classes
+                        }) ;
                     }
                     }
                 }
                 }
             }
             }
@@ -211,25 +247,46 @@ namespace TEAMModelOS.Controllers.Core
                     foreach (var cls in exam.classes)
                     foreach (var cls in exam.classes)
                     {
                     {
                         (List<TmdInfo> tmdids, List<StuInfo> students) stulist = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string> { cls }, code);
                         (List<TmdInfo> tmdids, List<StuInfo> students) stulist = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string> { cls }, code);
-                        classes.Add(new ExamClass { classId = cls, tmdids = stulist.tmdids, stulist = stulist.students });
+                        List<dynamic> dynamics = new List<dynamic>();
+                        stulist.students.ForEach(x=> { dynamics.Add(new { x.name,x.picture,x.id}); });
+                        var clssinfo= await TriggerStuActivity.GetClassInfo(client, _dingDing, new List<string> { cls},code);
+                        classes.Add(new ExamClass { classId = cls, className = clssinfo.IsNotEmpty() ? clssinfo[0].name : null, tmdids = stulist.tmdids, stulist = dynamics }) ;
+                    }
+                    List<dynamic> dys = new List<dynamic>();
+                    foreach (var pap in exam.papers) {
+                        dynamic dy = new { pap.name, pap.answers, pap.point, sheet =pap.sheet};
+                        if (!string.IsNullOrEmpty(pap.sheet)) {
+                            if (scope == "school")
+                            {
+                                SheetConfig config = await client.GetContainer("TEAMModelOS", "School").ReadItemAsync<SheetConfig>($"{pap.sheet}", new PartitionKey($"SheetConfig-{code}"));
+                                dy.sheet = config;
+                            }
+                            else
+                            {
+                                SheetConfig config = await client.GetContainer("TEAMModelOS", "Teacher").ReadItemAsync<SheetConfig>($"{pap.sheet}", new PartitionKey($"SheetConfig-{code}"));
+                                dy.sheet = config;
+                            }
+                        }
+                        dys.Add(dy);
                     }
                     }
+
                     corrects.Add(new
                     corrects.Add(new
                     {
                     {
                         exam = new
                         exam = new
                         {
                         {
                             name = exam.name,
                             name = exam.name,
-                            school = exam.school,
+                           //school = exam.school,
                             startTime = exam.startTime,
                             startTime = exam.startTime,
                             endTime = exam.endTime,
                             endTime = exam.endTime,
-                            classes = exam.classes,
-                            type = exam.type,
+                            // type = exam.type,
                             period = exam.period,
                             period = exam.period,
                             grades = exam.grades,
                             grades = exam.grades,
                             subjects = exam.subjects,
                             subjects = exam.subjects,
-                            progress = exam.progress,
-                            examType = exam.examType,
-                            creatorId = exam.creatorId,
-                            papers = exam.papers.Select(x => new { x.name, x.sheet })
+                            //progress = exam.progress,
+                            //examType = exam.examType,
+                            // creatorId = exam.creatorId,
+                            //   papers =exam.papers.Select(x=> new { x.name,x.sheet})
+                            papers = dys
                         },
                         },
                         classes = classes
                         classes = classes
                     });
                     });
@@ -246,16 +303,16 @@ namespace TEAMModelOS.Controllers.Core
         public string name { get; set; }
         public string name { get; set; }
         public string picture { get; set; }
         public string picture { get; set; }
         public string code { get; set; }
         public string code { get; set; }
-        public string status { get; set; }
+       // public string status { get; set; }
         public string token { get; set; }
         public string token { get; set; }
        // public List<(Correct,ExamInfo, (List<string> tmdids, List<Students> stulist))> exams{ get; set; }
        // public List<(Correct,ExamInfo, (List<string> tmdids, List<Students> stulist))> exams{ get; set; }
-        public List<dynamic> exams { get; set; }
     }
     }
 
 
    
    
     public class ExamClass {
     public class ExamClass {
         public string classId { get; set; }
         public string classId { get; set; }
+        public string className { get; set; }
         public List<TmdInfo> tmdids { get; set; }
         public List<TmdInfo> tmdids { get; set; }
-        public List<StuInfo> stulist { get; set; }
+        public List<dynamic> stulist { get; set; }
     }
     }
 }
 }

+ 6 - 2
TEAMModelOS/Controllers/Common/CommonController.cs

@@ -113,7 +113,11 @@ namespace TEAMModelOS.Controllers.Common
                 return BadRequest(); 
                 return BadRequest(); 
             }
             }
         }
         }
-        //立即结束某个活动
+        /// <summary>
+        /// 根据名单id直接查找  from 返回有三种类型  行政班  ClsStuList, SchStuList 学校自定义名单,私人名单 TchStuList
+        /// </summary>
+        /// <param name="element"></param>
+        /// <returns></returns>
         [ProducesDefaultResponseType]
         [ProducesDefaultResponseType]
        // [AuthToken(Roles = "teacher,admin")]
        // [AuthToken(Roles = "teacher,admin")]
         [HttpPost("get-class-info")]
         [HttpPost("get-class-info")]
@@ -126,7 +130,7 @@ namespace TEAMModelOS.Controllers.Common
                 if (!element.TryGetProperty("classes", out JsonElement _classes)) return BadRequest();
                 if (!element.TryGetProperty("classes", out JsonElement _classes)) return BadRequest();
                 if (!element.TryGetProperty("school", out JsonElement _school)) return BadRequest();
                 if (!element.TryGetProperty("school", out JsonElement _school)) return BadRequest();
                 List<string> classes = _classes.ToObject<List<string>>();
                 List<string> classes = _classes.ToObject<List<string>>();
-               var classInfos=await TriggerStuActivity.GetClassInfo(client, _dingDing, classes, $"{_school}");
+                var classInfos=await TriggerStuActivity.GetClassInfo(client, _dingDing, classes, $"{_school}");
                 return Ok(new { classInfos ,code = 200 });
                 return Ok(new { classInfos ,code = 200 });
             }
             }
             catch (Exception ex)
             catch (Exception ex)