|
@@ -15,6 +15,7 @@ using Microsoft.Extensions.Options;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Configuration;
|
|
using HTEXLib.COMM.Helpers;
|
|
using HTEXLib.COMM.Helpers;
|
|
using TEAMModelOS.SDK;
|
|
using TEAMModelOS.SDK;
|
|
|
|
+using System.Threading;
|
|
|
|
|
|
namespace TEAMModelOS.Controllers
|
|
namespace TEAMModelOS.Controllers
|
|
{
|
|
{
|
|
@@ -58,6 +59,10 @@ namespace TEAMModelOS.Controllers
|
|
ScAccessConfig config = areaSetting.accessConfig.ToObject<ScAccessConfig>();
|
|
ScAccessConfig config = areaSetting.accessConfig.ToObject<ScAccessConfig>();
|
|
Dictionary<string, dynamic > checkDatas = new Dictionary<string, dynamic >();
|
|
Dictionary<string, dynamic > checkDatas = new Dictionary<string, dynamic >();
|
|
|
|
|
|
|
|
+ var table = _azureStorage.GetCloudTableClient().GetTableReference("ScYxpt");
|
|
|
|
+ List<ScTeacher> scTeachers = await table.FindListByDict<ScTeacher>(new Dictionary<string, object> { { "PartitionKey", "ScTeacher" }, { "areaId", $"{areaIdJson}" } });
|
|
|
|
+ List<ScTeacherDiagnosis> scTeacherDiagnoses = await table.FindListByDict<ScTeacherDiagnosis>(new Dictionary<string, object> { { "PartitionKey", "ScTeacherDiagnosis" }, { "areaId", $"{areaIdJson}" } });
|
|
|
|
+ var teammodelossas = _azureStorage.GetBlobContainerSAS99Year("teammodelos", Azure.Storage.Sas.BlobContainerSasPermissions.Read);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -87,16 +92,7 @@ namespace TEAMModelOS.Controllers
|
|
trains.Add(item);
|
|
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}" } });
|
|
|
|
-
|
|
|
|
- List<KeyValuePair<TeacherTrain, string>> trainsNO = new List<KeyValuePair<TeacherTrain, string>>();
|
|
|
|
-
|
|
|
|
-
|
|
|
|
int pages = (trains.Count + 49) / 50; //pages = (total + max -1) / max;
|
|
int pages = (trains.Count + 49) / 50; //pages = (total + max -1) / max;
|
|
-
|
|
|
|
- var teammodelossas = _azureStorage.GetBlobContainerSAS99Year("teammodelos", Azure.Storage.Sas.BlobContainerSasPermissions.Read);
|
|
|
|
var schoolsas = _azureStorage.GetBlobContainerSAS99Year($"{school}", Azure.Storage.Sas.BlobContainerSasPermissions.Read);
|
|
var schoolsas = _azureStorage.GetBlobContainerSAS99Year($"{school}", Azure.Storage.Sas.BlobContainerSasPermissions.Read);
|
|
HashSet<TeacherTrain> updatePush = new HashSet<TeacherTrain>();
|
|
HashSet<TeacherTrain> updatePush = new HashSet<TeacherTrain>();
|
|
for (int i = 0; i < pages; i++)
|
|
for (int i = 0; i < pages; i++)
|
|
@@ -141,9 +137,10 @@ namespace TEAMModelOS.Controllers
|
|
});
|
|
});
|
|
await Task.WhenAll(tasks);
|
|
await Task.WhenAll(tasks);
|
|
//推送数据
|
|
//推送数据
|
|
|
|
+
|
|
if (list53112.IsNotEmpty())
|
|
if (list53112.IsNotEmpty())
|
|
{
|
|
{
|
|
-
|
|
|
|
|
|
+ //Thread.Sleep(10 * 1000);
|
|
dicts.Add(parameterContent53112);
|
|
dicts.Add(parameterContent53112);
|
|
UpdateTeacherListSituation = await _thirdApisService.Post(config.url, "UpdateTeacherListSituation", config.passKey, config.privateKey, parameterContent53112);
|
|
UpdateTeacherListSituation = await _thirdApisService.Post(config.url, "UpdateTeacherListSituation", config.passKey, config.privateKey, parameterContent53112);
|
|
UpdateTeacherListSituation.bizcode = "UpdateTeacherListSituation";
|
|
UpdateTeacherListSituation.bizcode = "UpdateTeacherListSituation";
|
|
@@ -153,6 +150,7 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
if (list53113.IsNotEmpty())
|
|
if (list53113.IsNotEmpty())
|
|
{
|
|
{
|
|
|
|
+ //Thread.Sleep(10 * 1000);
|
|
dicts.Add(parameterContent53113);
|
|
dicts.Add(parameterContent53113);
|
|
UpdateTeacherListDiagnosis = await _thirdApisService.Post(config.url, "UpdateTeacherListDiagnosis", config.passKey, config.privateKey, parameterContent53113);
|
|
UpdateTeacherListDiagnosis = await _thirdApisService.Post(config.url, "UpdateTeacherListDiagnosis", config.passKey, config.privateKey, parameterContent53113);
|
|
UpdateTeacherListDiagnosis.bizcode = "UpdateTeacherListDiagnosis";
|
|
UpdateTeacherListDiagnosis.bizcode = "UpdateTeacherListDiagnosis";
|
|
@@ -162,6 +160,7 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
if (list53117.IsNotEmpty())
|
|
if (list53117.IsNotEmpty())
|
|
{
|
|
{
|
|
|
|
+ //Thread.Sleep(10 * 1000 );
|
|
dicts.Add(parameterContent53117);
|
|
dicts.Add(parameterContent53117);
|
|
UploadKTSLList = await _thirdApisService.Post(config.url, "UploadKTSLList", config.passKey, config.privateKey, parameterContent53117);
|
|
UploadKTSLList = await _thirdApisService.Post(config.url, "UploadKTSLList", config.passKey, config.privateKey, parameterContent53117);
|
|
UploadKTSLList.bizcode = "UploadKTSLList";
|
|
UploadKTSLList.bizcode = "UploadKTSLList";
|
|
@@ -171,6 +170,7 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
if (list53122.IsNotEmpty())
|
|
if (list53122.IsNotEmpty())
|
|
{
|
|
{
|
|
|
|
+ //Thread.Sleep(10 * 1000 );
|
|
dicts.Add(parameterContent53122);
|
|
dicts.Add(parameterContent53122);
|
|
UploadSBTARPDFListV2 = await _thirdApisService.Post(config.url, "UploadSBTARPDFListV2", config.passKey, config.privateKey, parameterContent53122);
|
|
UploadSBTARPDFListV2 = await _thirdApisService.Post(config.url, "UploadSBTARPDFListV2", config.passKey, config.privateKey, parameterContent53122);
|
|
UploadSBTARPDFListV2.bizcode = "UploadSBTARPDFListV2";
|
|
UploadSBTARPDFListV2.bizcode = "UploadSBTARPDFListV2";
|
|
@@ -205,14 +205,8 @@ namespace TEAMModelOS.Controllers
|
|
checkDatas[x] = dict;
|
|
checkDatas[x] = dict;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- });
|
|
|
|
-
|
|
|
|
|
|
+ });
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
return Ok(new { data = new { results, checkDatas, dicts } });
|
|
return Ok(new { data = new { results, checkDatas, dicts } });
|
|
}
|
|
}
|
|
|
|
|