@ -7238,233 +7238,50 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount + + ;
# endregion
string sSHIPPERID = "" ;
if ( isbill ! = 1 )
{
if ( billams . BYCOUNTRY ! = "" )
{
Shipping = formatEdiStr ( "txt" , billams . AMSSHIPPER ) ;
}
else
{
Shipping = formatEdiStr ( "txt" , bill . SHIPPER ) ;
sSHIPPERID = bill . SHIPPERID ;
}
}
else
{
Shipping = formatEdiStr ( "txt" , OpBill . SHIPPER ) ;
sSHIPPERID = OpBill . SHIPPERID ;
}
List < System . String > DescriptionShipper = new List < System . String > ( ) ;
var shipperstr = "" ;
var isshipper = false ;
List < System . String > ShippingList = formatlengthStr ( Shipping , 35 ) ;
if ( ShippingList . Count ! = 0 & & Shipping . Length > 0 )
{
for ( var i = 0 ; i < ShippingList . Count ; i + + )
{
if ( i = = 0 ) Shipping = "NAD+CZ+++" + ShippingList [ 0 ] + "+" ;
if ( i = = 1 ) Shipping = Shipping + ShippingList [ i ] ;
if ( i = = 2 | | i = = 3 ) Shipping = Shipping + ":" + ShippingList [ i ] ;
if ( i > = 4 & & ShippingList . Count > 5 )
{
if ( i = = 4 )
{
if ( ShippingList [ i ] . Length > 34 )
{
Shipping = Shipping + ":" + ShippingList [ i ] . Substring ( 0 , 34 ) ;
//DescriptionShipper = ShippingList[i].Substring(34);
DescriptionShipper . Add ( "*" + ShippingList [ i ] . Substring ( 34 ) ) ;
isshipper = true ;
}
else
Shipping = Shipping + ":" + ShippingList [ i ] ;
//if (carrier == "HLCU")
//{
// Shipping = Shipping + "-";
// DescriptionShipper = "-" + DescriptionShipper;
//}
//else
//{
Shipping = Shipping + "*" ;
//DescriptionShipper = "*" + DescriptionShipper;
//}
}
else if ( i > 4 )
{
if ( isshipper )
DescriptionShipper . Add ( ShippingList [ i ] ) ;
else
{
DescriptionShipper . Add ( "*" + ShippingList [ i ] ) ;
isshipper = true ;
}
//DescriptionShipper.Add("*" + ShippingList[i]);
//DescriptionShipper = DescriptionShipper + " " + ShippingList[i];
}
}
else
if ( i = = 4 ) Shipping = Shipping + ":" + ShippingList [ i ] ;
}
}
shipperstr = Shipping + "'" ;
string sCONSIGNEEID = "" ;
if ( isbill ! = 1 )
{
if ( billams . BYCOUNTRY ! = "" )
{
Shipping = formatEdiStr ( "txt" , billams . AMSCONSIGNEE ) ;
}
else
{
Shipping = formatEdiStr ( "txt" , bill . CONSIGNEE ) ;
sCONSIGNEEID = bill . CONSIGNEEID ;
}
}
else
{
Shipping = formatEdiStr ( "txt" , OpBill . CONSIGNEE ) ;
sCONSIGNEEID = OpBill . CONSIGNEEID ;
}
//var DescriptionConsignee = "";
var Consigneestr = "" ;
isshipper = false ;
ShippingList = formatlengthStr ( Shipping , 35 ) ;
if ( ShippingList . Count ! = 0 & & Shipping . Length > 0 )
{
for ( var i = 0 ; i < ShippingList . Count ; i + + )
{
if ( i = = 0 ) Shipping = "NAD+CN+++" + ShippingList [ 0 ] + "+" ;
if ( i = = 1 ) Shipping = Shipping + ShippingList [ i ] ;
if ( i = = 2 | | i = = 3 ) Shipping = Shipping + ":" + ShippingList [ i ] ;
if ( i > = 4 & & ShippingList . Count > 5 )
{
if ( i = = 4 )
{
if ( ShippingList [ i ] . Length > 33 )
{
Shipping = Shipping + ":" + ShippingList [ i ] . Substring ( 0 , 33 ) ;
DescriptionShipper . Add ( "**" + ShippingList [ i ] . Substring ( 33 ) ) ;
isshipper = true ;
//DescriptionConsignee = ShippingList[i].Substring(33);
}
else
Shipping = Shipping + ":" + ShippingList [ i ] ;
//if (carrier == "HLCU")
//{
// Shipping = Shipping + "--";
// DescriptionConsignee = "--" + DescriptionConsignee;
//}
//else
//{
Shipping = Shipping + "**" ;
//DescriptionConsignee = "**" + DescriptionConsignee;
//}
}
else if ( i > 4 )
{
if ( isshipper )
DescriptionShipper . Add ( ShippingList [ i ] ) ;
else
{
DescriptionShipper . Add ( "**" + ShippingList [ i ] ) ;
isshipper = true ;
}
//DescriptionShipper.Add("**" + ShippingList[i]);
//DescriptionConsignee = DescriptionConsignee + " " + ShippingList[i];
}
#region NAD_FW 代理
}
else
if ( i = = 4 ) Shipping = Shipping + ":" + ShippingList [ i ] ;
}
}
Consigneestr = Shipping + "'" ;
//if (ftpset.SENDNAME.Length > 35)
// strR += "NAD+FW+" + ftpset.SENDCOMPANYCODE + ":160:86++" + ftpset.SENDNAME.Substring(0, 35) + "+" + ftpset.SENDNAME.Substring(35) + "'";
//else
// strR += "NAD+FW+" + ftpset.SENDCOMPANYCODE + ":160:86++" + ftpset.SENDNAME + "'";
//icount++;
string sNOTIFYPARTYID = "" ;
if ( isbill ! = 1 )
{
if ( billams . BYCOUNTRY ! = "" )
{
Shipping = formatEdiStr ( "txt" , billams . AMSNOTIFYPARTY ) ;
}
else
{
Shipping = formatEdiStr ( "txt" , bill . NOTIFYPARTY ) ;
sNOTIFYPARTYID = bill . NOTIFYPARTYID ;
}
}
else
{
Shipping = formatEdiStr ( "txt" , OpBill . NOTIFYPARTY ) ;
sNOTIFYPARTYID = OpBill . NOTIFYPARTYID ;
}
//var DescriptionNotifyparty = "";
var Notifypartystr = "" ;
isshipper = false ;
ShippingList = formatlengthStr ( Shipping , 35 ) ;
if ( ShippingList . Count ! = 0 & & Shipping . Length > 0 )
{
//string sAGENTID = "";
//if (isbill != 1)
//{
// Shipping = formatEdiStr("txt", bill.AGENT);
// sAGENTID = bill.AGENTID;
//}
//else
//{
// Shipping = formatEdiStr("txt", OpBill.AGENT);
// sAGENTID = OpBill.AGENTID;
//}
//List<System.String> ShippingList4 = formatlengthStr(Shipping, 35);
//if (ShippingList4.Count != 0)
//{
// Shipping = "NAD+FW++";
// for (var i = 0; i < ShippingList4.Count; i++)
// {
// if (i == 0)
// {
// Shipping += ShippingList4[i];
// }
// else
// {
// Shipping += ":" + ShippingList4[i];
// }
// }
// strR += Shipping + sAGENTID + "'";
// icount++;
//}
for ( var i = 0 ; i < ShippingList . Count ; i + + )
{
if ( i = = 0 ) Shipping = "NAD+P1+++" + ShippingList [ 0 ] + "+" ;
if ( i = = 1 ) Shipping = Shipping + ShippingList [ i ] ;
if ( i = = 2 | | i = = 3 ) Shipping = Shipping + ":" + ShippingList [ i ] ;
if ( i > = 4 & & ShippingList . Count > 5 )
{
if ( i = = 4 )
{
if ( ShippingList [ i ] . Length > 32 )
{
Shipping = Shipping + ":" + ShippingList [ i ] . Substring ( 0 , 32 ) ;
DescriptionShipper . Add ( "***" + ShippingList [ i ] . Substring ( 32 ) ) ;
isshipper = true ;
//DescriptionNotifyparty = ShippingList[i].Substring(32);
}
else
Shipping = Shipping + ":" + ShippingList [ i ] ;
//if (carrier == "HLCU")
//{
// Shipping = Shipping + "---";
// DescriptionNotifyparty = "---" + DescriptionNotifyparty;
//}
//else
//{
Shipping = Shipping + "***" ;
//DescriptionNotifyparty = "***" + DescriptionNotifyparty;
//}
}
else if ( i > 4 )
{
if ( isshipper )
DescriptionShipper . Add ( ShippingList [ i ] ) ;
else
{
DescriptionShipper . Add ( "***" + ShippingList [ i ] ) ;
isshipper = true ;
}
//DescriptionNotifyparty = DescriptionNotifyparty + " " + ShippingList[i];
}
# endregion
}
else
if ( i = = 4 ) Shipping = Shipping + ":" + ShippingList [ i ] ;
}
}
Notifypartystr = Shipping + "'" ;
#region FTX_AAA 货描
@ -7497,17 +7314,17 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount + + ;
}
if ( DescriptionShipper ! = null & & DescriptionShipper . Count ! = 0 )
{
foreach ( var shipper in DescriptionShipper )
{
if ( ! string . IsNullOrEmpty ( shipper ) )
{
strR + = "FTX+AAA+++" + shipper + "'" ;
icount = icount + 1 ;
}
}
}
//if (DescriptionShipper != null && DescriptionShipper.Count != 0 )
// {
// foreach (var shipper in DescriptionShipper)
// {
// if (!string.IsNullOrEmpty(shipper))
// {
// strR += "FTX+AAA+++" + shipper + "'";
// icount = icount + 1;
// }
// }
// }
//if (DescriptionShipper != "")
//{
// strR += "FTX+AAA+++" + DescriptionShipper + "'";
@ -7599,17 +7416,96 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount + + ;
# endregion
#region NAD_CZ 发货人
// #region NAD_CZ 发货人
strR + = shipperstr ;
icount = icount + 1 ;
//strR += shipperstr;
//icount = icount + 1;
//#endregion
//#region NAD_CN 收件人
//strR += Consigneestr;
//icount = icount + 1;
//#endregion
#region NAD_CZ 发货人
string sSHIPPERID = "" ;
if ( isbill ! = 1 )
{
if ( billams . BYCOUNTRY ! = "" )
{
Shipping = formatEdiStr ( "txt" , billams . AMSSHIPPER ) ;
}
else
{
Shipping = formatEdiStr ( "txt" , bill . SHIPPER ) ;
sSHIPPERID = bill . SHIPPERID ;
}
}
else
{
Shipping = formatEdiStr ( "txt" , OpBill . SHIPPER ) ;
sSHIPPERID = OpBill . SHIPPERID ;
}
List < System . String > ShippingList = formatlengthStr ( Shipping , 35 ) ;
if ( ShippingList . Count ! = 0 & & Shipping . Length > 0 )
{
Shipping = "NAD+CZ++" ;
for ( var i = 0 ; i < ShippingList . Count ; i + + )
{
if ( i = = 0 )
{
Shipping + = ShippingList [ i ] ;
}
else
{
Shipping + = ":" + ShippingList [ i ] ;
}
}
strR + = Shipping + sSHIPPERID + "'" ;
icount + + ;
}
# endregion
#region NAD_CN 收件人
string sCONSIGNEEID = "" ;
if ( isbill ! = 1 )
{
if ( billams . BYCOUNTRY ! = "" )
{
Shipping = formatEdiStr ( "txt" , billams . AMSCONSIGNEE ) ;
}
else
{
Shipping = formatEdiStr ( "txt" , bill . CONSIGNEE ) ;
sCONSIGNEEID = bill . CONSIGNEEID ;
}
}
else
{
Shipping = formatEdiStr ( "txt" , OpBill . CONSIGNEE ) ;
sCONSIGNEEID = OpBill . CONSIGNEEID ;
}
strR + = Consigneestr ;
icount = icount + 1 ;
List < System . String > ShippingList2 = formatlengthStr ( Shipping , 35 ) ;
if ( ShippingList2 . Count ! = 0 )
{
Shipping = "NAD+CN++" ;
for ( var i = 0 ; i < ShippingList2 . Count ; i + + )
{
if ( i = = 0 )
{
Shipping + = ShippingList2 [ i ] ;
}
else
{
Shipping + = ":" + ShippingList2 [ i ] ;
}
}
strR + = Shipping + sCONSIGNEEID + "'" ;
icount + + ;
}
# endregion
#region NAD_FW 代理
@ -7654,10 +7550,42 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
# endregion
#region NAD_P1 通知人
strR + = Notifypartystr ;
// r.WriteLine();
icount = icount + 1 ;
string sNOTIFYPARTYID = "" ;
if ( isbill ! = 1 )
{
if ( billams . BYCOUNTRY ! = "" )
{
Shipping = formatEdiStr ( "txt" , billams . AMSNOTIFYPARTY ) ;
}
else
{
Shipping = formatEdiStr ( "txt" , bill . NOTIFYPARTY ) ;
sNOTIFYPARTYID = bill . NOTIFYPARTYID ;
}
}
else
{
Shipping = formatEdiStr ( "txt" , OpBill . NOTIFYPARTY ) ;
sNOTIFYPARTYID = OpBill . NOTIFYPARTYID ;
}
List < System . String > ShippingList3 = formatlengthStr ( Shipping , 35 ) ;
if ( ShippingList3 . Count ! = 0 )
{
Shipping = "NAD+P1++" ;
for ( var i = 0 ; i < ShippingList3 . Count ; i + + )
{
if ( i = = 0 )
{
Shipping + = ShippingList3 [ i ] ;
}
else
{
Shipping + = ":" + ShippingList3 [ i ] ;
}
}
strR + = Shipping + sNOTIFYPARTYID + "'" ;
icount + + ;
}
# endregion
#region CPI 付费方式 + LOC 付款地址
@ -20652,6 +20580,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
var contractno = bill . CONTRACTNO ;
if ( string . IsNullOrEmpty ( contractno ) & & ftpset . SENDCODE = = "QJM" ) contractno = "081546" ;
//var sendcode = ftpset.SENDCODE;
//if (sendcode == "JMD") sendcode = "QJM";
//提单号
r . WriteLine ( "02:" + bill . CUSTNO . Trim ( ) + ":" + bill . MBLNO . Trim ( ) + ":" + bill . SERVICE + ":" + ftpset . SENDCODE + ":HMM::::::::" + contractno + "::" + bill . SERVICECONTRACTNO + "::'" ) ;
icount + + ;
@ -20956,7 +20887,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount + + ;
}
r . WriteLine ( "90:" + ftpset . SENDCO DE + ":" + ftpset . SENDNAME + ":" + ftpset . SENDCOMPANYCODE + ":" + ftpset . SENDATTN + ":" + ftpset . SENDTEL + ":" + ftpset . SENDTEL + ":" + ftpset . SENDEMAIL + "'" ) ;
r . WriteLine ( "90:" + ftpset . SENDCO MPANYCO DE + ":" + ftpset . SENDNAME + ":" + ftpset . SENDCOMPANYCODE + ":" + ftpset . SENDATTN + ":" + ftpset . SENDTEL + ":" + ftpset . SENDTEL + ":" + ftpset . SENDEMAIL + "'" ) ;
icount + + ;
}
icount + + ;
@ -20994,7 +20925,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if ( string . IsNullOrEmpty ( contractno ) & & ftpset . SENDCODE = = "QJM" ) contractno = "081546" ;
//提单号
r . WriteLine ( "02:" + bill . MBLNO . Trim ( ) + ":" + bill . MBLNO . Trim ( ) + ":" + bill . SERVICE + ":" + ftpset . SENDCO DE + ":HMM::::::::" + contractno + "::" + bill . SERVICECONTRACTNO + "::'" ) ;
r . WriteLine ( "02:" + bill . MBLNO . Trim ( ) + ":" + bill . MBLNO . Trim ( ) + ":" + bill . SERVICE + ":" + ftpset . SENDCO MPANYCO DE + ":HMM::::::::" + contractno + "::" + bill . SERVICECONTRACTNO + "::'" ) ;
@ -21389,7 +21320,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount + + ;
}
r . WriteLine ( "90:" + ftpset . SEND CODE + ":" + ftpset . SENDNAME + ":" + ftpset . SEND COMPANYCODE + ":" + ftpset . SENDATTN + ":" + ftpset . SENDTEL + ":" + ftpset . SENDTEL + ":" + ftpset . SENDEMAIL + "'" ) ;
r . WriteLine ( "90:" + ftpset . SEND SUBCOMPANY CODE + ":" + ftpset . SENDNAME + ":" + ftpset . SEND SUB COMPANYCODE + ":" + ftpset . SENDATTN + ":" + ftpset . SENDTEL + ":" + ftpset . SENDTEL + ":" + ftpset . SENDEMAIL + "'" ) ;
icount + + ;
}
icount + + ;