|
@@ -177,11 +177,25 @@ namespace TEAMModelOS.SDK
|
|
|
if (userScope.Equals(Constant.ScopeStudent) && !string.IsNullOrWhiteSpace(school))
|
|
|
{
|
|
|
var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()} and c.owner='school' ", $"Vote-{school}");
|
|
|
+ if (resultSchool.list.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (var stu in resultSchool.list)
|
|
|
+ {
|
|
|
+ stu.classIds = stu.classes;
|
|
|
+ }
|
|
|
+ }
|
|
|
datas.AddRange(resultSchool.list);
|
|
|
}
|
|
|
//获取教师发布的活动(个人名单,学校名单)
|
|
|
{
|
|
|
var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()} and c.owner='teacher' ");
|
|
|
+ if (resultTeacher.list.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (var stu in resultTeacher.list)
|
|
|
+ {
|
|
|
+ stu.classIds = stu.stuLists;
|
|
|
+ }
|
|
|
+ }
|
|
|
datas.AddRange(resultTeacher.list);
|
|
|
}
|
|
|
}
|
|
@@ -193,11 +207,25 @@ namespace TEAMModelOS.SDK
|
|
|
if (userScope.Equals(Constant.ScopeStudent) && !string.IsNullOrWhiteSpace(school))
|
|
|
{
|
|
|
var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()} and c.owner='school' ", $"Survey-{school}");
|
|
|
+ if (resultSchool.list.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (var stu in resultSchool.list)
|
|
|
+ {
|
|
|
+ stu.classIds = stu.classes;
|
|
|
+ }
|
|
|
+ }
|
|
|
datas.AddRange(resultSchool.list);
|
|
|
}
|
|
|
//获取教师发布的活动(个人名单,学校名单)
|
|
|
{
|
|
|
var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()} and c.owner='teacher' ");
|
|
|
+ if (resultTeacher.list.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (var stu in resultTeacher.list)
|
|
|
+ {
|
|
|
+ stu.classIds = stu.stuLists;
|
|
|
+ }
|
|
|
+ }
|
|
|
datas.AddRange(resultTeacher.list);
|
|
|
}
|
|
|
}
|
|
@@ -209,11 +237,25 @@ namespace TEAMModelOS.SDK
|
|
|
if (userScope.Equals(Constant.ScopeStudent) && !string.IsNullOrWhiteSpace(school))
|
|
|
{
|
|
|
var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()} and c.owner='school' ", $"Homework-{school}");
|
|
|
+ if (resultSchool.list.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (var stu in resultSchool.list)
|
|
|
+ {
|
|
|
+ stu.classIds = stu.classes;
|
|
|
+ }
|
|
|
+ }
|
|
|
datas.AddRange(resultSchool.list);
|
|
|
}
|
|
|
//获取教师发布的活动(个人名单,学校名单)
|
|
|
{
|
|
|
var resultTeacher = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL.ToString()} and c.owner='teacher' ");
|
|
|
+ if (resultTeacher.list.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (var stu in resultTeacher.list)
|
|
|
+ {
|
|
|
+ stu.classIds = stu.stuLists;
|
|
|
+ }
|
|
|
+ }
|
|
|
datas.AddRange(resultTeacher.list);
|
|
|
}
|
|
|
}
|
|
@@ -232,6 +274,13 @@ namespace TEAMModelOS.SDK
|
|
|
if (userScope.Equals(Constant.ScopeStudent) && !string.IsNullOrWhiteSpace(school))
|
|
|
{
|
|
|
var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL} and c.school='{school}' ", $"Art-{school}");
|
|
|
+ if (resultSchool.list.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (var stu in resultSchool.list)
|
|
|
+ {
|
|
|
+ stu.classIds = stu.classes;
|
|
|
+ }
|
|
|
+ }
|
|
|
datas.AddRange(resultSchool.list);
|
|
|
}
|
|
|
}
|
|
@@ -242,7 +291,7 @@ namespace TEAMModelOS.SDK
|
|
|
//获取学校发布的研修活动
|
|
|
if (userScope.Equals(Constant.ScopeStudent) && !string.IsNullOrWhiteSpace(school))
|
|
|
{
|
|
|
- var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL} and c.owner='school' ", $"Study-{school}");
|
|
|
+ var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Common).GetList<StudentActivity>($"{SQL} and c.owner='school' ", $"Study-{school}");
|
|
|
datas.AddRange(resultSchool.list);
|
|
|
}
|
|
|
/* //获取教师发布的活动(个人名单,学校名单)
|