From 834a13524d0c5d418a69bd397382e7dd9566dbf5 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Tue, 23 Jul 2024 16:29:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9MSK=20API=E5=90=88=E7=BA=A6?= =?UTF-8?q?=E8=AE=A2=E8=88=B1=EF=BC=8C=E8=88=AA=E8=A1=8C=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E9=87=8C=E6=9C=89=E9=9D=9E=E6=B8=AF=E5=8F=A3=E7=9A=84=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E4=BC=A0=E8=88=AA=E8=BF=90=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingMSKAPIService.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs b/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs index 391a399c..8985edfb 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingMSKAPIService.cs @@ -669,16 +669,19 @@ namespace Myshipping.Application.Service.BookingOrder throw Oops.Bah($"查询船期错误,pid={model.PId} 预计到港日期arrivalDateTime 格式解析错误"); } - currDto.transportMode = new MSKAPIBookingTransportMode + if(detail.transport.vessel != null) { - vessel = new MSKAPIBookingTransportModeVessel + currDto.transportMode = new MSKAPIBookingTransportMode { - name = detail.transport.vessel.vesselName, - maerskVesselCode = detail.transport.vessel.carrierVesselCode, - vesselIMONumber = detail.transport.vessel.vesselIMONumber - }, - exportVoyageNumber = detail.transport.carrierDepartureVoyageNumber, - }; + vessel = new MSKAPIBookingTransportModeVessel + { + name = detail.transport.vessel.vesselName, + maerskVesselCode = detail.transport.vessel.carrierVesselCode, + vesselIMONumber = detail.transport.vessel.vesselIMONumber + }, + exportVoyageNumber = detail.transport.carrierDepartureVoyageNumber, + }; + } currDto.serviceCode = detail.transport.carrierServiceCode; currDto.transportModeCode = detail.transport.transportMode;