From e351bf27da0802085fcef7ab989f6ff116b427a7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-G961P6V\\Zhh" <839860190@qq.com> Date: Fri, 24 May 2024 04:28:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E6=A3=80=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TransToWebPeisAppService.cs | 2 +- .../TransToWebPeisAppServiceTest.cs | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs b/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs index e28a3a0..1f46c25 100644 --- a/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs +++ b/src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs @@ -169,7 +169,7 @@ namespace Shentun.Peis.TransToWebPeis public async Task UploadPeisReportAsync(UploadPeisReportIuputDto input) { //同步数据 - //await TransPatientRegisterByPatientRegisterIdAsync(new PatientRegisterIdInputDto { PatientRegisterId = input.PatientRegisterId }); + await TransPatientRegisterByPatientRegisterIdAsync(new PatientRegisterIdInputDto { PatientRegisterId = input.PatientRegisterId }); //上传报告 var thirdInterfaces = await _thirdInterfaceRepository.GetListAsync(o => o.ThirdInterfaceType == ThirdInterfaceTypeFlag.TranToWebPeis); diff --git a/test/Shentun.Peis.Application.Tests/TransToWebPeisAppServiceTest.cs b/test/Shentun.Peis.Application.Tests/TransToWebPeisAppServiceTest.cs index e9018a7..9702137 100644 --- a/test/Shentun.Peis.Application.Tests/TransToWebPeisAppServiceTest.cs +++ b/test/Shentun.Peis.Application.Tests/TransToWebPeisAppServiceTest.cs @@ -30,14 +30,21 @@ namespace Shentun.Peis [Fact] public async Task UploadPeisReportAsync() { - var uploadPeisReportIuputDto = new UploadPeisReportIuputDto() + using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) { - 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); + + 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); + await unitOfWork.CompleteAsync(); + } + + } } }