@ -7238,233 +7238,50 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount + + ;
icount + + ;
# endregion
# 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;
//}
}
#region NAD_FW 代理
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];
}
}
//if (ftpset.SENDNAME.Length > 35)
else
// strR += "NAD+FW+" + ftpset.SENDCOMPANYCODE + ":160:86++" + ftpset.SENDNAME.Substring(0, 35) + "+" + ftpset.SENDNAME.Substring(35) + "'";
if ( i = = 4 ) Shipping = Shipping + ":" + ShippingList [ i ] ;
//else
}
// strR += "NAD+FW+" + ftpset.SENDCOMPANYCODE + ":160:86++" + ftpset.SENDNAME + "'";
}
//icount++;
Consigneestr = Shipping + "'" ;
string sNOTIFYPARTYID = "" ;
//string sAGENTID = "";
if ( isbill ! = 1 )
//if (isbill != 1)
{
//{
if ( billams . BYCOUNTRY ! = "" )
// Shipping = formatEdiStr("txt", bill.AGENT);
{
// sAGENTID = bill.AGENTID;
Shipping = formatEdiStr ( "txt" , billams . AMSNOTIFYPARTY ) ;
//}
}
//else
else
//{
{
// Shipping = formatEdiStr("txt", OpBill.AGENT);
Shipping = formatEdiStr ( "txt" , bill . NOTIFYPARTY ) ;
// sAGENTID = OpBill.AGENTID;
sNOTIFYPARTYID = bill . NOTIFYPARTYID ;
//}
}
//List<System.String> ShippingList4 = formatlengthStr(Shipping, 35);
}
//if (ShippingList4.Count != 0)
else
//{
{
// Shipping = "NAD+FW++";
Shipping = formatEdiStr ( "txt" , OpBill . NOTIFYPARTY ) ;
// for (var i = 0; i < ShippingList4.Count; i++)
sNOTIFYPARTYID = OpBill . NOTIFYPARTYID ;
// {
}
// if (i == 0)
//var DescriptionNotifyparty = "";
// {
var Notifypartystr = "" ;
// Shipping += ShippingList4[i];
isshipper = false ;
// }
// else
ShippingList = formatlengthStr ( Shipping , 35 ) ;
// {
if ( ShippingList . Count ! = 0 & & Shipping . Length > 0 )
// 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;
//}
}
# endregion
else if ( i > 4 )
{
if ( isshipper )
DescriptionShipper . Add ( ShippingList [ i ] ) ;
else
{
DescriptionShipper . Add ( "***" + ShippingList [ i ] ) ;
isshipper = true ;
}
//DescriptionNotifyparty = DescriptionNotifyparty + " " + ShippingList[i];
}
}
else
if ( i = = 4 ) Shipping = Shipping + ":" + ShippingList [ i ] ;
}
}
Notifypartystr = Shipping + "'" ;
#region FTX_AAA 货描
#region FTX_AAA 货描
@ -7497,17 +7314,17 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount + + ;
icount + + ;
}
}
if ( DescriptionShipper ! = null & & DescriptionShipper . Count ! = 0 )
//if (DescriptionShipper != null && DescriptionShipper.Count != 0 )
{
// {
foreach ( var shipper in DescriptionShipper )
// foreach (var shipper in DescriptionShipper)
{
// {
if ( ! string . IsNullOrEmpty ( shipper ) )
// if (!string.IsNullOrEmpty(shipper))
{
// {
strR + = "FTX+AAA+++" + shipper + "'" ;
// strR += "FTX+AAA+++" + shipper + "'";
icount = icount + 1 ;
// icount = icount + 1;
}
// }
}
// }
}
// }
//if (DescriptionShipper != "")
//if (DescriptionShipper != "")
//{
//{
// strR += "FTX+AAA+++" + DescriptionShipper + "'";
// strR += "FTX+AAA+++" + DescriptionShipper + "'";
@ -7599,17 +7416,96 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount + + ;
icount + + ;
# endregion
# endregion
#region NAD_CZ 发货人
// #region NAD_CZ 发货人
strR + = shipperstr ;
//strR += shipperstr;
icount = icount + 1 ;
//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
# endregion
#region NAD_CN 收件人
#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 ;
}
List < System . String > ShippingList2 = formatlengthStr ( Shipping , 35 ) ;
strR + = Consigneestr ;
if ( ShippingList2 . Count ! = 0 )
icount = icount + 1 ;
{
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
# endregion
#region NAD_FW 代理
#region NAD_FW 代理
@ -7654,10 +7550,42 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
# endregion
# endregion
#region NAD_P1 通知人
#region NAD_P1 通知人
string sNOTIFYPARTYID = "" ;
strR + = Notifypartystr ;
if ( isbill ! = 1 )
// r.WriteLine();
{
icount = icount + 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
# endregion
#region CPI 付费方式 + LOC 付款地址
#region CPI 付费方式 + LOC 付款地址
@ -20652,6 +20580,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
var contractno = bill . CONTRACTNO ;
var contractno = bill . CONTRACTNO ;
if ( string . IsNullOrEmpty ( contractno ) & & ftpset . SENDCODE = = "QJM" ) contractno = "081546" ;
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 + "::'" ) ;
r . WriteLine ( "02:" + bill . CUSTNO . Trim ( ) + ":" + bill . MBLNO . Trim ( ) + ":" + bill . SERVICE + ":" + ftpset . SENDCODE + ":HMM::::::::" + contractno + "::" + bill . SERVICECONTRACTNO + "::'" ) ;
icount + + ;
icount + + ;
@ -20956,7 +20887,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
icount + + ;
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 + + ;
}
}
icount + + ;
icount + + ;
@ -20994,7 +20925,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if ( string . IsNullOrEmpty ( contractno ) & & ftpset . SENDCODE = = "QJM" ) contractno = "081546" ;
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 + + ;
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 + + ;
}
}
icount + + ;
icount + + ;