修改MSK SPOT

master
jianghaiqing 5 months ago
parent 159cecb06c
commit 60fab066b2

@ -726,7 +726,7 @@ namespace Myshipping.Application.Service.BookingOrder
bookingDto.bookingBody.transport = new MSKAPIBookingTransport bookingDto.bookingBody.transport = new MSKAPIBookingTransport
{ {
carrierCode = model.carrierCode, carrierCode = model.carrierCode,
earliestDepartureDate = model.earliestDepartureDate.Value.ToString("yyyy-MM-ddTHH:mm:ss"), //earliestDepartureDate = model.earliestDepartureDate.Value.ToString("yyyy-MM-ddTHH:mm:ss"),
exportServiceMode = model.exportServiceMode, exportServiceMode = model.exportServiceMode,
importServiceMode = model.importServiceMode, importServiceMode = model.importServiceMode,
routeDetails = new MSKAPIBookingRouteDetails routeDetails = new MSKAPIBookingRouteDetails
@ -748,7 +748,22 @@ namespace Myshipping.Application.Service.BookingOrder
} }
}; };
for(int i=0;i< selectedShipSchedule.scheduleDetails.Count;i++) //ETD
if (!string.IsNullOrWhiteSpace(selectedShipSchedule.scheduleDetails.FirstOrDefault().fromLocation.date))
{
DateTime currDate = DateTime.MinValue;
if (DateTime.TryParse($"{selectedShipSchedule.scheduleDetails.FirstOrDefault().fromLocation.date} {selectedShipSchedule.scheduleDetails.FirstOrDefault().fromLocation.time}", out currDate))
{
bookingDto.bookingBody.transport.earliestDepartureDate = currDate.ToString("yyyy-MM-ddTHH:mm:ss");
}
else
{
throw Oops.Bah($"查询船期错误priceID={model.priceID} pid={model.PId} 预计离港日期departureDate={selectedShipSchedule.scheduleDetails.FirstOrDefault().fromLocation.date} {selectedShipSchedule.scheduleDetails.FirstOrDefault().fromLocation.time} 格式解析错误");
}
}
for (int i=0;i< selectedShipSchedule.scheduleDetails.Count;i++)
{ {
var detail = selectedShipSchedule.scheduleDetails[i]; var detail = selectedShipSchedule.scheduleDetails[i];
@ -768,7 +783,7 @@ namespace Myshipping.Application.Service.BookingOrder
} }
} }
//ETD //ETA
if (!string.IsNullOrWhiteSpace(detail.toLocation.date)) if (!string.IsNullOrWhiteSpace(detail.toLocation.date))
{ {
DateTime currDate = DateTime.MinValue; DateTime currDate = DateTime.MinValue;

Loading…
Cancel
Save