From 90bce86274f1f72b3065804a0faae4309c053ab5 Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Wed, 11 Jan 2023 09:35:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=A8=A1=E6=9D=BF=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=96=87=E4=BB=B6=E5=90=8D=E4=B9=B1=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Myshipping.Application.xml | 90 ++++++++++++++++++- .../BookingPrintTemplateService.cs | 14 ++- 2 files changed, 99 insertions(+), 5 deletions(-) diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index 53e04f0c..8c44bcc5 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -14711,7 +14711,7 @@ 任务主键 提单纸登记请求参数 - + 返回结果 @@ -14720,6 +14720,50 @@ 返回文件流 + + + 正本附件批量打印 + + 任务主键数组 + 返回文件流 + + + + 接收换船 + + 任务主键 + 返回结果 + + + + 取消换船 + + 任务主键 + 返回结果 + + + + 转发电放邮件 + + 任务主键 + 指定邮件地址 + 返回结果 + + + + 发送下货纸 + + 任务主键 + 文件功能 (9原始) + 返回结果 + + + + 获取订舱详情 + + 任务主键 + 返回结果 + 任务管理 @@ -14853,5 +14897,49 @@ 返回文件流 + + + 正本附件批量打印 + + 任务主键数组 + 返回文件流 + + + + 接收换船 + + 任务主键 + 返回结果 + + + + 取消换船 + + 任务主键 + 返回结果 + + + + 转发电放邮件 + + 任务主键 + 指定邮件地址 + 返回结果 + + + + 发送下货纸 + + 任务主键 + 文件功能 (9原始) + 返回结果 + + + + 获取订舱详情 + + 任务主键 + 返回结果 + diff --git a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs index fa80629c..f1fa6295 100644 --- a/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs +++ b/Myshipping.Application/Service/BookingPrintTemplate/BookingPrintTemplateService.cs @@ -37,14 +37,21 @@ namespace Myshipping.Application private readonly SqlSugarRepository _repUser; private readonly ILogger _logger; private readonly SqlSugarRepository _excelrep; - - public BookingPrintTemplateService(SqlSugarRepository rep, SqlSugarRepository repRight, SqlSugarRepository repUser, SqlSugarRepository excelrep, ILogger logger) + private readonly IHttpContextAccessor _httpContextAccessor; + + public BookingPrintTemplateService(SqlSugarRepository rep, + SqlSugarRepository repRight, + SqlSugarRepository repUser, + SqlSugarRepository excelrep, + ILogger logger, + IHttpContextAccessor httpContextAccessor) { _rep = rep; _repRight = repRight; _repUser = repUser; _logger = logger; _excelrep = excelrep; + _httpContextAccessor = httpContextAccessor; } /// @@ -352,8 +359,7 @@ namespace Myshipping.Application throw Oops.Bah(BookingErrorCode.BOOK115); } - var fileName = HttpUtility.UrlEncode(printFile.FileName, Encoding.GetEncoding("UTF-8")); - var result = new FileStreamResult(new FileStream(fileFullPath, FileMode.Open), "application/octet-stream") { FileDownloadName = fileName }; + var result = new FileStreamResult(new FileStream(fileFullPath, FileMode.Open), "application/octet-stream") { FileDownloadName = printFile.FileName }; return result; } ///