From a3ce4c114f6cb37b5c95ee991e82db877bc55851 Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Fri, 25 Nov 2022 12:00:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=96=87=E4=BB=B6=E6=89=BE?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingOrder/BookingOrderService.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 1a9b7fc7..b3e66cbc 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -596,7 +596,7 @@ namespace Myshipping.Application } //检索EDI扩展 - var ediExtEntity = await _bookingEDIExt.FirstOrDefaultAsync(u => u.BookingId == Id); + var ediExtEntity = await _bookingEDIExt.AsQueryable().Filter(null, true).FirstAsync(u => u.BookingId == Id); if (ediExtEntity != null) { @@ -1160,7 +1160,7 @@ namespace Myshipping.Application throw Oops.Bah(BookingErrorCode.BOOK001); } - var printTemplate = _repPrintTemplate.FirstOrDefault(x => x.TenantId == order.TenantId && x.TypeCode == typeCode); + var printTemplate = await _repPrintTemplate.AsQueryable().Filter(null, true).FirstAsync(x => x.TenantId == order.TenantId && x.TypeCode == typeCode); if (printTemplate == null) { throw Oops.Bah(BookingErrorCode.BOOK115); @@ -1221,10 +1221,11 @@ namespace Myshipping.Application //var result = new FileContentResult(bs, "application/octet-stream") { FileDownloadName = fileName }; var opt = App.GetOptions().Path; var serverpath = Path.Combine(App.WebHostEnvironment.WebRootPath, opt);//服务器路径 - if (!Directory.Exists(serverpath)) { + if (!Directory.Exists(serverpath)) + { Directory.CreateDirectory(serverpath); } - await File.WriteAllBytesAsync(Path.Combine(serverpath, fileName),bs); + await File.WriteAllBytesAsync(Path.Combine(serverpath, fileName), bs); return fileName; } ///