|
@@ -298,7 +298,7 @@ namespace TEAMModelOS.Controllers
|
|
/// <param name="jsonElement"></param>
|
|
/// <param name="jsonElement"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[ProducesDefaultResponseType]
|
|
[ProducesDefaultResponseType]
|
|
- [HttpPost("get-lesson-relords")]
|
|
|
|
|
|
+ [HttpPost("get-lesson-records")]
|
|
[ApiToken(Auth = "2004", Name = "获取学校课例", TName = "獲取學校課例", EName = "Get school lessons", RWN = "R", Limit = false)]
|
|
[ApiToken(Auth = "2004", Name = "获取学校课例", TName = "獲取學校課例", EName = "Get school lessons", RWN = "R", Limit = false)]
|
|
public async Task<IActionResult> GetLessonRec(JsonElement jsonElement)
|
|
public async Task<IActionResult> GetLessonRec(JsonElement jsonElement)
|
|
{
|
|
{
|
|
@@ -416,13 +416,13 @@ namespace TEAMModelOS.Controllers
|
|
/// <param name="jsonElement"></param>
|
|
/// <param name="jsonElement"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[ProducesDefaultResponseType]
|
|
[ProducesDefaultResponseType]
|
|
- [HttpPost("set-stdent-score")]
|
|
|
|
|
|
+ [HttpPost("upsert-student-score")]
|
|
[ApiToken(Auth = "2005", Name = "添加/修改学生艺术评测(音乐)答题结果", TName = "添加/修改學生藝術評測音樂答題結果", EName = "Add/modify the music answer results of student art evaluation", RWN = "W", Limit = false)]
|
|
[ApiToken(Auth = "2005", Name = "添加/修改学生艺术评测(音乐)答题结果", TName = "添加/修改學生藝術評測音樂答題結果", EName = "Add/modify the music answer results of student art evaluation", RWN = "W", Limit = false)]
|
|
public async Task<IActionResult> SetStudnetScore(JsonElement jsonElement)
|
|
public async Task<IActionResult> SetStudnetScore(JsonElement jsonElement)
|
|
{
|
|
{
|
|
var (id, school) = HttpContext.GetApiTokenInfo();
|
|
var (id, school) = HttpContext.GetApiTokenInfo();
|
|
- if (!jsonElement.TryGetProperty("oAnswer", out JsonElement _oAnswer)) return Ok(new { responseDate = new ResponseData<dynamic>() { code = RespondCode.ParamsError, msg = "oaswer参数错误", data = null } });
|
|
|
|
- OAnswerUp oAnswer = _oAnswer.ToObject<OAnswerUp>();
|
|
|
|
|
|
+ if (!jsonElement.TryGetProperty("answer", out JsonElement _answer)) return Ok(new { responseDate = new ResponseData<dynamic>() { code = RespondCode.ParamsError, msg = "answer参数错误", data = null } });
|
|
|
|
+ OAnswerUp oAnswer = _answer.ToObject<OAnswerUp>();
|
|
StudentArtResult studentArtResult = new();
|
|
StudentArtResult studentArtResult = new();
|
|
var cosmosClient = _azureCosmos.GetCosmosClient();
|
|
var cosmosClient = _azureCosmos.GetCosmosClient();
|
|
var resArt = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Student").ReadItemStreamAsync($"{school}-{oAnswer.studentId}", new PartitionKey($"ArtResult-{oAnswer.artId}"));
|
|
var resArt = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Student").ReadItemStreamAsync($"{school}-{oAnswer.studentId}", new PartitionKey($"ArtResult-{oAnswer.artId}"));
|