From 4ef20fa5a5db3ac894f0b0b4a5e5675459c01b5d Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 3 Mar 2023 18:03:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9FTP=20=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingOrder/BookingOrderService.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 1823f0af..de1df513 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -3048,7 +3048,7 @@ namespace Myshipping.Application var primaryModel = order.Adapt(); //起运港是CNTAO并且船公司是太平需要判断场站EDI - if (order.PORTLOADID == "CNTAO" && ediRouteEnum == EDIRouteEnum.PIL) + if ((order.PORTLOADID == "CNTAO" && ediRouteEnum == EDIRouteEnum.PIL) || ediRouteEnum == EDIRouteEnum.WY) { //场站 var ediYardList = _cache.GetAllMappingYard().GetAwaiter().GetResult() @@ -3366,10 +3366,20 @@ namespace Myshipping.Application CancellationTokenSource cts = new CancellationTokenSource(); + string host = string.Empty; + string port = string.Empty; + + if(ediCfg.SERVERIP.IndexOf(":")>= 0) + { + host = ediCfg.SERVERIP.Split(new char[] { ':'}).FirstOrDefault().Trim(); + port = ediCfg.SERVERIP.Split(new char[] { ':' }).Last()?.Trim(); + } + //后续发送 var ftpPostObj = new { - host = ediCfg.SERVERIP, + host = host, + port = port, username = ediCfg.USERNAME, pwd = ediCfg.PASSWORD, path = ediCfg.FOLDERNAME