|
@@ -755,7 +755,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
{
|
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
|
List<LessonRecord> records = new();
|
|
|
- StringBuilder sql = new($"select c.periodId,c.tmdid,c.collateTaskCount,c.collateCount,c.clientInteractionCount,c.scpoe from c where c.school = '{code}' and c.periodId = '{periodId}'");
|
|
|
+ StringBuilder sql = new($"select c.periodId,c.tmdid,c.collateTaskCount,c.collateCount,c.clientInteractionCount,c.examQuizCount,c.scpoe from c where c.school = '{code}' and c.periodId = '{periodId}'");
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(
|
|
|
queryText: sql.ToString(), requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"LessonRecord-{code}") }))
|
|
|
{
|
|
@@ -772,10 +772,11 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
double teachCount = records.Where((x, i) => records.FindIndex(z => z.tmdid == x.tmdid) == i).ToList().Count;
|
|
|
double taskCount = records.Select(c => c.collateTaskCount).Sum();
|
|
|
double workCount = records.Select(c => c.collateCount).Sum();
|
|
|
+ double examQuizCount = records.Select(c => c.examQuizCount).Sum();
|
|
|
double interactCount = records.Select(c => c.clientInteractionCount).Sum();
|
|
|
List<(string name, double count)> rc = await getRecordCount(client, records, stime.GetInt64(), etime.GetInt64(), code.GetString(), "", periodId.GetString());
|
|
|
double semester = rc.Where(r => r.name.Equals("semester")).FirstOrDefault().count;
|
|
|
- return Ok(new {total, teachCount, taskCount, workCount, interactCount, semester });
|
|
|
+ return Ok(new {total, teachCount, taskCount, workCount, examQuizCount,interactCount,semester });
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|