From 7ca66a8ccb95778662b5b4785afd80822ca46215 Mon Sep 17 00:00:00 2001 From: whm <86whm@163.com> Date: Mon, 3 Apr 2023 17:54:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E7=A1=AE=E6=89=93=E5=8D=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingOrder/BookingOrderService.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 57d6c39c..fffb8805 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -2364,7 +2364,7 @@ namespace Myshipping.Application //2023-4-3,根据河川操作要求,文件名只带提单号 - if(!string.IsNullOrEmpty(order.MBLNO)) + if (!string.IsNullOrEmpty(order.MBLNO)) { fileName = $"{order.MBLNO}{fileType}";//名称 } @@ -2595,7 +2595,16 @@ namespace Myshipping.Application { Directory.CreateDirectory(fileFullPath); } - fileName = $"{order.MBLNO}_{DateTime.Now.Ticks}" + ".xls";//名称 + + //2023-4-3,根据河川操作要求,文件名只带提单号 + if (!string.IsNullOrEmpty(order.MBLNO)) + { + fileName = $"{order.MBLNO}.xls";//名称 + } + else + { + fileName = $"{order.Id}_{DateTime.Now.Ticks}.xls";//名称 + } _logger.LogInformation("导出excel:" + Path.Combine(fileFullPath, fileName)); var filestream = new FileStream(Path.Combine(fileFullPath, fileName), FileMode.OpenOrCreate, FileAccess.ReadWrite); excelwork.Write(filestream); @@ -5195,7 +5204,7 @@ namespace Myshipping.Application x.lineRel.CarrierCode }).Take(10).ToList(); }); - var STemplate = _bookingTemplate.Where(x=>x.Type=="10"&&x.CreatedUserId==UserManager.UserId).Take(10).ToList(); + var STemplate = _bookingTemplate.Where(x => x.Type == "10" && x.CreatedUserId == UserManager.UserId).Take(10).ToList(); var FTemplate = _bookingTemplate.Where(x => x.Type == "20" && x.CreatedUserId == UserManager.UserId).Take(10).ToList(); var TTemplate = _bookingTemplate.Where(x => x.Type == "30" && x.CreatedUserId == UserManager.UserId).Take(10).ToList(); var WTDW = _djycustomer.Where(x => x.PropString.Contains("consignor") && x.TenantId == UserManager.TENANT_ID).Take(10).ToList(); @@ -5203,7 +5212,7 @@ namespace Myshipping.Application var Forwarder = _cache.GetAllCodeForwarder().Result.Take(10).ToList(); var GoodsName = _paraGoodsInfoRepository.AsQueryable().OrderBy("GOODS_CODE asc").Take(50).ToList().Select(t => t.Adapt()).ToList(); var YFXY = _paraContractNoInfoRepository.AsQueryable().OrderBy("CONTRACT_NO asc").Take(10).ToList().Select(t => t.Adapt()).ToList(); ; - var User = _repUser.AsQueryable().Filter(null, true).Where(x=>x.TenantId==UserManager.TENANT_ID).Take(10).ToListAsync(); + var User = _repUser.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID).Take(10).ToListAsync(); var Service = _cache.GetAllCodeService().Result.Take(10).ToList(); dynamic obj = new {