|
@@ -1656,11 +1656,11 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
List<string> schoolIds = await CommonFind.FindSchoolIds(cosmosClient, $"{tmdId}");
|
|
|
if (schoolIds.Count > 0)
|
|
|
{
|
|
|
- string scIdSql = BICommonWay.ManyScSql("schoolId", schoolIds);
|
|
|
+ string scIdSql = BICommonWay.ManyScSql("c.schoolId", schoolIds);
|
|
|
string stuSql = $"select value(count(c.id)) from c where {scIdSql}";
|
|
|
stuAllCnt = await CommonFind.GetSqlValueCount(cosmosClient, "Student", stuSql);
|
|
|
|
|
|
- string scSql = BICommonWay.ManyScSql("school", schoolIds);
|
|
|
+ string scSql = BICommonWay.ManyScSql("c.school", schoolIds);
|
|
|
string lessMoSql = $"select value(count(c.id)) from c where c.pk='LessonRecord' and {scSql} and c.startTime >= {start} and c.startTime <= {end}";
|
|
|
lessMthCnt = await CommonFind.GetSqlValueCount(cosmosClient, "School", lessMoSql);
|
|
|
|
|
@@ -1727,7 +1727,7 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
{
|
|
|
List<string> schoolIds = await CommonFind.FindSchoolIds(cosmosClient, $"{tmdId}");
|
|
|
if (schoolIds.Count == 0) return Ok(new { state = RespondCode.Ok, yearCnts, });
|
|
|
- scSql = BICommonWay.ManyScSql("school", schoolIds);
|
|
|
+ scSql = BICommonWay.ManyScSql("c.school", schoolIds);
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty($"{schooId}") && string.IsNullOrEmpty($"{tmdId}"))
|
|
@@ -1800,7 +1800,7 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
if (schoolIds.Count > 0)
|
|
|
{
|
|
|
|
|
|
- string scSql = BICommonWay.ManyScSql("school", schoolIds);
|
|
|
+ string scSql = BICommonWay.ManyScSql("c.school", schoolIds);
|
|
|
|
|
|
string strSql = "SELECT value(count(c.id)) FROM c where c.pk='LessonRecord'";
|
|
|
|