|
|
@ -67,8 +67,11 @@ namespace Shentun.Peis.Schedulers |
|
|
var backJobTypeIds = _configuration.GetSection("BackJobTypeId").Value; |
|
|
var backJobTypeIds = _configuration.GetSection("BackJobTypeId").Value; |
|
|
//Logger.LogInformation("Executed" + GetType().Name + "..!");
|
|
|
//Logger.LogInformation("Executed" + GetType().Name + "..!");
|
|
|
var appServiceHelper = new AppServiceHelper(); |
|
|
var appServiceHelper = new AppServiceHelper(); |
|
|
|
|
|
|
|
|
appServiceHelper.Login(); |
|
|
appServiceHelper.Login(); |
|
|
|
|
|
|
|
|
var thirdInterfaceDtos = appServiceHelper.CallAppService<object, List<ThirdInterfaceDto>>("api/app/ThirdInterface/GetList", null); |
|
|
var thirdInterfaceDtos = appServiceHelper.CallAppService<object, List<ThirdInterfaceDto>>("api/app/ThirdInterface/GetList", null); |
|
|
|
|
|
|
|
|
var thirdInterfaceDto = thirdInterfaceDtos.Where(o => o.Id == interfaceId).FirstOrDefault(); |
|
|
var thirdInterfaceDto = thirdInterfaceDtos.Where(o => o.Id == interfaceId).FirstOrDefault(); |
|
|
if (thirdInterfaceDto == null) |
|
|
if (thirdInterfaceDto == null) |
|
|
{ |
|
|
{ |
|
|
@ -88,6 +91,7 @@ namespace Shentun.Peis.Schedulers |
|
|
var parmValue = thirdInterfaceDto.ParmValue; |
|
|
var parmValue = thirdInterfaceDto.ParmValue; |
|
|
if (!string.IsNullOrWhiteSpace(parmValue)) |
|
|
if (!string.IsNullOrWhiteSpace(parmValue)) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
var configurationBuilder = new ConfigurationBuilder() |
|
|
var configurationBuilder = new ConfigurationBuilder() |
|
|
.AddJsonStream(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(parmValue))); |
|
|
.AddJsonStream(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(parmValue))); |
|
|
var interfaceConfig = configurationBuilder.Build(); |
|
|
var interfaceConfig = configurationBuilder.Build(); |
|
|
@ -101,6 +105,7 @@ namespace Shentun.Peis.Schedulers |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 同步基础数据
|
|
|
#region 同步基础数据
|
|
|
|
|
|
|
|
|
appServiceHelper.CallAppService<object, object>("api/app/TransToWebPeis/TransBaseData", null); |
|
|
appServiceHelper.CallAppService<object, object>("api/app/TransToWebPeis/TransBaseData", null); |
|
|
@ -112,8 +117,6 @@ namespace Shentun.Peis.Schedulers |
|
|
var QueryDays = Convert.ToInt32(interfaceConfig.GetSection("Interface").GetSection("Scheduler") |
|
|
var QueryDays = Convert.ToInt32(interfaceConfig.GetSection("Interface").GetSection("Scheduler") |
|
|
.GetSection("QueryDays").Value); |
|
|
.GetSection("QueryDays").Value); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取报告地址
|
|
|
//获取报告地址
|
|
|
var reportApiBaseAddress = interfaceConfig.GetSection("Interface").GetSection("ReportApiBaseAddress").Value; |
|
|
var reportApiBaseAddress = interfaceConfig.GetSection("Interface").GetSection("ReportApiBaseAddress").Value; |
|
|
var reportApiUrl = interfaceConfig.GetSection("Interface").GetSection("ReportApiUrl").Value; |
|
|
var reportApiUrl = interfaceConfig.GetSection("Interface").GetSection("ReportApiUrl").Value; |
|
|
@ -130,6 +133,7 @@ namespace Shentun.Peis.Schedulers |
|
|
var funName = "GetSyncPatientRegisterIds"; |
|
|
var funName = "GetSyncPatientRegisterIds"; |
|
|
object[] classConstructorArg = new object[] { thirdInterfaceDto.Id }; |
|
|
object[] classConstructorArg = new object[] { thirdInterfaceDto.Id }; |
|
|
object[] objects = [input]; |
|
|
object[] objects = [input]; |
|
|
|
|
|
|
|
|
var pluginsOut = ReflectionHelper.InvokeAsync<List<SyncPatientRegisterIdsDto>>(assemblyName, className, classConstructorArg, funName, objects).Result; |
|
|
var pluginsOut = ReflectionHelper.InvokeAsync<List<SyncPatientRegisterIdsDto>>(assemblyName, className, classConstructorArg, funName, objects).Result; |
|
|
|
|
|
|
|
|
#region 同步备单数据
|
|
|
#region 同步备单数据
|
|
|
@ -140,7 +144,7 @@ namespace Shentun.Peis.Schedulers |
|
|
if (preRegistrationPluginsOut.Any()) |
|
|
if (preRegistrationPluginsOut.Any()) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
foreach (var item in pluginsOut) |
|
|
|
|
|
|
|
|
foreach (var item in preRegistrationPluginsOut) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
PatientRegisterIdInputDto patientRegisterIdDto = new PatientRegisterIdInputDto |
|
|
PatientRegisterIdInputDto patientRegisterIdDto = new PatientRegisterIdInputDto |
|
|
|