wxd 2 years ago
parent
commit
62fc7363e6
  1. 8
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsQztl.cs
  2. 4
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/PatientRegisterPluginsHzcyHis.cs
  3. 12
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/HisTest.cs
  4. 2
      ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ImportPatientRegisterPlugInsHzcyTest.cs
  5. 8
      src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs
  6. 0
      src/Shentun.Peis.Application/AppServiceHelper.cs
  7. 14
      src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs
  8. 6
      src/Shentun.Peis.HttpApi.Host/Schedulers/ChargeRequestInterfaceQueryWorker.cs
  9. 6
      src/Shentun.Peis.HttpApi.Host/Schedulers/ImportLisResultInterfaceWorker.cs
  10. 6
      src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPacsResultInterfaceWorker.cs
  11. 6
      src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPatientRegisterInterfaceWorker.cs
  12. 81
      test/Shentun.Peis.Application.Tests/AppointPatientRegisterAppServiceTest.cs
  13. 2
      test/Shentun.Peis.Application.Tests/ImportLisResultAppServiceTest.cs

8
ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsGem.cs → 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<CustomerOrgGroupDto> _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<string, List<PersonnelTypeDto>>("api/app/PersonnelType/GetAll", "");
}
//public
public async Task<QztlPatientRegisterFromInterface?> CallInterfaceServiceAsync()
{
string baseAddress = InterfaceWebApiUrl;

4
ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/PatientRegisterPluginsGemHis.cs → 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;

12
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()

2
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();

8
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

0
src/Shentun.Peis.HttpApi.Host/AppServiceHelper.cs → src/Shentun.Peis.Application/AppServiceHelper.cs

14
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<JsonOptions>(x =>
//{
// //x.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);
// x.JsonSerializerOptions.Converters.Add(new DateTimeJsonConverter());
// x.JsonSerializerOptions.PropertyNameCaseInsensitive = true;
Configure<JsonOptions>(x =>
{
//x.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);
x.JsonSerializerOptions.Converters.Add(new DateTimeJsonConverter());
x.JsonSerializerOptions.PropertyNameCaseInsensitive = true;
//});
});
Configure<AbpJsonOptions>(x =>
{
x.DefaultDateTimeFormat = "yyyy-MM-dd HH:mm:ss";
});
}

6
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()
{

6
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()
{

6
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()

6
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()
{

81
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<ChargeRequest, Guid> _repository;
private readonly AppointPatientRegisterAppService _appService;
private readonly ITestOutputHelper _output;
private readonly IUnitOfWorkManager _unitOfWorkManager;
public AppointPatientRegisterAppServiceTest(ITestOutputHelper testOutputHelper)
{
_output = testOutputHelper;
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
_repository = GetRequiredService<IRepository<ChargeRequest, Guid>>();
_appService = GetRequiredService<AppointPatientRegisterAppService>();
}
[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<AppointPatientRegisterInputDto, List<AppointPatientRegisterDto>>
("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();
}
}
}
}

2
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();
}

Loading…
Cancel
Save