3 changed files with 135 additions and 2 deletions
-
11src/Shentun.Peis.Application.Contracts/WebApiOutDto.cs
-
83src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs
-
43test/Shentun.Peis.Application.Tests/TransToWebPeisAppServiceTest.cs
@ -0,0 +1,11 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.Peis |
||||
|
{ |
||||
|
public class WebApiOutDto: WebApiOutDtoBase |
||||
|
{ |
||||
|
public object Data { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,43 @@ |
|||||
|
using Shentun.Peis.ChargeRequests; |
||||
|
using Shentun.Peis.Models; |
||||
|
using Shentun.Peis.TransToWebPeis; |
||||
|
using Shentun.Peis.TransToWebPeiss; |
||||
|
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 TransToWebPeisAppServiceTest : PeisApplicationTestBase |
||||
|
{ |
||||
|
private readonly IRepository<ChargeRequest, Guid> _repository; |
||||
|
private readonly TransToWebPeisAppService _appService; |
||||
|
private readonly ITestOutputHelper _output; |
||||
|
private readonly IUnitOfWorkManager _unitOfWorkManager; |
||||
|
public TransToWebPeisAppServiceTest(ITestOutputHelper testOutputHelper) |
||||
|
{ |
||||
|
_output = testOutputHelper; |
||||
|
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>(); |
||||
|
_repository = GetRequiredService<IRepository<ChargeRequest, Guid>>(); |
||||
|
_appService = GetRequiredService<TransToWebPeisAppService > (); |
||||
|
} |
||||
|
[Fact] |
||||
|
public async Task UploadPeisReportAsync() |
||||
|
{ |
||||
|
var uploadPeisReportIuputDto = new UploadPeisReportIuputDto() |
||||
|
{ |
||||
|
PatientRegisterId = new Guid("3a128197-3e61-23d3-1115-aed602ab82a8"), |
||||
|
//ReportBase64 = Shentun.Utilities.FileHelper.ToBase64("E:\\Whitedolphins\\prog20230709\\体检报告.pdf"),
|
||||
|
ReportBase64 = Shentun.Utilities.FileHelper.ToBase64("E:\\Whitedolphins\\upload.pdf"), |
||||
|
|
||||
|
}; |
||||
|
await _appService.UploadPeisReportAsync(uploadPeisReportIuputDto); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue