订舱打印

booking_auth_dev
wanghaomei 2 years ago
parent 110d739901
commit e0a5594f04

@ -4701,6 +4701,13 @@
<param name="typeCode">报表类型代码例如fangcang、samplebill等</param>
<returns></returns>
</member>
<member name="M:Myshipping.Application.BookingOrderService.Print(System.Int64,System.String)">
<summary>
打印
</summary>
<param name="bookingId"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Application.BookingOrderService.SendXHZ(System.Int64)">
<summary>
发送下货纸

@ -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;
}

Loading…
Cancel
Save