From 30ada3bb2ac625ecaeb878933faa50c0149edc6e Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 29 Dec 2022 14:19:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9EDI=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=9C=80=E8=A6=81=E5=9C=BA=E7=AB=99EDI=E7=9A=84?= =?UTF-8?q?=E7=B2=BE=E7=A1=AE=E5=88=A4=E6=96=AD=EF=BC=8CPIL&CNTAO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingOrderService.cs | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 4dff5b25..a6bf6eb0 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -2452,19 +2452,23 @@ namespace Myshipping.Application var primaryModel = order.Adapt(); - //场站 - var ediYardList = _cache.GetAllMappingYard().GetAwaiter().GetResult() + //起运港是CNTAO并且船公司是太平需要判断场站EDI + if (order.PORTLOADID == "CNTAO" && ediRouteEnum == EDIRouteEnum.PIL) + { + //场站 + var ediYardList = _cache.GetAllMappingYard().GetAwaiter().GetResult() .Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase)).ToList(); - if (!string.IsNullOrWhiteSpace(order.YARDID)) - { - var currYardInfo = ediYardList.FirstOrDefault(t => t.Code.Equals(order.YARDID, StringComparison.OrdinalIgnoreCase)); + if (!string.IsNullOrWhiteSpace(order.YARDID)) + { + var currYardInfo = ediYardList.FirstOrDefault(t => t.Code.Equals(order.YARDID, StringComparison.OrdinalIgnoreCase)); - if (currYardInfo == null) - throw Oops.Bah($"场站{order.YARDID}的EDI代码未找到"); + if (currYardInfo == null) + throw Oops.Bah($"场站{order.YARDID}的EDI代码未找到"); - primaryModel.YARDEDICODE = currYardInfo.MapCode?.Trim(); - primaryModel.YARD = currYardInfo.MapName?.Trim(); + primaryModel.YARDEDICODE = currYardInfo.MapCode?.Trim(); + primaryModel.YARD = currYardInfo.MapName?.Trim(); + } } primaryModel.CARRIEREDICODE = ediSOSICfg.MapCode;