|
@@ -125,34 +125,34 @@ namespace TEAMModelOS.Controllers.Research
|
|
|
//线下 学校研修活动
|
|
|
|
|
|
|
|
|
- //await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Common")
|
|
|
- //.GetItemQueryIterator<Study>(queryText: $"select c.owner, c.teachers,c.targets from c join A0 in c.teachers where A0.id='{_tmdid}' ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Study-{_school}") }))
|
|
|
- //{
|
|
|
+ await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Common")
|
|
|
+ .GetItemQueryIterator<Study>(queryText: $"select c.owner, c.teachers,c.targets from c join A0 in c.teachers where A0.id='{_tmdid}' ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Study-{_school}") }))
|
|
|
+ {
|
|
|
|
|
|
- // if (!string.IsNullOrEmpty(item.owner))
|
|
|
- // {
|
|
|
- // if (item.owner.Equals("school"))
|
|
|
- // {
|
|
|
- // offlineSchoolJoinCount += 1;
|
|
|
- // var tech = item.teachers.Find(x => x.id.Equals($"{_tmdid}"));
|
|
|
- // if (tech != null && tech.signTime > 0)
|
|
|
- // {
|
|
|
- // offlinelTime += item.hour;
|
|
|
- // offlineSchoolDoneCount += 1;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // else if (item.owner.Equals("area"))
|
|
|
- // {
|
|
|
- // offlineAreaJoinCount += 1;
|
|
|
- // var tech = item.teachers.Find(x => x.id.Equals($"{_tmdid}"));
|
|
|
- // if (tech != null && tech.signTime > 0)
|
|
|
- // {
|
|
|
- // offlinelTime += item.hour;
|
|
|
- // offlineAreaDoneCount += 1;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- //}
|
|
|
+ if (!string.IsNullOrEmpty(item.owner))
|
|
|
+ {
|
|
|
+ if (item.owner.Equals("school"))
|
|
|
+ {
|
|
|
+ offlineSchoolJoinCount += 1;
|
|
|
+ var tech = item.teachers.Find(x => x.id.Equals($"{_tmdid}"));
|
|
|
+ if (tech != null && tech.signTime > 0)
|
|
|
+ {
|
|
|
+ offlinelTime += item.hour;
|
|
|
+ offlineSchoolDoneCount += 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (item.owner.Equals("area"))
|
|
|
+ {
|
|
|
+ offlineAreaJoinCount += 1;
|
|
|
+ var tech = item.teachers.Find(x => x.id.Equals($"{_tmdid}"));
|
|
|
+ if (tech != null && tech.signTime > 0)
|
|
|
+ {
|
|
|
+ offlinelTime += item.hour;
|
|
|
+ offlineAreaDoneCount += 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|