|
@@ -31,6 +31,7 @@ using static TEAMModelOS.SDK.SchoolService;
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
using static TEAMModelOS.Controllers.ScController;
|
|
|
using OpenXmlPowerTools;
|
|
|
+using TEAMModelOS.SDK.DI.StudyAPI;
|
|
|
|
|
|
namespace TEAMModelOS.Controllers.Third
|
|
|
{
|
|
@@ -54,6 +55,7 @@ namespace TEAMModelOS.Controllers.Third
|
|
|
private readonly AzureServiceBusFactory _serviceBus;
|
|
|
private readonly AzureRedisFactory _azureRedis;
|
|
|
private readonly CoreAPIHttpService _coreAPIHttpService;
|
|
|
+ private readonly ScsStudyApisService _scsStudyApisService;
|
|
|
private readonly ThirdApisService _scsApisService;
|
|
|
public readonly string type = "scsyxpt";
|
|
|
private readonly HttpTrigger _httpTrigger;
|
|
@@ -61,7 +63,7 @@ namespace TEAMModelOS.Controllers.Third
|
|
|
private readonly ThirdApisService _thirdApisService;
|
|
|
public IConfiguration _configuration { get; set; }
|
|
|
public ScDataInitController(ThirdApisService thirdApisService, IWebHostEnvironment environment, AzureCosmosFactory azureCosmos, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option, AzureStorageFactory azureStorage,
|
|
|
- AzureRedisFactory azureRedis, AzureServiceBusFactory serviceBus, IConfiguration configuration, CoreAPIHttpService coreAPIHttpService, ThirdApisService scsApisService, HttpTrigger httpTrigger)
|
|
|
+ AzureRedisFactory azureRedis, AzureServiceBusFactory serviceBus, IConfiguration configuration, CoreAPIHttpService coreAPIHttpService, ScsStudyApisService scsStudyApis, ThirdApisService scsApisService, HttpTrigger httpTrigger)
|
|
|
{
|
|
|
_azureCosmos = azureCosmos;
|
|
|
_snowflakeId = snowflakeId;
|
|
@@ -72,6 +74,7 @@ namespace TEAMModelOS.Controllers.Third
|
|
|
_configuration = configuration;
|
|
|
_azureRedis = azureRedis;
|
|
|
_coreAPIHttpService = coreAPIHttpService;
|
|
|
+ _scsStudyApisService = scsStudyApis;
|
|
|
_scsApisService = scsApisService;
|
|
|
_httpTrigger = httpTrigger;
|
|
|
_environment = environment;
|
|
@@ -610,6 +613,8 @@ namespace TEAMModelOS.Controllers.Third
|
|
|
int status = -1; string json = null;
|
|
|
//5.3.1.1获取项目列表
|
|
|
(status, json) = await _httpTrigger.RequestHttpTrigger(dict, _option.Location, "GetProjectInfoByTrainComID");
|
|
|
+ //新的方式 5.3.1.1获取项目列表
|
|
|
+ //(status, json) = await _scsStudyApisService.GetProjectInfoByTrainComID($"{areaId}", $"{accessConfig}");
|
|
|
List<ScProject> projects = null;
|
|
|
List<ScSchool> saveschools = null;
|
|
|
List<ScSchool> schools = null;
|