|
@@ -453,10 +453,12 @@ namespace TEAMModelBI.Controllers.Census
|
|
|
Dictionary<string, long> activitys = new(); //活动类型集合
|
|
|
long allActivity = 0; //活动累计
|
|
|
long weekActivity = 0;//本周活动
|
|
|
- long tearActivity = 0;//本学期活动
|
|
|
+ long termActivity = 0;//本学期活动
|
|
|
long weekLess = 0; //本周课例
|
|
|
long termLess = 0; //本学期课例
|
|
|
long allLess = 0; //所有课例
|
|
|
+ int tecCount = 0; //教师数量
|
|
|
+ int scCount = 0; //学校数量
|
|
|
|
|
|
foreach (var area in areaInfos)
|
|
|
{
|
|
@@ -465,13 +467,17 @@ namespace TEAMModelBI.Controllers.Census
|
|
|
{
|
|
|
recSchools.Add(school);
|
|
|
}
|
|
|
-
|
|
|
+ scCount += recSchools.Count;
|
|
|
recSchools.ForEach(x => { if (x.type == 2) heCount += 1; else if (x.type == 1) geCount += 1; else oeCount += 1; });
|
|
|
allSize += recSchools.Select(s => s.size).Sum();
|
|
|
area.schoolCount = recSchools.Count;
|
|
|
+
|
|
|
+ int tempCount = await CommonFind.GetPeopleNumber(cosmosClient, "School", recSchools?.Select(x => x.id).ToList(), "Teacher");
|
|
|
+
|
|
|
+ tecCount += tempCount;
|
|
|
//查教师
|
|
|
- area.techCount = await CommonFind.GetPeopleNumber(cosmosClient,"School",recSchools?.Select(x=>x.id).ToList(), "Teacher");
|
|
|
- //查询省
|
|
|
+ area.techCount = tempCount;
|
|
|
+ //查询学生
|
|
|
area.stuCount = await CommonFind.GetPeopleNumber(cosmosClient, "Student", recSchools?.Select(x => x.id).ToList(), "Base");
|
|
|
}
|
|
|
|
|
@@ -485,7 +491,7 @@ namespace TEAMModelBI.Controllers.Census
|
|
|
weekActivity += await CommonFind.FindTotals(cosmosClient, weekSql,new List<string> { "Common" });
|
|
|
|
|
|
string termSql = $"select COUNT(c.id) AS totals from c where c.pk='{type}' and c.createTime>={termStart} and c.createTime<={termEnd} ";
|
|
|
- tearActivity += await CommonFind.FindTotals(cosmosClient, termSql, new List<string> { "Common" });
|
|
|
+ termActivity += await CommonFind.FindTotals(cosmosClient, termSql, new List<string> { "Common" });
|
|
|
|
|
|
allActivity += totals;
|
|
|
activitys.Add(type, totals);
|