|
|
|
@ -34,6 +34,7 @@ namespace Shentun.Peis.PlugIns.Gem |
|
|
|
private CustomerOrgRegisterDto _customerOrgRegisterDto; |
|
|
|
private List<PersonnelTypeDto> _personnelTypes; |
|
|
|
private List<CustomerOrgGroupDto> _customerOrgGroupDtos; |
|
|
|
private string _answerWebApiUrl; |
|
|
|
public ImportPatientRegisterPlugInsGem(string parmValue) : base(parmValue) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -43,8 +44,7 @@ namespace Shentun.Peis.PlugIns.Gem |
|
|
|
{ |
|
|
|
await LoginAsync(); |
|
|
|
await InitAsync(); |
|
|
|
for (var i = 0; i < 30; i++) |
|
|
|
{ |
|
|
|
|
|
|
|
var qztlPatientRegisterFromInterface = await CallInterfaceServiceAsync(); |
|
|
|
if (qztlPatientRegisterFromInterface == null || !qztlPatientRegisterFromInterface.plans.Any()) |
|
|
|
{ |
|
|
|
@ -272,7 +272,7 @@ namespace Shentun.Peis.PlugIns.Gem |
|
|
|
var succesIds = new List<string>(); |
|
|
|
var deleteIds = new List<string>(); |
|
|
|
succesIds.Add(patientRegister.Planuserid); |
|
|
|
await NoteOk(succesIds, deleteIds); |
|
|
|
await AnswerOk(succesIds, deleteIds); |
|
|
|
} |
|
|
|
|
|
|
|
catch (Exception ex) |
|
|
|
@ -291,12 +291,6 @@ namespace Shentun.Peis.PlugIns.Gem |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public async Task InitAsync() |
|
|
|
@ -304,6 +298,7 @@ namespace Shentun.Peis.PlugIns.Gem |
|
|
|
var customerOrgIdStr = InterfaceConfig.GetSection("Interface").GetSection("单位编号").Value; |
|
|
|
_hospitalId = InterfaceConfig.GetSection("Interface").GetSection("HospitalId").Value; |
|
|
|
_aesKEY = InterfaceConfig.GetSection("Interface").GetSection("aesKEY").Value; |
|
|
|
_answerWebApiUrl = InterfaceConfig.GetSection("Interface").GetSection("AnswerWebApiUrl").Value; |
|
|
|
if (string.IsNullOrWhiteSpace(customerOrgIdStr)) |
|
|
|
{ |
|
|
|
return; |
|
|
|
@ -655,7 +650,7 @@ namespace Shentun.Peis.PlugIns.Gem |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public async Task NoteOk(List<string> successIds, List<string> deleteIds) |
|
|
|
public async Task AnswerOk(List<string> successIds, List<string> deleteIds) |
|
|
|
{ |
|
|
|
if (successIds == null || deleteIds == null) |
|
|
|
{ |
|
|
|
@ -690,7 +685,7 @@ namespace Shentun.Peis.PlugIns.Gem |
|
|
|
deleteIdStr += "," + deleteIds[i]; |
|
|
|
} |
|
|
|
} |
|
|
|
string baseAddress = "http://62.156.10.237:8005/health/values/SetPlanOK?"; |
|
|
|
string baseAddress = _answerWebApiUrl;// "http://62.156.10.237:8005/health/values/SetPlanOK?";
|
|
|
|
string ary = "HospitalId=" + _hospitalId + (Char)38 + |
|
|
|
"ids=" + successIdStr + (Char)38 + "delids=" + deleteIdStr + (Char)38 + "AesKey=" + _aesKEY; |
|
|
|
baseAddress = baseAddress + ary; |
|
|
|
|