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