Browse Source

青藏公司

bjmzak
DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
846d5e1994
  1. 17
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/ImportPatientRegisterPlugInsGem.cs
  2. 2
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ImportPacsResultPlugInsGemTest.cs
  3. 5
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/appsettings.json
  4. 3
      src/Shentun.Peis.Domain.Shared/Enums/ThirdInterfaceTypeFlag.cs
  5. 3
      src/Shentun.Peis.Domain/ThirdInterfaces/ThirdInterfaceManager.cs
  6. 4
      src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs
  7. 5
      src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPacsResultInterfaceWorker.cs
  8. 17
      src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPatientRegisterInterfaceWorker.cs

17
ThirdPlugIns/Shentun.Peis.PlugIns.Gem/ImportPatientRegisterPlugInsGem.cs

@ -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;

2
ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ImportPacsResultPlugInsGemTest.cs

@ -28,7 +28,7 @@ namespace Shentun.Peis.PlugIns.Gem.Test
var item = await input.ImportResultAsync(
new ImportPacsResultPlugInsInput()
{
PatientRegisterId = new Guid("3a1277ab-376c-fbdb-4419-92bbb4594607")
PatientRegisterId = new Guid("3a128200-3d63-95cd-f870-635df8e999f2")
});

5
ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/appsettings.json

@ -22,9 +22,10 @@
"Sql": "select ZHID as Code ,ZHMC as DisplayName from PORTAL56_LIS.vi_tj_testitemgroup",
"ColumnNames": "编码,名称",
"EndpointAddress": "http://10.1.12.140:8082/gemse-tj/services/bstj.bstjHttpSoap11Endpoint",
//"WebApiUrl": "http://10.1.13.18:8380/ris/findReportList",
"WebApiUrl": "http://10.1.13.18:8380/ris/findReportList",
"AnswerWebApiUrl": "http://62.156.10.237:8005/health/values/SetPlanOK?",
"单位编号": "3a126b36-831f-aa9f-ddfe-a82f660fc485",
"WebApiUrl": "http://62.156.10.237:8005/health/values/GetPlan?",
//"WebApiUrl": "http://62.156.10.237:8005/health/values/GetPlan?",
"aesKEY": "Vwso4P4vBkKw0AODd1LwqgL6vIW8np8m",
"HospitalId": "3",
"Scheduler": {

3
src/Shentun.Peis.Domain.Shared/Enums/ThirdInterfaceTypeFlag.cs

@ -20,5 +20,8 @@ namespace Shentun.Peis.Enums
[Description("Pacs结果导入")]
public const string ImportPacsResult = "04";
[Description("人员登记信息结果导入")]
public const string ImportPatientRegister = "05";
}
}

3
src/Shentun.Peis.Domain/ThirdInterfaces/ThirdInterfaceManager.cs

@ -121,7 +121,8 @@ namespace Shentun.Peis.ThirdInterfaces
if (entity.ThirdInterfaceType != ThirdInterfaceTypeFlag.LisRequest
&& entity.ThirdInterfaceType != ThirdInterfaceTypeFlag.ChargeRequest
&& entity.ThirdInterfaceType != ThirdInterfaceTypeFlag.ImportLisResult
&& entity.ThirdInterfaceType != ThirdInterfaceTypeFlag.ImportPacsResult)
&& entity.ThirdInterfaceType != ThirdInterfaceTypeFlag.ImportPacsResult
&& entity.ThirdInterfaceType != ThirdInterfaceTypeFlag.ImportPatientRegister)
{
throw new ArgumentException($"接口类型参数为:{entity.ThirdInterfaceType},是无效值");
}

4
src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs

@ -619,6 +619,10 @@ public class PeisHttpApiHostModule : AbpModule
{
RecurringJob.AddOrUpdate<IImportPacsResultInterfaceWorker>("导入Pacs结果接口", o => o.DoWork(thirdInterfaceDto.Id), corn, TimeZoneInfo.Local);
}
else if (thirdInterfaceDto.ThirdInterfaceType == "05")
{
RecurringJob.AddOrUpdate<IImportPatientRegisterInterfaceWorker>("导入人员登记信息结果接口", o => o.DoWork(thirdInterfaceDto.Id), corn, TimeZoneInfo.Local);
}
}
}

5
src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPacsResultInterfaceWorker.cs

@ -17,10 +17,7 @@ namespace Shentun.Peis.Schedulers
}
public class ImportPacsResultInterfaceWorker : ThirdInterfaceWorkerBase, IImportPacsResultInterfaceWorker
{
private string isActive = "N";
private static long i;
private static bool _isRunning = false;
private static readonly object lockObject = new object();
public void DoWork()

17
src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPatientRegisterInterfaceWorker.cs

@ -0,0 +1,17 @@
using System;
namespace Shentun.Peis.Schedulers
{
public interface IImportPatientRegisterInterfaceWorker
{
public void DoWork(Guid interfaceId);
public void DoWork();
}
public class ImportPatientRegisterInterfaceWorker : ThirdInterfaceWorkerBase, IImportPatientRegisterInterfaceWorker
{
public void DoWork()
{
throw new NotImplementedException();
}
}
}
Loading…
Cancel
Save