修改PIL EDI增加CNPT NO字段,修改EDI的取值逻辑

optimize
jianghaiqing 2 years ago
parent 2c9e11c58d
commit 0c985f9dab

@ -590,5 +590,10 @@ namespace Myshipping.Application
/// 商品代码
/// </summary>
public string GOODSCODE { get; set; }
/// <summary>
/// CNPTNo
/// </summary>
public string CNPTNo { get; set; }
}
}

@ -449,6 +449,21 @@ namespace Myshipping.Application.EDI.PIL
if (bill.CBM == 0)
{ error = error + "<br />提单号:" + bill.CBM + "货物尺码不能为空"; }
if (InttrEdi.filetype.Equals("B", StringComparison.OrdinalIgnoreCase))
{
if(string.IsNullOrWhiteSpace(bill.ShipperEdiCode))
{ error = error + "<br />提单号:" + bill.MBLNO + "发货人EDI代码不能为空"; }
if(bill.BLFRT.IndexOf("FREIGHT PREPAID") < 0)
{
if (string.IsNullOrWhiteSpace(bill.ConsigneeEdiCode))
{ error = error + "<br />提单号:" + bill.MBLNO + "付款方式是到付时收货人EDI代码不能为空"; }
}
if (string.IsNullOrWhiteSpace(bill.CNPTNo))
{ error = error + "<br />提单号:" + bill.MBLNO + "CNPT NO不能为空"; }
}
if (bill.CARGOID == null || bill.CARGOID == "")
{ error = error + "<br />提单号:" + bill.MBLNO + "货物标示不能为空"; }
@ -1033,6 +1048,10 @@ namespace Myshipping.Application.EDI.PIL
tempstr += GetSpaceStr("", 4);//12 //SCAC Code//O//X(4)//233 //236 //
tempstr += GetSpaceStr("", 14);//13 //Filler//M//X(14)//237 //250 //Spaces
tempstr = GetSpaceStr(tempstr, 236);
/*
2023-05-31 PILCNPT No
if (bill.BLFRT.IndexOf("FREIGHT PREPAID") > -1)//运费预付
{
tempstr += GetSpaceStr(bill.ShipperEdiCode, 10);//3 //Booking Party Code//O//X(10)//6 //15 //webcsm Partner Code
@ -1041,6 +1060,9 @@ namespace Myshipping.Application.EDI.PIL
{
tempstr += GetSpaceStr(bill.ConsigneeEdiCode, 10);//3//Shipper Code//O//X(10)//6//15//webcsm Partner Code//mandtory for CIF shpts,预付必填
}
*/
tempstr += GetSpaceStr(bill.CNPTNo, 10);//3 //Booking Party Code//O//X(10)//6 //15 //webcsm Partner Code
r.WriteLine(GetSpaceStr(tempstr, 250));
#endregion

@ -214,5 +214,11 @@ namespace Myshipping.Application.Entity
/// </summary>
[Description("EMC Name accout")]
public string EmcNameAccount { get; set; }
/// <summary>
/// CNPTNo
/// </summary>
[Description("CNPT No")]
public string CNPTNo { get; set; }
}
}

@ -4428,6 +4428,9 @@ namespace Myshipping.Application
primaryModel.ShipperEdiCode = ediExtModel.ShipperEdiCode;
primaryModel.SalesRepCode = ediExtModel.SalerCode;
//2023-05-31 增加CNPTNo赋值解决PIL的订舱报文
primaryModel.CNPTNo = ediExtModel.CNPTNo;
//优先取订舱的EDI附属信息为空取FTP配置
primaryModel.EDIATTN = ediExtModel.EDIAttn;

@ -166,5 +166,10 @@ namespace Myshipping.Application
/// 第一层包装皮重
/// </summary>
public decimal? KingTareweight { get; set; }
/// <summary>
/// CNPTNo
/// </summary>
public string CNPTNo { get; set; }
}
}

Loading…
Cancel
Save