|
@@ -869,7 +869,7 @@ namespace TEAMModelOS.Controllers
|
|
|
acc.GetProperty("name").GetString(),
|
|
|
acc.GetProperty("picture").GetString(),
|
|
|
acc.GetProperty("year").GetInt32(),
|
|
|
- acc.GetProperty("no").GetString(), null// acc.GetProperty("periodId").ValueKind.Equals(JsonValueKind.String) ? acc.GetProperty("periodId").GetString() : null
|
|
|
+ acc.GetProperty("no").GetString(), acc.GetProperty("periodId").ValueKind.Equals(JsonValueKind.String) ? acc.GetProperty("periodId").GetString() : null
|
|
|
)
|
|
|
);
|
|
|
}
|
|
@@ -881,7 +881,7 @@ namespace TEAMModelOS.Controllers
|
|
|
acc.GetProperty("name").GetString(),
|
|
|
acc.GetProperty("picture").GetString(),
|
|
|
acc.GetProperty("year").GetInt32(),
|
|
|
- acc.GetProperty("no").GetString(), null// acc.GetProperty("periodId").ValueKind.Equals(JsonValueKind.String) ? acc.GetProperty("periodId").GetString() : null
|
|
|
+ acc.GetProperty("no").GetString(), acc.GetProperty("periodId").ValueKind.Equals(JsonValueKind.String) ? acc.GetProperty("periodId").GetString() : null
|
|
|
)
|
|
|
);
|
|
|
}
|
|
@@ -895,7 +895,7 @@ namespace TEAMModelOS.Controllers
|
|
|
acc.GetProperty("name").GetString(),
|
|
|
acc.GetProperty("picture").GetString(),
|
|
|
acc.GetProperty("year").GetInt32(),
|
|
|
- acc.GetProperty("no").GetString(),null// acc.GetProperty("periodId").ValueKind.Equals(JsonValueKind.String) ? acc.GetProperty("periodId").GetString() : null
|
|
|
+ acc.GetProperty("no").GetString(), acc.GetProperty("periodId").ValueKind.Equals(JsonValueKind.String) ? acc.GetProperty("periodId").GetString() : null
|
|
|
)
|
|
|
}
|
|
|
);
|
|
@@ -921,7 +921,7 @@ namespace TEAMModelOS.Controllers
|
|
|
classNo = classInfos[classStud.Key].GetProperty("no").GetString();
|
|
|
className = classInfos[classStud.Key].GetProperty("name").GetString();
|
|
|
//gradeId = classInfos[classStud.Key].GetProperty("gradeId").GetString();
|
|
|
- periodId = classInfos[classStud.Key].GetProperty("periodId").GetString();
|
|
|
+ periodId = classInfos[classStud.Key].GetProperty("periodId").ValueKind.Equals(JsonValueKind.String)? classInfos[classStud.Key].GetProperty("periodId").GetString():null;
|
|
|
if (classInfos[classStud.Key].TryGetProperty("year", out JsonElement year)) {
|
|
|
if (year.ValueKind.Equals(JsonValueKind.Number)) {
|
|
|
classYear = classInfos[classStud.Key].GetProperty("year").GetInt32();
|
|
@@ -961,7 +961,7 @@ namespace TEAMModelOS.Controllers
|
|
|
classNo = (string)null,
|
|
|
className = (string)null,
|
|
|
gradeId = (string)null,
|
|
|
- periodId = (string)null,
|
|
|
+ periodId = o.periodId,
|
|
|
classYear = -1
|
|
|
}));
|
|
|
|
|
@@ -1135,8 +1135,6 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
writer.WriteEndObject();
|
|
|
writer.Flush();
|
|
|
-
|
|
|
- Console.WriteLine(1111);
|
|
|
var ret = await _azureCosmos
|
|
|
.GetCosmosClient()
|
|
|
.GetContainer("TEAMModelOS", "Student")
|
|
@@ -1154,15 +1152,12 @@ namespace TEAMModelOS.Controllers
|
|
|
$"IES5,{_option.Location},StudentController/removeStudentClassInfo(),CosmosDB response:{ret.Status}\nBase-{schoolId},id:{id}",
|
|
|
GroupNames.醍摩豆服務運維群組);
|
|
|
}
|
|
|
- Console.WriteLine(2222);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- Console.WriteLine(333);
|
|
|
//將impStuds內的資料移除sucStuds及errorIds,所得的結果就是不存在於資料庫的id。
|
|
|
sucStuds.ForEach(o => impStuds.Remove(o));
|
|
|
errorIds.ForEach(o => impStuds.Remove(o));
|
|
|
- Console.WriteLine(444);
|
|
|
return (sucStuds, impStuds, errorIds);
|
|
|
}
|
|
|
|