|
@@ -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)
|
|
|
{
|