|
|
@ -478,22 +478,8 @@ namespace Myshipping.Application.Service.BookingOrder
|
|
|
|
|
|
|
|
|
|
|
|
var jsonBody = Newtonsoft.Json.JsonConvert.SerializeObject(bookingDto);
|
|
|
|
var jsonBody = Newtonsoft.Json.JsonConvert.SerializeObject(bookingDto);
|
|
|
|
|
|
|
|
|
|
|
|
#if DEBUG
|
|
|
|
var rlt = await sendUrl.SetBody(jsonBody)
|
|
|
|
//测试用造假数据
|
|
|
|
|
|
|
|
var rlt = JSON.Serialize(new MSKAPIBookingResultDto
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
code = 200,
|
|
|
|
|
|
|
|
data = new MSKAPIBookingResultDataDto
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bookingReference = DateTime.Now.ToString("yyyyMMddHHmmssfffff"),
|
|
|
|
|
|
|
|
requestAcknowledgementId = Guid.NewGuid().ToString(),
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
var rlt = await sendUrl.SetBody(jsonBody)
|
|
|
|
|
|
|
|
.PostAsStringAsync();
|
|
|
|
.PostAsStringAsync();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"开始请求MSK API订舱,返回结果 JSON={JSON.Serialize(rlt)}");
|
|
|
|
_logger.LogInformation($"开始请求MSK API订舱,返回结果 JSON={JSON.Serialize(rlt)}");
|
|
|
|
|
|
|
|
|
|
|
@ -1396,13 +1382,14 @@ var rlt = await sendUrl.SetBody(jsonBody)
|
|
|
|
|
|
|
|
|
|
|
|
var model = GetInfo(entity.Id).GetAwaiter().GetResult();
|
|
|
|
var model = GetInfo(entity.Id).GetAwaiter().GetResult();
|
|
|
|
result = InnerSendMSKBooking(model, entity.Id, false).GetAwaiter().GetResult();
|
|
|
|
result = InnerSendMSKBooking(model, entity.Id, false).GetAwaiter().GetResult();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result.succ)
|
|
|
|
|
|
|
|
return string.Empty;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
msgList.Add(ex.Message);
|
|
|
|
msgList.Add(ex.Message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return string.Empty;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return string.Join("#", msgList.ToArray());
|
|
|
|
return string.Join("#", msgList.ToArray());
|
|
|
@ -1477,7 +1464,7 @@ var rlt = await sendUrl.SetBody(jsonBody)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
entity = model.Adapt<BookingDeliveryRecord>();
|
|
|
|
entity = model.bookingDto.Adapt<BookingDeliveryRecord>();
|
|
|
|
|
|
|
|
|
|
|
|
entity.CreatedTime = nowDate;
|
|
|
|
entity.CreatedTime = nowDate;
|
|
|
|
entity.UpdatedTime = nowDate;
|
|
|
|
entity.UpdatedTime = nowDate;
|
|
|
|