From fda37aa3251feb1971fd158f0df0cad0bd4fae38 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Wed, 11 Jan 2023 17:52:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9EDI=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BB=98=E6=AC=BE=E6=96=B9=E5=BC=8F=E7=9A=84EDI=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E6=95=B0=E6=8D=AE=E6=A3=80=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingOrder/BookingOrderService.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 4787b85a..93a6995f 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -2860,16 +2860,24 @@ namespace Myshipping.Application if (ediRouteEnum == EDIRouteEnum.ESL || ediRouteEnum == EDIRouteEnum.PIL || ediRouteEnum == EDIRouteEnum.WY || ediRouteEnum == EDIRouteEnum.YML || ediRouteEnum == EDIRouteEnum.YT) { + //付费方式基础数据 + var baseFrtList = _cache.GetAllCodeFrt().GetAwaiter().GetResult(); + + var baseFrtInfo = baseFrtList.FirstOrDefault(t => t.EnName.Equals(order.BLFRT, StringComparison.OrdinalIgnoreCase)); + + if (baseFrtInfo == null) + throw Oops.Bah($"付费方式{order.BLFRT}的基础代码未找到"); + //付费方式映射 var ediFrtList = _cache.GetAllMappingFrt().GetAwaiter().GetResult() .Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase)).ToList(); if (!string.IsNullOrWhiteSpace(order.BLFRT)) { - var currFrtInfo = ediFrtList.FirstOrDefault(t => t.Code.Equals(order.BLFRT, StringComparison.OrdinalIgnoreCase)); + var currFrtInfo = ediFrtList.FirstOrDefault(t => t.Code.Equals(baseFrtInfo.Code, StringComparison.OrdinalIgnoreCase)); if (currFrtInfo == null) - throw Oops.Bah($"付费方式{order.YARDID}的EDI代码未找到"); + throw Oops.Bah($"付费方式{baseFrtInfo.Code}的EDI代码未找到"); primaryModel.BLFRTEDICODE = currFrtInfo.MapCode?.Trim(); } From d4f3b56c9b6d5910bdf88bd2255b4b5719e8ce7e Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Wed, 11 Jan 2023 17:57:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=98=E8=B4=B9?= =?UTF-8?q?=E6=96=B9=E5=BC=8FEDI=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingOrder/BookingOrderService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 93a6995f..66fe42b6 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -2877,7 +2877,7 @@ namespace Myshipping.Application var currFrtInfo = ediFrtList.FirstOrDefault(t => t.Code.Equals(baseFrtInfo.Code, StringComparison.OrdinalIgnoreCase)); if (currFrtInfo == null) - throw Oops.Bah($"付费方式{baseFrtInfo.Code}的EDI代码未找到"); + throw Oops.Bah($"付费方式{order.BLFRT}的EDI代码未找到"); primaryModel.BLFRTEDICODE = currFrtInfo.MapCode?.Trim(); }