From 8539c9023e660f3a107ce6d04a976366026ccf60 Mon Sep 17 00:00:00 2001 From: wanghaomei <86whm@163.com> Date: Mon, 12 Aug 2024 14:08:45 +0800 Subject: [PATCH] =?UTF-8?q?SITC=E8=AE=A2=E8=88=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingOrderService.cs | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 587ceb21..0de8ddb6 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -7171,6 +7171,10 @@ namespace Myshipping.Application throw Oops.Bah($"收货地{primaryModel.PLACERECEIPTID}的EDI代码未找到"); primaryModel.PLACERECEIPTID = currPortInfo.MapCode?.Trim(); + if (ediRouteEnum == EDIRouteEnum.SITC) + { + primaryModel.PLACERECEIPT = currPortInfo.MapName?.Trim(); + } } //装货港 @@ -7183,6 +7187,10 @@ namespace Myshipping.Application throw Oops.Bah($"装货港{primaryModel.PORTLOADID}的EDI代码未找到"); primaryModel.PORTLOADID = currPortInfo.MapCode?.Trim(); + if (ediRouteEnum == EDIRouteEnum.SITC) + { + primaryModel.PORTLOAD = currPortInfo.MapName?.Trim(); + } } //签单地点 @@ -7246,6 +7254,10 @@ namespace Myshipping.Application throw Oops.Bah($"卸货港{primaryModel.PORTDISCHARGEID}的EDI代码未找到"); primaryModel.PORTDISCHARGEID = currPortInfo.MapCode?.Trim(); + if (ediRouteEnum == EDIRouteEnum.SITC) + { + primaryModel.PORTDISCHARGE = currPortInfo.MapName?.Trim(); + } } //中转港 @@ -7274,6 +7286,10 @@ namespace Myshipping.Application throw Oops.Bah($"中转港{primaryModel.TRANSPORTID}的EDI代码未找到"); primaryModel.TRANSPORTID = currPortInfo.MapCode?.Trim(); + if (ediRouteEnum == EDIRouteEnum.SITC) + { + primaryModel.TRANSPORT = currPortInfo.MapName?.Trim(); + } } //目的地 @@ -7302,6 +7318,10 @@ namespace Myshipping.Application throw Oops.Bah($"目的地{primaryModel.DESTINATIONID}的EDI代码未找到"); primaryModel.DESTINATIONID = currPortInfo.MapCode?.Trim(); + if (ediRouteEnum == EDIRouteEnum.SITC) + { + primaryModel.DESTINATION = currPortInfo.MapName?.Trim(); + } } //交货地 @@ -7801,7 +7821,7 @@ namespace Myshipping.Application var jRtn = JObject.Parse(rtn); _logger.LogInformation($"SITC接口返回:{rtn}"); - if (jRtn.GetIntValue("code") == 200) + if (jRtn.GetBooleanValue("success")) { var token = jRtn.GetJObjectValue("data").GetStringValue("accessToken"); _logger.LogInformation($"调用SITC接口获取token:{token}"); @@ -7813,7 +7833,7 @@ namespace Myshipping.Application .PostAsStringAsync(); jRtn = JObject.Parse(rtn); _logger.LogInformation($"SITC接口返回:{rtn}"); - if (jRtn.GetIntValue("code") == 200) + if (jRtn.GetBooleanValue("success")) { var bkNO = jRtn.GetJObjectValue("data").GetStringValue("bkNo"); _logger.LogInformation($"SITC接口返回订舱编号:{bkNO}");