|
@@ -81,7 +81,7 @@ namespace TEAMModelOS.Controllers.Both
|
|
|
if (string.IsNullOrWhiteSpace(shortCode))
|
|
|
{
|
|
|
|
|
|
- return Ok(new { code=1,msg="开卷码为空!"});
|
|
|
+ return Ok(new { code=1,msg="提取码为空!"});
|
|
|
}
|
|
|
|
|
|
string sql = $"select value c from c where c.shortCode='{shortCode}'";
|
|
@@ -98,8 +98,8 @@ namespace TEAMModelOS.Controllers.Both
|
|
|
else {
|
|
|
if (result.list.Count>1)
|
|
|
{
|
|
|
- await _dingDing.SendBotMsg($"根据试卷开卷码搜索评测,查询到多条数据,请检查,开卷码{shortCode},试卷id:{string.Join(",",result.list.Select(x=>x.id))}", GroupNames.成都开发測試群組);
|
|
|
- return Ok(new { code = 3, msg = "开卷码匹配到多个评测,需要管理员处理!" });
|
|
|
+ await _dingDing.SendBotMsg($"根据试卷提取码搜索评测,查询到多条数据,请检查,提取码{shortCode},试卷id:{string.Join(",",result.list.Select(x=>x.id))}", GroupNames.成都开发測試群組);
|
|
|
+ return Ok(new { code = 3, msg = "提取码匹配到多个评测,需要管理员处理!" });
|
|
|
}
|
|
|
return Ok(new { code = 2, msg = "未找到评测!" });
|
|
|
}
|
|
@@ -108,7 +108,7 @@ namespace TEAMModelOS.Controllers.Both
|
|
|
ResponseMessage response= await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReadItemStreamAsync(tokenInfo.id, new PartitionKey($"Teacher-{evaluationSyncInfo.ownerId}"));
|
|
|
if (!response.IsSuccessStatusCode)
|
|
|
{
|
|
|
- await _dingDing.SendBotMsg($"根据试卷开卷码搜索评测,检测到查询数据的教师未加入学校,数据归属{evaluationSyncInfo.scope},教师id:{tokenInfo.id},ownerId:{evaluationSyncInfo.ownerId}", GroupNames.成都开发測試群組);
|
|
|
+ await _dingDing.SendBotMsg($"根据试卷提取码搜索评测,检测到查询数据的教师未加入学校,数据归属{evaluationSyncInfo.scope},教师id:{tokenInfo.id},ownerId:{evaluationSyncInfo.ownerId}", GroupNames.成都开发測試群組);
|
|
|
return Ok(new { code = 4, msg = "教师未加入当前评测的学校!" });
|
|
|
}
|
|
|
}
|
|
@@ -116,7 +116,7 @@ namespace TEAMModelOS.Controllers.Both
|
|
|
{
|
|
|
if (!tokenInfo.id.Equals(evaluationSyncInfo.ownerId))
|
|
|
{
|
|
|
- await _dingDing.SendBotMsg($"根据试卷开卷码搜索评测,检测到请求的教师与数据的ownerId不一致,数据归属{evaluationSyncInfo.scope},教师id:{tokenInfo.id},ownerId:{evaluationSyncInfo.ownerId}", GroupNames.成都开发測試群組);
|
|
|
+ await _dingDing.SendBotMsg($"根据试卷提取码搜索评测,检测到请求的教师与数据的ownerId不一致,数据归属{evaluationSyncInfo.scope},教师id:{tokenInfo.id},ownerId:{evaluationSyncInfo.ownerId}", GroupNames.成都开发測試群組);
|
|
|
return Ok(new { code = 5, msg = "查询的评测不属于当前教师!" });
|
|
|
}
|
|
|
}
|
|
@@ -257,7 +257,7 @@ namespace TEAMModelOS.Controllers.Both
|
|
|
}
|
|
|
|
|
|
EvaluationSyncInfo syncInfo = await EvaluationSyncInfoService.PackageEvaluation(activity.id, activity.scope, activity.owner, activity.type, _azureCosmos, _azureStorage, _coreAPIHttpService, _dingDing, _httpClientFactory);
|
|
|
- if (syncInfo!=null)
|
|
|
+ if (syncInfo!=null &&!infos.Exists(x=>x.id.Equals(syncInfo.id)))
|
|
|
{
|
|
|
infos.Add(syncInfo);
|
|
|
}
|