|
@@ -542,7 +542,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
}
|
|
}
|
|
if (members.IsNotEmpty())
|
|
if (members.IsNotEmpty())
|
|
{
|
|
{
|
|
- queryText = new StringBuilder($"SELECT distinct value(c) FROM c where " +
|
|
|
|
|
|
+ queryText = new StringBuilder($"SELECT distinct value(c) FROM c where 1=1 " +
|
|
$"and c.id in ({string.Join(",", members.Select(x => $"'{x.id}'"))}) ");
|
|
$"and c.id in ({string.Join(",", members.Select(x => $"'{x.id}'"))}) ");
|
|
await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Teacher").GetItemQueryIterator<TeacherTrain>(queryText: queryText.ToString(),
|
|
await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Teacher").GetItemQueryIterator<TeacherTrain>(queryText: queryText.ToString(),
|
|
requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"TeacherTrain-{school}") }))
|
|
requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"TeacherTrain-{school}") }))
|
|
@@ -563,8 +563,9 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
List<ScTeacherDiagnosis> scTeacherDiagnoses = await table.FindListByDict<ScTeacherDiagnosis>(new Dictionary<string, object> { { "PartitionKey", "ScTeacherDiagnosis" }, { "schoolCode", $"{school}" } });
|
|
List<ScTeacherDiagnosis> scTeacherDiagnoses = await table.FindListByDict<ScTeacherDiagnosis>(new Dictionary<string, object> { { "PartitionKey", "ScTeacherDiagnosis" }, { "schoolCode", $"{school}" } });
|
|
|
|
|
|
List<KeyValuePair<TeacherTrain, string>> trainsNO = new List<KeyValuePair<TeacherTrain, string>>();
|
|
List<KeyValuePair<TeacherTrain, string>> trainsNO = new List<KeyValuePair<TeacherTrain, string>>();
|
|
- List<PushFail> fails = new List<PushFail>();
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ List<ScsResult> results = new List<ScsResult>();
|
|
|
|
+ Dictionary<string, Dictionary<string, object>> pushDatas = new Dictionary<string, Dictionary<string, object>>();
|
|
int pages = (trains.Count + 19) / 20; //pages = (total + max -1) / max;
|
|
int pages = (trains.Count + 19) / 20; //pages = (total + max -1) / max;
|
|
for (int i = 0; i < pages; i++) {
|
|
for (int i = 0; i < pages; i++) {
|
|
List<TeacherTrain> lists = trains.Skip((i) * 20).Take(20).ToList();
|
|
List<TeacherTrain> lists = trains.Skip((i) * 20).Take(20).ToList();
|
|
@@ -600,13 +601,16 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
parameterContent53122.Add("TrainComID", config.trainComID);
|
|
parameterContent53122.Add("TrainComID", config.trainComID);
|
|
parameterContent53122.Add("List", list53122);
|
|
parameterContent53122.Add("List", list53122);
|
|
//装载数据
|
|
//装载数据
|
|
|
|
+
|
|
foreach (var x in lists) {
|
|
foreach (var x in lists) {
|
|
List<KeyValuePair<string, string>> msgs = new List<KeyValuePair<string, string>>();
|
|
List<KeyValuePair<string, string>> msgs = new List<KeyValuePair<string, string>>();
|
|
- List<ScTeacher> teacher = scTeachers.FindAll(t => t.tmdid.Equals(x.id));
|
|
|
|
|
|
+ List<ScTeacher> teacher = scTeachers.FindAll(t => !string.IsNullOrWhiteSpace(t.tmdid) && t.tmdid.Equals(x.id));
|
|
foreach (var t in teacher)
|
|
foreach (var t in teacher)
|
|
{
|
|
{
|
|
- ScTeacherDiagnosis diagnosis = scTeacherDiagnoses.Find(x => x.RowKey.Equals(t.PXID));
|
|
|
|
-
|
|
|
|
|
|
+ List<PushFail> fails = new List<PushFail>();
|
|
|
|
+ Dictionary<string,object> pushData = new Dictionary<string, object>();
|
|
|
|
+ string json = scTeacherDiagnoses.ToJsonString();
|
|
|
|
+ ScTeacherDiagnosis diagnosis = scTeacherDiagnoses.Find(x => x.RowKey.Equals($"{t.PXID}"));
|
|
(int t53112OK, List<KeyValuePair<string, string>> msgs53112) = check53112(x, msgs);
|
|
(int t53112OK, List<KeyValuePair<string, string>> msgs53112) = check53112(x, msgs);
|
|
(int t53113OK, List<KeyValuePair<string, string>> msgs53113, List<AbilitySub> abilitySubs) = await check53113(x, diagnosis, msgs);
|
|
(int t53113OK, List<KeyValuePair<string, string>> msgs53113, List<AbilitySub> abilitySubs) = await check53113(x, diagnosis, msgs);
|
|
(int t53117OK, List<KeyValuePair<string, string>> msgs53117) = check53117(x, msgs);
|
|
(int t53117OK, List<KeyValuePair<string, string>> msgs53117) = check53117(x, msgs);
|
|
@@ -648,15 +652,18 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
parameterMapData.Add("ComPassed", ComPassed);//0、未认定 1、合格 2、优秀 3、不合格 4、其他
|
|
parameterMapData.Add("ComPassed", ComPassed);//0、未认定 1、合格 2、优秀 3、不合格 4、其他
|
|
|
|
+ pushData.Add("success-UpdateTeacherListSituation", parameterMapData);
|
|
list53112.Add(parameterMapData);
|
|
list53112.Add(parameterMapData);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
|
|
+ pushData.Add("fail-UpdateTeacherListSituation", new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53112 });
|
|
fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53112 });
|
|
fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53112 });
|
|
}
|
|
}
|
|
//5.3.1.13学员能力点测评结果批量回写-UpdateTeacherListDiagnosis
|
|
//5.3.1.13学员能力点测评结果批量回写-UpdateTeacherListDiagnosis
|
|
if (t53113OK == 1)
|
|
if (t53113OK == 1)
|
|
{
|
|
{
|
|
|
|
+ List<Dictionary<string, object>> parameterMapDatas = new List<Dictionary<string, object>>();
|
|
x.currency.teacherAilities.ForEach(a => {
|
|
x.currency.teacherAilities.ForEach(a => {
|
|
Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
parameterMapData.Add("PXID", $"{t.PXID}");
|
|
parameterMapData.Add("PXID", $"{t.PXID}");
|
|
@@ -744,15 +751,20 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
});
|
|
});
|
|
}
|
|
}
|
|
list53113.Add(parameterMapData);
|
|
list53113.Add(parameterMapData);
|
|
|
|
+ parameterMapDatas.Add(parameterMapData);
|
|
});
|
|
});
|
|
|
|
+ pushData.Add("success-UpdateTeacherListDiagnosis", parameterMapDatas);
|
|
|
|
+
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
|
|
+ pushData.Add("fail-UpdateTeacherListDiagnosis", new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53113 });
|
|
fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53113 });
|
|
fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53113 });
|
|
}
|
|
}
|
|
//5.3.1.17学员课堂实录批量回写-UploadKTSLList
|
|
//5.3.1.17学员课堂实录批量回写-UploadKTSLList
|
|
if (t53117OK == 1)
|
|
if (t53117OK == 1)
|
|
{
|
|
{
|
|
|
|
+ List<Dictionary<string, object>> parameterMapDatas = new List<Dictionary<string, object>>();
|
|
x.teacherClasses.ForEach(clss =>
|
|
x.teacherClasses.ForEach(clss =>
|
|
{
|
|
{
|
|
Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
@@ -766,10 +778,13 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
string fileext = clss.url.Substring(clss.url.LastIndexOf(".") > 0 ? clss.url.LastIndexOf(".") + 1 : 0);
|
|
string fileext = clss.url.Substring(clss.url.LastIndexOf(".") > 0 ? clss.url.LastIndexOf(".") + 1 : 0);
|
|
parameterMapData.Add("fileType", fileext);
|
|
parameterMapData.Add("fileType", fileext);
|
|
list53117.Add(parameterMapData);
|
|
list53117.Add(parameterMapData);
|
|
|
|
+ parameterMapDatas.Add(parameterMapData);
|
|
});
|
|
});
|
|
|
|
+ pushData.Add("success-UploadKTSLList", parameterMapDatas);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
|
|
+ pushData.Add("fail-UploadKTSLList", new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53117 });
|
|
fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53117 });
|
|
fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53117 });
|
|
}
|
|
}
|
|
//5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2
|
|
//5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2
|
|
@@ -780,43 +795,51 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
parameterMapData.Add("TID", $"{t.TID}");
|
|
parameterMapData.Add("TID", $"{t.TID}");
|
|
List<Dictionary<string, object>> files = new List<Dictionary<string, object>>();
|
|
List<Dictionary<string, object>> files = new List<Dictionary<string, object>>();
|
|
x.offlineRecords.ForEach(record => {
|
|
x.offlineRecords.ForEach(record => {
|
|
- Dictionary<string, object> fileMap = new Dictionary<string, object>();
|
|
|
|
- fileMap.Add("url", record.url);
|
|
|
|
- fileMap.Add("fileName", record.name);
|
|
|
|
- fileMap.Add("fileSize", record.size);
|
|
|
|
- fileMap.Add("md5", record.hash);
|
|
|
|
- string fileext = record.url.Substring(record.url.LastIndexOf(".") > 0 ? record.url.LastIndexOf(".") + 1 : 0);
|
|
|
|
- fileMap.Add("fileType", fileext);
|
|
|
|
- files.Add(fileMap);
|
|
|
|
|
|
+ if (!string.IsNullOrWhiteSpace(record.url)) {
|
|
|
|
+ Dictionary<string, object> fileMap = new Dictionary<string, object>();
|
|
|
|
+ fileMap.Add("url", record.url);
|
|
|
|
+ fileMap.Add("fileName", record.name);
|
|
|
|
+ fileMap.Add("fileSize", record.size);
|
|
|
|
+ fileMap.Add("md5", record.hash);
|
|
|
|
+ string fileext = record.url.Substring(record.url.LastIndexOf(".") > 0 ? record.url.LastIndexOf(".") + 1 : 0);
|
|
|
|
+ fileMap.Add("fileType", fileext);
|
|
|
|
+ files.Add(fileMap);
|
|
|
|
+ }
|
|
});
|
|
});
|
|
parameterMapData.Add("files", files);
|
|
parameterMapData.Add("files", files);
|
|
list53122.Add(parameterMapData);
|
|
list53122.Add(parameterMapData);
|
|
|
|
+ pushData.Add("success-UploadSBTARPDFListV2", parameterMapData);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
|
|
+ pushData.Add("fail-UploadSBTARPDFListV2", new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53122 });
|
|
fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53122 });
|
|
fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53122 });
|
|
}
|
|
}
|
|
|
|
+ pushDatas.Add(t.tmdid,pushData);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//推送数据
|
|
//推送数据
|
|
- UpdateTeacherListSituation = await _thirdApisService.Post(config.url, Code, config.passKey, config.privateKey, parameterContent53112);
|
|
|
|
|
|
+ UpdateTeacherListSituation = await _thirdApisService.Post(config.url, "UpdateTeacherListSituation", config.passKey, config.privateKey, parameterContent53112);
|
|
UpdateTeacherListSituation.code = "UpdateTeacherListSituation";
|
|
UpdateTeacherListSituation.code = "UpdateTeacherListSituation";
|
|
UpdateTeacherListSituation.title = "5.3.1.12学员培训基本情况批量回写";
|
|
UpdateTeacherListSituation.title = "5.3.1.12学员培训基本情况批量回写";
|
|
|
|
|
|
- UpdateTeacherListDiagnosis = await _thirdApisService.Post(config.url, Code, config.passKey, config.privateKey, parameterContent53113);
|
|
|
|
|
|
+ UpdateTeacherListDiagnosis = await _thirdApisService.Post(config.url, "UpdateTeacherListDiagnosis", config.passKey, config.privateKey, parameterContent53113);
|
|
UpdateTeacherListDiagnosis.code = "UpdateTeacherListDiagnosis";
|
|
UpdateTeacherListDiagnosis.code = "UpdateTeacherListDiagnosis";
|
|
UpdateTeacherListDiagnosis.title = "5.3.1.13学员能力点测评结果批量回写";
|
|
UpdateTeacherListDiagnosis.title = "5.3.1.13学员能力点测评结果批量回写";
|
|
|
|
|
|
- UploadKTSLList = await _thirdApisService.Post(config.url, Code, config.passKey, config.privateKey, parameterContent53117);
|
|
|
|
|
|
+ UploadKTSLList = await _thirdApisService.Post(config.url, "UploadKTSLList", config.passKey, config.privateKey, parameterContent53117);
|
|
UploadKTSLList.code = "UploadKTSLList";
|
|
UploadKTSLList.code = "UploadKTSLList";
|
|
UploadKTSLList.title = "5.3.1.17学员课堂实录批量回写";
|
|
UploadKTSLList.title = "5.3.1.17学员课堂实录批量回写";
|
|
|
|
|
|
- UploadSBTARPDFListV2 = await _thirdApisService.Post(config.url, Code, config.passKey, config.privateKey, parameterContent53122);
|
|
|
|
|
|
+ UploadSBTARPDFListV2 = await _thirdApisService.Post(config.url, "UploadSBTARPDFListV2", config.passKey, config.privateKey, parameterContent53122);
|
|
UploadSBTARPDFListV2.code = "UploadSBTARPDFListV2";
|
|
UploadSBTARPDFListV2.code = "UploadSBTARPDFListV2";
|
|
UploadSBTARPDFListV2.title = "5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写";
|
|
UploadSBTARPDFListV2.title = "5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写";
|
|
-
|
|
|
|
|
|
+ results.Add(UpdateTeacherListSituation);
|
|
|
|
+ results.Add(UpdateTeacherListDiagnosis);
|
|
|
|
+ results.Add(UploadKTSLList);
|
|
|
|
+ results.Add(UploadSBTARPDFListV2);
|
|
}
|
|
}
|
|
- await response.WriteAsJsonAsync(new { });
|
|
|
|
|
|
+ await response.WriteAsJsonAsync(new { data= new { results, pushDatas } });
|
|
return response;
|
|
return response;
|
|
}
|
|
}
|
|
//5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2
|
|
//5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2
|
|
@@ -826,15 +849,20 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
{
|
|
{
|
|
msgs.Add(new KeyValuePair<string, string>("offlineRecord-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", $"文件大小"));
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ var hasUrl= teacherTrain.offlineRecords.Where(x => !string.IsNullOrWhiteSpace(x.url) && x.size > 0);
|
|
|
|
+ if (!hasUrl.Any()) {
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("offlineRecord-url", $"需要上传的校本研修作业至少有一个。"));
|
|
|
|
+ }
|
|
|
|
+ //不需要检查每一个校本研修的文件记录。
|
|
|
|
+ //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);
|
|
return (t53122OK, msgs);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -871,10 +899,17 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
msgs.Add(new KeyValuePair<string, string>("finalScore", $"最终评定结果参数:{teacherTrain.finalScore}"));
|
|
msgs.Add(new KeyValuePair<string, string>("finalScore", $"最终评定结果参数:{teacherTrain.finalScore}"));
|
|
t53112OK = 0;
|
|
t53112OK = 0;
|
|
}
|
|
}
|
|
- if (string.IsNullOrEmpty(teacherTrain.summary) || teacherTrain.summary.Length > 300)
|
|
|
|
|
|
+ //if (string.IsNullOrEmpty(teacherTrain.summary) || teacherTrain.summary.Length > 300)
|
|
|
|
+ //{
|
|
|
|
+ // string msg = string.IsNullOrEmpty(teacherTrain.summary) ? "未填写" : teacherTrain.summary.Length > 300 ? "字数超过300." : "";
|
|
|
|
+ // msgs.Add(new KeyValuePair<string, string>("summary", $"教师培训总结:{msg}"));
|
|
|
|
+ // t53112OK = 0;
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ if (!string.IsNullOrEmpty(teacherTrain.summary) && teacherTrain.summary.Length > 300)
|
|
{
|
|
{
|
|
- string msg = string.IsNullOrEmpty(teacherTrain.summary) ? "未填写" : teacherTrain.summary.Length > 300 ? "字数超过300." : "";
|
|
|
|
- msgs.Add(new KeyValuePair<string, string>("summary", $"教师培训总结:{msg}"));
|
|
|
|
|
|
+ //string msg = string.IsNullOrEmpty(teacherTrain.summary) ? "未填写" : teacherTrain.summary.Length > 300 ? "字数超过300." : "";
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("summary", $"教师培训总结:字数超过300."));
|
|
t53112OK = 0;
|
|
t53112OK = 0;
|
|
}
|
|
}
|
|
if (teacherTrain.totalTime <= 0)
|
|
if (teacherTrain.totalTime <= 0)
|
|
@@ -900,48 +935,82 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
msgs.Add(new KeyValuePair<string, string>("submitTime", $"认证材料学习:{teacherTrain.currency.submitTime}"));
|
|
msgs.Add(new KeyValuePair<string, string>("submitTime", $"认证材料学习:{teacherTrain.currency.submitTime}"));
|
|
t53113OK = 0;
|
|
t53113OK = 0;
|
|
}
|
|
}
|
|
- if (teacherTrain.currency.teacherAilities.Count <= 0 || teacherTrain.currency.teacherAilities.Select(x=>x.no).Count()<=0)
|
|
|
|
|
|
+ if (teacherTrain.currency.teacherAilities.Count <= 0 )
|
|
{
|
|
{
|
|
- msgs.Add(new KeyValuePair<string, string>("teacherAilities", $"能力点不匹配:{teacherTrain.currency.submitTime}"));
|
|
|
|
|
|
+
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("teacherAilities", $"已学习能力点:0"));
|
|
t53113OK = 0;
|
|
t53113OK = 0;
|
|
}
|
|
}
|
|
- if (teacherTrain.currency.teacherAilities.Count <= 0 || teacherTrain.currency.teacherAilities.Select(x => x.no).Count() <= 0)
|
|
|
|
|
|
+ if (diagnosis != null)
|
|
{
|
|
{
|
|
-
|
|
|
|
- string insql = "";
|
|
|
|
- if (teacherTrain.currency.teacherAilities.IsNotEmpty())
|
|
|
|
- {
|
|
|
|
- IEnumerable<string> ds= diagnosis.abilityNos.ToObject<List<string>>().Except(teacherTrain.currency.teacherAilities.Select(x => x.no));
|
|
|
|
- if (ds != null && ds.Count() > 0) {
|
|
|
|
- msgs.Add(new KeyValuePair<string, string>("diagnosisNos", $"省平台勾选的能力点编号为学习完成:省平台:{diagnosis.abilityNos},已学习:{teacherTrain.currency.teacherAilities.Select(x => x.no).ToJsonString()}"));
|
|
|
|
- }
|
|
|
|
- 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}") }))
|
|
|
|
|
|
+ if (!string.IsNullOrWhiteSpace(diagnosis.abilityNos))
|
|
{
|
|
{
|
|
- abilitySubs.Add(item);
|
|
|
|
- }
|
|
|
|
- teacherTrain.currency.teacherAilities.ForEach(x => {
|
|
|
|
- var abilitySub= abilitySubs.Find(z => z.id.Equals(x.id));
|
|
|
|
- if (abilitySub == null || abilitySub.uploads.IsNotEmpty()) {
|
|
|
|
- msgs.Add(new KeyValuePair<string, string>("uploads", $"未上传认证材料:{x.no},{x.name}"));
|
|
|
|
- }
|
|
|
|
- if (x.zpscore <= 0) {
|
|
|
|
- msgs.Add(new KeyValuePair<string, string>("zpscore", $"认证材料,没有完成自评:{x.no},{x.name},{x.zpscore}"));
|
|
|
|
- }
|
|
|
|
- if (x.hpscore <= 0)
|
|
|
|
|
|
+ List<string> nos = diagnosis.abilityNos.ToObject<List<string>>();
|
|
|
|
+ if (nos.Count > 0 && teacherTrain.currency.teacherAilities.Count > 0)
|
|
{
|
|
{
|
|
- msgs.Add(new KeyValuePair<string, string>("hpscore", $"认证材料,没有完成互评:{x.no},{x.name},{x.hpscore}"));
|
|
|
|
|
|
+ var notin = nos.Except(teacherTrain.currency.teacherAilities.Select(x => x.no).Where(z=>!string.IsNullOrWhiteSpace(z)));
|
|
|
|
+ if (notin.Any())
|
|
|
|
+ {
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("diagnosisNos", $"省平台勾选的能力点编号为学习完成:省平台:{string.Join(",", nos.OrderBy(x => x))}" + $" ,已学习:{string.Join(",", teacherTrain.currency.teacherAilities.Select(x => x.no).OrderBy(x=>x))} "));
|
|
|
|
+ t53113OK = 0;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ string insql = "";
|
|
|
|
+ if (teacherTrain.currency.teacherAilities.IsNotEmpty())
|
|
|
|
+ {
|
|
|
|
+ var abilites= teacherTrain.currency.teacherAilities.Where(c => !string.IsNullOrWhiteSpace(c.no) && nos.Contains(c.no));
|
|
|
|
+ insql = $" where c.id in ({string.Join(",", abilites.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));
|
|
|
|
+ if (abilitySub == null || !abilitySub.uploads.Any())
|
|
|
|
+ {
|
|
|
|
+ t53113OK = 0;
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("uploads", $"未上传认证材料:{x.no},{x.name}"));
|
|
|
|
+ }
|
|
|
|
+ if (x.zpscore <= 0)
|
|
|
|
+ {
|
|
|
|
+ t53113OK = 0;
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("zpscore", $"认证材料,没有完成自评:{x.no},{x.name},{x.zpscore}"));
|
|
|
|
+ }
|
|
|
|
+ if (x.hpscore <= 0)
|
|
|
|
+ {
|
|
|
|
+ t53113OK = 0;
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("hpscore", $"认证材料,没有完成互评:{x.no},{x.name},{x.hpscore}"));
|
|
|
|
+ }
|
|
|
|
+ if (x.xzscore <= 0)
|
|
|
|
+ {
|
|
|
|
+ t53113OK = 0;
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("xzscore", $"认证材料,没有完成小组评:{x.no},{x.name},{x.xzscore}"));
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ if (t53113OK != 1) {
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("diagnosisNos", $"省平台勾选的能力点编号为学习完成:省平台:{string.Join(",", nos.OrderBy(x=>x))}" + $" ,已学习:{string.Join(",", teacherTrain.currency.teacherAilities.Select(x => x.no).OrderBy(x => x))} "));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- if (x.xzscore <= 0)
|
|
|
|
- {
|
|
|
|
- msgs.Add(new KeyValuePair<string, string>("xzscore", $"认证材料,没有完成小组评:{x.no},{x.name},{x.xzscore}"));
|
|
|
|
|
|
+ else {
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("teacherAilities", $"未同步省平台挑选的能力点"));
|
|
|
|
+ t53113OK = 0;
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("teacherAilities", $"未同步省平台挑选的能力点"));
|
|
|
|
+ t53113OK = 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ msgs.Add(new KeyValuePair<string, string>("teacherAilities", $"未同步省平台挑选的能力点"));
|
|
t53113OK = 0;
|
|
t53113OK = 0;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
return (t53113OK, msgs, abilitySubs);
|
|
return (t53113OK, msgs, abilitySubs);
|
|
}
|
|
}
|
|
}
|
|
}
|