7 changed files with 102 additions and 19 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
-
0src/Shentun.Peis.Application/AppServiceHelper.cs
-
14src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs
-
81test/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(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue