修改新增INTTRA订舱(MSK)

master
jianghaiqing 8 months ago
parent cfb3add07d
commit 48f00ebb05

@ -4,6 +4,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Myshipping.Application.EDI namespace Myshipping.Application.EDI
@ -31,6 +32,7 @@ namespace Myshipping.Application.EDI
if (str == "DAAE") return "DELMAS"; if (str == "DAAE") return "DELMAS";
if (str == "UASC") return "UASC"; if (str == "UASC") return "UASC";
if (str == "COSU") return "COSCO"; if (str == "COSU") return "COSCO";
if (str == "OOLU") return "OOCL";
else return ""; else return "";
} }
public static string GetBillNum(string str) public static string GetBillNum(string str)
@ -186,6 +188,9 @@ namespace Myshipping.Application.EDI
/// <returns></returns> /// <returns></returns>
public static string formatEdiStr(string fileType, string str) public static string formatEdiStr(string fileType, string str)
{ {
if (str == null)
str = string.Empty;
if (fileType == "txt") if (fileType == "txt")
{ {
return str.Replace("?", "??").Replace(":", "?:").Replace("+", "?+").Replace("'", "?'"); return str.Replace("?", "??").Replace(":", "?:").Replace("+", "?+").Replace("'", "?'");
@ -340,7 +345,7 @@ namespace Myshipping.Application.EDI
if (headData.CARGOID == "D" || headData.SERVICE == "DOOR-DOOR" || headData.SERVICE == "DOOR-CY" || headData.SERVICE == "CY-DOOR") if (headData.CARGOID == "D" || headData.SERVICE == "DOOR-DOOR" || headData.SERVICE == "DOOR-CY" || headData.SERVICE == "CY-DOOR")
{ {
if (headData.CARRIER != "YML") if (headData.CARRIERID != "YML")
{ {
if (string.IsNullOrEmpty(headData.EDIATTN)) if (string.IsNullOrEmpty(headData.EDIATTN))
{ error = error + "<br />EDI信息联系人不能为空"; } { error = error + "<br />EDI信息联系人不能为空"; }
@ -771,7 +776,7 @@ namespace Myshipping.Application.EDI
r.WriteLine("UNH+" + bill.ORDERNO + "+IFTMBF:D:99B:UN'"); r.WriteLine("UNH+" + bill.ORDERNO + "+IFTMBF:D:99B:UN'");
icount = icount + 2; icount = icount + 2;
if (bill.CARRIEREDICODE == "HLCU") if (bill.CARRIERID == "HLCU")
{ {
if (InttrEdi.filerole == "9") if (InttrEdi.filerole == "9")
r.WriteLine("BGM+335+" + bill.ORDERNO + "SO+9'"); r.WriteLine("BGM+335+" + bill.ORDERNO + "SO+9'");
@ -795,15 +800,15 @@ namespace Myshipping.Application.EDI
r.WriteLine("DTM+137:" + DateTime.Now.ToString("yyyyMMddHHmm") + ":203'"); r.WriteLine("DTM+137:" + DateTime.Now.ToString("yyyyMMddHHmm") + ":203'");
icount = icount + 2; icount = icount + 2;
if (bill.SERVICE.ToUpper() == "DOOR-DOOR") if (bill.SERVICEEDICODE.ToUpper() == "DOOR-DOOR")
{ {
r.WriteLine("TSR+27+2'"); r.WriteLine("TSR+27+2'");
} }
else if (bill.SERVICE.ToUpper() == "DOOR-CY") else if (bill.SERVICEEDICODE.ToUpper() == "DOOR-CY")
{ {
r.WriteLine("TSR+28+2'"); r.WriteLine("TSR+28+2'");
} }
else if (bill.SERVICE.ToUpper() == "CY-DOOR") else if (bill.SERVICEEDICODE.ToUpper() == "CY-DOOR")
{ {
r.WriteLine("TSR+29+2'"); r.WriteLine("TSR+29+2'");
} }
@ -818,7 +823,7 @@ namespace Myshipping.Application.EDI
if (bill.BLFRT.IndexOf("COLLECT") >= 0) if (bill.BLFRT.IndexOf("COLLECT") >= 0)
str_pay = bill.PAYABLEAT; str_pay = bill.PAYABLEAT;
/* 2024-04-08 JHQ
if (bill.CARRIEREDICODE == "HLCU") if (bill.CARRIEREDICODE == "HLCU")
{ {
r.WriteLine("FTX+AAI+++" + bill.BLFRT + " Payable at " + str_pay + " " + bill.SERVICE + " " + bill.CONTRACTNO + " " r.WriteLine("FTX+AAI+++" + bill.BLFRT + " Payable at " + str_pay + " " + bill.SERVICE + " " + bill.CONTRACTNO + " "
@ -834,17 +839,34 @@ namespace Myshipping.Application.EDI
r.WriteLine("FTX+AAI+++" + bill.BLFRT + " Payable at " + str_pay + " " + bill.SERVICE + " " r.WriteLine("FTX+AAI+++" + bill.BLFRT + " Payable at " + str_pay + " " + bill.SERVICE + " "
+ bill.PKGS.ToString() + bill.KINDPKGS + " " + formatEdiStr("txt", bill.EDIREMARK.Replace("\r\n", " ").Replace("\n", " ").Replace("\r", " ")) + "'"); + bill.PKGS.ToString() + bill.KINDPKGS + " " + formatEdiStr("txt", bill.EDIREMARK.Replace("\r\n", " ").Replace("\n", " ").Replace("\r", " ")) + "'");
} }
icount = icount + 2; icount = icount + 2;
*/
icount = icount + 1;
var Shipping = "";
Shipping = formatEdiStr("txt", bill.EDIREMARK);
Shipping = Shipping.Replace("\n", "\\");
Shipping = Shipping.Replace("\r", " ");
string[] EdiRemarkList = Shipping.Split('\\');
if (EdiRemarkList.Length != 0)
{
for (var i = 0; i < EdiRemarkList.Length; i++)
{
r.WriteLine("FTX+AAI+++" + EdiRemarkList[i] + "'");
icount = icount + 1;
}
}
/*件重尺*/ /*件重尺*/
r.WriteLine("CNT+7:" + Math.Round(Convert.ToDecimal(bill.KGS), 3) + ":KGM'");//按照四舍五入的国际标准 r.WriteLine("CNT+7:" + bill.KGS.ToString("0.###") + ":KGM'");//按照四舍五入的国际标准
r.WriteLine("CNT+11:" + bill.PKGS.ToString() + "'"); r.WriteLine("CNT+11:" + bill.PKGS.ToString() + "'");
r.WriteLine("CNT+15:" + Math.Round(Convert.ToDecimal(bill.CBM), 3) + ":MTQ'"); r.WriteLine("CNT+15:" + bill.CBM.ToString("0.###") + ":MTQ'");
icount = icount + 3; icount = icount + 3;
//2024-04-08 这里看2.0文档显示不使用 CNT
if (bill.CARRIEREDICODE == "UASC") if (bill.CARRIERID == "UASC")
{ {
if (bill.CTNLIST.Count > 0) if (bill.CTNLIST.Count > 0)
{ {
@ -861,7 +883,7 @@ namespace Myshipping.Application.EDI
if (bill.BLFRT == "FREIGHT COLLECT") if (bill.BLFRT == "FREIGHT COLLECT")
{ {
if (bill.PAYABLEAT != "") if (!string.IsNullOrWhiteSpace(bill.PAYABLEAT))
{ {
r.WriteLine("LOC+57+" + bill.PREPARDATID + "::6:" + bill.PAYABLEAT + "'"); r.WriteLine("LOC+57+" + bill.PREPARDATID + "::6:" + bill.PAYABLEAT + "'");
icount = icount + 1; icount = icount + 1;
@ -924,17 +946,25 @@ namespace Myshipping.Application.EDI
r.WriteLine("TDT+20+" + voyno + "+1++" + bill.CARRIEREDICODE + "+++:::" + bill.VESSEL + "'"); r.WriteLine("TDT+20+" + voyno + "+1++" + bill.CARRIEREDICODE + "+++:::" + bill.VESSEL + "'");
r.WriteLine("LOC+9+" + bill.PORTLOADID + ":139:6:" + bill.PORTLOAD + "'"); r.WriteLine("LOC+9+" + bill.PORTLOADID + ":139:6:" + bill.PORTLOAD + "'");
r.WriteLine("DTM+133:" + Convert.ToDateTime(bill.ETD).ToString("yyyyMMdd") + ":102'");//yyyyMMddHHmm r.WriteLine("DTM+133:" + Convert.ToDateTime(bill.ETD).ToString("yyyyMMdd") + ":102'");//yyyyMMddHHmm
if (!string.IsNullOrEmpty(bill.PLACERECEIPTID))
r.WriteLine("LOC+88+" + bill.PLACERECEIPTID + ":139:6:" + bill.PLACERECEIPT + "'");
else
r.WriteLine("LOC+88+" + bill.PORTLOADID + ":139:6:" + bill.PORTLOAD + "'"); r.WriteLine("LOC+88+" + bill.PORTLOADID + ":139:6:" + bill.PORTLOAD + "'");
r.WriteLine("LOC+11+" + bill.PORTDISCHARGEID + ":139:6:" + bill.PORTDISCHARGE + "'"); r.WriteLine("LOC+11+" + bill.PORTDISCHARGEID + ":139:6:" + bill.PORTDISCHARGE + "'");
icount = icount + 5; icount = icount + 5;
if (bill.DESTINATION != "") if (!string.IsNullOrWhiteSpace(bill.DESTINATIONID))
{ {
r.WriteLine("LOC+7+" + bill.DESTINATIONID + ":139:6:" + bill.DESTINATION + "'"); r.WriteLine("LOC+7+" + bill.DESTINATIONID + ":139:6:" + bill.DESTINATION + "'");
icount = icount + 1; icount = icount + 1;
} }
var Shipping = "";
var DescriptionShipper = ""; //处理发货人
Shipping = string.Empty;
var DescriptionShipper = string.Empty;
Shipping = formatEdiStr("txt", bill.SHIPPER); Shipping = formatEdiStr("txt", bill.SHIPPER);
List<System.String> ShippingList = formatlengthStr(Shipping, 35); List<System.String> ShippingList = formatlengthStr(Shipping, 35);
@ -957,6 +987,7 @@ namespace Myshipping.Application.EDI
} }
else else
Shipping = Shipping + ":" + ShippingList[i]; Shipping = Shipping + ":" + ShippingList[i];
if (bill.CARRIEREDICODE == "HLCU") if (bill.CARRIEREDICODE == "HLCU")
{ {
Shipping = Shipping + "-"; Shipping = Shipping + "-";
@ -1008,6 +1039,7 @@ namespace Myshipping.Application.EDI
} }
else else
Shipping = Shipping + ":" + ShippingList[i]; Shipping = Shipping + ":" + ShippingList[i];
if (bill.CARRIEREDICODE == "HLCU") if (bill.CARRIEREDICODE == "HLCU")
{ {
Shipping = Shipping + "--"; Shipping = Shipping + "--";
@ -1061,7 +1093,6 @@ namespace Myshipping.Application.EDI
if (ShippingList.Count != 0 && Shipping.Length > 0) if (ShippingList.Count != 0 && Shipping.Length > 0)
{ {
for (var i = 0; i < ShippingList.Count; i++) for (var i = 0; i < ShippingList.Count; i++)
{ {
if (i == 0) Shipping = "NAD+NI+++" + ShippingList[0] + "+"; if (i == 0) Shipping = "NAD+NI+++" + ShippingList[0] + "+";
@ -1109,10 +1140,10 @@ namespace Myshipping.Application.EDI
} }
else if (bill.BYCOUNTRY == "BRAZIL") else if (bill.BYCOUNTRY == "BRAZIL")
{ {
if (bill.NOTIFYPARTYCOUNTRY != "") if (!string.IsNullOrWhiteSpace(bill.NOTIFYPARTYCOUNTRY))
Shipping = Shipping + "++++" + bill.NOTIFYPARTYCOUNTRY; Shipping = Shipping + "++++" + bill.NOTIFYPARTYCOUNTRY;
r.WriteLine(Shipping + "'"); r.WriteLine(Shipping + "'");
if (bill.NOTIFYPARTYTAXNO != "") if (!string.IsNullOrWhiteSpace(bill.NOTIFYPARTYTAXNO))
{ {
r.WriteLine("RFF+GN:" + bill.NOTIFYPARTYTAXNO + "'"); r.WriteLine("RFF+GN:" + bill.NOTIFYPARTYTAXNO + "'");
icount = icount + 1; icount = icount + 1;
@ -1125,7 +1156,7 @@ namespace Myshipping.Application.EDI
r.WriteLine("NAD+CA+" + bill.CARRIEREDICODE + ":160:86++" + GetCarrierName(bill.CARRIEREDICODE) + "'"); r.WriteLine("NAD+CA+" + bill.CARRIEREDICODE + ":160:86++" + GetCarrierName(bill.CARRIEREDICODE) + "'");
icount = icount + 1; icount = icount + 1;
if (bill.SERVICE == "DOOR-DOOR") if (bill.SERVICEEDICODE == "DOOR-DOOR")
{ {
Shipping = formatEdiStr("txt", bill.SHIPPER); Shipping = formatEdiStr("txt", bill.SHIPPER);
ShippingList = formatlengthStr(Shipping, 35); ShippingList = formatlengthStr(Shipping, 35);
@ -1208,7 +1239,7 @@ namespace Myshipping.Application.EDI
} }
if (bill.WEITUO != "") if (!string.IsNullOrWhiteSpace(bill.WEITUO))
{ {
if (bill.WEITUO.Length > 35) if (bill.WEITUO.Length > 35)
r.WriteLine("NAD+FW+++" + formatEdiStr("txt", bill.WEITUO.Substring(0, 35)) + "+" + formatEdiStr("txt", bill.WEITUO.Substring(35)) + "'"); r.WriteLine("NAD+FW+++" + formatEdiStr("txt", bill.WEITUO.Substring(0, 35)) + "+" + formatEdiStr("txt", bill.WEITUO.Substring(35)) + "'");
@ -1258,7 +1289,7 @@ namespace Myshipping.Application.EDI
icount = icount + 8; icount = icount + 8;
if (bill.HSCODE != "") if (!string.IsNullOrWhiteSpace(bill.HSCODE))
{ {
r.WriteLine("PIA+5+" + bill.HSCODE + ":HS'"); r.WriteLine("PIA+5+" + bill.HSCODE + ":HS'");
icount = icount + 1; icount = icount + 1;
@ -1278,27 +1309,27 @@ namespace Myshipping.Application.EDI
} }
} }
if (DescriptionShipper != "") if (!string.IsNullOrWhiteSpace(DescriptionShipper))
{ {
r.WriteLine("FTX+AAA+++" + DescriptionShipper + "'"); r.WriteLine("FTX+AAA+++" + DescriptionShipper + "'");
icount = icount + 1; icount = icount + 1;
} }
if (DescriptionConsignee != "") if (!string.IsNullOrWhiteSpace(DescriptionConsignee))
{ {
r.WriteLine("FTX+AAA+++" + DescriptionConsignee + "'"); r.WriteLine("FTX+AAA+++" + DescriptionConsignee + "'");
icount = icount + 1; icount = icount + 1;
} }
if (DescriptionNotifyparty != "") if (!string.IsNullOrWhiteSpace(DescriptionNotifyparty))
{ {
r.WriteLine("FTX+AAA+++" + DescriptionNotifyparty + "'"); r.WriteLine("FTX+AAA+++" + DescriptionNotifyparty + "'");
icount = icount + 1; icount = icount + 1;
} }
r.WriteLine("MEA+AAE+WT+KGM:" + Math.Round(Convert.ToDecimal(bill.KGS), 3) + "'"); r.WriteLine("MEA+AAE+WT+KGM:" + bill.KGS.ToString("0.###") + "'");
r.WriteLine("MEA+AAE+AAW+MTQ:" + Math.Round(Convert.ToDecimal(bill.CBM), 3) + "'"); r.WriteLine("MEA+AAE+AAW+MTQ:" + bill.CBM.ToString("0.###") + "'");
icount = icount + 2; icount = icount + 2;
Shipping = formatEdiStr("txt", bill.MARKS); Shipping = formatEdiStr("txt", bill.MARKS);
@ -1316,6 +1347,7 @@ namespace Myshipping.Application.EDI
} }
} }
//危险品
if (bill.CARGOID == "D") if (bill.CARGOID == "D")
{ {
r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "'"); r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "'");
@ -1336,6 +1368,7 @@ namespace Myshipping.Application.EDI
isfind = true; isfind = true;
} }
}); });
if (!isfind) if (!isfind)
{ {
var ctnnum = new MsOpSeaeCtnEDIBaseModel(); var ctnnum = new MsOpSeaeCtnEDIBaseModel();
@ -1350,16 +1383,41 @@ namespace Myshipping.Application.EDI
r.WriteLine("EQD+CN++" + ctn.CTNALLCODE + "+1'"); r.WriteLine("EQD+CN++" + ctn.CTNALLCODE + "+1'");
else else
r.WriteLine("EQD+CN++" + ctn.CTNALLCODE + "+2'"); r.WriteLine("EQD+CN++" + ctn.CTNALLCODE + "+2'");
r.WriteLine("EQN+" + ctn.CTNNUM.ToString() + "'"); r.WriteLine("EQN+" + ctn.CTNNUM.ToString() + "'");
icount = icount + 2; icount = icount + 2;
if (bill.CARGOID == "R") if (bill.CARGOID == "R")
{ {
if (bill.REEFERF != "") if (!string.IsNullOrWhiteSpace(bill.REEFERF))
r.WriteLine("MEA+AAE+AAS+CBM:" + bill.REEFERF + "'"); r.WriteLine("MEA+AAE+AAS+CBM:" + bill.REEFERF + "'");
if (bill.HUMIDITY != "") if (!string.IsNullOrWhiteSpace(bill.HUMIDITY))
r.WriteLine("MEA+AAE+AAO+HMD:" + bill.HUMIDITY + "'"); r.WriteLine("MEA+AAE+AAO+HMD:" + bill.HUMIDITY + "'");
r.WriteLine("TMP+2+" + bill.TEMPSET + ":CEL'");
//温度这里如果是带小数点的值,会导致错误,这里需要慎重
var tempset = bill.TEMPSET;
if (!string.IsNullOrWhiteSpace(tempset))
{
var fuhao = "";
if (tempset.IndexOf("-") == 0)
{
fuhao = "-";
tempset = tempset.Replace("-", "");
}
if (tempset.Length < 3)
{
for (int i = 0; i < 3 - tempset.Length + 1; i++)
{
tempset = "0" + tempset;
}
}
tempset = fuhao + tempset;
}
else
{
tempset = "000";
}
r.WriteLine("TMP+2+" + tempset + ":CEL'");
icount = icount + 2; icount = icount + 2;
@ -1405,15 +1463,15 @@ namespace Myshipping.Application.EDI
if (bill.SERVICE.ToUpper() == "DOOR-DOOR") if (bill.SERVICEEDICODE.ToUpper() == "DOOR-DOOR")
{ {
r.WriteLine("TSR+27+2'"); r.WriteLine("TSR+27+2'");
} }
else if (bill.SERVICE.ToUpper() == "DOOR-CY") else if (bill.SERVICEEDICODE.ToUpper() == "DOOR-CY")
{ {
r.WriteLine("TSR+28+2'"); r.WriteLine("TSR+28+2'");
} }
else if (bill.SERVICE.ToUpper() == "CY-DOOR") else if (bill.SERVICEEDICODE.ToUpper() == "CY-DOOR")
{ {
r.WriteLine("TSR+29+2'"); r.WriteLine("TSR+29+2'");
} }
@ -1423,11 +1481,11 @@ namespace Myshipping.Application.EDI
} }
var str_pay = ""; var str_pay = "";
if (bill.BLFRT.IndexOf("PREPAID") >= 0) if (bill.BLFRTEDICODE.IndexOf("PREPAID") >= 0)
str_pay = bill.PREPARDAT; str_pay = bill.PREPARDAT;
if (bill.BLFRT.IndexOf("COLLECT") >= 0) if (bill.BLFRTEDICODE.IndexOf("COLLECT") >= 0)
str_pay = bill.PAYABLEAT; str_pay = bill.PAYABLEAT;
r.WriteLine("FTX+AAI+++" + bill.BLFRT + " Payable at " + str_pay + " " + bill.SERVICE + " " r.WriteLine("FTX+AAI+++" + bill.BLFRTEDICODE + " Payable at " + str_pay + " " + bill.SERVICEEDICODE + " "
+ bill.PKGS.ToString() + bill.KINDPKGS + "'"); + bill.PKGS.ToString() + bill.KINDPKGS + "'");
icount = icount + 5; icount = icount + 5;
@ -1593,8 +1651,6 @@ namespace Myshipping.Application.EDI
} }
var DescriptionShipper = ""; var DescriptionShipper = "";
Shipping = formatEdiStr("txt", bill.SHIPPER); Shipping = formatEdiStr("txt", bill.SHIPPER);
@ -1715,6 +1771,7 @@ namespace Myshipping.Application.EDI
else r.WriteLine(Shipping + "'"); else r.WriteLine(Shipping + "'");
icount = icount + 1; icount = icount + 1;
/*2024-04-08 JHQ 2.0
if (!string.IsNullOrEmpty(bill.WEITUO)) if (!string.IsNullOrEmpty(bill.WEITUO))
{ {
if (bill.WEITUO.Length > 35) if (bill.WEITUO.Length > 35)
@ -1739,10 +1796,11 @@ namespace Myshipping.Application.EDI
r.WriteLine("NAD+FW+" + InttrEdi.SENDCODE + ":160:86++" + InttrEdi.SENDNAME + "'"); r.WriteLine("NAD+FW+" + InttrEdi.SENDCODE + ":160:86++" + InttrEdi.SENDNAME + "'");
} }
} }
icount++;
*/
icount++;
Shipping = formatEdiStr("txt", bill.NOTIFYPARTY); Shipping = formatEdiStr("txt", bill.NOTIFYPARTY);
@ -1813,6 +1871,7 @@ namespace Myshipping.Application.EDI
else r.WriteLine(Shipping + "'"); else r.WriteLine(Shipping + "'");
icount = icount + 1; icount = icount + 1;
/* 2024-04-08 JHQ 2.0
Shipping = formatEdiStr("txt", bill.NOTIFYPARTY2); Shipping = formatEdiStr("txt", bill.NOTIFYPARTY2);
ShippingList = formatlengthStr(Shipping, 35); ShippingList = formatlengthStr(Shipping, 35);
if (ShippingList.Count != 0 && Shipping.Length > 0) if (ShippingList.Count != 0 && Shipping.Length > 0)
@ -1826,10 +1885,11 @@ namespace Myshipping.Application.EDI
} }
r.WriteLine(Shipping + "'"); r.WriteLine(Shipping + "'");
} }
*/
r.WriteLine("NAD+CA+" + bill.CARRIEREDICODE + ":160:86++" + GetCarrierName(bill.CARRIEREDICODE) + "'"); r.WriteLine("NAD+CA+" + bill.CARRIEREDICODE + ":160:86++" + GetCarrierName(bill.CARRIEREDICODE) + "'");
icount = icount + 1;
if (InttrEdi.SENDNAME.Length > 35) if (InttrEdi.SENDNAME.Length > 35)
r.WriteLine("NAD+HI+" + InttrEdi.SENDCODE + ":160:86++" + InttrEdi.SENDNAME.Substring(0, 35) + "+" + InttrEdi.SENDNAME.Substring(35) + "'"); r.WriteLine("NAD+HI+" + InttrEdi.SENDCODE + ":160:86++" + InttrEdi.SENDNAME.Substring(0, 35) + "+" + InttrEdi.SENDNAME.Substring(35) + "'");
@ -1853,7 +1913,8 @@ namespace Myshipping.Application.EDI
} }
} }
else if (bill.ISSUETYPE == "海运单" || bill.ISSUETYPE.ToUpper() == "SEAWAY" || bill.ISSUETYPE.ToUpper() == "SEAWAY BILL" || bill.ISSUETYPE.ToUpper() == "WAYBILL" || bill.ISSUETYPE.ToUpper() == "SWB正本" || bill.ISSUETYPE.ToUpper() == "SWB无正本") else if (bill.ISSUETYPE == "海运单" || bill.ISSUETYPE.ToUpper() == "SEAWAY" || bill.ISSUETYPE.ToUpper() == "SEAWAY BILL" || bill.ISSUETYPE.ToUpper() == "WAYBILL" || bill.ISSUETYPE.ToUpper() == "SWB正本"
|| bill.ISSUETYPE.ToUpper() == "SWB无正本")
{ {
r.WriteLine("DOC+710+++" + GetBillNum(bill.NOBILL) + "'"); r.WriteLine("DOC+710+++" + GetBillNum(bill.NOBILL) + "'");
icount = icount + 1; icount = icount + 1;
@ -2016,9 +2077,9 @@ namespace Myshipping.Application.EDI
} }
//MEA+AAE+WT+KGM:3000' //MEA+AAE+WT+KGM:3000'
//MEA+AAE+AAW+MTQ:110.11' //MEA+AAE+AAW+MTQ:110.11'
r.WriteLine("MEA+AAE+WT+KGM:" + Math.Round(Convert.ToDecimal(ctngood.KGS), 3) + "'"); r.WriteLine("MEA+AAE+WT+KGM:" + ctngood.KGS.ToString("0.###") + "'");
icount++; icount++;
r.WriteLine("MEA+AAE+AAW+MTQ:" + Math.Round(Convert.ToDecimal(ctngood.CBM), 3) + "'"); r.WriteLine("MEA+AAE+AAW+MTQ:" + ctngood.CBM.ToString("0.###") + "'");
icount++; icount++;
//PCI++MARKS AND NUMBERS:FOR MATERIAL 1: OUR PONUMBER: PO_123456' //PCI++MARKS AND NUMBERS:FOR MATERIAL 1: OUR PONUMBER: PO_123456'
//if (isbill != 1) //if (isbill != 1)

@ -26,12 +26,49 @@ namespace ServiceProjectSyncWin.Entities
public Nullable<DateTime> SI_CUT_DATE { get; set; } public Nullable<DateTime> SI_CUT_DATE { get; set; }
/// <summary>
/// 截关时间
/// </summary>
public Nullable<DateTime> CLOSING_DATE { get; set; }
public Nullable<DateTime> ETD { get; set; } public Nullable<DateTime> ETD { get; set; }
public Nullable<DateTime> ETA { get; set; } public Nullable<DateTime> ETA { get; set; }
public Nullable<DateTime> VGM_CUTOFF_TIME { get; set; } public Nullable<DateTime> VGM_CUTOFF_TIME { get; set; }
/// <summary>
/// 截单时间
/// </summary>
public Nullable<DateTime> CUT_SINGLE_TIME { get; set; }
/// <summary>
/// 舱单截止时间
/// </summary>
public Nullable<DateTime> MANIFEST_CUT_DATE { get; set; }
/// <summary>
/// MDGF提交截止时间
/// </summary>
public Nullable<DateTime> MDGF_CUT_DATE { get; set; }
/// <summary>
/// 截港时间
/// </summary>
public Nullable<DateTime> CY_CUTOFF_TIME { get; set; }
public string TASK_ID { get; set; } public string TASK_ID { get; set; }
public bool IsDeleted { get; set; }
/// <summary>
/// 租户id
/// </summary>
public long? TenantId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreatedTime { get; set; }
} }
} }

@ -0,0 +1,47 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServiceProjectSyncWin.Entities
{
[Tenant("db_master")]
[SugarTable("task_file")]
public class TaskFileEntities
{
/// <summary>
/// 主键
/// </summary>
[SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true)]
public string PK_ID { get; set; }
/// <summary>
/// 任务主键(父主键)
/// </summary>
public string TASK_PKID { get; set; }
/// <summary>
/// 文件路径
/// </summary>
public string FILE_PATH { get; set; }
/// <summary>
/// 文件类型
/// </summary>
public string FILE_TYPE { get; set; }
/// <summary>
/// 文件名
/// </summary>
public string FILE_NAME { get; set; }
/// <summary>
/// 附件类型代码 BC-Booking Confirmation
/// </summary>
public string FILE_CATEGORY { get; set; }
/// <summary>
/// 附件类型名称 BC-Booking Confirmation
/// </summary>
public string FILE_CATEGORY_NAME { get; set; }
}
}

@ -5,13 +5,18 @@ using Furion.DistributedIDGenerator;
using Furion.FriendlyException; using Furion.FriendlyException;
using Furion.JsonSerialization; using Furion.JsonSerialization;
using Furion.RemoteRequest.Extensions; using Furion.RemoteRequest.Extensions;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using ServiceProjectSyncWin; using ServiceProjectSyncWin;
using ServiceProjectSyncWin.Entities; using ServiceProjectSyncWin.Entities;
using SqlSugar; using SqlSugar;
using System.Collections.Specialized;
using System.ComponentModel.DataAnnotations;
using System.Net.Http.Headers;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Web;
using static System.Net.Mime.MediaTypeNames; using static System.Net.Mime.MediaTypeNames;
Serve.RunGeneric(additional: services => Serve.RunGeneric(additional: services =>
@ -426,9 +431,903 @@ public class SyncHisRecord: ISyncHisRecord,ITransient
1 1
2 2
*/ */
//_db.Queryable<TaskBCEntity>().Max(a => a.ORG_STATUS_ID); var taskList = _db.Queryable<TaskBCEntity>().Where(a => (a.BUSI_TYPE == "BookingConfirmation" || a.BUSI_TYPE == "BookingAmendment") && a.TASK_ID == "08dc56ae-e1bd-4650-818e-85447143df67")
.OrderBy(t=>t.CreatedTime)
.ToList();
string batchNo = Guid.NewGuid().ToString();
_logger.LogInformation($"批次={batchNo} 提取待处理任务 num={taskList.Count}");
string bcReadUrl = "http://localhost:5110/api/TaskBCParser/ExcuteBCFileRead";
string amendReadUrl = "http://localhost:5110/api/TaskBookingAmendmentParser/ExcuteBookingAmendmentRead";
//foreach (var task in taskList)
for(int i=0;i<taskList.Count;i++)
{
var task = taskList[i];
//BookingConfirmation、BookingAmendment
if (task.BUSI_TYPE == "BookingConfirmation")
{
_logger.LogInformation($"批次={batchNo} 处理任务 No={i} MBLNO={task.MBL_NO} 开始");
var fileInfo = _db.Queryable<TaskFileEntities>().Where(a => a.TASK_PKID == task.TASK_ID && a.FILE_CATEGORY == "BC").First();
if (fileInfo != null)
{
_logger.LogInformation($"批次={batchNo} 提取待处理任务 MBLNO={task.MBL_NO} 取到文件");
string bcFileFullPath = $"D:\\djy\\backend\\wwwroot\\{fileInfo.FILE_PATH}";
var bcFileName = Path.GetFileName(bcFileFullPath);
TaskBCInfoReadDto BCReadInfo = GetBCReaderInfo(bcFileFullPath, bcFileName, task.TenantId.Value, task.TASK_ID, bcReadUrl).GetAwaiter().GetResult();
_logger.LogInformation($"批次={batchNo} 提取待处理任务 MBLNO={task.MBL_NO} 识别完文件 BCReadInfo={JSON.Serialize(BCReadInfo)}");
if (BCReadInfo != null)
{
//SI_CUT_DATE
if (BCReadInfo.SICutDate.HasValue)
{
if (task.SI_CUT_DATE.HasValue && task.SI_CUT_DATE.Value == BCReadInfo.SICutDate.Value)
{
}
task.SI_CUT_DATE = BCReadInfo.SICutDate.Value;
}
else
{
task.SI_CUT_DATE = null;
}
//VGM_CUTOFF_TIME
if (BCReadInfo.VGMCutoffTime.HasValue)
{
task.VGM_CUTOFF_TIME = BCReadInfo.VGMCutoffTime.Value;
}
else
{
task.VGM_CUTOFF_TIME = null;
}
//MANIFEST_CUT_DATE
if (BCReadInfo.ManifestCutDate.HasValue)
{
task.MANIFEST_CUT_DATE = BCReadInfo.ManifestCutDate.Value;
}
else
{
task.MANIFEST_CUT_DATE = null;
}
//CY_CUTOFF_TIME
if (BCReadInfo.CYCutoffTime.HasValue)
{
task.CY_CUTOFF_TIME = BCReadInfo.CYCutoffTime.Value;
}
else
{
task.CY_CUTOFF_TIME = null;
}
//MDGF_CUT_DATE
if (BCReadInfo.MDGFCutDate.HasValue)
{
task.MDGF_CUT_DATE = BCReadInfo.MDGFCutDate.Value;
}
else
{
task.MDGF_CUT_DATE = null;
}
//CLOSING_DATE
if (BCReadInfo.ClosingDate.HasValue)
{
task.CLOSING_DATE = BCReadInfo.ClosingDate.Value;
}
else
{
task.CLOSING_DATE = null;
}
_db.Updateable<TaskBCEntity>(task).UpdateColumns(it => new
{
it.SI_CUT_DATE,
it.VGM_CUTOFF_TIME,
it.MANIFEST_CUT_DATE,
it.CY_CUTOFF_TIME,
it.MDGF_CUT_DATE,
it.CLOSING_DATE
}).ExecuteCommand();
}
}
}
else if (task.BUSI_TYPE == "BookingAmendment")
{
var fileInfo = _db.Queryable<TaskFileEntities>().Where(a => a.TASK_PKID == task.TASK_ID && a.FILE_CATEGORY == "BC_MODIFY").First();
if (fileInfo != null)
{
string bcFileFullPath = $"D:\\djy\\backend\\wwwroot\\{fileInfo.FILE_PATH}";
var bcFileName = Path.GetFileName(bcFileFullPath);
TaskBCInfoReadDto BCReadInfo = GetBCReaderInfo(bcFileFullPath, bcFileName, task.TenantId.Value, task.TASK_ID, amendReadUrl).GetAwaiter().GetResult();
if (BCReadInfo != null)
{
//SI_CUT_DATE
if (BCReadInfo.SICutDate.HasValue)
{
task.SI_CUT_DATE = BCReadInfo.SICutDate.Value;
}
else
{
task.SI_CUT_DATE = null;
}
//VGM_CUTOFF_TIME
if (BCReadInfo.VGMCutoffTime.HasValue)
{
task.VGM_CUTOFF_TIME = BCReadInfo.VGMCutoffTime.Value;
}
else
{
task.VGM_CUTOFF_TIME = null;
}
//MANIFEST_CUT_DATE
if (BCReadInfo.ManifestCutDate.HasValue)
{
task.MANIFEST_CUT_DATE = BCReadInfo.ManifestCutDate.Value;
}
else
{
task.MANIFEST_CUT_DATE = null;
}
//CY_CUTOFF_TIME
if (BCReadInfo.CYCutoffTime.HasValue)
{
task.CY_CUTOFF_TIME = BCReadInfo.CYCutoffTime.Value;
}
else
{
task.CY_CUTOFF_TIME = null;
}
//MDGF_CUT_DATE
if (BCReadInfo.MDGFCutDate.HasValue)
{
task.MDGF_CUT_DATE = BCReadInfo.MDGFCutDate.Value;
}
else
{
task.MDGF_CUT_DATE = null;
}
//CLOSING_DATE
if (BCReadInfo.ClosingDate.HasValue)
{
task.CLOSING_DATE = BCReadInfo.ClosingDate.Value;
}
else
{
task.CLOSING_DATE = null;
}
_db.Updateable<TaskBCEntity>(task).UpdateColumns(it => new
{
it.SI_CUT_DATE,
it.VGM_CUTOFF_TIME,
it.MANIFEST_CUT_DATE,
it.CY_CUTOFF_TIME,
it.MDGF_CUT_DATE,
it.CLOSING_DATE
}).ExecuteCommand();
}
}
}
Thread.Sleep(500);
}
}
#region 读BC详情详情
/// <summary>
/// 读BC详情详情
/// </summary>
/// <param name="attachFullName">文件完整路径</param>
/// <param name="fileName">文件名称</param>
/// <param name="tenantId">所属租户</param>
/// <param name="taskPKId">任务ID</param>
/// <param name="url">请求URL</param>
/// <returns></returns>
private async Task<TaskBCInfoReadDto> GetBCReaderInfo(string attachFullName, string fileName, long tenantId, string taskPKId, string url)
{
TaskBCInfoReadDto taskBCInfoReadDto = null;
try
{
DateTime nowDate = DateTime.Now;
EmailBCReadMessageInfo messageInfo = new EmailBCReadMessageInfo
{
Head = new TaskMessageHead
{
GID = IDGen.NextID().ToString(),
MessageType = "BOOKING_AMENDMENT",
SenderId = "DJY",
SenderName = "新大简云",
ReceiverId = "RulesEngine",
ReceiverName = "大简云规则引擎",
Version = "1.0",
RequestDate = nowDate.ToString("yyyy-MM-dd HH:mm:ss"),
RequestAction = "ReadFile",
},
Main = new EmailBCReadMessageMainInfo
{
TenantId = tenantId > 0 ? tenantId.ToString() : ""
}
};
NameValueCollection par = new NameValueCollection();
par.Add("jsonData", JSON.Serialize(messageInfo));
//解析BookingAmendment
var compareRlt = await ExcuteReadFile(par, url, new
{
file = "file",
fileName = fileName,
fileBytes = File.ReadAllBytes(attachFullName)
});
_logger.LogInformation($"读取BC附件详情 taskPKId={taskPKId}compareRlt={JSON.Serialize(compareRlt)}");
if (compareRlt.succ)
{
taskBCInfoReadDto = JSON.Deserialize<TaskBCInfoReadDto>(JSON.Serialize(compareRlt.extra));
}
}
catch (Exception ex)
{
_logger.LogError($"读取BC附件详情异常原因{ex.Message}");
}
return taskBCInfoReadDto;
}
#endregion
#region 请求BookingAmendment解析
/// <summary>
/// 请求BookingAmendment解析
/// </summary>
/// <param name="nameValueCollection">请求参数</param>
/// <param name="url">请求url</param>
/// <param name="fileInfo">文件</param>
/// <param name="contentType">请求类型</param>
/// <returns>返回回执</returns>
[NonAction]
private async Task<ParserReaderExcuteResultDto> ExcuteReadFile(NameValueCollection nameValueCollection, string url, dynamic fileInfo,
string contentType = "application/json")
{
ParserReaderExcuteResultDto model = null;
var result = string.Empty;
using (var httpClient = new HttpClient())
{
try
{
using (var reduceAttach = new MultipartFormDataContent())
{
string[] allKeys = nameValueCollection.AllKeys;
foreach (string key in allKeys)
{
var dataContent = new ByteArrayContent(Encoding.UTF8.GetBytes(nameValueCollection[key]));
dataContent.Headers.ContentDisposition = new ContentDispositionHeaderValue($"form-data")
{
Name = key
};
reduceAttach.Add(dataContent);
} }
#region 文件参数
if (fileInfo != null)
{
var Content = new ByteArrayContent(fileInfo.fileBytes);
//Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data")
//{
// Name = fileInfo.file.ToString(),
// FileName = fileInfo.fileName.ToString(),
//};
Content.Headers.Add("Content-Type", contentType);
reduceAttach.Add(Content, fileInfo.file.ToString(), HttpUtility.UrlEncode(fileInfo.fileName.ToString()));
}
#endregion
//httpClient.DefaultRequestHeaders.Add("USER_KEY", App.Configuration["ApiUserKey"]);
//httpClient.DefaultRequestHeaders.Add("USER_SECRET", App.Configuration["ApiUserSecret"]);
//请求
var response = httpClient.PostAsync(url, reduceAttach).Result;
result = response.Content.ReadAsStringAsync().Result;
model = JSON.Deserialize<ParserReaderExcuteResultDto>(result);
}
}
catch (Exception ex)
{
_logger.LogInformation("请求读取BC附件详情读取详情异常原因{error}", ex.Message);
throw Oops.Oh($"请求读取BC附件详情读取详情异常原因{ex.Message}");
}
}
return model;
}
#endregion
public class EmailBCReadMessageInfo
{
/// <summary>
/// 表头
/// </summary>
public TaskMessageHead Head { get; set; }
/// <summary>
/// 表体
/// </summary>
public EmailBCReadMessageMainInfo Main { get; set; }
}
public class EmailBCReadMessageMainInfo
{
/// <summary>
/// 所属租户ID
/// </summary>
public string TenantId { get; set; }
}
public class TaskMessageHead : WebAPIHeadBase
{
}
public class WebAPIHeadBase
{
/// <summary>
/// 报文惟一主键
/// </summary>
/// <example>08dab66c-96a1-4f90-8606-2626e06202ad</example>
[Required(ErrorMessage = "必填")]
public string GID { get; set; }
/// <summary>
/// 报文类型 BUSI_RULE-业务规则校验
/// </summary>
/// <example>BUSI_RULE</example>
[Required(ErrorMessage = "必填")]
public string MessageType { get; set; }
/// <summary>
/// 发送方代码
/// </summary>
/// <example>CUSTOMER1</example>
[Required(ErrorMessage = "必填")]
public string SenderId { get; set; }
/// <summary>
/// 发送方名称
/// </summary>
/// <example>企业A</example>
[Required(ErrorMessage = "必填")]
public string SenderName { get; set; }
/// <summary>
/// 接收方代码
/// </summary>
/// <example>RulesEngine</example>
[Required(ErrorMessage = "必填")]
public string ReceiverId { get; set; }
/// <summary>
/// 接收方名称
/// </summary>
/// <example>大简云规则引擎</example>
[Required(ErrorMessage = "必填")]
public string ReceiverName { get; set; }
/// <summary>
/// 请求方登录TOKEN可以是真实的登录人TOKEN或者是服务模拟登录人TOKEN
/// </summary>
/// <example>eyJhbGciOiJSUzI1NiIsImtpZCI6IkQ1RTkxMDI5OUU0RURFNUZEM0EwNTJBMEFDRDUzMUQzIiwidHlwIjoiYXQrand0In0</example>
public string Token { get; set; }
/// <summary>
/// 版本号 默认1.0
/// </summary>
/// <example>1.0</example>
[Required(ErrorMessage = "必填")]
public string Version { get; set; } = "1.0";
/// <summary>
/// 请求时间
/// </summary>
/// <example>2022-10-10 10:00:00</example>
public string RequestDate { get; set; }
/// <summary>
/// 请求操作类型
/// </summary>
/// <example>Add</example>
[Required(ErrorMessage = "必填")]
public string RequestAction { get; set; } = "Add";
}
}
public class ParserReaderExcuteResultDto
{
/// <summary>
/// 是否成功 true=成功 false=失败
/// </summary>
public bool succ { get; set; } = false;
/// <summary>
/// 状态 0-成功
/// </summary>
public int status { get; set; } = 0;
/// <summary>
/// 返回消息
/// </summary>
public string msg { get; set; }
/// <summary>
/// 总记录数
/// </summary>
public int total { get; set; }
/// <summary>
/// 当前页列表数据
/// </summary>
public object rows { get; set; }
/// <summary>
/// 合计信息
/// </summary>
public object summary { get; set; }
/// <summary>
/// 扩展信息
/// </summary>
public object extra { get; set; }
/// <summary>
/// 扩展信息2
/// </summary>
public object extra2 { get; set; }
/// <summary>
/// 扩展信息场站统计
/// </summary>
public object yardStatInfo { get; set; }
/// <summary>
/// 是否异常
/// </summary>
public bool exceptionflag { get; set; }
/// <summary>
/// 生成HTML
/// </summary>
public string ResultHtml { get; set; }
}
/// <summary>
///
/// </summary>
public class TaskBCInfoReadDto
{
/// <summary>
/// 订舱单位
/// </summary>
public string BookingParty { get; set; }
/// <summary>
/// 发货人
/// </summary>
public string Shipper { get; set; }
/// <summary>
/// 收货人
/// </summary>
public string Consignee { get; set; }
/// <summary>
/// 通知人
/// </summary>
public string NotifyParty { get; set; }
/// <summary>
/// BC更新次数
/// </summary>
public Nullable<int> BCModifyTimes { get; set; }
/// <summary>
/// BC更新时间
/// </summary>
public Nullable<DateTime> BCModifyDate { get; set; }
/// <summary>
/// 主单号
/// </summary>
public string MBLNo { get; set; }
/// <summary>
/// 船名
/// </summary>
public string Vessel { get; set; }
/// <summary>
/// 航次
/// </summary>
public string VoyNo { get; set; }
/// <summary>
/// 船公司
/// </summary>
public string Carrier { get; set; }
/// <summary>
/// 收货地
/// </summary>
public string PlaceReceipt { get; set; }
/// <summary>
/// 装货港
/// </summary>
public string Portload { get; set; }
/// <summary>
/// 截关时间
/// </summary>
public Nullable<DateTime> ClosingDate { get; set; }
/// <summary>
/// 截VGM时间
/// </summary>
public Nullable<DateTime> VGMCutoffTime { get; set; }
/// <summary>
/// ETA(预计到港时间)
/// </summary>
public Nullable<DateTime> ETA { get; set; }
/// <summary>
/// ETD(预计离港时间)
/// </summary>
public Nullable<DateTime> ETD { get; set; }
/// <summary>
/// 目的港ETA
/// </summary>
public Nullable<DateTime> PODETA { get; set; }
/// <summary>
/// 截单时间
/// </summary>
public Nullable<DateTime> CutSingleTime { get; set; }
/// <summary>
/// 卸货港
/// </summary>
public string PortDischarge { get; set; }
/// <summary>
/// 交货地
/// </summary>
public string PlaceDelivery { get; set; }
/// <summary>
/// 装运方式
/// </summary>
public string ShippingMethod { get; set; }
/// <summary>
/// 运输条款
/// </summary>
public string Service { get; set; }
/// <summary>
/// 港前运输形态
/// </summary>
public string PreTransMode { get; set; }
/// <summary>
/// 品名
/// </summary>
public string Description { get; set; }
/// <summary>
/// 签单地点
/// </summary>
public string IssuePlace { get; set; }
/// <summary>
/// 集港码头
/// </summary>
public string CollectionTerminal { get; set; }
/// <summary>
/// 约号
/// </summary>
public string ContractNo { get; set; }
/// <summary>
/// 预付地点
/// </summary>
public string PrepardAT { get; set; }
/// <summary>
/// 船代
/// </summary>
public string ShipAgent { get; set; }
/// <summary>
/// 场站
/// </summary>
public string Yard { get; set; }
/// <summary>
/// 场站联系人
/// </summary>
public string YardContactUserName { get; set; }
/// <summary>
/// 场站联系电话
/// </summary>
public string YardContactTel { get; set; }
/// <summary>
/// 一代客服姓名
/// </summary>
public string FstCustomerSerUserName { get; set; }
/// <summary>
/// 一代客服电话
/// </summary>
public string FstCustomerSerUserTel { get; set; }
/// <summary>
/// 一代客服邮箱
/// </summary>
public string FstCustomerSerUserEmail { get; set; }
/// <summary>
/// 备注1
/// </summary>
public string Remark1 { get; set; }
/// <summary>
/// 截港时间
/// </summary>
public Nullable<DateTime> CYCutoffTime { get; set; }
/// <summary>
/// 状态 TEMP-暂存 SUCC-已对应 ERROR-异常
/// </summary>
public string Status { get; set; }
/// <summary>
/// 文件MD5
/// </summary>
public string FileMD5 { get; set; }
/// <summary>
/// 最后对应时间,最后关联到订舱日期
/// </summary>
public Nullable<DateTime> LastToBookingDate { get; set; }
/// <summary>
/// 来源邮箱
/// </summary>
public string FromEmail { get; set; }
/// <summary>
/// 接收邮箱
/// </summary>
public string RecvEmail { get; set; }
/// <summary>
/// 订舱ID对应成功后订舱ID写入
/// </summary>
public Nullable<long> BookingOrderId { get; set; }
/// <summary>
/// 集装箱列表
/// </summary>
public List<TaskBCInfoReadCtnDto> CtnList { get; set; }
/// <summary>
/// 顺序号
/// </summary>
public int Indx { get; set; }
/// <summary>
/// 对应订舱序号
/// </summary>
public int BKOrderIndx { get; set; }
/// <summary>
/// 舱位主键
/// </summary>
public Nullable<long> BookingSlotId { get; set; }
/// <summary>
/// 船公司代号
/// </summary>
public string CarrierId { get; set; }
/// <summary>
/// 航线代码(船公司)
/// </summary>
public string LaneCode { get; set; }
/// <summary>
/// 航线名称(船公司)
/// </summary>
public string LaneName { get; set; }
/// <summary>
/// 承运方式 DIRECT_SHIP-直达TRANSFER_SHIP-中转
/// </summary>
public string CarriageType { get; set; }
/// <summary>
/// 承运方式名称 DIRECT_SHIP-直达TRANSFER_SHIP-中转
/// </summary>
public string CarriageTypeName { get; set; }
/// <summary>
/// 订舱方式 CONTRACT_ORDER-合约订舱SPOT_ORDER-SPOT订舱
/// </summary>
public string BookingSlotType { get; set; }
/// <summary>
/// 订舱方式名称 CONTRACT_ORDER-合约订舱SPOT_ORDER-SPOT订舱
/// </summary>
public string BookingSlotTypeName { get; set; }
/// <summary>
/// 箱型箱量
/// </summary>
public string CtnStat { get; set; }
/// <summary>
/// 所在周数
/// </summary>
public string WeekAt { get; set; }
/// <summary>
/// 箱使天数
/// </summary>
public int DetensionFreeDays { get; set; }
/// <summary>
/// 样单截止日期
/// </summary>
public Nullable<DateTime> SICutDate { get; set; }
/// <summary>
/// 舱单截止时间
/// </summary>
public Nullable<DateTime> ManifestCutDate { get; set; }
/// <summary>
/// MDGF提交截止时间
/// </summary>
public Nullable<DateTime> MDGFCutDate { get; set; }
/// <summary>
/// 中转港1
/// </summary>
public string TransferPort1 { get; set; }
/// <summary>
/// 中转港2
/// </summary>
public string TransferPort2 { get; set; }
/// <summary>
/// 二程船名
/// </summary>
public string SecondVessel { get; set; }
/// <summary>
/// 二程航次
/// </summary>
public string SecondVoyno { get; set; }
/// <summary>
/// 二程ETD
/// </summary>
public Nullable<DateTime> SecondETD { get; set; }
/// <summary>
/// 二程ETA
/// </summary>
public Nullable<DateTime> SecondETA { get; set; }
/// <summary>
/// 订舱确认时间
/// </summary>
public Nullable<DateTime> BookingConfirmDate { get; set; }
}
/// <summary>
/// 任务BC集装箱
/// </summary>
public class TaskBCInfoReadCtnDto
{
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
/// <summary>
/// 箱型
/// </summary>
public string CtnALL { get; set; }
/// <summary>
/// 箱量
/// </summary>
public Nullable<int> CTNNUM { get; set; }
/// <summary>
/// 件数
/// </summary>
public Nullable<int> PKGS { get; set; }
/// <summary>
/// 尺码
/// </summary>
public Nullable<decimal> CBM { get; set; }
/// <summary>
/// 毛重
/// </summary>
public Nullable<decimal> KGS { get; set; }
/// <summary>
/// 皮重
/// </summary>
public Nullable<decimal> TareWeight { get; set; }
/// <summary>
/// 危品票标示
/// </summary>
public string IODGT { get; set; }
/// <summary>
/// 特殊装载需求
/// </summary>
public string SpecialLoadingRequire { get; set; }
/// <summary>
/// 提箱场站
/// </summary>
public string TakeCTNYard { get; set; }
/// <summary>
/// 提箱时间
/// </summary>
public Nullable<DateTime> TakeCTNTime { get; set; }
/// <summary>
/// 还箱场站
/// </summary>
public string ReturnCTNYard { get; set; }
} }

@ -1,6 +1,6 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
"db_master": "Data Source=rm-m5e0s0o35bo87087b3o.mysql.rds.aliyuncs.com;Database=booking_hechuan;User ID=hechuan;Password=HcDjy@123;pooling=true;port=3306;sslmode=none;CharSet=utf8mb4;Convert Zero Datetime=True;Allow Zero Datetime=True;" "db_master": "Data Source=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;Database=booking_data;User ID=rulesengine_admin;Password=Rule1qaz2wsx!QAZ;pooling=true;port=3306;sslmode=none;CharSet=utf8;"
}, },
"ServiceStatusPushUrl": "http://47.104.85.216:12345/api/ServiceWorkFlowManage/PushStatus" "ServiceStatusPushUrl": "http://47.104.85.216:12345/api/ServiceWorkFlowManage/PushStatus"
} }
Loading…
Cancel
Save