13 changed files with 119 additions and 36 deletions
-
8ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/ImportPatientRegisterPlugInsQztl.cs
-
4ThirdPlugIns/Shentun.Peis.PlugIns.Gem/PatientRegisters/Qztl/PatientRegisterPluginsHzcyHis.cs
-
12ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/HisTest.cs
-
2ThirdPlugIns/Shentun.Peis.PlugIns.Gem/test/Shentun.Peis.PlugIns.Gem.Test/ImportPatientRegisterPlugInsHzcyTest.cs
-
8src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs
-
0src/Shentun.Peis.Application/AppServiceHelper.cs
-
14src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs
-
6src/Shentun.Peis.HttpApi.Host/Schedulers/ChargeRequestInterfaceQueryWorker.cs
-
6src/Shentun.Peis.HttpApi.Host/Schedulers/ImportLisResultInterfaceWorker.cs
-
6src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPacsResultInterfaceWorker.cs
-
6src/Shentun.Peis.HttpApi.Host/Schedulers/ImportPatientRegisterInterfaceWorker.cs
-
81test/Shentun.Peis.Application.Tests/AppointPatientRegisterAppServiceTest.cs
-
2test/Shentun.Peis.Application.Tests/ImportLisResultAppServiceTest.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(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue