|
@@ -506,17 +506,25 @@ namespace TEAMModelOS.Controllers
|
|
|
/// <returns></returns>
|
|
|
[ProducesDefaultResponseType]
|
|
|
[HttpPost("statistics-area")]
|
|
|
+#if !DEBUG
|
|
|
[AuthToken(Roles = "teacher,admin,area")]
|
|
|
[Authorize(Roles = "IES")]
|
|
|
+#endif
|
|
|
public async Task<IActionResult> StatisticsArea(JsonElement request)
|
|
|
{
|
|
|
- var (userid, _, _, _) = HttpContext.GetAuthTokenInfo();
|
|
|
+ //var (userid, _, _, _) = HttpContext.GetAuthTokenInfo();
|
|
|
request.TryGetProperty("standard", out JsonElement _standard);
|
|
|
string standard = $"{_standard}";
|
|
|
if (string.IsNullOrEmpty(standard))
|
|
|
{
|
|
|
return BadRequest();
|
|
|
}
|
|
|
+ request.TryGetProperty("update", out JsonElement _update);
|
|
|
+ HashSet<string> update = null;
|
|
|
+ if (_update.ValueKind.Equals(JsonValueKind.Array))
|
|
|
+ {
|
|
|
+ update = _update.ToObject<HashSet<string>>();
|
|
|
+ }
|
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
|
Area area = null;
|
|
|
string sql = $"select value(c) from c where c.standard='{standard}'";
|
|
@@ -580,7 +588,7 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
schoolInfos.Add(new SchoolInfos { schoolId = school.id, schoolName = school.name, picture = school.picture, teacherCount = count, appraiseCount = appraise });
|
|
|
//增加评审人员总人数,学习总人数。
|
|
|
- trains.Add(StatisticsService.StatisticsSchool(_coreAPIHttpService, school.id, setting, area, client, _dingDing, null));
|
|
|
+ trains.Add(StatisticsService.StatisticsSchool(_coreAPIHttpService, school.id, setting, area, client, _dingDing, update));
|
|
|
}
|
|
|
int pagesize = 100;
|
|
|
if (trains.Count <= pagesize)
|