|
@@ -522,7 +522,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
List<KeyValuePair<TeacherTrain, string>> trainsNO = new List<KeyValuePair<TeacherTrain, string>>();
|
|
|
List<PushFail> fails = new List<PushFail>();
|
|
|
List<ScTeacher> scTeachers = await _azureStorage.FindListByDict<ScTeacher>(new Dictionary<string, object> { { "PartitionKey", "ScTeacher" } });
|
|
|
- // List<ScTeacherDiagnosis> diagnoses = await _azureStorage.FindListByDict<ScTeacherDiagnosis>(new Dictionary<string, object> { { "PartitionKey", "ScTeacherDiagnosis", }});
|
|
|
+ // List<ScTeacherDiagnosis> diagnoses = await _azureStorage.FindListByDict<ScTeacherDiagnosis>(new Dictionary<string, object> { { "PartitionKey", "ScTeacherDiagnosis", }});
|
|
|
trains.ForEach(x => {
|
|
|
var teacher = teachers.Find(t => t.id.Equals(x.id));
|
|
|
if (teacher == null)
|
|
@@ -555,6 +555,25 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
await response.WriteAsJsonAsync(new { });
|
|
|
return response;
|
|
|
}
|
|
|
+ //5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2
|
|
|
+ public (int t53122OK, List<KeyValuePair<string, string>> msgs) check53122(TeacherTrain teacherTrain, List<KeyValuePair<string, string>> msgs) {
|
|
|
+ int t53122OK = 1;
|
|
|
+ if (teacherTrain.offlineRecords.Count<= 0)
|
|
|
+ {
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("offlineRecord-count", $"文件个数为0"));
|
|
|
+ }
|
|
|
+ teacherTrain.offlineRecords.ForEach(x => {
|
|
|
+ if (string.IsNullOrEmpty(x.url)) {
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("offlineRecord-url", $"链接为空"));
|
|
|
+ }
|
|
|
+ if (x.size<=0)
|
|
|
+ {
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("offlineRecord-size", $"文件大小"));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return (t53122OK, msgs);
|
|
|
+ }
|
|
|
+
|
|
|
//5.3.1.17学员课堂实录批量回写-UploadKTSLList
|
|
|
public (int t53117OK, List<KeyValuePair<string, string>> msgs) check53117(TeacherTrain teacherTrain, List<KeyValuePair<string, string>> msgs) {
|
|
|
//校验 基本情况是否满足
|
|
@@ -628,15 +647,12 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
if (teacherTrain.currency.teacherAilities.IsNotEmpty())
|
|
|
{
|
|
|
insql = $" where c.id in ({string.Join(",", teacherTrain.currency.teacherAilities.Select(o => $"'{o.id}'"))})";
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
//认证材料
|
|
|
await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher")
|
|
|
.GetItemQueryIterator<AbilitySub>(queryText: $"select value(c) from c {insql}", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"AbilitySub-{teacherTrain.school}-{teacherTrain.id}") }))
|
|
|
{
|
|
|
abilitySubs.Add(item);
|
|
|
-
|
|
|
}
|
|
|
teacherTrain.currency.teacherAilities.ForEach(x => {
|
|
|
var abilitySub= abilitySubs.Find(z => z.id.Equals(x.id));
|
|
@@ -653,7 +669,6 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
}
|
|
|
});
|
|
|
t53113OK = 0;
|
|
|
-
|
|
|
}
|
|
|
return (t53113OK, msgs, abilitySubs);
|
|
|
}
|