|
@@ -31,15 +31,15 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
public IConfiguration _configuration { get; set; }
|
|
|
|
|
|
- //private readonly ThirdApisService _thirdApisService;
|
|
|
- public ScDataPushController( AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, IConfiguration configuration)
|
|
|
+ private readonly ThirdApisService _thirdApisService;
|
|
|
+ public ScDataPushController(ThirdApisService thirdApisService, AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, IConfiguration configuration)
|
|
|
{
|
|
|
_azureCosmos = azureCosmos;
|
|
|
|
|
|
_azureStorage = azureStorage;
|
|
|
|
|
|
_configuration = configuration;
|
|
|
- // _thirdApisService = thirdApisService;
|
|
|
+ _thirdApisService = thirdApisService;
|
|
|
}
|
|
|
|
|
|
[ProducesDefaultResponseType]
|
|
@@ -48,356 +48,488 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
|
JsonElement areaIdJson = json.GetProperty("areaId");
|
|
|
+ // JsonElement school = json.GetProperty("school");
|
|
|
+ JsonElement schoolsJson = json.GetProperty("schools");
|
|
|
+ Dictionary<string, Dictionary<string, object>> pushDatas = new Dictionary<string, Dictionary<string, object>>();
|
|
|
+ List<Dictionary<string, object>> dicts = new List<Dictionary<string, object>>();
|
|
|
+ List<string> pushTeachers = json.GetProperty("pushTeachers").ToObject<List<string>>();
|
|
|
+ List<ScsResult> results = new List<ScsResult>();
|
|
|
AreaSetting areaSetting = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).ReadItemAsync<AreaSetting>($"{areaIdJson}", new PartitionKey("AreaSetting"));
|
|
|
ScAccessConfig config = areaSetting.accessConfig.ToObject<ScAccessConfig>();
|
|
|
- JsonElement school = json.GetProperty("school");
|
|
|
- List<string> pushTeachers = json.GetProperty("pushTeachers").ToObject<List<string>>();
|
|
|
- StringBuilder queryText = new StringBuilder($"SELECT distinct value(c) FROM c where c.type='yxtrain'");
|
|
|
- List<GroupList> yxtrain = new List<GroupList>();
|
|
|
- await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<GroupList>(queryText: queryText.ToString(),
|
|
|
- requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"GroupList-{school}") }))
|
|
|
- {
|
|
|
- yxtrain.Add(item);
|
|
|
- }
|
|
|
- List<TeacherTrain> trains = new List<TeacherTrain>();
|
|
|
- var members = yxtrain.SelectMany(x => x.members).ToList();
|
|
|
- //指定推送一部分的教师
|
|
|
- if (pushTeachers.IsNotEmpty())
|
|
|
- {
|
|
|
- members = members.FindAll(x => pushTeachers.Contains(x.id));
|
|
|
- }
|
|
|
- if (members.IsNotEmpty())
|
|
|
- {
|
|
|
- queryText = new StringBuilder($"SELECT distinct value(c) FROM c where 1=1 " +
|
|
|
- $"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(),
|
|
|
- requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"TeacherTrain-{school}") }))
|
|
|
+ Dictionary<string, dynamic > checkDatas = new Dictionary<string, dynamic >();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ List<string> schools = schoolsJson.ToObject<List<string>>();
|
|
|
+ foreach (var school in schools) {
|
|
|
+ StringBuilder queryText = new StringBuilder($"SELECT distinct value(c) FROM c where c.type='yxtrain'");
|
|
|
+ List<GroupList> yxtrain = new List<GroupList>();
|
|
|
+ await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "School").GetItemQueryIterator<GroupList>(queryText: queryText.ToString(),
|
|
|
+ requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"GroupList-{school}") }))
|
|
|
{
|
|
|
- trains.Add(item);
|
|
|
+ yxtrain.Add(item);
|
|
|
}
|
|
|
- }
|
|
|
+ List<TeacherTrain> trains = new List<TeacherTrain>();
|
|
|
+ var members = yxtrain.SelectMany(x => x.members).ToList();
|
|
|
+ //指定推送一部分的教师
|
|
|
+ if (pushTeachers.IsNotEmpty())
|
|
|
+ {
|
|
|
+ members = members.FindAll(x => pushTeachers.Contains(x.id));
|
|
|
+ }
|
|
|
+ if (members.IsNotEmpty())
|
|
|
+ {
|
|
|
+ queryText = new StringBuilder($"SELECT distinct value(c) FROM c where 1=1 " +
|
|
|
+ $"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(),
|
|
|
+ requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"TeacherTrain-{school}") }))
|
|
|
+ {
|
|
|
+ trains.Add(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var table = _azureStorage.GetCloudTableClient().GetTableReference("ScYxpt");
|
|
|
+ List<ScTeacher> scTeachers = await table.FindListByDict<ScTeacher>(new Dictionary<string, object> { { "PartitionKey", "ScTeacher" }, { "schoolCode", $"{school}" } });
|
|
|
+ List<ScTeacherDiagnosis> scTeacherDiagnoses = await table.FindListByDict<ScTeacherDiagnosis>(new Dictionary<string, object> { { "PartitionKey", "ScTeacherDiagnosis" }, { "schoolCode", $"{school}" } });
|
|
|
|
|
|
- //string sql = $" SELECT value(c) FROM c join a in c.binds where ARRAY_LENGTH(c.binds)>0 and a.type='{config.config}' ";
|
|
|
- //List<Teacher> teachers = new List<Teacher>();
|
|
|
- //await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Teacher").GetItemQueryIterator<Teacher>(queryText: sql,
|
|
|
- // requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Base") }))
|
|
|
- //{
|
|
|
- // teachers.Add(item);
|
|
|
- //}
|
|
|
- var table = _azureStorage.GetCloudTableClient().GetTableReference("ScYxpt");
|
|
|
- List<ScTeacher> scTeachers = await table.FindListByDict<ScTeacher>(new Dictionary<string, object> { { "PartitionKey", "ScTeacher" }, { "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<ScsResult> results = new List<ScsResult>();
|
|
|
- Dictionary<string, Dictionary<string, object>> pushDatas = new Dictionary<string, Dictionary<string, object>>();
|
|
|
- List<Dictionary<string, object>> dicts = new List<Dictionary<string, object>>();
|
|
|
- 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);
|
|
|
+ int pages = (trains.Count + 49) / 50; //pages = (total + max -1) / max;
|
|
|
|
|
|
- //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);
|
|
|
+ var teammodelossas = _azureStorage.GetBlobContainerSAS99Year("teammodelos", Azure.Storage.Sas.BlobContainerSasPermissions.Read);
|
|
|
+ var schoolsas = _azureStorage.GetBlobContainerSAS99Year($"{school}", Azure.Storage.Sas.BlobContainerSasPermissions.Read);
|
|
|
+ HashSet<TeacherTrain> updatePush = new HashSet<TeacherTrain>();
|
|
|
+ for (int i = 0; i < pages; i++)
|
|
|
+ {
|
|
|
+ List<TeacherTrain> lists = trains.Skip((i) * 50).Take(50).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.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.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.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.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);
|
|
|
+ //装载数据
|
|
|
+ List<Task> tasks = new List<Task>();
|
|
|
+ lists.ForEach(x =>
|
|
|
+ {
|
|
|
+ tasks.Add(CheckTeacher(x, scTeachers, scTeacherDiagnoses, $"{school}", schoolsas, list53112, list53113, list53117, list53122, teammodelossas, pushDatas, updatePush));
|
|
|
+ });
|
|
|
+ await Task.WhenAll(tasks);
|
|
|
+ //推送数据
|
|
|
+ if (list53112.IsNotEmpty())
|
|
|
+ {
|
|
|
|
|
|
- //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);
|
|
|
- //装载数据
|
|
|
- dicts.Add(parameterContent53112);
|
|
|
- dicts.Add(parameterContent53113);
|
|
|
- dicts.Add(parameterContent53117);
|
|
|
- dicts.Add(parameterContent53122);
|
|
|
- foreach (var x in lists)
|
|
|
+ dicts.Add(parameterContent53112);
|
|
|
+ UpdateTeacherListSituation = await _thirdApisService.Post(config.url, "UpdateTeacherListSituation", config.passKey, config.privateKey, parameterContent53112);
|
|
|
+ UpdateTeacherListSituation.bizcode = "UpdateTeacherListSituation";
|
|
|
+ UpdateTeacherListSituation.title = "5.3.1.12学员培训基本情况批量回写";
|
|
|
+ results.Add(UpdateTeacherListSituation);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (list53113.IsNotEmpty())
|
|
|
+ {
|
|
|
+ dicts.Add(parameterContent53113);
|
|
|
+ UpdateTeacherListDiagnosis = await _thirdApisService.Post(config.url, "UpdateTeacherListDiagnosis", config.passKey, config.privateKey, parameterContent53113);
|
|
|
+ UpdateTeacherListDiagnosis.bizcode = "UpdateTeacherListDiagnosis";
|
|
|
+ UpdateTeacherListDiagnosis.title = "5.3.1.13学员能力点测评结果批量回写";
|
|
|
+ results.Add(UpdateTeacherListDiagnosis);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (list53117.IsNotEmpty())
|
|
|
+ {
|
|
|
+ dicts.Add(parameterContent53117);
|
|
|
+ UploadKTSLList = await _thirdApisService.Post(config.url, "UploadKTSLList", config.passKey, config.privateKey, parameterContent53117);
|
|
|
+ UploadKTSLList.bizcode = "UploadKTSLList";
|
|
|
+ UploadKTSLList.title = "5.3.1.17学员课堂实录批量回写";
|
|
|
+ results.Add(UploadKTSLList);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (list53122.IsNotEmpty())
|
|
|
+ {
|
|
|
+ dicts.Add(parameterContent53122);
|
|
|
+ UploadSBTARPDFListV2 = await _thirdApisService.Post(config.url, "UploadSBTARPDFListV2", config.passKey, config.privateKey, parameterContent53122);
|
|
|
+ UploadSBTARPDFListV2.bizcode = "UploadSBTARPDFListV2";
|
|
|
+ UploadSBTARPDFListV2.title = "5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写";
|
|
|
+ results.Add(UploadSBTARPDFListV2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<Task<ItemResponse<TeacherTrain>>> tas = new List<Task<ItemResponse<TeacherTrain>>>();
|
|
|
+ updatePush.ToList().ForEach(x =>
|
|
|
{
|
|
|
- List<KeyValuePair<string, string>> msgs = new List<KeyValuePair<string, string>>();
|
|
|
- List<ScTeacher> teacher = scTeachers.FindAll(t => !string.IsNullOrWhiteSpace(t.tmdid) && t.tmdid.Equals(x.id));
|
|
|
- foreach (var t in teacher)
|
|
|
+ tas.Add(client.GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReplaceItemAsync(x, x.id, new PartitionKey(x.code)));
|
|
|
+ });
|
|
|
+ await Task.WhenAll(tas);
|
|
|
+
|
|
|
+ pushDatas.Keys.ToList().ForEach(x => {
|
|
|
+ if (pushDatas[x].Keys.Any())
|
|
|
{
|
|
|
- List<PushFail> fails = new List<PushFail>();
|
|
|
- Dictionary<string, object> pushData = new Dictionary<string, object>();
|
|
|
- string jsonTech = scTeacherDiagnoses.ToJsonString();
|
|
|
- ScTeacherDiagnosis diagnosis = scTeacherDiagnoses.Find(x => x.RowKey.Equals($"{t.PXID}"));
|
|
|
- (int t53112OK, List<KeyValuePair<string, string>> msgs53112) = ThirdService. check53112(x, msgs);
|
|
|
- (int t53113OK, List<KeyValuePair<string, string>> msgs53113, List<AbilitySub> abilitySubs) = await ThirdService.check53113(_azureCosmos,x, diagnosis, msgs);
|
|
|
- (int t53117OK, List<KeyValuePair<string, string>> msgs53117) = ThirdService.check53117(x, msgs);
|
|
|
- (int t53122OK, List<KeyValuePair<string, string>> msgs53122) = ThirdService.check53122(x, msgs);
|
|
|
+ Dictionary<string, dynamic> dict = new Dictionary<string, dynamic>();
|
|
|
+ dict.Add($"tmdid", x);
|
|
|
+
|
|
|
+ List<string> types = new List<string>();
|
|
|
+ pushDatas[x].Keys.ToList().ForEach(y => {
|
|
|
+ if (y.Contains("fail-"))
|
|
|
+ {
|
|
|
+ types.Add(y);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ dict.Add($"msg", pushDatas[x][pushDatas[x].Keys.First()]);
|
|
|
+ dict.Add($"types", types);
|
|
|
+ if (types.Any())
|
|
|
+ {
|
|
|
+ checkDatas[x] = dict;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- //5.3.1.12学员培训基本情况批量回写-UpdateTeacherListSituation
|
|
|
- if (t53112OK == 1)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return Ok(new { data = new { results, checkDatas, dicts } });
|
|
|
+ }
|
|
|
+
|
|
|
+ private async Task CheckTeacher(TeacherTrain x, List<ScTeacher> scTeachers, List<ScTeacherDiagnosis> scTeacherDiagnoses, string school,(string uri ,string sas) schoolsas,
|
|
|
+ List<Dictionary<string, object>> list53112, List<Dictionary<string, object>> list53113, List<Dictionary<string, object>> list53117, List<Dictionary<string, object>> list53122,
|
|
|
+ (string uri, string sas ) teammodelossas, Dictionary<string, Dictionary<string, object>> pushDatas,HashSet<TeacherTrain> updatePush
|
|
|
+ )
|
|
|
+ {
|
|
|
+ List<KeyValuePair<string, string>> msgs = new List<KeyValuePair<string, string>>();
|
|
|
+ List<ScTeacher> teacher = scTeachers.FindAll(t => !string.IsNullOrWhiteSpace(t.tmdid) && t.tmdid.Equals(x.id));
|
|
|
+ foreach (var t in teacher)
|
|
|
+ {
|
|
|
+ List<PushFail> fails = new List<PushFail>();
|
|
|
+ Dictionary<string, object> pushData = new Dictionary<string, object>();
|
|
|
+ string jsonTech = scTeacherDiagnoses.ToJsonString();
|
|
|
+ ScTeacherDiagnosis diagnosis = scTeacherDiagnoses.Find(x => x.RowKey.Equals($"{t.PXID}"));
|
|
|
+
|
|
|
+ ///检查是否全部已经上传
|
|
|
+ bool pushAll = true;
|
|
|
+ int t53112OK = 1, t53113OK=1, t53117OK=1 , t53122OK=1 ;
|
|
|
+ List<KeyValuePair<string, string>> msgs53112 = null;
|
|
|
+ List<KeyValuePair<string, string>> msgs53113 = null;
|
|
|
+
|
|
|
+ List<KeyValuePair<string, string>> msgs53117 = null;
|
|
|
+ List<KeyValuePair<string, string>> msgs53122 = null;
|
|
|
+ List<AbilitySub> allRightAbility = new List<AbilitySub>();
|
|
|
+ List<AbilitySub> abilitySubs = new List<AbilitySub>();
|
|
|
+ if (!x.pushes.Contains("53112")) {
|
|
|
+ pushAll = false;
|
|
|
+ (t53112OK, msgs53112) = ThirdService.check53112(x, msgs);
|
|
|
+ }
|
|
|
+ if (!x.pushes.Contains("53113")) {
|
|
|
+ pushAll = false;
|
|
|
+ ( t53113OK, msgs53113, abilitySubs, allRightAbility) = await ThirdService.check53113(_azureCosmos, x, diagnosis, msgs, $"{school}", schoolsas.uri, schoolsas.sas, _azureStorage);
|
|
|
+ }
|
|
|
+ if (!x.pushes.Contains("53117"))
|
|
|
+ {
|
|
|
+ pushAll = false;
|
|
|
+ ( t53117OK, msgs53117) = await ThirdService.check53117(x, msgs, $"{school}", schoolsas.uri, schoolsas.sas, _azureStorage);
|
|
|
+ }
|
|
|
+ if (!x.pushes.Contains("53122"))
|
|
|
+ {
|
|
|
+ pushAll = false;
|
|
|
+ ( t53122OK, msgs53122) = await ThirdService.check53122(x, msgs, $"{school}", schoolsas.uri, schoolsas.sas, _azureStorage);
|
|
|
+ }
|
|
|
+ if (pushAll== false && t53112OK == 1 && t53113OK == 1 && t53117OK == 1 && t53122OK == 1)
|
|
|
+ {
|
|
|
+ //5.3.1.12学员培训基本情况批量回写-UpdateTeacherListSituation
|
|
|
+ if (t53112OK == 1)
|
|
|
+ {
|
|
|
+ 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、其他
|
|
|
+ pushData.Add("success-UpdateTeacherListSituation", parameterMapData);
|
|
|
+ x.pushes.Add("53112");
|
|
|
+ updatePush.Add(x);
|
|
|
+ list53112.Add(parameterMapData);
|
|
|
+ }
|
|
|
+ //5.3.1.13学员能力点测评结果批量回写-UpdateTeacherListDiagnosis
|
|
|
+ if (t53113OK == 1)
|
|
|
+ {
|
|
|
+ List<Dictionary<string, object>> parameterMapDatas = new List<Dictionary<string, object>>();
|
|
|
+ var uploadedAbility = abilitySubs.FindAll(ab => ab.uploads.Count > 0);
|
|
|
+ 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("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)
|
|
|
+ parameterMapData.Add("DiagnosisNum", $"{a.no}");
|
|
|
+ List<Dictionary<string, object>> pfiles = new List<Dictionary<string, object>>();
|
|
|
+ parameterMapData.Add("pfiles", pfiles);
|
|
|
+
|
|
|
+ AbilitySub allRight = allRightAbility.Find(sub => sub.id.Equals(a.id));
|
|
|
+ if (allRight != null)
|
|
|
{
|
|
|
- case -2:
|
|
|
- ComPassed = "4";
|
|
|
+ allRight.uploads.ForEach(upload =>
|
|
|
+ {
|
|
|
+ upload.urls.ForEach(url =>
|
|
|
+ {
|
|
|
+ Dictionary<string, object> pfileMap = new Dictionary<string, object>();
|
|
|
+ string fileext = url.url.Substring(url.url.LastIndexOf(".") > 0 ? url.url.LastIndexOf(".") + 1 : 0);
|
|
|
+ pfileMap.Add("url", $"{url.url}?{schoolsas.sas}");
|
|
|
+ pfileMap.Add("fileName", url.name.Length > 95 ? $"{url.name.Substring(0, 95)}.{fileext}" : url.name);
|
|
|
+ pfileMap.Add("fileSize", $"{url.size}");
|
|
|
+ pfileMap.Add("md5", url.hash);
|
|
|
+
|
|
|
+ pfileMap.Add("fileType", fileext);
|
|
|
+ pfiles.Add(pfileMap);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //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 = "4";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ string hpscore = "0";
|
|
|
+ switch (a.hpscore)
|
|
|
+ {
|
|
|
case -1:
|
|
|
- ComPassed = "0";
|
|
|
+ hpscore = "0";
|
|
|
break;
|
|
|
case 0:
|
|
|
- ComPassed = "3";
|
|
|
+ hpscore = "3";
|
|
|
break;
|
|
|
case 1:
|
|
|
- ComPassed = "1";
|
|
|
+ hpscore = "1";
|
|
|
break;
|
|
|
case 2:
|
|
|
- ComPassed = "2";
|
|
|
+ hpscore = "2";
|
|
|
break;
|
|
|
default:
|
|
|
- ComPassed = "4";
|
|
|
+ hpscore = "4";
|
|
|
break;
|
|
|
}
|
|
|
- parameterMapData.Add("ComPassed", ComPassed);//0、未认定 1、合格 2、优秀 3、不合格 4、其他
|
|
|
- pushData.Add("success-UpdateTeacherListSituation", parameterMapData);
|
|
|
- list53112.Add(parameterMapData);
|
|
|
- }
|
|
|
- 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 });
|
|
|
- }
|
|
|
- //5.3.1.13学员能力点测评结果批量回写-UpdateTeacherListDiagnosis
|
|
|
- if (t53113OK == 1)
|
|
|
- {
|
|
|
- List<Dictionary<string, object>> parameterMapDatas = new List<Dictionary<string, object>>();
|
|
|
- var uploadedAbility= abilitySubs.FindAll(ab => ab.uploads.Count > 0);
|
|
|
- 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}");
|
|
|
- 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)
|
|
|
+ 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 = "4";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ ///上传了三个,且当前没有上传的能力点,标记为为学习状态。
|
|
|
+ if (uploadedAbility.Count >= 3)
|
|
|
+ {
|
|
|
+ if (pfiles.Count == 0)
|
|
|
{
|
|
|
- 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);
|
|
|
- });
|
|
|
- });
|
|
|
+ zpscore = "4";
|
|
|
+ hpscore = "4";
|
|
|
+ xzpresult = "4";
|
|
|
}
|
|
|
+ }
|
|
|
+ parameterMapData.Add("zpresult", zpscore);
|
|
|
+ parameterMapData.Add("hpresult", hpscore);
|
|
|
+ parameterMapData.Add("xzpresult", xzpresult);
|
|
|
|
|
|
+ list53113.Add(parameterMapData);
|
|
|
+ parameterMapDatas.Add(parameterMapData);
|
|
|
+ });
|
|
|
+ x.pushes.Add("53113");
|
|
|
+ updatePush.Add(x);
|
|
|
+ pushData.Add("success-UpdateTeacherListDiagnosis", parameterMapDatas);
|
|
|
|
|
|
- //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 = "4";
|
|
|
- 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 = "4";
|
|
|
- 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 = "4";
|
|
|
- break;
|
|
|
- }
|
|
|
- ///上传了三个,且当前没有上传的能力点,标记为为学习状态。
|
|
|
- if (uploadedAbility.Count >=3) {
|
|
|
- if (pfiles.Count == 0) {
|
|
|
- zpscore = "4";
|
|
|
- hpscore = "4";
|
|
|
- xzpresult = "4";
|
|
|
- }
|
|
|
- }
|
|
|
- parameterMapData.Add("zpresult", zpscore);
|
|
|
- parameterMapData.Add("hpresult", hpscore);
|
|
|
- parameterMapData.Add("xzpresult", xzpresult);
|
|
|
-
|
|
|
- list53113.Add(parameterMapData);
|
|
|
- parameterMapDatas.Add(parameterMapData);
|
|
|
- });
|
|
|
- pushData.Add("success-UpdateTeacherListDiagnosis", parameterMapDatas);
|
|
|
-
|
|
|
- }
|
|
|
- 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 });
|
|
|
- }
|
|
|
- //5.3.1.17学员课堂实录批量回写-UploadKTSLList
|
|
|
- if (t53117OK == 1)
|
|
|
- {
|
|
|
- List<Dictionary<string, object>> parameterMapDatas = new List<Dictionary<string, object>>();
|
|
|
- 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);
|
|
|
- parameterMapDatas.Add(parameterMapData);
|
|
|
- });
|
|
|
- pushData.Add("success-UploadKTSLList", parameterMapDatas);
|
|
|
- }
|
|
|
- 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 });
|
|
|
- }
|
|
|
- //5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写-UploadSBTARPDFListV2
|
|
|
- if (t53122OK == 1)
|
|
|
+ }
|
|
|
+ //5.3.1.17学员课堂实录批量回写-UploadKTSLList
|
|
|
+ if (t53117OK == 1)
|
|
|
+ {
|
|
|
+ List<Dictionary<string, object>> parameterMapDatas = new List<Dictionary<string, object>>();
|
|
|
+ x.teacherClasses.ForEach(clss =>
|
|
|
{
|
|
|
Dictionary<string, object> parameterMapData = new Dictionary<string, object>();
|
|
|
+ string fileext = clss.url.Substring(clss.url.LastIndexOf(".") > 0 ? clss.url.LastIndexOf(".") + 1 : 0);
|
|
|
parameterMapData.Add("PXID", $"{t.PXID}");
|
|
|
parameterMapData.Add("TID", $"{t.TID}");
|
|
|
- List<Dictionary<string, object>> files = new List<Dictionary<string, object>>();
|
|
|
- x.offlineRecords.ForEach(record => {
|
|
|
- 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);
|
|
|
- }
|
|
|
- });
|
|
|
- if (x.offlineReport != null) {
|
|
|
+ parameterMapData.Add("url", $"{clss.url}?{schoolsas.sas}");//添加访问授权
|
|
|
+ parameterMapData.Add("url2", $"{clss.url}?{schoolsas.sas}");
|
|
|
+ parameterMapData.Add("fileName", clss.name.Length > 95 ? $"{clss.name.Substring(0, 95)}.{fileext}" : clss.name);
|
|
|
+ parameterMapData.Add("fileSize", $"{clss.size}");
|
|
|
+ parameterMapData.Add("md5", clss.hash);
|
|
|
+
|
|
|
+ parameterMapData.Add("fileType", fileext);
|
|
|
+ list53117.Add(parameterMapData);
|
|
|
+ parameterMapDatas.Add(parameterMapData);
|
|
|
+ });
|
|
|
+ x.pushes.Add("53117");
|
|
|
+ updatePush.Add(x);
|
|
|
+ pushData.Add("success-UploadKTSLList", parameterMapDatas);
|
|
|
+ }
|
|
|
+ //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 =>
|
|
|
+ {
|
|
|
+ if (!string.IsNullOrWhiteSpace(record.url))
|
|
|
+ {
|
|
|
Dictionary<string, object> fileMap = new Dictionary<string, object>();
|
|
|
- fileMap.Add("url", x.offlineReport.blob);
|
|
|
- fileMap.Add("fileName", x.offlineReport.name);
|
|
|
- fileMap.Add("fileSize", x.offlineReport.size);
|
|
|
- fileMap.Add("md5", x.offlineReport.hash);
|
|
|
- string fileext = x.offlineReport.extension;
|
|
|
+ string fileext = record.url.Substring(record.url.LastIndexOf(".") > 0 ? record.url.LastIndexOf(".") + 1 : 0);
|
|
|
+ fileMap.Add("url", $"{record.url}?{schoolsas.sas}");
|
|
|
+ fileMap.Add("fileName", record.name.Length > 95 ? $"{record.name.Substring(0, 95)}.{fileext}" : record.name);
|
|
|
+ fileMap.Add("fileSize", $"{record.size}");
|
|
|
+ fileMap.Add("md5", record.hash);
|
|
|
+
|
|
|
fileMap.Add("fileType", fileext);
|
|
|
files.Add(fileMap);
|
|
|
}
|
|
|
- parameterMapData.Add("files", files);
|
|
|
- list53122.Add(parameterMapData);
|
|
|
- pushData.Add("success-UploadSBTARPDFListV2", parameterMapData);
|
|
|
- }
|
|
|
- else
|
|
|
+ });
|
|
|
+ if (x.offlineReport != null)
|
|
|
{
|
|
|
- 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 });
|
|
|
+ Dictionary<string, object> fileMap = new Dictionary<string, object>();
|
|
|
+ fileMap.Add("url", $"{x.offlineReport.blob}?{teammodelossas.sas}");
|
|
|
+ fileMap.Add("fileName", x.offlineReport.name);
|
|
|
+ fileMap.Add("fileSize", $"{x.offlineReport.size}");
|
|
|
+ fileMap.Add("md5", x.offlineReport.hash);
|
|
|
+ string fileext = x.offlineReport.extension;
|
|
|
+ fileMap.Add("fileType", fileext);
|
|
|
+ files.Add(fileMap);
|
|
|
+ }
|
|
|
+ parameterMapData.Add("files", files);
|
|
|
+ list53122.Add(parameterMapData);
|
|
|
+ x.pushes.Add("53122");
|
|
|
+ updatePush.Add(x);
|
|
|
+ pushData.Add("success-UploadSBTARPDFListV2", parameterMapData);
|
|
|
+ }
|
|
|
+ if (!pushAll)
|
|
|
+ {
|
|
|
+ if (pushData.Any()) {
|
|
|
+ pushDatas.Add(t.tmdid, pushData);
|
|
|
}
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ if (t53112OK != 1) {
|
|
|
+ pushData.Add("fail-UpdateTeacherListSituation", new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53112, school = t.schoolCode, schoolname = t.SchoolName });
|
|
|
+ fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53112 ,school= t.schoolCode,schoolname=t.SchoolName });
|
|
|
+ }
|
|
|
+ if (t53113OK != 1)
|
|
|
+ {
|
|
|
+ pushData.Add("fail-UpdateTeacherListDiagnosis", new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53113, school = t.schoolCode, schoolname = t.SchoolName });
|
|
|
+ fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53113, school = t.schoolCode, schoolname = t.SchoolName });
|
|
|
+ }
|
|
|
+ if (t53117OK != 1) {
|
|
|
+ pushData.Add("fail-UploadKTSLList", new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53117, school = t.schoolCode, schoolname = t.SchoolName });
|
|
|
+ fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53117, school = t.schoolCode, schoolname = t.SchoolName });
|
|
|
+ }
|
|
|
+ if (t53122OK != 1) {
|
|
|
+ pushData.Add("fail-UploadSBTARPDFListV2", new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53122, school = t.schoolCode, schoolname = t.SchoolName });
|
|
|
+ fails.Add(new PushFail { tmdid = t.tmdid, name = t.TeacherName, msgs = msgs53122, school = t.schoolCode, schoolname = t.SchoolName });
|
|
|
+ }
|
|
|
+ if (pushData.Any())
|
|
|
+ {
|
|
|
pushDatas.Add(t.tmdid, pushData);
|
|
|
}
|
|
|
}
|
|
|
- //推送数据
|
|
|
- //UpdateTeacherListSituation = await _thirdApisService.Post(config.url, "UpdateTeacherListSituation", config.passKey, config.privateKey, parameterContent53112);
|
|
|
- //UpdateTeacherListSituation.code = "UpdateTeacherListSituation";
|
|
|
- //UpdateTeacherListSituation.title = "5.3.1.12学员培训基本情况批量回写";
|
|
|
-
|
|
|
- //UpdateTeacherListDiagnosis = await _thirdApisService.Post(config.url, "UpdateTeacherListDiagnosis", config.passKey, config.privateKey, parameterContent53113);
|
|
|
- //UpdateTeacherListDiagnosis.code = "UpdateTeacherListDiagnosis";
|
|
|
- //UpdateTeacherListDiagnosis.title = "5.3.1.13学员能力点测评结果批量回写";
|
|
|
-
|
|
|
- //UploadKTSLList = await _thirdApisService.Post(config.url, "UploadKTSLList", config.passKey, config.privateKey, parameterContent53117);
|
|
|
- //UploadKTSLList.code = "UploadKTSLList";
|
|
|
- //UploadKTSLList.title = "5.3.1.17学员课堂实录批量回写";
|
|
|
-
|
|
|
- //UploadSBTARPDFListV2 = await _thirdApisService.Post(config.url, "UploadSBTARPDFListV2", config.passKey, config.privateKey, parameterContent53122);
|
|
|
- //UploadSBTARPDFListV2.code = "UploadSBTARPDFListV2";
|
|
|
- //UploadSBTARPDFListV2.title = "5.3.1.22学员校本教研PDF(每人可以返回多条)批量回写";
|
|
|
- //results.Add(UpdateTeacherListSituation);
|
|
|
- //results.Add(UpdateTeacherListDiagnosis);
|
|
|
- //results.Add(UploadKTSLList);
|
|
|
- //results.Add(UploadSBTARPDFListV2);
|
|
|
}
|
|
|
-
|
|
|
- return Ok(new { data = new { results, pushDatas, dicts } });
|
|
|
}
|
|
|
|
|
|
+ [ProducesDefaultResponseType]
|
|
|
+ [HttpPost("sc-check")]
|
|
|
+ public async Task<IActionResult> css(JsonElement json)
|
|
|
+ {
|
|
|
+ JsonElement areaIdJson = json.GetProperty("areaId");
|
|
|
+ AreaSetting areaSetting = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).ReadItemAsync<AreaSetting>($"{areaIdJson}", new PartitionKey("AreaSetting"));
|
|
|
+ ScAccessConfig config = areaSetting.accessConfig.ToObject<ScAccessConfig>();
|
|
|
+ Dictionary<string, object> parameterContent53123 = new Dictionary<string, object>();
|
|
|
+ parameterContent53123.Add("Content", new { TrainComID = config.trainComID, ProjectID =config.p.First().pd, ProjectItemID =config.p.First().pid, PXID = "277838", TID= "624316" });
|
|
|
+ parameterContent53123.Add("TrainComID", config.trainComID);
|
|
|
+ parameterContent53123.Add("ProjectID", config.p.First().pd);
|
|
|
+ parameterContent53123.Add("ProjectItemID", config.p.First().pid);
|
|
|
+ parameterContent53123.Add("PXID", "277838");
|
|
|
+ parameterContent53123.Add("TID", "624316");
|
|
|
+ ScsResult GetDiagnosisResultByPXIDCommand = await _thirdApisService.Post(config.url, "GetDiagnosisResultByPXIDCommand", config.passKey, config.privateKey, parameterContent53123);
|
|
|
+ return Ok(GetDiagnosisResultByPXIDCommand);
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|