|
@@ -480,6 +480,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
JsonElement accessConfig = data.ToObject<JsonElement>().GetProperty("accessConfig");
|
|
JsonElement accessConfig = data.ToObject<JsonElement>().GetProperty("accessConfig");
|
|
ScAccessConfig config = $"{accessConfig}".ToObject<ScAccessConfig>();
|
|
ScAccessConfig config = $"{accessConfig}".ToObject<ScAccessConfig>();
|
|
JsonElement school = data.ToObject<JsonElement>().GetProperty("school");
|
|
JsonElement school = data.ToObject<JsonElement>().GetProperty("school");
|
|
|
|
+ List<string> pushTeachers = data.ToObject<JsonElement>().GetProperty("pushTeachers").ToObject<List<string>>();
|
|
StringBuilder queryText = new StringBuilder($"SELECT distinct value(c) FROM c where c.type='yxtrain'");
|
|
StringBuilder queryText = new StringBuilder($"SELECT distinct value(c) FROM c where c.type='yxtrain'");
|
|
List<GroupList> yxtrain = new List<GroupList>();
|
|
List<GroupList> yxtrain = new List<GroupList>();
|
|
await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<GroupList>(queryText: queryText.ToString(),
|
|
await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<GroupList>(queryText: queryText.ToString(),
|
|
@@ -489,6 +490,10 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
}
|
|
}
|
|
List<TeacherTrain> trains = new List<TeacherTrain>();
|
|
List<TeacherTrain> trains = new List<TeacherTrain>();
|
|
var members = yxtrain.SelectMany(x => x.members).ToList();
|
|
var members = yxtrain.SelectMany(x => x.members).ToList();
|
|
|
|
+ //指定推送一部分的教师
|
|
|
|
+ if (pushTeachers.IsNotEmpty()) {
|
|
|
|
+ members= members.FindAll(x => pushTeachers.Contains(x.id));
|
|
|
|
+ }
|
|
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 " +
|
|
@@ -510,222 +515,260 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
|
|
|
List<ScTeacher> scTeachers= await _azureStorage.FindListByDict<ScTeacher>(new Dictionary<string, object> { { "PartitionKey", "ScTeacher" },{ "schoolCode",$"{school}" } });
|
|
List<ScTeacher> scTeachers= await _azureStorage.FindListByDict<ScTeacher>(new Dictionary<string, object> { { "PartitionKey", "ScTeacher" },{ "schoolCode",$"{school}" } });
|
|
List<ScTeacherDiagnosis> scTeacherDiagnoses = await _azureStorage.FindListByDict<ScTeacherDiagnosis>(new Dictionary<string, object> { { "PartitionKey", "ScTeacherDiagnosis" }, { "schoolCode", $"{school}" } });
|
|
List<ScTeacherDiagnosis> scTeacherDiagnoses = await _azureStorage.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<PushFail> fails = new List<PushFail>();
|
|
- //5.3.1.12学员培训基本情况批量回写-UpdateTeacherListSituation
|
|
|
|
- List<TeacherTrain> trains53112OK = new List<TeacherTrain>();
|
|
|
|
- ScsResult UpdateTeacherListSituation = null;
|
|
|
|
- Dictionary<string, object> parameterContent53112 = new Dictionary<string, object>();
|
|
|
|
- List<Dictionary<string, object>> list53112 = new List<Dictionary<string, object>>();
|
|
|
|
- parameterContent53112.Add("TrainComID", config.trainComID);
|
|
|
|
- parameterContent53112.Add("List", list53112);
|
|
|
|
-
|
|
|
|
- //5.3.1.13学员能力点测评结果批量回写-UpdateTeacherListDiagnosis 300条限制
|
|
|
|
- List<TeacherTrain> trains53113OK = new List<TeacherTrain>();
|
|
|
|
- ScsResult UpdateTeacherListDiagnosis = null;
|
|
|
|
- Dictionary<string, object> parameterContent53113 = new Dictionary<string, object>();
|
|
|
|
- List<Dictionary<string, object>> list53113 = new List<Dictionary<string, object>>();
|
|
|
|
- parameterContent53113.Add("TrainComID", config.trainComID);
|
|
|
|
- parameterContent53113.Add("List", list53113);
|
|
|
|
|
|
+
|
|
|
|
+ int pages = (trains.Count + 19) / 20; //pages = (total + max -1) / max;
|
|
|
|
+ for (int i = 0; i < pages; i++) {
|
|
|
|
+ List<TeacherTrain> lists = trains.Skip((i) * 20).Take(20).ToList();
|
|
|
|
+ //5.3.1.12学员培训基本情况批量回写-UpdateTeacherListSituation
|
|
|
|
+ List<TeacherTrain> trains53112OK = new List<TeacherTrain>();
|
|
|
|
+ ScsResult UpdateTeacherListSituation = null;
|
|
|
|
+ Dictionary<string, object> parameterContent53112 = new Dictionary<string, object>();
|
|
|
|
+ List<Dictionary<string, object>> list53112 = new List<Dictionary<string, object>>();
|
|
|
|
+ parameterContent53112.Add("TrainComID", config.trainComID);
|
|
|
|
+ parameterContent53112.Add("List", list53112);
|
|
|
|
|
|
- //5.3.1.17学员课堂实录批量回写-UploadKTSLList 300条限制
|
|
|
|
- List<TeacherTrain> trains53117OK = new List<TeacherTrain>();
|
|
|
|
- ScsResult UploadKTSLList = null;
|
|
|
|
- Dictionary<string, object> parameterContent53117 = new Dictionary<string, object>();
|
|
|
|
- List<Dictionary<string, object>> list53117 = new List<Dictionary<string, object>>();
|
|
|
|
- parameterContent53117.Add("TrainComID", config.trainComID);
|
|
|
|
- parameterContent53117.Add("List", list53117);
|
|
|
|
|
|
+ //5.3.1.13学员能力点测评结果批量回写-UpdateTeacherListDiagnosis 300条限制
|
|
|
|
+ List<TeacherTrain> trains53113OK = new List<TeacherTrain>();
|
|
|
|
+ ScsResult UpdateTeacherListDiagnosis = null;
|
|
|
|
+ Dictionary<string, object> parameterContent53113 = new Dictionary<string, object>();
|
|
|
|
+ List<Dictionary<string, object>> list53113 = new List<Dictionary<string, object>>();
|
|
|
|
+ parameterContent53113.Add("TrainComID", config.trainComID);
|
|
|
|
+ parameterContent53113.Add("List", list53113);
|
|
|
|
|
|
- //5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2 100条限制
|
|
|
|
- List<TeacherTrain> trains53122OK = new List<TeacherTrain>();
|
|
|
|
- ScsResult UploadSBTARPDFListV2 = null;
|
|
|
|
- Dictionary<string, object> parameterContent53122 = new Dictionary<string, object>();
|
|
|
|
- List<Dictionary<string, object>> list53122 = new List<Dictionary<string, object>>();
|
|
|
|
- parameterContent53122.Add("TrainComID", config.trainComID);
|
|
|
|
- parameterContent53122.Add("List", list53122);
|
|
|
|
- foreach (var x in trains) {
|
|
|
|
- List<KeyValuePair<string, string>> msgs = new List<KeyValuePair<string, string>>();
|
|
|
|
- List<ScTeacher> teacher = scTeachers.FindAll(t => t.tmdid.Equals(x.id));
|
|
|
|
- foreach (var t in teacher) {
|
|
|
|
- ScTeacherDiagnosis diagnosis = scTeacherDiagnoses.Find(x => x.RowKey.Equals(t.PXID));
|
|
|
|
|
|
+ //5.3.1.17学员课堂实录批量回写-UploadKTSLList 300条限制
|
|
|
|
+ List<TeacherTrain> trains53117OK = new List<TeacherTrain>();
|
|
|
|
+ ScsResult UploadKTSLList = null;
|
|
|
|
+ Dictionary<string, object> parameterContent53117 = new Dictionary<string, object>();
|
|
|
|
+ List<Dictionary<string, object>> list53117 = new List<Dictionary<string, object>>();
|
|
|
|
+ parameterContent53117.Add("TrainComID", config.trainComID);
|
|
|
|
+ parameterContent53117.Add("List", list53117);
|
|
|
|
|
|
- (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);
|
|
|
|
- //5.3.1.12学员培训基本情况批量回写-UpdateTeacherListSituation
|
|
|
|
- if (t53112OK == 1)
|
|
|
|
|
|
+ //5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2 100条限制
|
|
|
|
+ List<TeacherTrain> trains53122OK = new List<TeacherTrain>();
|
|
|
|
+ ScsResult UploadSBTARPDFListV2 = null;
|
|
|
|
+ Dictionary<string, object> parameterContent53122 = new Dictionary<string, object>();
|
|
|
|
+ List<Dictionary<string, object>> list53122 = new List<Dictionary<string, object>>();
|
|
|
|
+ parameterContent53122.Add("TrainComID", config.trainComID);
|
|
|
|
+ parameterContent53122.Add("List", list53122);
|
|
|
|
+ //装载数据
|
|
|
|
+ foreach (var x in lists) {
|
|
|
|
+ List<KeyValuePair<string, string>> msgs = new List<KeyValuePair<string, string>>();
|
|
|
|
+ List<ScTeacher> teacher = scTeachers.FindAll(t => t.tmdid.Equals(x.id));
|
|
|
|
+ foreach (var t in teacher)
|
|
{
|
|
{
|
|
- Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
|
- parameterMapData.Add("PXID", $"{t.PXID}");
|
|
|
|
- parameterMapData.Add("TID", $"{t.TID}");
|
|
|
|
- parameterMapData.Add("TeacherName", $"{t.TeacherName}");
|
|
|
|
- parameterMapData.Add("CourseHour", $"{x.totalTime}");
|
|
|
|
- parameterMapData.Add("ResearchText", $"{x.summary}");
|
|
|
|
- /// <summary>
|
|
|
|
- ///省上标准 最终结果 0未认定,1合格,2优秀,3不合格,4其他
|
|
|
|
- ///系统标准 -2 其他 -1 未认定,0不合格,1合格,2优秀
|
|
|
|
- /// </summary>
|
|
|
|
- string ComPassed = "0";
|
|
|
|
- switch (x.finalScore)
|
|
|
|
- {
|
|
|
|
- case -2:
|
|
|
|
- ComPassed = "4";
|
|
|
|
- break;
|
|
|
|
- case -1:
|
|
|
|
- ComPassed = "0";
|
|
|
|
- break;
|
|
|
|
- case 0:
|
|
|
|
- ComPassed = "3";
|
|
|
|
- break;
|
|
|
|
- case 1:
|
|
|
|
- ComPassed = "1";
|
|
|
|
- break;
|
|
|
|
- case 2:
|
|
|
|
- ComPassed = "2";
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- ComPassed = "4";
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- parameterMapData.Add("ComPassed", ComPassed);//0、未认定 1、合格 2、优秀 3、不合格 4、其他
|
|
|
|
- list53112.Add(parameterMapData);
|
|
|
|
|
|
+ ScTeacherDiagnosis diagnosis = scTeacherDiagnoses.Find(x => x.RowKey.Equals(t.PXID));
|
|
|
|
|
|
- }
|
|
|
|
- //5.3.1.13学员能力点测评结果批量回写-UpdateTeacherListDiagnosis
|
|
|
|
- if (t53113OK == 1)
|
|
|
|
- {
|
|
|
|
- x.currency.teacherAilities.ForEach(a => {
|
|
|
|
|
|
+ (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);
|
|
|
|
+
|
|
|
|
+ //5.3.1.12学员培训基本情况批量回写-UpdateTeacherListSituation
|
|
|
|
+ if (t53112OK == 1)
|
|
|
|
+ {
|
|
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}");
|
|
parameterMapData.Add("TID", $"{t.TID}");
|
|
parameterMapData.Add("TID", $"{t.TID}");
|
|
- parameterMapData.Add("DiagnosisNum", $"{a.no}");
|
|
|
|
- //0"未认定", 1"合格", 2"优秀", 3"不合格"
|
|
|
|
- //系统 -1 未认定,0 不合格,1 合格,2 优秀
|
|
|
|
- string zpscore = "0";
|
|
|
|
- switch (a.zpscore)
|
|
|
|
|
|
+ parameterMapData.Add("TeacherName", $"{t.TeacherName}");
|
|
|
|
+ parameterMapData.Add("CourseHour", $"{x.totalTime}");
|
|
|
|
+ parameterMapData.Add("ResearchText", $"{x.summary}");
|
|
|
|
+ /// <summary>
|
|
|
|
+ ///省上标准 最终结果 0未认定,1合格,2优秀,3不合格,4其他
|
|
|
|
+ ///系统标准 -2 其他 -1 未认定,0不合格,1合格,2优秀
|
|
|
|
+ /// </summary>
|
|
|
|
+ string ComPassed = "0";
|
|
|
|
+ switch (x.finalScore)
|
|
{
|
|
{
|
|
- case -1:
|
|
|
|
- zpscore = "0";
|
|
|
|
- break;
|
|
|
|
- case 0:
|
|
|
|
- zpscore = "3";
|
|
|
|
- break;
|
|
|
|
- case 1:
|
|
|
|
- zpscore = "1";
|
|
|
|
- break;
|
|
|
|
- case 2:
|
|
|
|
- zpscore = "2";
|
|
|
|
|
|
+ case -2:
|
|
|
|
+ ComPassed = "4";
|
|
break;
|
|
break;
|
|
- default:
|
|
|
|
- zpscore = "0";
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- string hpscore = "0";
|
|
|
|
- switch (a.hpscore)
|
|
|
|
- {
|
|
|
|
case -1:
|
|
case -1:
|
|
- hpscore = "0";
|
|
|
|
|
|
+ ComPassed = "0";
|
|
break;
|
|
break;
|
|
case 0:
|
|
case 0:
|
|
- hpscore = "3";
|
|
|
|
|
|
+ ComPassed = "3";
|
|
break;
|
|
break;
|
|
case 1:
|
|
case 1:
|
|
- hpscore = "1";
|
|
|
|
|
|
+ ComPassed = "1";
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
- hpscore = "2";
|
|
|
|
|
|
+ ComPassed = "2";
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
- hpscore = "0";
|
|
|
|
|
|
+ ComPassed = "4";
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- string xzpresult = "0";
|
|
|
|
- switch (a.xzscore)
|
|
|
|
- {
|
|
|
|
- case -1:
|
|
|
|
- xzpresult = "0";
|
|
|
|
- break;
|
|
|
|
- case 0:
|
|
|
|
- xzpresult = "3";
|
|
|
|
- break;
|
|
|
|
- case 1:
|
|
|
|
- xzpresult = "1";
|
|
|
|
- break;
|
|
|
|
- case 2:
|
|
|
|
- xzpresult = "2";
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- xzpresult = "0";
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- parameterMapData.Add("zpresult", zpscore);
|
|
|
|
- parameterMapData.Add("hpresult", hpscore);
|
|
|
|
- parameterMapData.Add("xzpresult", xzpresult);
|
|
|
|
- List<Dictionary<string, object>> pfiles = new List<Dictionary<string, object>>();
|
|
|
|
- parameterMapData.Add("pfiles", pfiles);
|
|
|
|
|
|
+ parameterMapData.Add("ComPassed", ComPassed);//0、未认定 1、合格 2、优秀 3、不合格 4、其他
|
|
|
|
+ list53112.Add(parameterMapData);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53112 });
|
|
|
|
+ }
|
|
|
|
+ //5.3.1.13学员能力点测评结果批量回写-UpdateTeacherListDiagnosis
|
|
|
|
+ if (t53113OK == 1)
|
|
|
|
+ {
|
|
|
|
+ x.currency.teacherAilities.ForEach(a => {
|
|
|
|
+ Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
|
+ parameterMapData.Add("PXID", $"{t.PXID}");
|
|
|
|
+ parameterMapData.Add("TID", $"{t.TID}");
|
|
|
|
+ parameterMapData.Add("DiagnosisNum", $"{a.no}");
|
|
|
|
+ //0"未认定", 1"合格", 2"优秀", 3"不合格"
|
|
|
|
+ //系统 -1 未认定,0 不合格,1 合格,2 优秀
|
|
|
|
+ string zpscore = "0";
|
|
|
|
+ switch (a.zpscore)
|
|
|
|
+ {
|
|
|
|
+ case -1:
|
|
|
|
+ zpscore = "0";
|
|
|
|
+ break;
|
|
|
|
+ case 0:
|
|
|
|
+ zpscore = "3";
|
|
|
|
+ break;
|
|
|
|
+ case 1:
|
|
|
|
+ zpscore = "1";
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ zpscore = "2";
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ zpscore = "0";
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ string hpscore = "0";
|
|
|
|
+ switch (a.hpscore)
|
|
|
|
+ {
|
|
|
|
+ case -1:
|
|
|
|
+ hpscore = "0";
|
|
|
|
+ break;
|
|
|
|
+ case 0:
|
|
|
|
+ hpscore = "3";
|
|
|
|
+ break;
|
|
|
|
+ case 1:
|
|
|
|
+ hpscore = "1";
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ hpscore = "2";
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ hpscore = "0";
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ string xzpresult = "0";
|
|
|
|
+ switch (a.xzscore)
|
|
|
|
+ {
|
|
|
|
+ case -1:
|
|
|
|
+ xzpresult = "0";
|
|
|
|
+ break;
|
|
|
|
+ case 0:
|
|
|
|
+ xzpresult = "3";
|
|
|
|
+ break;
|
|
|
|
+ case 1:
|
|
|
|
+ xzpresult = "1";
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ xzpresult = "2";
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ xzpresult = "0";
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ parameterMapData.Add("zpresult", zpscore);
|
|
|
|
+ parameterMapData.Add("hpresult", hpscore);
|
|
|
|
+ parameterMapData.Add("xzpresult", xzpresult);
|
|
|
|
+ List<Dictionary<string, object>> pfiles = new List<Dictionary<string, object>>();
|
|
|
|
+ parameterMapData.Add("pfiles", pfiles);
|
|
|
|
|
|
- AbilitySub abilitySub = abilitySubs.Find(sub => sub.id.Equals(a.id));
|
|
|
|
- if (abilitySub != null)
|
|
|
|
- {
|
|
|
|
- abilitySub.uploads.ForEach(upload => {
|
|
|
|
- upload.urls.ForEach(url => {
|
|
|
|
- Dictionary<string, object> pfileMap = new Dictionary<string, object>();
|
|
|
|
- pfileMap.Add("url", url.url);
|
|
|
|
- pfileMap.Add("fileName", url.name);
|
|
|
|
- pfileMap.Add("fileSize", url.size);
|
|
|
|
- pfileMap.Add("md5", url.hash);
|
|
|
|
- string fileext = url.url.Substring(url.url.LastIndexOf(".") > 0 ? url.url.LastIndexOf(".") + 1 : 0);
|
|
|
|
- pfileMap.Add("fileType", fileext);
|
|
|
|
- pfiles.Add(pfileMap);
|
|
|
|
|
|
+ AbilitySub abilitySub = abilitySubs.Find(sub => sub.id.Equals(a.id));
|
|
|
|
+ if (abilitySub != null)
|
|
|
|
+ {
|
|
|
|
+ abilitySub.uploads.ForEach(upload => {
|
|
|
|
+ upload.urls.ForEach(url => {
|
|
|
|
+ Dictionary<string, object> pfileMap = new Dictionary<string, object>();
|
|
|
|
+ pfileMap.Add("url", url.url);
|
|
|
|
+ pfileMap.Add("fileName", url.name);
|
|
|
|
+ pfileMap.Add("fileSize", url.size);
|
|
|
|
+ pfileMap.Add("md5", url.hash);
|
|
|
|
+ string fileext = url.url.Substring(url.url.LastIndexOf(".") > 0 ? url.url.LastIndexOf(".") + 1 : 0);
|
|
|
|
+ pfileMap.Add("fileType", fileext);
|
|
|
|
+ pfiles.Add(pfileMap);
|
|
|
|
+ });
|
|
});
|
|
});
|
|
- });
|
|
|
|
- }
|
|
|
|
- list53113.Add(parameterMapData);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- //5.3.1.17学员课堂实录批量回写-UploadKTSLList
|
|
|
|
- if (t53117OK == 1)
|
|
|
|
- {
|
|
|
|
- x.teacherClasses.ForEach(clss =>
|
|
|
|
|
|
+ }
|
|
|
|
+ list53113.Add(parameterMapData);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53113 });
|
|
|
|
+ }
|
|
|
|
+ //5.3.1.17学员课堂实录批量回写-UploadKTSLList
|
|
|
|
+ if (t53117OK == 1)
|
|
|
|
+ {
|
|
|
|
+ x.teacherClasses.ForEach(clss =>
|
|
|
|
+ {
|
|
|
|
+ Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
|
+ parameterMapData.Add("PXID", $"{t.PXID}");
|
|
|
|
+ parameterMapData.Add("TID", $"{t.TID}");
|
|
|
|
+ parameterMapData.Add("url", clss.url);//添加访问授权
|
|
|
|
+ parameterMapData.Add("url2", clss.url);
|
|
|
|
+ parameterMapData.Add("fileName", clss.name);
|
|
|
|
+ parameterMapData.Add("fileSize", clss.size);
|
|
|
|
+ parameterMapData.Add("md5", clss.hash);
|
|
|
|
+ string fileext = clss.url.Substring(clss.url.LastIndexOf(".") > 0 ? clss.url.LastIndexOf(".") + 1 : 0);
|
|
|
|
+ parameterMapData.Add("fileType", fileext);
|
|
|
|
+ list53117.Add(parameterMapData);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53117 });
|
|
|
|
+ }
|
|
|
|
+ //5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2
|
|
|
|
+ if (t53122OK == 1)
|
|
{
|
|
{
|
|
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}");
|
|
parameterMapData.Add("TID", $"{t.TID}");
|
|
parameterMapData.Add("TID", $"{t.TID}");
|
|
- parameterMapData.Add("url", clss.url);//添加访问授权
|
|
|
|
- parameterMapData.Add("url2", clss.url);
|
|
|
|
- parameterMapData.Add("fileName", clss.name);
|
|
|
|
- parameterMapData.Add("fileSize", clss.size);
|
|
|
|
- parameterMapData.Add("md5", clss.hash);
|
|
|
|
- string fileext = clss.url.Substring(clss.url.LastIndexOf(".") > 0 ? clss.url.LastIndexOf(".") + 1 : 0);
|
|
|
|
- parameterMapData.Add("fileType", fileext);
|
|
|
|
- list53117.Add(parameterMapData);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- //5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2
|
|
|
|
- if (t53122OK == 1)
|
|
|
|
- {
|
|
|
|
- Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
|
- parameterMapData.Add("PXID", $"{t.PXID}");
|
|
|
|
- parameterMapData.Add("TID", $"{t.TID}");
|
|
|
|
- List<Dictionary<string, object>> files = new List<Dictionary<string, object>>();
|
|
|
|
- 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);
|
|
|
|
- });
|
|
|
|
- parameterMapData.Add("files", files);
|
|
|
|
- list53122.Add(parameterMapData);
|
|
|
|
|
|
+ List<Dictionary<string, object>> files = new List<Dictionary<string, object>>();
|
|
|
|
+ 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);
|
|
|
|
+ });
|
|
|
|
+ parameterMapData.Add("files", files);
|
|
|
|
+ list53122.Add(parameterMapData);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53122 });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //推送数据
|
|
|
|
+ UpdateTeacherListSituation = await _thirdApisService.Post(config.url, Code, config.passKey, config.privateKey, parameterContent53112);
|
|
|
|
+ UpdateTeacherListSituation.code = "UpdateTeacherListSituation";
|
|
|
|
+ UpdateTeacherListSituation.title = "5.3.1.12学员培训基本情况批量回写";
|
|
|
|
+
|
|
|
|
+ UpdateTeacherListDiagnosis = await _thirdApisService.Post(config.url, Code, config.passKey, config.privateKey, parameterContent53113);
|
|
|
|
+ UpdateTeacherListDiagnosis.code = "UpdateTeacherListDiagnosis";
|
|
|
|
+ UpdateTeacherListDiagnosis.title = "5.3.1.13学员能力点测评结果批量回写";
|
|
|
|
+
|
|
|
|
+ UploadKTSLList = await _thirdApisService.Post(config.url, Code, config.passKey, config.privateKey, parameterContent53117);
|
|
|
|
+ UploadKTSLList.code = "UploadKTSLList";
|
|
|
|
+ UploadKTSLList.title = "5.3.1.17学员课堂实录批量回写";
|
|
|
|
+
|
|
|
|
+ UploadSBTARPDFListV2 = await _thirdApisService.Post(config.url, Code, config.passKey, config.privateKey, parameterContent53122);
|
|
|
|
+ UploadSBTARPDFListV2.code = "UploadSBTARPDFListV2";
|
|
|
|
+ UploadSBTARPDFListV2.title = "5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写";
|
|
|
|
+
|
|
}
|
|
}
|
|
await response.WriteAsJsonAsync(new { });
|
|
await response.WriteAsJsonAsync(new { });
|
|
return response;
|
|
return response;
|