|
@@ -604,7 +604,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
//装载数据
|
|
|
|
|
|
foreach (var x in lists) {
|
|
|
- List<KeyValuePair<string, string>> msgs = new List<KeyValuePair<string, string>>();
|
|
|
+ List<CodeValue> msgs = new List<CodeValue>();
|
|
|
List<ScTeacher> teacher = scTeachers.FindAll(t => !string.IsNullOrWhiteSpace(t.tmdid) && t.tmdid.Equals(x.id));
|
|
|
foreach (var t in teacher)
|
|
|
{
|
|
@@ -612,10 +612,10 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
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 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 t53122OK, List<KeyValuePair<string, string>> msgs53122) = check53122(x, msgs);
|
|
|
+ (int t53112OK, List<CodeValue> msgs53112) = check53112(x, msgs);
|
|
|
+ (int t53113OK, List<CodeValue> msgs53113, List<AbilitySub> abilitySubs) = await check53113(x, diagnosis, msgs);
|
|
|
+ (int t53117OK, List<CodeValue> msgs53117) = check53117(x, msgs);
|
|
|
+ (int t53122OK, List<CodeValue> msgs53122) = check53122(x, msgs);
|
|
|
|
|
|
//5.3.1.12学员培训基本情况批量回写-UpdateTeacherListSituation
|
|
|
if (t53112OK == 1)
|
|
@@ -844,102 +844,102 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
return response;
|
|
|
}
|
|
|
//5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2
|
|
|
- public (int t53122OK, List<KeyValuePair<string, string>> msgs) check53122(TeacherTrain teacherTrain, List<KeyValuePair<string, string>> msgs) {
|
|
|
+ public (int t53122OK, List<CodeValue> msgs) check53122(TeacherTrain teacherTrain, List<CodeValue> msgs) {
|
|
|
int t53122OK = 1;
|
|
|
if (teacherTrain.offlineRecords.Count<= 0)
|
|
|
{
|
|
|
- msgs.Add(new KeyValuePair<string, string>("offlineRecord-count", $"文件个数为0"));
|
|
|
+ msgs.Add(new CodeValue("offlineRecord-count", $"文件个数为0"));
|
|
|
}
|
|
|
var hasUrl= teacherTrain.offlineRecords.Where(x => !string.IsNullOrWhiteSpace(x.url) && x.size > 0);
|
|
|
if (!hasUrl.Any()) {
|
|
|
- msgs.Add(new KeyValuePair<string, string>("offlineRecord-url", $"需要上传的校本研修作业至少有一个。"));
|
|
|
+ msgs.Add(new CodeValue("offlineRecord-url", $"需要上传的校本研修作业至少有一个。"));
|
|
|
}
|
|
|
//不需要检查每一个校本研修的文件记录。
|
|
|
//teacherTrain.offlineRecords.ForEach(x => {
|
|
|
// if (string.IsNullOrEmpty(x.url)) {
|
|
|
- // msgs.Add(new KeyValuePair<string, string>("offlineRecord-url", $"链接为空"));
|
|
|
+ // msgs.Add(new CodeValue("offlineRecord-url", $"链接为空"));
|
|
|
// }
|
|
|
// if (x.size<=0)
|
|
|
// {
|
|
|
- // msgs.Add(new KeyValuePair<string, string>("offlineRecord-size", $"文件大小"));
|
|
|
+ // msgs.Add(new CodeValue("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) {
|
|
|
+ public (int t53117OK, List<CodeValue> msgs) check53117(TeacherTrain teacherTrain, List<CodeValue> msgs) {
|
|
|
//校验 基本情况是否满足
|
|
|
int t53117OK = 1;
|
|
|
if (teacherTrain.classTime <= 0)
|
|
|
{
|
|
|
- msgs.Add(new KeyValuePair<string, string>("classTime", $"未获得学时:{teacherTrain.classTime}"));
|
|
|
+ msgs.Add(new CodeValue("classTime", $"未获得学时:{teacherTrain.classTime}"));
|
|
|
t53117OK = 0;
|
|
|
}
|
|
|
if (teacherTrain.teacherClasses.Count() <= 0) {
|
|
|
- msgs.Add(new KeyValuePair<string, string>("teacherClasses", $"未上传课堂实录:{teacherTrain.teacherClasses.Count()}个视频"));
|
|
|
+ msgs.Add(new CodeValue("teacherClasses", $"未上传课堂实录:{teacherTrain.teacherClasses.Count()}个视频"));
|
|
|
t53117OK = 0;
|
|
|
}
|
|
|
|
|
|
teacherTrain.teacherClasses.ForEach(x =>{
|
|
|
if (string.IsNullOrWhiteSpace(x.url)) {
|
|
|
t53117OK = 0;
|
|
|
- msgs.Add(new KeyValuePair<string, string>("teacherClasses", $"课堂实录链接无效"));
|
|
|
+ msgs.Add(new CodeValue("teacherClasses", $"课堂实录链接无效"));
|
|
|
}
|
|
|
});
|
|
|
return (t53117OK, msgs);
|
|
|
}
|
|
|
//5.3.1.12学员培训基本情况批量回写-UpdateTeacherListSituation
|
|
|
- public (int t53112OK, List<KeyValuePair<string, string>> msgs) check53112(TeacherTrain teacherTrain, List<KeyValuePair<string, string>> msgs)
|
|
|
+ public (int t53112OK, List<CodeValue> msgs) check53112(TeacherTrain teacherTrain, List<CodeValue> msgs)
|
|
|
{
|
|
|
//校验 基本情况是否满足
|
|
|
int t53112OK = 1;
|
|
|
if (teacherTrain.finalScore < 0)
|
|
|
{
|
|
|
//总体认定结果0、未认定 1、合格 2、优秀 3、不合格 4、其他
|
|
|
- msgs.Add(new KeyValuePair<string, string>("finalScore", $"最终评定结果参数:{teacherTrain.finalScore}"));
|
|
|
+ msgs.Add(new CodeValue("finalScore", $"最终评定结果参数:{teacherTrain.finalScore}"));
|
|
|
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}"));
|
|
|
+ // msgs.Add(new CodeValue("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", $"教师培训总结:字数超过300."));
|
|
|
+ msgs.Add(new CodeValue("summary", $"教师培训总结:字数超过300."));
|
|
|
t53112OK = 0;
|
|
|
}
|
|
|
if (teacherTrain.totalTime <= 0)
|
|
|
{
|
|
|
- msgs.Add(new KeyValuePair<string, string>("totalTime", $"未获得学时:{teacherTrain.totalTime}"));
|
|
|
+ msgs.Add(new CodeValue("totalTime", $"未获得学时:{teacherTrain.totalTime}"));
|
|
|
t53112OK = 0;
|
|
|
}
|
|
|
return (t53112OK, msgs);
|
|
|
}
|
|
|
//5.3.1.13学员能力点测评结果批量回写-UpdateTeacherListDiagnosis
|
|
|
- public async Task<(int t53113OK, List<KeyValuePair<string, string>> msgs, List<AbilitySub> abilitySubs)> check53113(TeacherTrain teacherTrain, ScTeacherDiagnosis diagnosis, List<KeyValuePair<string, string>> msgs)
|
|
|
+ public async Task<(int t53113OK, List<CodeValue> msgs, List<AbilitySub> abilitySubs)> check53113(TeacherTrain teacherTrain, ScTeacherDiagnosis diagnosis, List<CodeValue> msgs)
|
|
|
{
|
|
|
//校验 基本情况是否满足
|
|
|
int t53113OK = 1;
|
|
|
List<AbilitySub> abilitySubs = new List<AbilitySub>();
|
|
|
if (teacherTrain.currency.videoTime < 0)
|
|
|
{
|
|
|
- msgs.Add(new KeyValuePair<string, string>("videoTime", $"视频学习时长:{teacherTrain.currency.videoTime}"));
|
|
|
+ msgs.Add(new CodeValue("videoTime", $"视频学习时长:{teacherTrain.currency.videoTime}"));
|
|
|
t53113OK = 0;
|
|
|
}
|
|
|
if (teacherTrain.currency.submitTime < 0)
|
|
|
{
|
|
|
- msgs.Add(new KeyValuePair<string, string>("submitTime", $"认证材料学习:{teacherTrain.currency.submitTime}"));
|
|
|
+ msgs.Add(new CodeValue("submitTime", $"认证材料学习:{teacherTrain.currency.submitTime}"));
|
|
|
t53113OK = 0;
|
|
|
}
|
|
|
if (teacherTrain.currency.teacherAilities.Count <= 0 )
|
|
|
{
|
|
|
|
|
|
- msgs.Add(new KeyValuePair<string, string>("teacherAilities", $"已学习能力点:0"));
|
|
|
+ msgs.Add(new CodeValue("teacherAilities", $"已学习能力点:0"));
|
|
|
t53113OK = 0;
|
|
|
}
|
|
|
if (diagnosis != null)
|
|
@@ -952,7 +952,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
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))} "));
|
|
|
+ msgs.Add(new CodeValue("diagnosisNos", $"省平台勾选的能力点编号为学习完成:省平台:{string.Join(",", nos.OrderBy(x => x))}" + $" ,已学习:{string.Join(",", teacherTrain.currency.teacherAilities.Select(x => x.no).OrderBy(x=>x))} "));
|
|
|
t53113OK = 0;
|
|
|
}
|
|
|
else {
|
|
@@ -973,41 +973,41 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
if (abilitySub == null || !abilitySub.uploads.Any())
|
|
|
{
|
|
|
t53113OK = 0;
|
|
|
- msgs.Add(new KeyValuePair<string, string>("uploads", $"未上传认证材料:{x.no},{x.name}"));
|
|
|
+ msgs.Add(new CodeValue("uploads", $"未上传认证材料:{x.no},{x.name}"));
|
|
|
}
|
|
|
if (x.zpscore <= 0)
|
|
|
{
|
|
|
t53113OK = 0;
|
|
|
- msgs.Add(new KeyValuePair<string, string>("zpscore", $"认证材料,没有完成自评:{x.no},{x.name},{x.zpscore}"));
|
|
|
+ msgs.Add(new CodeValue("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}"));
|
|
|
+ msgs.Add(new CodeValue("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}"));
|
|
|
+ msgs.Add(new CodeValue("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))} "));
|
|
|
+ msgs.Add(new CodeValue("diagnosisNos", $"省平台勾选的能力点编号为学习完成:省平台:{string.Join(",", nos.OrderBy(x=>x))}" + $" ,已学习:{string.Join(",", teacherTrain.currency.teacherAilities.Select(x => x.no).OrderBy(x => x))} "));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- msgs.Add(new KeyValuePair<string, string>("teacherAilities", $"未同步省平台挑选的能力点"));
|
|
|
+ msgs.Add(new CodeValue("teacherAilities", $"未同步省平台挑选的能力点"));
|
|
|
t53113OK = 0;
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- msgs.Add(new KeyValuePair<string, string>("teacherAilities", $"未同步省平台挑选的能力点"));
|
|
|
+ msgs.Add(new CodeValue("teacherAilities", $"未同步省平台挑选的能力点"));
|
|
|
t53113OK = 0;
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- msgs.Add(new KeyValuePair<string, string>("teacherAilities", $"未同步省平台挑选的能力点"));
|
|
|
+ msgs.Add(new CodeValue("teacherAilities", $"未同步省平台挑选的能力点"));
|
|
|
t53113OK = 0;
|
|
|
}
|
|
|
|