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;