|
|
@ -811,6 +811,11 @@ namespace Myshipping.Application
|
|
|
|
public async Task<UpdateBookingLetteryardOutput> LetterYard(long bookingId)
|
|
|
|
public async Task<UpdateBookingLetteryardOutput> LetterYard(long bookingId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var order = _rep.FirstOrDefault(x => x.Id == 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);
|
|
|
|
var letterYard = await _repLetterYard.FirstOrDefaultAsync(x => x.BookingId == bookingId);
|
|
|
|
if (letterYard == null)
|
|
|
|
if (letterYard == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1112,6 +1117,22 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#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 下货纸
|
|
|
|
#region 下货纸
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 发送下货纸
|
|
|
|
/// 发送下货纸
|
|
|
@ -1772,11 +1793,16 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
primaryModel.KINDPKGS_EDI_CODE = ediPkgs.MapCode?.Trim();
|
|
|
|
primaryModel.KINDPKGS_EDI_CODE = ediPkgs.MapCode?.Trim();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//这里是订舱时,默认取SOREMARK赋值到EDIREMARK
|
|
|
|
|
|
|
|
if (model.sendType == "B")
|
|
|
|
|
|
|
|
primaryModel.EDIREMARK = order.SOREMARK;
|
|
|
|
|
|
|
|
|
|
|
|
//箱信息
|
|
|
|
//箱信息
|
|
|
|
var contaList = _repCtn.AsQueryable().Where(t => t.BILLID == order.Id).ToList();
|
|
|
|
var contaList = _repCtn.AsQueryable().Where(t => t.BILLID == order.Id).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
primaryModel.CTNLIST = new List<MsOpSeaeCtnEDIBaseModel>();
|
|
|
|
primaryModel.CTNLIST = new List<MsOpSeaeCtnEDIBaseModel>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//集装箱
|
|
|
|
//集装箱
|
|
|
|
foreach (var conta in contaList)
|
|
|
|
foreach (var conta in contaList)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1822,6 +1848,8 @@ namespace Myshipping.Application
|
|
|
|
primaryModel.CTNGOODSLIST.Add(cargoModel);
|
|
|
|
primaryModel.CTNGOODSLIST.Add(cargoModel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//这里临时赋值,等明确对应的扩展表字段后赋值
|
|
|
|
//这里临时赋值,等明确对应的扩展表字段后赋值
|
|
|
|
|
|
|
|
|
|
|
|
#if DEBUG
|
|
|
|
#if DEBUG
|
|
|
@ -1831,7 +1859,7 @@ namespace Myshipping.Application
|
|
|
|
primaryModel.SalesRepCode = "SALE1";
|
|
|
|
primaryModel.SalesRepCode = "SALE1";
|
|
|
|
primaryModel.ACIHBL = String.Empty;
|
|
|
|
primaryModel.ACIHBL = String.Empty;
|
|
|
|
primaryModel.S0CC0C = String.Empty;
|
|
|
|
primaryModel.S0CC0C = String.Empty;
|
|
|
|
primaryModel.EDIREMARK = String.Empty;
|
|
|
|
|
|
|
|
primaryModel.AMSCONSIGNEE = String.Empty;
|
|
|
|
primaryModel.AMSCONSIGNEE = String.Empty;
|
|
|
|
primaryModel.AMSNOTIFYPARTY = String.Empty;
|
|
|
|
primaryModel.AMSNOTIFYPARTY = String.Empty;
|
|
|
|
primaryModel.EDIATTN = "CEE1";
|
|
|
|
primaryModel.EDIATTN = "CEE1";
|
|
|
|