diff --git a/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsGem.cs b/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsQztl.cs similarity index 99% rename from ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsGem.cs rename to ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsQztl.cs index 4a74631..a5dc656 100644 --- a/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsGem.cs +++ b/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsQztl.cs @@ -25,7 +25,7 @@ using Shentun.Peis.PlugIns.PatientRegisters; namespace Shentun.Peis.PlugIns.Extensions.PatientRegisters.Qztl { - public class ImportPatientRegisterPlugInsGem : ImportPatientRegisterPlugInsBase + public class ImportPatientRegisterPlugInsQztl : ImportPatientRegisterPlugInsBase { private Guid _importCustomerOrgId; private string _hospitalId; @@ -37,11 +37,11 @@ namespace Shentun.Peis.PlugIns.Extensions.PatientRegisters.Qztl private List _customerOrgGroupDtos; private string _answerWebApiUrl; - public ImportPatientRegisterPlugInsGem(Guid thirdInterfaceId) : base(thirdInterfaceId) + public ImportPatientRegisterPlugInsQztl(Guid thirdInterfaceId) : base(thirdInterfaceId) { } - public ImportPatientRegisterPlugInsGem(string parmValue) : base(parmValue) + public ImportPatientRegisterPlugInsQztl(string parmValue) : base(parmValue) { } @@ -372,7 +372,7 @@ namespace Shentun.Peis.PlugIns.Extensions.PatientRegisters.Qztl _personnelTypes = await CallAppServiceAsync>("api/app/PersonnelType/GetAll", ""); } - + //public public async Task CallInterfaceServiceAsync() { string baseAddress = InterfaceWebApiUrl; diff --git a/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/PatientRegisterPluginsGemHis.cs b/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/PatientRegisterPluginsHzcyHis.cs similarity index 96% rename from ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/PatientRegisterPluginsGemHis.cs rename to ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/PatientRegisterPluginsHzcyHis.cs index 3cd736f..29f47ea 100644 --- a/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/PatientRegisterPluginsGemHis.cs +++ b/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/PatientRegisterPluginsHzcyHis.cs @@ -12,11 +12,11 @@ using static ServiceReferenceHzcyHis.bstjPortTypeClient; namespace Shentun.Peis.PlugIns.Extensions.PatientRegisters.Qztl { - public class PatientRegisterPluginsGemHis : PatientRegisterPluginsBase + public class PatientRegisterPluginsHzcyHis : PatientRegisterPluginsBase { private string _endpointAddress = ""; - public PatientRegisterPluginsGemHis(string parmValue) : base(parmValue) + public PatientRegisterPluginsHzcyHis(string parmValue) : base(parmValue) { _endpointAddress = InterfaceConfig.GetSection("Interface").GetSection("EndpointAddress").Value; diff --git a/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/HisTest.cs b/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/HisTest.cs index e5fd6b4..063ecd1 100644 --- a/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/HisTest.cs +++ b/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/HisTest.cs @@ -16,7 +16,7 @@ namespace Shentun.Peis.PlugIns.Extensions.Test [Fact] public async Task PatientQuery() { - var patientRegisterPluginsGemHis = new PatientRegisterPluginsGemHis(GetConfigParm()); + var patientRegisterPluginsGemHis = new PatientRegisterPluginsHzcyHis(GetConfigParm()); var hisPatientQueryInput = new HisPatientQueryInput() { Data = new HisPatientQueryDataInput() @@ -55,7 +55,7 @@ namespace Shentun.Peis.PlugIns.Extensions.Test [Fact] public async Task PatientNew() { - var patientRegisterPluginsGemHis = new PatientRegisterPluginsGemHis(GetConfigParm()); + var patientRegisterPluginsGemHis = new PatientRegisterPluginsHzcyHis(GetConfigParm()); var hisPatientQueryInput = new HisPatientQueryInput() { Data = new HisPatientQueryDataInput() @@ -97,7 +97,7 @@ namespace Shentun.Peis.PlugIns.Extensions.Test [Fact] public async Task MecSave() { - var patientRegisterPluginsGemHis = new PatientRegisterPluginsGemHis(GetConfigParm()); + var patientRegisterPluginsGemHis = new PatientRegisterPluginsHzcyHis(GetConfigParm()); var hisInput = new HisMecSaveInput() { Data = new HisMecSaveDataInput() @@ -145,7 +145,7 @@ namespace Shentun.Peis.PlugIns.Extensions.Test [Fact] public async Task CancelQrCode() { - var patientRegisterPluginsGemHis = new PatientRegisterPluginsGemHis(GetConfigParm()); + var patientRegisterPluginsGemHis = new PatientRegisterPluginsHzcyHis(GetConfigParm()); var hisInput = new HisCancelQrCodeInput() { Data = new HisCancelQrCodeDataInput() @@ -180,7 +180,7 @@ namespace Shentun.Peis.PlugIns.Extensions.Test [Fact] public async Task PayStatus() { - var patientRegisterPluginsGemHis = new PatientRegisterPluginsGemHis(GetConfigParm()); + var patientRegisterPluginsGemHis = new PatientRegisterPluginsHzcyHis(GetConfigParm()); var hisInput = new HisPayStatusInput() { Data = new HisPayStatusDataInput() @@ -215,7 +215,7 @@ namespace Shentun.Peis.PlugIns.Extensions.Test [Fact] public async Task AgreeRefund() { - var patientRegisterPluginsGemHis = new PatientRegisterPluginsGemHis(GetConfigParm()); + var patientRegisterPluginsGemHis = new PatientRegisterPluginsHzcyHis(GetConfigParm()); var hisInput = new HisAgreeRefundInput() { Data = new HisAgreeRefundDataInput() diff --git a/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ImportPatientRegisterPlugInsHzcyTest.cs b/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ImportPatientRegisterPlugInsHzcyTest.cs index 1b67172..7cea871 100644 --- a/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ImportPatientRegisterPlugInsHzcyTest.cs +++ b/ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ImportPatientRegisterPlugInsHzcyTest.cs @@ -26,7 +26,7 @@ namespace Shentun.Peis.PlugIns.Extensions.Test string filePath = DirectoryHelper.GetAppDirectory() + "/appsettings.json"; configParm = File.ReadAllText(filePath); - var input = new ImportPatientRegisterPlugInsGem(configParm); + var input = new ImportPatientRegisterPlugInsQztl(configParm); await input.ImportAsync(); diff --git a/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs b/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs index 361d108..8a0f712 100644 --- a/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs +++ b/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs @@ -128,20 +128,20 @@ namespace Shentun.Peis.PlugIns throw new ArgumentException("数据连接设置中的DbType不能为空"); } InterfaceDbType = InterfaceDbType.ToLower(); - Logger.LogInformation("数据库类型:" + InterfaceDbType); + //Logger.LogInformation("数据库类型:" + InterfaceDbType); if (InterfaceDbType == "sqlserver") { - Logger.LogInformation("调用sqlserver:" + InterfaceDbType); + //Logger.LogInformation("调用sqlserver:" + InterfaceDbType); conn = new SqlConnection(InterfaceConnctionStr); } else if (InterfaceDbType == "postgres") { - Logger.LogInformation("调用postgres:" + InterfaceDbType); + //Logger.LogInformation("调用postgres:" + InterfaceDbType); conn = new NpgsqlConnection(InterfaceConnctionStr); } else if (InterfaceDbType == "oracle") { - Logger.LogInformation("调用oracle:" + InterfaceDbType); + //Logger.LogInformation("调用oracle:" + InterfaceDbType); conn = new OracleConnection(InterfaceConnctionStr); } else diff --git a/src/Shentun.Peis.HttpApi.Host/AppServiceHelper.cs b/src/Shentun.Peis.Application/AppServiceHelper.cs similarity index 100% rename from src/Shentun.Peis.HttpApi.Host/AppServiceHelper.cs rename to src/Shentun.Peis.Application/AppServiceHelper.cs diff --git a/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs b/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs index 10781cd..0f212b4 100644 --- a/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs +++ b/src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs @@ -236,17 +236,19 @@ public class PeisHttpApiHostModule : AbpModule // options.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All); // options.JsonSerializerOptions.PropertyNamingPolicy = null; //}); - //Configure(x => - //{ - // //x.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All); - // x.JsonSerializerOptions.Converters.Add(new DateTimeJsonConverter()); - // x.JsonSerializerOptions.PropertyNameCaseInsensitive = true; + Configure(x => + { + //x.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All); + x.JsonSerializerOptions.Converters.Add(new DateTimeJsonConverter()); + x.JsonSerializerOptions.PropertyNameCaseInsensitive = true; - //}); + }); Configure(x => { x.DefaultDateTimeFormat = "yyyy-MM-dd HH:mm:ss"; + + }); } diff --git a/src/Shentun.Peis.HttpApi.Host/Schedulers/ChargeRequestInterfaceQueryWorker.cs b/src/Shentun.Peis.HttpApi.Host/Schedulers/ChargeRequestInterfaceQueryWorker.cs index 6c65675..3e9b203 100644 --- a/src/Shentun.Peis.HttpApi.Host/Schedulers/ChargeRequestInterfaceQueryWorker.cs +++ b/src/Shentun.Peis.HttpApi.Host/Schedulers/ChargeRequestInterfaceQueryWorker.cs @@ -28,8 +28,8 @@ namespace Shentun.Peis.Schedulers public virtual void DoWork(Guid interfaceId) { if (_isRunning) return; - lock (lockObject) - { + //lock (lockObject) + //{ _isRunning = true; try { @@ -78,7 +78,7 @@ namespace Shentun.Peis.Schedulers } _isRunning = false; return; - } + //} } public void DoWork() { diff --git a/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportLisResultInterfaceWorker.cs b/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportLisResultInterfaceWorker.cs index b08f21d..0136222 100644 --- a/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportLisResultInterfaceWorker.cs +++ b/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportLisResultInterfaceWorker.cs @@ -26,8 +26,8 @@ namespace Shentun.Peis.Schedulers public virtual void DoWork(Guid interfaceId) { if (_isRunning) return; - lock (lockObject) - { + //lock (lockObject) + //{ _isRunning = true; try { @@ -76,7 +76,7 @@ namespace Shentun.Peis.Schedulers } _isRunning = false; return; - } + //} } public void DoWork() { diff --git a/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPacsResultInterfaceWorker.cs b/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPacsResultInterfaceWorker.cs index 3c9265c..bda1630 100644 --- a/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPacsResultInterfaceWorker.cs +++ b/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPacsResultInterfaceWorker.cs @@ -26,8 +26,8 @@ namespace Shentun.Peis.Schedulers public virtual void DoWork(Guid interfaceId) { if (_isRunning) return; - lock (lockObject) - { + //lock (lockObject) + //{ _isRunning = true; try { @@ -76,7 +76,7 @@ namespace Shentun.Peis.Schedulers } _isRunning = false; return; - } + //} } public void DoWork() diff --git a/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPatientRegisterInterfaceWorker.cs b/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPatientRegisterInterfaceWorker.cs index 2dde3b1..07e1b43 100644 --- a/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPatientRegisterInterfaceWorker.cs +++ b/src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPatientRegisterInterfaceWorker.cs @@ -22,8 +22,8 @@ namespace Shentun.Peis.Schedulers public virtual void DoWork(Guid interfaceId) { if (_isRunning) return; - lock (lockObject) - { + //lock (lockObject) + //{ _isRunning = true; try { @@ -71,7 +71,7 @@ namespace Shentun.Peis.Schedulers } _isRunning = false; return; - } + //} } public void DoWork() { diff --git a/test/Shentun.Peis.Application.Tests/AppointPatientRegisterAppServiceTest.cs b/test/Shentun.Peis.Application.Tests/AppointPatientRegisterAppServiceTest.cs new file mode 100644 index 0000000..a4ddc40 --- /dev/null +++ b/test/Shentun.Peis.Application.Tests/AppointPatientRegisterAppServiceTest.cs @@ -0,0 +1,81 @@ +using Shentun.Peis.AppointPatientRegisters; +using Shentun.Peis.ChargeRequests; +using Shentun.Peis.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Uow; +using Xunit; +using Xunit.Abstractions; + +namespace Shentun.Peis +{ + public class AppointPatientRegisterAppServiceTest : PeisApplicationTestBase + { + private readonly IRepository _repository; + private readonly AppointPatientRegisterAppService _appService; + private readonly ITestOutputHelper _output; + private readonly IUnitOfWorkManager _unitOfWorkManager; + public AppointPatientRegisterAppServiceTest(ITestOutputHelper testOutputHelper) + { + _output = testOutputHelper; + _unitOfWorkManager = GetRequiredService(); + _repository = GetRequiredService>(); + _appService = GetRequiredService(); + } + + [Fact] + public async Task GetListByFilterAsync() + { + using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) + { + + var entity = new AppointPatientRegisterInputDto() + { + ThirdInterFaceId = new Guid("43a9c3a5-8741-4c64-b869-bc304712d88e"), + AppointStartDate = DateTime.Now.Date.AddDays(-10), + MobilePhone = "18911254911" + + }; + + var newEntity = await _appService.GetListByFilterAsync(entity); + foreach (var item in newEntity) + { + _output.WriteLine(item.PersonName); + } + await unitOfWork.CompleteAsync(); + } + } + [Fact] + public async Task GetListByFilterAsync2() + { + using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) + { + + var entity = new AppointPatientRegisterInputDto() + { + ThirdInterFaceId = new Guid("43a9c3a5-8741-4c64-b869-bc304712d88e"), + AppointStartDate = DateTime.Now.Date.AddDays(-10), + MobilePhone = "18911254911" + + }; + var appServiceHelper = new AppServiceHelper(); + var list = await appServiceHelper.CallAppServiceAsync> + ("api/app/AppointPatientRegister/GetListByFilter", entity); + foreach(var item in list) + { + _output.WriteLine(item.PersonName); + } + //var newEntity = await _appService.GetListByFilterAsync(entity); + //foreach (var item in newEntity) + //{ + // _output.WriteLine(item.PersonName); + //} + await unitOfWork.CompleteAsync(); + } + } + } +} diff --git a/test/Shentun.Peis.Application.Tests/ImportLisResultAppServiceTest.cs b/test/Shentun.Peis.Application.Tests/ImportLisResultAppServiceTest.cs index 755a586..7e1f6e2 100644 --- a/test/Shentun.Peis.Application.Tests/ImportLisResultAppServiceTest.cs +++ b/test/Shentun.Peis.Application.Tests/ImportLisResultAppServiceTest.cs @@ -77,7 +77,7 @@ namespace Shentun.Peis { await _appService.ImportResultByPatientRegisterIdAsync(new PatientRegisterIdInputDto() { - PatientRegisterId = new Guid("3a128196-ec34-aa17-0a04-b4bb6bafc752") + PatientRegisterId = new Guid("3a127c60-bf8f-e6d9-9db0-817d217e0ff1") }); await unitOfWork.CompleteAsync(); }