修改马士基API查询船期

master
jianghaiqing 9 months ago
parent 573dbf5243
commit 1c74fd6f5a

@ -11971,11 +11971,19 @@ namespace Myshipping.Application
{ {
carrierProductId = a.carrierProductId, carrierProductId = a.carrierProductId,
carrierProductSequenceId = a.carrierProductSequenceId, carrierProductSequenceId = a.carrierProductSequenceId,
ETD = b.departureDateTime.Value, ETD = b.departureDateTime,
ATD = b.arrivalDateTime.Value, ATD = b.arrivalDateTime,
vesselOperatorCarrierCode = b.vesselOperatorCarrierCode 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) if(b.facilities != null)
{ {
info.orignCityName = b.facilities.collectionOrigin?.cityName; info.orignCityName = b.facilities.collectionOrigin?.cityName;
@ -11993,9 +12001,6 @@ namespace Myshipping.Application
info.deliveryLocationType = b.facilities.deliveryDestination?.locationType; info.deliveryLocationType = b.facilities.deliveryDestination?.locationType;
info.deliveryUNLocationCode = b.facilities.deliveryDestination?.UNLocationCode; info.deliveryUNLocationCode = b.facilities.deliveryDestination?.UNLocationCode;
info.deliveryUNRegionCode = b.facilities.deliveryDestination?.UNRegionCode; info.deliveryUNRegionCode = b.facilities.deliveryDestination?.UNRegionCode;
} }
info.vesselIMONumber = b.firstDepartureVessel?.vesselIMONumber; info.vesselIMONumber = b.firstDepartureVessel?.vesselIMONumber;

@ -131,5 +131,10 @@ namespace Myshipping.Application
/// 承运人代码(MAEU, SEAU, SEJJ, MCPU, MAEI) /// 承运人代码(MAEU, SEAU, SEJJ, MCPU, MAEI)
/// </summary> /// </summary>
public string vesselOperatorCarrierCode { get; set; } public string vesselOperatorCarrierCode { get; set; }
/// <summary>
/// 行程天数
/// </summary>
public int days { get; set; }
} }
} }

Loading…
Cancel
Save