booking_auth_dev
wet 2 years ago
commit c6422515b2

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

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

@ -24,7 +24,7 @@ namespace Myshipping.Application
.Map(dest => dest.VESSEL, src => src.VESSEL) .Map(dest => dest.VESSEL, src => src.VESSEL)
.Map(dest => dest.VOYNO, src => src.VOYNO) .Map(dest => dest.VOYNO, src => src.VOYNO)
.Map(dest => dest.ETD, src => src.ETD.HasValue? src.ETD.Value.ToString("yyyy-MM-dd"):"") .Map(dest => dest.ETD, src => src.ETD.HasValue? src.ETD.Value.ToString("yyyy-MM-dd"):"")
//.Map(dest => dest.EDIREMARK, src => src.EDIREMARK) //.Map(dest => dest.EDIREMARK, src => src.SOREMARK)
.Map(dest => dest.SIREMARK, src => src.SIREMARK) .Map(dest => dest.SIREMARK, src => src.SIREMARK)
.Map(dest => dest.SHIPPER, src => src.SHIPPER) .Map(dest => dest.SHIPPER, src => src.SHIPPER)
.Map(dest => dest.CONSIGNEE, src => src.CONSIGNEE) .Map(dest => dest.CONSIGNEE, src => src.CONSIGNEE)

Loading…
Cancel
Save