liqk 3 лет назад
Родитель
Сommit
0edce9a750
1 измененных файлов с 5 добавлено и 2 удалено
  1. 5 2
      TEAMModelOS/Controllers/Common/AreaController.cs

+ 5 - 2
TEAMModelOS/Controllers/Common/AreaController.cs

@@ -394,7 +394,9 @@ namespace TEAMModelOS.Controllers
                 
                 List<Survey> trSurveys = new List<Survey>();
                 List<ExamLite> trExams = new List<ExamLite>();
+                List<(List<TmdInfo> teac, Study stu)> moreInfo = new List<(List<TmdInfo> teac, Study stu)>();
                 foreach (Study study in studies) {
+                    (List<TmdInfo> tchList, _) = await TriggerStuActivity.GetTchList(client, _dingDing, study.tchLists, study.school);
                     if (!string.IsNullOrEmpty(study.surveyId))
                     {
                         await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryIterator<Survey>(queryText: $"select value(c) from c where c.id = '{study.surveyId}'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Survey-{study.school}") }))
@@ -407,7 +409,8 @@ namespace TEAMModelOS.Controllers
                         {
                             trExams.Add(item);
                         }
-                    }                  
+                    }
+                    moreInfo.Add((tchList,study));
                 } ;
                 var survey = trSurveys.Select(s => new {
                     count = s.answers.Count,
@@ -426,7 +429,7 @@ namespace TEAMModelOS.Controllers
                     lateCount = s.teachers.Where(h =>!string.IsNullOrEmpty(h.sign) && h.sign.Equals("1")).ToList().Count,
                     acount = s.teachers.Where(h => h.aTime > 0).ToList().Count
                 });
-                return Ok(new { survey,exam, info, studies });
+                return Ok(new { survey,exam, info, studies = moreInfo.Select(m => new { m.teac,m.stu}) });
             }
             catch (Exception e)
             {