|
|
|
@ -771,6 +771,11 @@ namespace Myshipping.Application
|
|
|
|
|
public async Task<UpdateBookingLetteryardOutput> LetterYard(long bookingId)
|
|
|
|
|
{
|
|
|
|
|
var order = _rep.FirstOrDefault(x => x.Id == bookingId);
|
|
|
|
|
if (order == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah(BookingErrorCode.BOOK001);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var letterYard = await _repLetterYard.FirstOrDefaultAsync(x => x.BookingId == bookingId);
|
|
|
|
|
if (letterYard == null)
|
|
|
|
|
{
|
|
|
|
@ -1072,6 +1077,22 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 打印
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 打印
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="bookingId"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/BookingOrder/Print")]
|
|
|
|
|
public async Task<IActionResult> Print(long bookingId, string type)
|
|
|
|
|
{
|
|
|
|
|
var bs = await GetReportFile(bookingId, type);
|
|
|
|
|
var fileName = HttpUtility.UrlEncode($"{bookingId}_{DateTime.Now.Ticks}.xlsx", Encoding.GetEncoding("UTF-8"));
|
|
|
|
|
var result = new FileContentResult(bs, "application/octet-stream") { FileDownloadName = fileName };
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 下货纸
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发送下货纸
|
|
|
|
@ -1810,7 +1831,7 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah(result.msg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//上传FTP
|
|
|
|
|
var sendStatus = await InnerSendBookingOrClosingEDIToFTP(result.extra.ToString(), ftpSet);
|
|
|
|
|
|
|
|
|
@ -1869,7 +1890,7 @@ namespace Myshipping.Application
|
|
|
|
|
if (jobjRetn.GetStringValue("status") != "1")
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|