|
@@ -28,6 +28,8 @@ using Azure.Storage.Blobs.Models;
|
|
|
using static TEAMModelOS.SDK.Models.Teacher;
|
|
|
using System.Web;
|
|
|
using static TEAMModelOS.Controllers.FixDataController;
|
|
|
+using static TEAMModelOS.SDK.SchoolService;
|
|
|
+using Microsoft.AspNetCore.Hosting;
|
|
|
|
|
|
namespace TEAMModelOS.Controllers.Third
|
|
|
{
|
|
@@ -55,6 +57,7 @@ namespace TEAMModelOS.Controllers.Third
|
|
|
private readonly ThirdApisService _scsApisService;
|
|
|
public readonly string type = "scsyxpt";
|
|
|
private readonly HttpTrigger _httpTrigger;
|
|
|
+ private readonly IWebHostEnvironment _environment;
|
|
|
/// <summary>
|
|
|
/// 机构安全码
|
|
|
/// </summary>
|
|
@@ -72,7 +75,7 @@ namespace TEAMModelOS.Controllers.Third
|
|
|
/// </summary>
|
|
|
public string _sc_url;
|
|
|
public IConfiguration _configuration { get; set; }
|
|
|
- public ScController(AzureCosmosFactory azureCosmos, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage,
|
|
|
+ public ScController(IWebHostEnvironment environment,AzureCosmosFactory azureCosmos, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage,
|
|
|
AzureRedisFactory azureRedis, AzureServiceBusFactory serviceBus, IConfiguration configuration, CoreAPIHttpService accountHttpService, ThirdApisService scsApisService, HttpTrigger httpTrigger)
|
|
|
{
|
|
|
_azureCosmos = azureCosmos;
|
|
@@ -90,6 +93,241 @@ namespace TEAMModelOS.Controllers.Third
|
|
|
_sc_privateKey = _configuration.GetValue<string>("Third:scsyxpt:privateKey");
|
|
|
_sc_url = _configuration.GetValue<string>("Third:scsyxpt:url");
|
|
|
_httpTrigger = httpTrigger;
|
|
|
+ _environment = environment;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 检查醍摩豆id存在多个学校的情况
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="request"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [ProducesDefaultResponseType]
|
|
|
+ [HttpPost("sc/get-project-school-teacher")]
|
|
|
+ [AllowAnonymous]
|
|
|
+ public async Task<IActionResult> GetProjectSchoolTeacher(JsonElement request) {
|
|
|
+ if (!request.TryGetProperty("accessConfig", out JsonElement accessConfig)) return BadRequest();
|
|
|
+ if (!request.TryGetProperty("ignoreSchools", out JsonElement ignoreSchools)) return BadRequest();
|
|
|
+ if (!request.TryGetProperty("city", out JsonElement city)) return BadRequest();
|
|
|
+ if (!request.TryGetProperty("dist", out JsonElement dist)) return BadRequest();
|
|
|
+ if (!request.TryGetProperty("areaId", out JsonElement areaId)) return BadRequest();
|
|
|
+ if (!request.TryGetProperty("standard", out JsonElement standard)) return BadRequest();
|
|
|
+ List<IdNameCode> ignore = ignoreSchools.ToObject<List<IdNameCode>>();
|
|
|
+ Dictionary<string, object> dict = new Dictionary<string, object> { { "accessConfig", $"{accessConfig}" } };
|
|
|
+ int status = -1;string json = null;
|
|
|
+ //5.3.1.1获取项目列表
|
|
|
+ (status, json) = await _httpTrigger.RequestHttpTrigger(dict, _option.Location, "GetProjectInfoByTrainComID");
|
|
|
+ List<ScProject> projects = null;
|
|
|
+ List<ScSchool> saveschools = null;
|
|
|
+ List<ScSchool> schools = null;
|
|
|
+ List<ScSchool> matchSchools = null;
|
|
|
+ List<ScSchool> tbschools=null;
|
|
|
+ if (status == 200)
|
|
|
+ {
|
|
|
+ projects = json.ToObject<List<ScProject>>(new JsonSerializerOptions { PropertyNameCaseInsensitive = false });
|
|
|
+ }
|
|
|
+ // 5.3.1.18根据机构ID、项目ID、子项目ID返回学校列表
|
|
|
+ (status, json) = await _httpTrigger.RequestHttpTrigger(dict, _option.Location, "GetSchoolList");
|
|
|
+ if (status == 200)
|
|
|
+ {
|
|
|
+ schools = json.ToObject<List<ScSchool>>(new JsonSerializerOptions { PropertyNameCaseInsensitive = false });
|
|
|
+ if (ignore.IsNotEmpty())
|
|
|
+ {
|
|
|
+ matchSchools = schools.FindAll(x => ignore.Select(y=>y.name).Contains(x.schoolname));
|
|
|
+ if (matchSchools.IsNotEmpty())
|
|
|
+ {
|
|
|
+ if (matchSchools.Count != ignore.Count)
|
|
|
+ {
|
|
|
+ var matched = matchSchools.Select(x => x.schoolname);
|
|
|
+ var unmatch = ignore.Select(y => y.name).Except(matched);
|
|
|
+ return Ok(new { matched, unmatch });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ matchSchools.ForEach(x => {
|
|
|
+ var exschool= ignore.Find(y => y.name.Equals(x.schoolname));
|
|
|
+ if (exschool != null) {
|
|
|
+ x.schoolCode = exschool.id;
|
|
|
+ x.areaId = $"{areaId}";
|
|
|
+ x.city = $"{city}";
|
|
|
+ x.dist = $"{dist}";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return Ok(new { unmatch=ignore, schools }) ;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //数据校验
|
|
|
+ tbschools = await _azureStorage.FindListByDict<ScSchool>(new Dictionary<string, object>() { { "PartitionKey", $"ScSchool" } });
|
|
|
+ if (tbschools.IsNotEmpty())
|
|
|
+ {
|
|
|
+
|
|
|
+ var a = tbschools.Select(y => $"{y.RowKey}").ToList();
|
|
|
+ saveschools = schools.Where(x=>!a.Exists(z=>z.Equals($"{x.schoolid}"))).ToList();
|
|
|
+ List<SchoolData> schoolDatas = new List<SchoolData>();
|
|
|
+ saveschools.ForEach(x =>
|
|
|
+ {
|
|
|
+ x.RowKey = $"{x.schoolid}";
|
|
|
+ x.PartitionKey = "ScSchool";
|
|
|
+ x.areaId = $"{areaId}";
|
|
|
+ x.city = $"{city}";
|
|
|
+ x.dist = $"{dist}";
|
|
|
+ if (string.IsNullOrEmpty(x.schoolCode))
|
|
|
+ {
|
|
|
+ schoolDatas.Add(new SchoolData { uid = $"{x.schoolid}", province = "四川省", city = $"{city}", name = x.schoolname });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ schoolDatas = await SchoolService.GenerateSchoolCode(schoolDatas, _dingDing, _environment);
|
|
|
+ saveschools.ForEach(x => {
|
|
|
+
|
|
|
+ var schoolData = schoolDatas.Find(y => y.uid.Equals($"{x.schoolid}"));
|
|
|
+ if (schoolData != null && !string.IsNullOrEmpty(schoolData.id))
|
|
|
+ {
|
|
|
+ x.schoolCode = schoolData.id;
|
|
|
+ x.areaId = $"{areaId}";
|
|
|
+ x.city = $"{city}";
|
|
|
+ x.dist = $"{dist}";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ saveschools.RemoveAll(x => string.IsNullOrEmpty(x.schoolCode));
|
|
|
+ saveschools.RemoveAll(x => tbschools.FindAll(z=>!string.IsNullOrEmpty(z.schoolCode)).Exists(y=>y.schoolCode.Equals(x.schoolCode)));
|
|
|
+ saveschools = await _azureStorage.SaveAll(saveschools);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ List<SchoolData> schoolDatas = new List<SchoolData>();
|
|
|
+ schools.ForEach(x =>
|
|
|
+ {
|
|
|
+ x.RowKey = $"{x.schoolid}";
|
|
|
+ x.PartitionKey = "ScSchool";
|
|
|
+ x.areaId = $"{areaId}";
|
|
|
+ x.city = $"{city}";
|
|
|
+ x.dist = $"{dist}";
|
|
|
+ if (string.IsNullOrEmpty(x.schoolCode))
|
|
|
+ {
|
|
|
+ schoolDatas.Add(new SchoolData { uid = $"{x.schoolid}", province = "四川省", city = $"{city}", name = x.schoolname });
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ schoolDatas = await SchoolService.GenerateSchoolCode(schoolDatas, _dingDing, _environment);
|
|
|
+ schools.ForEach(x => {
|
|
|
+
|
|
|
+ var schoolData = schoolDatas.Find(y => y.uid.Equals($"{x.schoolid}"));
|
|
|
+ if (schoolData != null && !string.IsNullOrEmpty(schoolData.id)) {
|
|
|
+ x.schoolCode = schoolData.id;
|
|
|
+ x.areaId = $"{areaId}";
|
|
|
+ x.city = $"{city}";
|
|
|
+ x.dist = $"{dist}";
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ schools.RemoveAll(x => string.IsNullOrEmpty(x.schoolCode));
|
|
|
+ saveschools = await _azureStorage.SaveAll(schools);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<string> unsave = new List<string>();
|
|
|
+ if (saveschools.IsNotEmpty()) {
|
|
|
+ var ex = schools.Select(x => $"{x.schoolid}").Except(saveschools.Select(y=>y.RowKey));
|
|
|
+ if (ex.Count() > 0) {
|
|
|
+ unsave.AddRange(ex);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (tbschools.IsNotEmpty())
|
|
|
+ {
|
|
|
+ var ex = schools.Select(x => $"{x.schoolid}").Except(tbschools.Select(y => y.RowKey));
|
|
|
+ if (ex.Count() > 0)
|
|
|
+ {
|
|
|
+ unsave.AddRange(ex);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var areaschools = await _azureStorage.FindListByDict<ScSchool>(new Dictionary<string, object>() { { "PartitionKey", $"ScSchool" } ,{ "areaId",$"{areaId}" } });
|
|
|
+
|
|
|
+ List<School> cosbdschools = new List<School>();
|
|
|
+ await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<School>(queryText: $"select value(c) from c where c.areaId='{areaId}'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Base") }))
|
|
|
+ {
|
|
|
+ cosbdschools.Add(item);
|
|
|
+ }
|
|
|
+
|
|
|
+ var tbs = areaschools.FindAll(x => areaschools.Select(z => z.schoolCode).Except(cosbdschools.Select(x => x.id)).Contains(x.schoolCode));
|
|
|
+ List<CSchool> cSchools = new List<CSchool>();
|
|
|
+ foreach (var sch in tbs) {
|
|
|
+ cSchools.Add(new CSchool
|
|
|
+ {
|
|
|
+ id = sch.schoolCode,
|
|
|
+ name = sch.schoolname,
|
|
|
+ // admin = "1530606136",
|
|
|
+ period = new List<string>() { sch.schooltypename },
|
|
|
+ size = 100,
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ var client = _azureCosmos.GetCosmosClient();
|
|
|
+ List<School> schoolsfailed = new List<School>();
|
|
|
+ List<School> schoolsScucess = new List<School>();
|
|
|
+ List<string> failedmsg= new List<string>();
|
|
|
+ foreach (var sc in cSchools)
|
|
|
+ {
|
|
|
+ List<Period> periods = new List<Period>();
|
|
|
+ string campusId = Guid.NewGuid().ToString();
|
|
|
+ sc.period.ForEach(x => {
|
|
|
+ periods.Add(new Period { id = Guid.NewGuid().ToString(), name = x, campusId = campusId });
|
|
|
+ });
|
|
|
+ School school = new School
|
|
|
+ {
|
|
|
+ id = sc.id,
|
|
|
+ name = sc.name,
|
|
|
+ size = sc.size,
|
|
|
+ code = "Base",
|
|
|
+ campuses = new List<Campus> { new Campus { name = sc.name, id = campusId } },
|
|
|
+ region = "中国",
|
|
|
+ province = "四川省",
|
|
|
+ city = $"{city}",
|
|
|
+ timeZone = new SDK.Models.TimeZone { label = "(UTC+08:00) 北京,重庆,香港特别行政区,乌鲁木齐", value = "+08:00" },
|
|
|
+ type = 1,
|
|
|
+ pk = "School",
|
|
|
+ ttl = -1,
|
|
|
+ schoolCode = sc.id,
|
|
|
+ dist=$"{dist}",
|
|
|
+ period = periods,
|
|
|
+ areaId =$"{areaId}",
|
|
|
+ standard=$"{standard}"
|
|
|
+ };
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+ await client.GetContainer(Constant.TEAMModelOS, "School").CreateItemAsync<School>(school, new PartitionKey(school.code));
|
|
|
+ schoolsScucess.Add(school);
|
|
|
+ }
|
|
|
+ catch (CosmosException ex)
|
|
|
+ {
|
|
|
+ failedmsg.Add($"{school.ToJsonString()}\n \n{ex.Status}{ex.Message }\n {ex.StackTrace}");
|
|
|
+ schoolsfailed.Add(school);
|
|
|
+ }
|
|
|
+ catch (Exception ex) {
|
|
|
+ failedmsg.Add($"{school.ToJsonString()}\n{ex.Message }\n {ex.StackTrace}");
|
|
|
+ schoolsfailed.Add(school);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 5.3.1.2获取学员名单
|
|
|
+ (status, json) = await _httpTrigger.RequestHttpTrigger(dict, _option.Location, "GetTeachersListByProject");
|
|
|
+ if (status == 200)
|
|
|
+ {
|
|
|
+ List<ScTeacher> teachers = json.ToObject<List<ScTeacher>>(new JsonSerializerOptions { PropertyNameCaseInsensitive = false });
|
|
|
+ }
|
|
|
+ return Ok(new {
|
|
|
+ projects, msg=$"Table中已经有:{tbschools.Count}个学校,省平台获取到:{schools.Count}个学校,本次保存有:{saveschools?.Count},没有被保存的学校:{unsave.Count},创建失败的学校有:{schoolsfailed.Count()},创建成功的的学校有:{schoolsScucess.Count()}",
|
|
|
+ schoolsfailed,
|
|
|
+ failedmsg,
|
|
|
+ schoolsScucess,
|
|
|
+ tbsch= tbschools.Select(x=>new { x.schoolname,x.schoolCode})
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -750,651 +988,6 @@ namespace TEAMModelOS.Controllers.Third
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public class Unbind
|
|
|
- {
|
|
|
- public string userid { get; set; }
|
|
|
- public string id { get; set; }
|
|
|
- public string name { get; set; }
|
|
|
- public List<ScBindData> data { get; set; }
|
|
|
- }
|
|
|
- /// <summary>
|
|
|
- ///
|
|
|
- /// </summary>
|
|
|
- /// <param name="json"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [ProducesDefaultResponseType]
|
|
|
- [HttpPost("sc/get-list")]
|
|
|
- [AllowAnonymous]
|
|
|
- public async Task<IActionResult> GetProjectList(List<Unbind> unbinds)
|
|
|
- {
|
|
|
-
|
|
|
-
|
|
|
- // 5.3.1.1获取项目列表
|
|
|
- string trainComID = _sc_trainComID;
|
|
|
- string Code = "GetProjectInfoByTrainComID";
|
|
|
- Dictionary<string, object> parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", _sc_trainComID);
|
|
|
- ScsResult GetProjectInfoByTrainComID = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetProjectInfoByTrainComID.code = Code;
|
|
|
- GetProjectInfoByTrainComID.title = "5.3.1.1获取项目列表";
|
|
|
-
|
|
|
- Code = "GetSingleTeacherByProject";
|
|
|
- //parameterMap = new Dictionary<string, object>();
|
|
|
- //List<dynamic> dynamics = new List<dynamic>();
|
|
|
- //List<string> un = new List<string>();
|
|
|
- //foreach (var x in unbinds) {
|
|
|
- // parameterMap = new Dictionary<string, object>();
|
|
|
- // parameterMap.Add("TrainComID", trainComID);
|
|
|
- // parameterMap.Add("Pxid", x.data[0].pxid);
|
|
|
- // parameterMap.Add("Tid", x.userid);
|
|
|
- // ScsResult GetSingleTeacherByProject1 = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- // GetSingleTeacherByProject1.code = Code;
|
|
|
- // GetSingleTeacherByProject1.title = "5.3.1.11获取跳转学员信息";
|
|
|
- // if (GetSingleTeacherByProject1.result)
|
|
|
- // {
|
|
|
- // ScTeacher scTeacher = GetSingleTeacherByProject1.content.ToObject<ScTeacher>(new JsonSerializerOptions { PropertyNameCaseInsensitive = false });
|
|
|
-
|
|
|
- // x.data[0].username = scTeacher.TeacherName;
|
|
|
- // x.data[0].userid = $"{scTeacher.TID}";
|
|
|
- // x.data[0].account = scTeacher.Account;
|
|
|
- // }
|
|
|
- // else {
|
|
|
- // un.Add($"{GetSingleTeacherByProject1.reason},{GetSingleTeacherByProject1.content},{parameterMap.ToJsonString()}");
|
|
|
- // }
|
|
|
-
|
|
|
- // dynamics.Add(new { x.data[0].sn, x.name, x.id, x.data[0].username, x.data[0].userid, x.data[0].account, x.data[0].pxid, });
|
|
|
- //}
|
|
|
- //return Ok(new { dynamics ,un });
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // 5.3.1.18根据机构ID、项目ID、子项目ID返回学校列表
|
|
|
- Code = "GetSchoolList";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("ProjectID", "60");
|
|
|
- parameterMap.Add("ProjectItemID", "1068");
|
|
|
- ScsResult GetSchoolList1 = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetSchoolList1.code = Code;
|
|
|
- GetSchoolList1.title = "5.3.1.18根据机构ID、项目ID、子项目ID返回学校列表";
|
|
|
-
|
|
|
- // 5.3.1.19获取项目设置的可选能力点,
|
|
|
- Code = "GetProjectDiagnosis";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("ProjectID", "60");
|
|
|
- parameterMap.Add("ProjectItemID", "1068");
|
|
|
- ScsResult GetProjectDiagnosis = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetProjectDiagnosis.code = Code;
|
|
|
- GetProjectDiagnosis.title = "5.3.1.19获取项目设置的可选能力点";
|
|
|
- // 补充
|
|
|
- // 5.3.1.3通过项目编号获取学员测评能力项,需要确认每个教师是是否一样。
|
|
|
- Code = "GetDiagnosisListByProject_V2";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- //parameterMap.Add("ProjectID", "22");
|
|
|
- //parameterMap.Add("ProjectItemID", "22");
|
|
|
- parameterMap.Add("PXID", "242849");
|
|
|
- ScsResult GetDiagnosisListByProject_V2 = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetDiagnosisListByProject_V2.code = Code;
|
|
|
- GetDiagnosisListByProject_V2.title = "5.3.1.3通过项目编号获取学员测评能力项V2";
|
|
|
- return Ok(new { GetDiagnosisListByProject_V2= GetDiagnosisListByProject_V2,GetProjectInfoByTrainComID= GetProjectInfoByTrainComID ,GetSchoolList = GetSchoolList1 });
|
|
|
-
|
|
|
- // 5.3.1.2获取学员名单,暂不对接 V1。
|
|
|
- Code = "GetTeachersListByProject";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("ProjectID", "22");
|
|
|
- parameterMap.Add("ProjectItemID", "24");
|
|
|
- ScsResult GetTeachersListByProject = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetTeachersListByProject.code = Code;
|
|
|
- GetTeachersListByProject.title = "5.3.1.2获取学员名单";
|
|
|
-
|
|
|
-
|
|
|
- // 5.3.1.3通过项目编号获取学员测评能力项,需要确认每个教师是是否一样。
|
|
|
- Code = "GetDiagnosisListByProject";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("ProjectID", "22");
|
|
|
- parameterMap.Add("ProjectItemID", "24");
|
|
|
- parameterMap.Add("PXID", "65321");
|
|
|
- ScsResult GetDiagnosisListByProject = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetDiagnosisListByProject.code = Code;
|
|
|
- GetDiagnosisListByProject.title = "5.3.1.3通过项目编号获取学员测评能力项";
|
|
|
-
|
|
|
-
|
|
|
- // 补充
|
|
|
- // 5.3.1.3通过项目编号获取学员测评能力项,需要确认每个教师是是否一样。
|
|
|
- Code = "GetDiagnosisListByProject_V2";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- //parameterMap.Add("ProjectID", "22");
|
|
|
- //parameterMap.Add("ProjectItemID", "22");
|
|
|
- parameterMap.Add("PXID", "244188");
|
|
|
- ScsResult GetDiagnosisListByProject_V2T = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetDiagnosisListByProject_V2T.code = Code;
|
|
|
- GetDiagnosisListByProject_V2T.title = "5.3.1.3通过项目编号获取学员测评能力项V2";
|
|
|
-
|
|
|
- ScsResult UpdateTeacherSituation = null;
|
|
|
- // 5.3.1.4学员培训基本情况回写
|
|
|
- try
|
|
|
- {
|
|
|
- Code = "UpdateTeacherSituation";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("PXID", "65324");
|
|
|
- parameterMap.Add("TID", "253940");
|
|
|
- parameterMap.Add("TeacherName", "宋鸿");
|
|
|
- parameterMap.Add("CourseHour", "50");
|
|
|
- parameterMap.Add("ResearchText", "");//学习成果描述,字符长度<=300
|
|
|
- parameterMap.Add("ComPassed", "1");//0、未认定 1、合格 2、优秀 3、不合格 4、其他
|
|
|
- UpdateTeacherSituation = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- UpdateTeacherSituation.code = Code;
|
|
|
- UpdateTeacherSituation.title = "5.3.1.4学员培训基本情况回写";
|
|
|
- }
|
|
|
- catch (Exception ex) { }
|
|
|
- ScsResult UpdateTeacherDiagnosis = null;
|
|
|
- try
|
|
|
- {
|
|
|
- // 5.3.1.5学员能力点测评结果回写
|
|
|
- Code = "UpdateTeacherDiagnosis";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("PXID", "65321");
|
|
|
- parameterMap.Add("TID", "32393");
|
|
|
- parameterMap.Add("DiagnosisNum", "A1");
|
|
|
- //0"未认定", 1"合格", 2"优秀", 3"不合格"
|
|
|
- parameterMap.Add("zpresult", "1");
|
|
|
- parameterMap.Add("hpresult", "1");
|
|
|
- parameterMap.Add("xzpresult", "1");
|
|
|
- List<Dictionary<string, string>> pfilesA = new List<Dictionary<string, string>>();
|
|
|
- parameterMap.Add("pfiles", pfilesA);
|
|
|
- Dictionary<string, string> pfileMapA = new Dictionary<string, string>();
|
|
|
- pfileMapA.Add("url", "https://scnltsfiles.scedu.com.cn/upload/infofj/202104011628463774.pdf");
|
|
|
- pfileMapA.Add("fileName", "XXX.pdf");
|
|
|
- pfileMapA.Add("fileSize", "247767");
|
|
|
- pfileMapA.Add("md5", "9c3da8c5c07c2c660cd73c01f56d7fca");
|
|
|
- pfileMapA.Add("fileType", "pdf");
|
|
|
- pfilesA.Add(pfileMapA);
|
|
|
- UpdateTeacherDiagnosis = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- UpdateTeacherDiagnosis.code = Code;
|
|
|
- UpdateTeacherDiagnosis.title = "5.3.1.5学员能力点测评结果回写";
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- // 5.3.1.6获取能力测评体系字典值数据
|
|
|
- Code = "GetDiagnosisDic";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- ScsResult GetDiagnosisDic = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetDiagnosisDic.code = Code;
|
|
|
- GetDiagnosisDic.title = "5.3.1.6获取能力测评体系字典值数据";
|
|
|
-
|
|
|
-
|
|
|
- // 5.3.1.7获取能力测评评价类型字典值数据 ,不用对接
|
|
|
- Code = "GetDiagnosisItemDic";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("DiagnosisDicID", "3");
|
|
|
- ScsResult GetDiagnosisItemDic = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetDiagnosisItemDic.code = Code;
|
|
|
- GetDiagnosisItemDic.title = "5.3.1.7获取能力测评评价类型字典值数据";
|
|
|
-
|
|
|
-
|
|
|
- // 5.3.1.8获取能力测评评价类型细则字典值数据,不用对接。
|
|
|
- Code = "GetchoiceDic";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("DiagnosisItemID", "4");
|
|
|
- ScsResult GetchoiceDic = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetchoiceDic.code = Code;
|
|
|
- GetchoiceDic.title = "5.3.1.8获取能力测评评价类型细则字典值数据";
|
|
|
-
|
|
|
-
|
|
|
- // 5.3.1.9根据培训ID与机构ID获取老师信息
|
|
|
- Code = "GetTeacherInfoByPXID";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("PXID", "65321");
|
|
|
- ScsResult GetTeacherInfoByPXID = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetTeacherInfoByPXID.code = Code;
|
|
|
- GetTeacherInfoByPXID.title = "5.3.1.9根据培训ID与机构ID获取老师信息";
|
|
|
-
|
|
|
-
|
|
|
- // 5.3.1.10根据培训项目ID与学校ID获取学校方案,用于展示学校的id方案。顺便确认学校的名单。
|
|
|
- Code = "GetSchoolPlanBySchoolID";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("ProjectItemID", "3");
|
|
|
- parameterMap.Add("SchoolID", "220913");
|
|
|
- parameterMap.Add("Type", "0");
|
|
|
- ScsResult GetSchoolPlanBySchoolID = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetSchoolPlanBySchoolID.code = Code;
|
|
|
- GetSchoolPlanBySchoolID.title = "5.3.1.10根据培训项目ID与学校ID获取学校方案";
|
|
|
-
|
|
|
-
|
|
|
- // 5.3.1.11获取跳转学员信息。用于sso单点,后端验证
|
|
|
- Code = "GetSingleTeacherByProject";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("Pxid", "65321");
|
|
|
- parameterMap.Add("Tid", "32393");
|
|
|
- ScsResult GetSingleTeacherByProject = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetSingleTeacherByProject.code = Code;
|
|
|
- GetSingleTeacherByProject.title = "5.3.1.11获取跳转学员信息";
|
|
|
-
|
|
|
- ScsResult UpdateTeacherListSituation = null;
|
|
|
- Dictionary<string, object> parameterContent = new Dictionary<string, object>();
|
|
|
- List<Dictionary<string, object>> list = new List<Dictionary<string, object>>();
|
|
|
- try
|
|
|
- { // 5.3.1.12学员培训基本情况批量回写
|
|
|
- Code = "UpdateTeacherListSituation";
|
|
|
-
|
|
|
-
|
|
|
- parameterContent.Add("TrainComID", trainComID);
|
|
|
- parameterContent.Add("List", list);
|
|
|
- // {"TrainComID":"39","List":[{"ResearchText":"","ComPassed":1,"PXID":"35455","CourseHour":"50.0","TID":"411105","TeacherName":"付绍令"}]}
|
|
|
- {
|
|
|
- Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
-
|
|
|
- parameterMapData.Add("PXID", "65324");
|
|
|
- parameterMapData.Add("TID", "253940");
|
|
|
- parameterMapData.Add("TeacherName", "柏成伟");
|
|
|
- parameterMapData.Add("CourseHour", "50");
|
|
|
- parameterMapData.Add("ResearchText", "学习成果描述,字符长度<=300");
|
|
|
- parameterMapData.Add("ComPassed", "2");//0、未认定 1、合格 2、优秀 3、不合格 4、其他
|
|
|
- list.Add(parameterMapData);
|
|
|
- parameterMapData = new Dictionary<string, object>();
|
|
|
-
|
|
|
- parameterMapData.Add("PXID", "65324");
|
|
|
- parameterMapData.Add("TID", "253940");
|
|
|
- parameterMapData.Add("TeacherName", "柏成伟");
|
|
|
- parameterMapData.Add("CourseHour", "50");
|
|
|
- parameterMapData.Add("ResearchText", "学习成果描述,字符长度<=300");
|
|
|
- parameterMapData.Add("ComPassed", "2");//0、未认定 1、合格 2、优秀 3、不合格 4、其他
|
|
|
- list.Add(parameterMapData);
|
|
|
- parameterMapData = new Dictionary<string, object>();
|
|
|
-
|
|
|
- //parameterMapData.Add("PXID", "22");
|
|
|
- //parameterMapData.Add("TID", "21348");
|
|
|
- //parameterMapData.Add("TeacherName", "邓泽燕");
|
|
|
- //parameterMapData.Add("CourseHour", "50");
|
|
|
- //parameterMapData.Add("ResearchText", "学习成果描述,字符长度<=300");
|
|
|
- //parameterMapData.Add("ComPassed", "2");//0、未认定 1、合格 2、优秀 3、不合格 4、其他
|
|
|
- //list.Add(parameterMapData);
|
|
|
- //parameterMapData = new Dictionary<string, object>();
|
|
|
- //parameterMapData.Add("PXID", "35546");
|
|
|
- //parameterMapData.Add("TID", "411182");
|
|
|
- //parameterMapData.Add("TeacherName", "刘晓莉");
|
|
|
- //parameterMapData.Add("CourseHour", "50");
|
|
|
- //parameterMapData.Add("ResearchText", "");
|
|
|
- //parameterMapData.Add("ComPassed", "1");//0、未认定 1、合格 2、优秀 3、不合格 4、其他
|
|
|
- //list.Add(parameterMapData);
|
|
|
- }
|
|
|
- UpdateTeacherListSituation = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterContent);
|
|
|
- UpdateTeacherListSituation.code = Code;
|
|
|
- UpdateTeacherListSituation.title = "5.3.1.12学员培训基本情况批量回写";
|
|
|
- }
|
|
|
- catch (Exception ex) { }
|
|
|
-
|
|
|
- ScsResult UpdateTeacherListDiagnosis = null;
|
|
|
- try
|
|
|
- { // 5.3.1.13学员能力点测评结果批量回写
|
|
|
- Code = "UpdateTeacherListDiagnosis";
|
|
|
- parameterContent = new Dictionary<string, object>();
|
|
|
- list = new List<Dictionary<string, object>>();
|
|
|
- parameterContent.Add("TrainComID", trainComID);
|
|
|
- parameterContent.Add("List", list);
|
|
|
- {
|
|
|
- Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
-
|
|
|
- parameterMapData.Add("PXID", "65321");
|
|
|
- parameterMapData.Add("TID", "32393");
|
|
|
- parameterMapData.Add("DiagnosisNum", "A1");
|
|
|
- //0"未认定", 1"合格", 2"优秀", 3"不合格"
|
|
|
- parameterMapData.Add("zpresult", "1");
|
|
|
- parameterMapData.Add("hpresult", "2");
|
|
|
- parameterMapData.Add("xzpresult", "2");
|
|
|
- List<Dictionary<string, object>> pfiles = new List<Dictionary<string, object>>();
|
|
|
- parameterMapData.Add("pfiles", pfiles);
|
|
|
- Dictionary<string, object> pfileMap = new Dictionary<string, object>();
|
|
|
- pfileMap.Add("url", "https://srt-read-online.3ren.cn/basebusiness/material/20210422/1619055398463iE97VWe36i001.mp4");
|
|
|
- pfileMap.Add("fileName", "697a58c2375f7a031456c893e1e1860c.mp4");
|
|
|
- pfileMap.Add("fileSize", "17036168");
|
|
|
- pfileMap.Add("md5", "");
|
|
|
- pfileMap.Add("fileType", "video");
|
|
|
- pfiles.Add(pfileMap);
|
|
|
-
|
|
|
- list.Add(parameterMapData);
|
|
|
-
|
|
|
- pfileMap = new Dictionary<string, object>();
|
|
|
- pfileMap.Add("url", "https://srt-read-online.3ren.cn/basebusiness/material/20210422/1619055446704gbKuNF8eas001.pdf");
|
|
|
- pfileMap.Add("fileName", "A6技术支持的课堂反思.pdf");
|
|
|
- pfileMap.Add("fileSize", "32192");
|
|
|
- pfileMap.Add("md5", "");
|
|
|
- pfileMap.Add("fileType", "pdf");
|
|
|
- pfiles.Add(pfileMap);
|
|
|
-
|
|
|
- list.Add(parameterMapData);
|
|
|
- }
|
|
|
-
|
|
|
- //{
|
|
|
- // Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
-
|
|
|
- // parameterMapData.Add("PXID", "3062");
|
|
|
- // parameterMapData.Add("TID", "401268");
|
|
|
- // parameterMapData.Add("DiagnosisNum", "A1");
|
|
|
- // //0"未认定", 1"合格", 2"优秀", 3"不合格"
|
|
|
- // parameterMapData.Add("zpresult", "1");
|
|
|
- // parameterMapData.Add("hpresult", "2");
|
|
|
- // parameterMapData.Add("xzpresult", "2");
|
|
|
- // List<Dictionary<string, object>> pfiles = new List<Dictionary<string, object>>();
|
|
|
- // parameterMapData.Add("pfiles", pfiles);
|
|
|
- // Dictionary<string, object> pfileMap = new Dictionary<string, object>();
|
|
|
- // pfileMap.Add("url", "https://srt-read-online.3ren.cn/basebusiness/material/20210422/1619058650000bphKFbDVSa001.pdf");
|
|
|
- // pfileMap.Add("fileName", "学情分析.pdf");
|
|
|
- // pfileMap.Add("fileSize", "94926");
|
|
|
- // pfileMap.Add("md5", "");
|
|
|
- // pfileMap.Add("fileType", "pdf");
|
|
|
- // pfiles.Add(pfileMap);
|
|
|
-
|
|
|
- // list.Add(parameterMapData);
|
|
|
-
|
|
|
- // pfileMap = new Dictionary<string, object>();
|
|
|
- // pfileMap.Add("url", "https://srt-read-online.3ren.cn/basebusiness/material/20210422/1619058698452gF19jmiuML001.mp4");
|
|
|
- // pfileMap.Add("fileName", "种子萌发学情分析.mp4");
|
|
|
- // pfileMap.Add("fileSize", "12692368");
|
|
|
- // pfileMap.Add("md5", "");
|
|
|
- // pfileMap.Add("fileType", "video");
|
|
|
- // pfiles.Add(pfileMap);
|
|
|
- // list.Add(parameterMapData);
|
|
|
- //}
|
|
|
- UpdateTeacherListDiagnosis = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterContent);
|
|
|
- UpdateTeacherListDiagnosis.code = Code;
|
|
|
- UpdateTeacherListDiagnosis.title = "5.3.1.13学员能力点测评结果批量回写";
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- ScsResult UploadSBTARPDF = null;
|
|
|
- try
|
|
|
- { // 5.3.1.14学员校本研修PDF回写
|
|
|
- Code = "UploadSBTARPDF";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("PXID", "16");
|
|
|
- parameterMap.Add("TID", "16");
|
|
|
-
|
|
|
- parameterMap.Add("url", "http://image1.cersp.com.cn/scpx/images/article/file/20190318/upload__51f98fc8_1697695ae73__7ffe_00001297.pdf");
|
|
|
- parameterMap.Add("fileName", "XXX.pdf");
|
|
|
- parameterMap.Add("fileSize", "247767");
|
|
|
- parameterMap.Add("md5", "9c3da8c5c07c2c660cd73c01f56d7fca");
|
|
|
- parameterMap.Add("fileType", "pdf");
|
|
|
- UploadSBTARPDF = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- UploadSBTARPDF.code = Code;
|
|
|
- UploadSBTARPDF.title = "5.3.1.14学员校本研修PDF回写";
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- }
|
|
|
-
|
|
|
- ScsResult UploadSBTARPDFList = null;
|
|
|
- try
|
|
|
- { // 5.3.1.15学员校本教研PDF批量回写
|
|
|
- Code = "UploadSBTARPDFList";
|
|
|
- parameterContent = new Dictionary<string, object>();
|
|
|
- list = new List<Dictionary<string, object>>();
|
|
|
- parameterContent.Add("TrainComID", trainComID);
|
|
|
- parameterContent.Add("List", list);
|
|
|
- {
|
|
|
- Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
- parameterMapData.Add("PXID", "65309");
|
|
|
- parameterMapData.Add("TID", "253940");
|
|
|
- parameterMapData.Add("url", "https://scnltsfiles.scedu.com.cn/upload/infofj/202104011628463774.pdf");
|
|
|
- parameterMapData.Add("fileName", "XXX.pdf");
|
|
|
- parameterMapData.Add("fileSize", "247767");
|
|
|
- parameterMapData.Add("md5", "9c3da8c5c07c2c660cd73c01f56d7fca");
|
|
|
- parameterMapData.Add("fileType", "pdf");
|
|
|
- list.Add(parameterMapData);
|
|
|
- }
|
|
|
- {
|
|
|
- Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
- parameterMapData.Add("PXID", "65306");
|
|
|
- parameterMapData.Add("TID", "32393");
|
|
|
- parameterMapData.Add("url", "https://scnltsfiles.scedu.com.cn/upload/infofj/202104011628463774.pdf");
|
|
|
- parameterMapData.Add("fileName", "XXX.pdf");
|
|
|
- parameterMapData.Add("fileSize", "247767");
|
|
|
- parameterMapData.Add("md5", "9c3da8c5c07c2c660cd73c01f56d7fca");
|
|
|
- parameterMapData.Add("fileType", "pdf");
|
|
|
- list.Add(parameterMapData);
|
|
|
- }
|
|
|
- UploadSBTARPDFList = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterContent);
|
|
|
- UploadSBTARPDFList.code = Code;
|
|
|
- UploadSBTARPDFList.title = "5.3.1.15学员校本教研PDF批量回写";
|
|
|
- }
|
|
|
- catch (Exception ex) { }
|
|
|
- ScsResult UploadKTSL = null;
|
|
|
- try
|
|
|
- {
|
|
|
- // 5.3.1.16学员课堂实录回写
|
|
|
- Code = "UploadKTSL";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("PXID", "16");
|
|
|
- parameterMap.Add("TID", "16");
|
|
|
- parameterMap.Add("url", "https://xxx.mp4");
|
|
|
- parameterMap.Add("url2", "https://xxx.mp4");
|
|
|
- parameterMap.Add("fileName", "XXX.mp4");
|
|
|
- parameterMap.Add("fileSize", "247767");
|
|
|
- parameterMap.Add("md5", "9c3da8c5c07c2c660cd73c01f56d7fca");
|
|
|
- parameterMap.Add("fileType", "mp4");
|
|
|
- UploadKTSL = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- UploadKTSL.code = Code;
|
|
|
- UploadKTSL.title = "5.3.1.16学员课堂实录回写";
|
|
|
- }
|
|
|
- catch (Exception ex) { }
|
|
|
- ScsResult UploadKTSLList = null;
|
|
|
- try
|
|
|
- {
|
|
|
- // 5.3.1.17学员课堂实录批量回写
|
|
|
- Code = "UploadKTSLList";
|
|
|
- parameterContent = new Dictionary<string, object>();
|
|
|
- list = new List<Dictionary<string, object>>();
|
|
|
- parameterContent.Add("TrainComID", trainComID);
|
|
|
- parameterContent.Add("List", list);
|
|
|
- {
|
|
|
- Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
- parameterMapData.Add("PXID", "16");
|
|
|
- parameterMapData.Add("TID", "16");
|
|
|
- parameterMapData.Add("url", "https://xxx.mp4");
|
|
|
- parameterMapData.Add("url2", "https://xxx.mp4");
|
|
|
- parameterMapData.Add("fileName", "XXX.mp4");
|
|
|
- parameterMapData.Add("fileSize", "247767");
|
|
|
- parameterMapData.Add("md5", "9c3da8c5c07c2c660cd73c01f56d7fca");
|
|
|
- parameterMapData.Add("fileType", "mp4");
|
|
|
- list.Add(parameterMapData);
|
|
|
- }
|
|
|
- {
|
|
|
- Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
- parameterMapData.Add("PXID", "16");
|
|
|
- parameterMapData.Add("TID", "16");
|
|
|
- parameterMapData.Add("url", "https://xxx.mp4");
|
|
|
- parameterMapData.Add("url2", "https://xxx.mp4");
|
|
|
- parameterMapData.Add("fileName", "XXX.mp4");
|
|
|
- parameterMapData.Add("fileSize", "247767");
|
|
|
- parameterMapData.Add("md5", "9c3da8c5c07c2c660cd73c01f56d7fca");
|
|
|
- parameterMapData.Add("fileType", "mp4");
|
|
|
- list.Add(parameterMapData);
|
|
|
- }
|
|
|
- UploadKTSLList = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterContent);
|
|
|
- UploadKTSLList.code = Code;
|
|
|
- UploadKTSLList.title = "5.3.1.17学员课堂实录批量回写";
|
|
|
-
|
|
|
- }
|
|
|
- catch (Exception ex) { }
|
|
|
-
|
|
|
- // 5.3.1.18根据机构ID、项目ID、子项目ID返回学校列表
|
|
|
- Code = "GetSchoolList";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("ProjectID", "22");
|
|
|
- parameterMap.Add("ProjectItemID", "24");
|
|
|
- ScsResult GetSchoolList = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetSchoolList.code = Code;
|
|
|
- GetSchoolList.title = "5.3.1.18根据机构ID、项目ID、子项目ID返回学校列表";
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // 5.3.1.20获取学校设置的可选能力点,
|
|
|
- Code = "GetSchoolDiagnosis";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("ProjectID", "22");
|
|
|
- parameterMap.Add("ProjectItemID", "21");
|
|
|
- parameterMap.Add("SchoolID", "200001");
|
|
|
- ScsResult GetSchoolDiagnosis = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetSchoolDiagnosis.code = Code;
|
|
|
- GetSchoolDiagnosis.title = "5.3.1.20获取学校设置的可选能力点";
|
|
|
-
|
|
|
- // 5.3.1.21分页获取学员名单
|
|
|
- Code = "GetTeachersPageListByProject";
|
|
|
- parameterMap = new Dictionary<string, object>();
|
|
|
- parameterMap.Add("TrainComID", trainComID);
|
|
|
- parameterMap.Add("ProjectID", "22");
|
|
|
- parameterMap.Add("ProjectItemID", "24");
|
|
|
- parameterMap.Add("curPage", "1");
|
|
|
- parameterMap.Add("pageSize", "10");
|
|
|
- ScsResult GetTeachersPageListByProject = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterMap);
|
|
|
- GetTeachersPageListByProject.code = Code;
|
|
|
- GetTeachersPageListByProject.title = "5.3.1.21分页获取学员名单";
|
|
|
-
|
|
|
- // 5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写
|
|
|
- Code = "UploadSBTARPDFListV2";
|
|
|
- parameterContent = new Dictionary<string, object>();
|
|
|
- parameterContent.Add("TrainComID", trainComID);
|
|
|
- list = new List<Dictionary<string, object>>();
|
|
|
- parameterContent.Add("List", list);
|
|
|
- {
|
|
|
- Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
- parameterMapData.Add("PXID", "65309");
|
|
|
- parameterMapData.Add("TID", "253940");
|
|
|
- List<Dictionary<string, object>> pfiles = new List<Dictionary<string, object>>();
|
|
|
- parameterMapData.Add("pfiles", pfiles);
|
|
|
- Dictionary<string, object> pfileMap = new Dictionary<string, object>();
|
|
|
- pfileMap.Add("url", "https://scnltsfiles.scedu.com.cn/upload/infofj/202104011628463774.pdf");
|
|
|
- pfileMap.Add("fileName", "XXX.pdf");
|
|
|
- pfileMap.Add("fileSize", "247767");
|
|
|
- pfileMap.Add("md5", "9c3da8c5c07c2c660cd73c01f56d7fca");
|
|
|
- pfileMap.Add("fileType", "pdf");
|
|
|
- pfiles.Add(pfileMap);
|
|
|
- pfileMap = new Dictionary<string, object>(); //添加第二个校本研修方案
|
|
|
- pfileMap.Add("url", "https://scnltsfiles.scedu.com.cn/upload/infofj/202104011628463774.pdf");
|
|
|
- pfileMap.Add("fileName", "XXX.pdf");
|
|
|
- pfileMap.Add("fileSize", "247767");
|
|
|
- pfileMap.Add("md5", "9c3da8c5c07c2c660cd73c01f56d7fca");
|
|
|
- pfileMap.Add("fileType", "pdf");
|
|
|
- pfiles.Add(pfileMap);
|
|
|
- parameterMapData.Add("files", pfiles);
|
|
|
- list.Add(parameterMapData);
|
|
|
- }
|
|
|
-
|
|
|
- {
|
|
|
- Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
- parameterMapData.Add("PXID", "65306");
|
|
|
- parameterMapData.Add("TID", "32393");
|
|
|
- List<Dictionary<string, object>> pfiles = new List<Dictionary<string, object>>();
|
|
|
- parameterMapData.Add("pfiles", pfiles);
|
|
|
- Dictionary<string, object> pfileMap = new Dictionary<string, object>();
|
|
|
- pfileMap.Add("url", "https://scnltsfiles.scedu.com.cn/upload/infofj/202104011628463774.pdf");
|
|
|
- pfileMap.Add("fileName", "XXX.pdf");
|
|
|
- pfileMap.Add("fileSize", "247767");
|
|
|
- pfileMap.Add("md5", "9c3da8c5c07c2c660cd73c01f56d7fca");
|
|
|
- pfileMap.Add("fileType", "pdf");
|
|
|
- pfiles.Add(pfileMap);
|
|
|
- pfileMap = new Dictionary<string, object>(); //添加第二个校本研修方案
|
|
|
- pfileMap.Add("url", "https://scnltsfiles.scedu.com.cn/upload/infofj/202104011628463774.pdf");
|
|
|
- pfileMap.Add("fileName", "XXX.pdf");
|
|
|
- pfileMap.Add("fileSize", "247767");
|
|
|
- pfileMap.Add("md5", "9c3da8c5c07c2c660cd73c01f56d7fca");
|
|
|
- pfileMap.Add("fileType", "pdf");
|
|
|
- pfiles.Add(pfileMap);
|
|
|
- parameterMapData.Add("files", pfiles);
|
|
|
- list.Add(parameterMapData);
|
|
|
- }
|
|
|
- ScsResult UploadSBTARPDFListV2 = await _scsApisService.Post(_sc_url, Code, _sc_passKey, _sc_privateKey, parameterContent);
|
|
|
- UploadSBTARPDFListV2.code = Code;
|
|
|
- UploadSBTARPDFListV2.title = "5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写";
|
|
|
-
|
|
|
-
|
|
|
- return Ok(new
|
|
|
- {
|
|
|
- GetProjectInfoByTrainComID,
|
|
|
- GetTeachersListByProject,
|
|
|
- GetDiagnosisListByProject,
|
|
|
- GetDiagnosisListByProject_V2,
|
|
|
- UpdateTeacherSituation,
|
|
|
- UpdateTeacherDiagnosis,
|
|
|
- GetDiagnosisDic,
|
|
|
- GetDiagnosisItemDic,
|
|
|
- GetchoiceDic,
|
|
|
- GetTeacherInfoByPXID,
|
|
|
- GetSchoolPlanBySchoolID,
|
|
|
- GetSingleTeacherByProject,
|
|
|
- UpdateTeacherListSituation,
|
|
|
- UpdateTeacherListDiagnosis,
|
|
|
- UploadSBTARPDF,
|
|
|
- UploadSBTARPDFList,
|
|
|
- UploadKTSL,
|
|
|
- UploadKTSLList,
|
|
|
- GetSchoolList,
|
|
|
- GetProjectDiagnosis,
|
|
|
- GetSchoolDiagnosis,
|
|
|
- GetTeachersPageListByProject,
|
|
|
- UploadSBTARPDFListV2
|
|
|
- });
|
|
|
-
|
|
|
- //return Ok(GetProjectInfoByTrainComID);
|
|
|
- }
|
|
|
-
|
|
|
- public record ScSSO{
|
|
|
- public string Webid { get; set; }
|
|
|
- public string Pxid { get; set; }
|
|
|
- public string tid { get; set; }
|
|
|
- public string time { get; set; }
|
|
|
- public string Encrypt { get; set; }
|
|
|
- // public string data { get; set; }
|
|
|
- }
|
|
|
- public record ScSSOData
|
|
|
- {
|
|
|
- public string path { get; set; }
|
|
|
- public string Pxid { get; set; }
|
|
|
- public string tid { get; set; }
|
|
|
- public string time { get; set; }
|
|
|
- public string Encrypt { get; set; }
|
|
|
- public string data { get; set; }
|
|
|
- public string username { get; set; }
|
|
|
- public string account { get; set; }
|
|
|
- }
|
|
|
- public record SSO
|
|
|
- {
|
|
|
- public string type { get; set; }
|
|
|
- public string param { get; set; }
|
|
|
- public string id_token { get; set; }
|
|
|
- }
|
|
|
- public record TmdidImplicit {
|
|
|
- public string id_token { get; set; }
|
|
|
- public string access_token { get; set; }
|
|
|
- public string expires_in { get; set; }
|
|
|
- public string token_type { get; set; }
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|