From 9bf0eb98ebbe1a0436c41af07ea0d1c075ed110e Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 6 Jan 2023 13:40:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9EDI?= 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 9085b636..57a8447c 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -61,6 +61,7 @@ using Microsoft.IdentityModel.Tokens; using Myshipping.Application.EDI.ESL; using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; +using NPOI.SS.Formula.Functions; namespace Myshipping.Application { @@ -2639,12 +2640,12 @@ namespace Myshipping.Application //集装箱型 var ediCtnList = _cache.GetAllMappingCtn().GetAwaiter().GetResult() .Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase) - && t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList(); + && !string.IsNullOrWhiteSpace(t.CarrierCode) && t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList(); //包装 var ediPkgsList = _cache.GetAllMappingPackage().GetAwaiter().GetResult() .Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase) - && t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList(); + && !string.IsNullOrWhiteSpace(t.CarrierCode) && t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)).ToList(); //包装基础数据 var basePkgsList = _cache.GetAllCodePackage().GetAwaiter().GetResult(); @@ -2662,7 +2663,7 @@ namespace Myshipping.Application var ftpSet = _cache.GetAllEdiSetting().GetAwaiter().GetResult() .FirstOrDefault(a => a.EDICODE.Equals(ediRouteEnum.ToString(), StringComparison.OrdinalIgnoreCase) - && a.TenantId == order.TenantId && a.CARRIERID.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)); + && a.TenantId == order.TenantId && !string.IsNullOrWhiteSpace(a.CARRIERID) && a.CARRIERID.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)); if (ftpSet == null) throw Oops.Bah($"获取EDICODE={ediRouteEnum.ToString()}的EDI参数设置失败"); @@ -2986,7 +2987,7 @@ namespace Myshipping.Application var fileInfo = new FileInfo(filePath); - Log.Information($"准备请求发送ftp:{ftpSpiderUrl} ,参数:{ftpPostObj.ToJsonString()},文件:{filePath}"); + _logger.LogInformation($"准备请求发送ftp:{ftpSpiderUrl} ,参数:{ftpPostObj.ToJsonString()},文件:{filePath}"); string strJoin = System.IO.File.ReadAllText(filePath);