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;