diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index c82e2dd1..fd88788c 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -11971,11 +11971,19 @@ namespace Myshipping.Application { carrierProductId = a.carrierProductId, carrierProductSequenceId = a.carrierProductSequenceId, - ETD = b.departureDateTime.Value, - ATD = b.arrivalDateTime.Value, + ETD = b.departureDateTime, + ATD = b.arrivalDateTime, vesselOperatorCarrierCode = b.vesselOperatorCarrierCode }; + if (b.departureDateTime.HasValue && b.arrivalDateTime.HasValue) + { + TimeSpan ts = b.arrivalDateTime.Value.Subtract(b.departureDateTime.Value); + var timeDiff = ts.TotalHours; + + info.days = (int)Math.Ceiling(timeDiff / 24.0); + } + if(b.facilities != null) { info.orignCityName = b.facilities.collectionOrigin?.cityName; @@ -11993,9 +12001,6 @@ namespace Myshipping.Application info.deliveryLocationType = b.facilities.deliveryDestination?.locationType; info.deliveryUNLocationCode = b.facilities.deliveryDestination?.UNLocationCode; info.deliveryUNRegionCode = b.facilities.deliveryDestination?.UNRegionCode; - - - } info.vesselIMONumber = b.firstDepartureVessel?.vesselIMONumber; diff --git a/Myshipping.Application/Service/BookingOrder/Dto/SearchShipSailingScheduleResultDto.cs b/Myshipping.Application/Service/BookingOrder/Dto/SearchShipSailingScheduleResultDto.cs index 80e411b6..18f48fa7 100644 --- a/Myshipping.Application/Service/BookingOrder/Dto/SearchShipSailingScheduleResultDto.cs +++ b/Myshipping.Application/Service/BookingOrder/Dto/SearchShipSailingScheduleResultDto.cs @@ -131,5 +131,10 @@ namespace Myshipping.Application /// 承运人代码(MAEU, SEAU, SEJJ, MCPU, MAEI) /// public string vesselOperatorCarrierCode { get; set; } + + /// + /// 行程天数 + /// + public int days { get; set; } } }