|
|
@ -43,14 +43,17 @@ namespace Shentun.Peis.Schedulers |
|
|
private readonly TransToWebPeisAppService _appService; |
|
|
private readonly TransToWebPeisAppService _appService; |
|
|
private readonly PrintReportAppService _printReportAppService; |
|
|
private readonly PrintReportAppService _printReportAppService; |
|
|
private readonly IRepository<PatientRegister, Guid> _patientRegisterRepository; |
|
|
private readonly IRepository<PatientRegister, Guid> _patientRegisterRepository; |
|
|
|
|
|
private readonly IConfiguration _configuration; |
|
|
public SyncPatientRegisterReportInterfaceWorker( |
|
|
public SyncPatientRegisterReportInterfaceWorker( |
|
|
TransToWebPeisAppService appService, |
|
|
TransToWebPeisAppService appService, |
|
|
IRepository<PatientRegister, Guid> patientRegisterRepository, |
|
|
IRepository<PatientRegister, Guid> patientRegisterRepository, |
|
|
PrintReportAppService printReportAppService) |
|
|
|
|
|
|
|
|
PrintReportAppService printReportAppService, |
|
|
|
|
|
IConfiguration configuration) |
|
|
{ |
|
|
{ |
|
|
_appService = appService; |
|
|
_appService = appService; |
|
|
_patientRegisterRepository = patientRegisterRepository; |
|
|
_patientRegisterRepository = patientRegisterRepository; |
|
|
_printReportAppService = printReportAppService; |
|
|
_printReportAppService = printReportAppService; |
|
|
|
|
|
_configuration = configuration; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void DoWork(Guid interfaceId) |
|
|
public void DoWork(Guid interfaceId) |
|
|
@ -61,6 +64,7 @@ namespace Shentun.Peis.Schedulers |
|
|
_isRunning = true; |
|
|
_isRunning = true; |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
|
|
|
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(); |
|
|
@ -71,6 +75,11 @@ namespace Shentun.Peis.Schedulers |
|
|
_isRunning = false; |
|
|
_isRunning = false; |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
if (!backJobTypeIds.Contains(thirdInterfaceDto.ThirdInterfaceType)) |
|
|
|
|
|
{ |
|
|
|
|
|
_isRunning = false; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
if (thirdInterfaceDto.IsActive != 'Y') |
|
|
if (thirdInterfaceDto.IsActive != 'Y') |
|
|
{ |
|
|
{ |
|
|
_isRunning = false; |
|
|
_isRunning = false; |
|
|
|