cjy 4 months ago
commit 5bdc471cad

@ -441,27 +441,29 @@ namespace DS.WMS.Core.Op.EDI
}
//}
if (string.IsNullOrEmpty(headData.CONSIGNEE))
{
error = error + "<br />提单号:" + headData.MBLNO + " 收货人不能为空";
}
else
//改为截单时校验
if (InttrEdi.filetype == "E")
{
if (StringIsChinese(headData.CONSIGNEE))
if (string.IsNullOrEmpty(headData.CONSIGNEE))
{
error = error + "<br />提单号:" + headData.MBLNO + " 收货人含有中文或双字节字符";
error = error + "<br />提单号:" + headData.MBLNO + " 收货人不能为空";
}
else
{
if (headData.CARRIEREDICODE == "HLCU")
if (StringIsChinese(headData.CONSIGNEE))
{
error += formatlengthError("txt", headData.CONSIGNEE, 35, headData.MBLNO, "收货人", 6, "--", false);
error = error + "<br />提单号:" + headData.MBLNO + " 收货人含有中文或双字节字符";
}
else
{
error += formatlengthError("txt", headData.CONSIGNEE, 35, headData.MBLNO, "收货人", 6, "**", false);
if (headData.CARRIEREDICODE == "HLCU")
{
error += formatlengthError("txt", headData.CONSIGNEE, 35, headData.MBLNO, "收货人", 6, "--", false);
}
else
{
error += formatlengthError("txt", headData.CONSIGNEE, 35, headData.MBLNO, "收货人", 6, "**", false);
}
}
}
}
@ -496,52 +498,55 @@ namespace DS.WMS.Core.Op.EDI
}
}
if (string.IsNullOrEmpty(headData.NOTIFYPARTY))
{
//CMA 订舱时可以不填通知人
if (headData.CARRIEREDICODE != "CMDU")
{
error = error + "<br />提单号:" + headData.MBLNO + " 通知人不能为空";
}
}
else
//改为截单时校验
if (InttrEdi.filetype == "E")
{
if (StringIsChinese(headData.NOTIFYPARTY))
if (string.IsNullOrEmpty(headData.NOTIFYPARTY))
{
error = error + "<br />提单号:" + headData.MBLNO + " 通知人含有中文或双字节字符";
//CMA 订舱时可以不填通知人
if (headData.CARRIEREDICODE != "CMDU")
{
error = error + "<br />提单号:" + headData.MBLNO + " 通知人不能为空";
}
}
else
{
if (headData.CARRIEREDICODE == "HLCU")
if (StringIsChinese(headData.NOTIFYPARTY))
{
error += formatlengthError("txt", headData.NOTIFYPARTY, 35, headData.MBLNO, "通知人", 6, "---", false);
error = error + "<br />提单号:" + headData.MBLNO + " 通知人含有中文或双字节字符";
}
else
{
error += formatlengthError("txt", headData.NOTIFYPARTY, 35, headData.MBLNO, "通知人", 6, "***", false);
if (headData.CARRIEREDICODE == "HLCU")
{
error += formatlengthError("txt", headData.NOTIFYPARTY, 35, headData.MBLNO, "通知人", 6, "---", false);
}
else
{
error += formatlengthError("txt", headData.NOTIFYPARTY, 35, headData.MBLNO, "通知人", 6, "***", false);
}
}
}
}
if (!string.IsNullOrEmpty(headData.NOTIFYPARTY2))
{
error += formatlengthError("txt", headData.NOTIFYPARTY2, 35, headData.MBLNO, "第二通知人", 5, "", false);
}
if (!string.IsNullOrEmpty(headData.NOTIFYPARTY2))
{
error += formatlengthError("txt", headData.NOTIFYPARTY2, 35, headData.MBLNO, "第二通知人", 5, "", false);
}
if (string.IsNullOrEmpty(headData.MARKS))
{
error = error + "<br />提单号:" + headData.MBLNO + " 唛头不能为空";
}
else
{
if (StringIsChinese(headData.MARKS))
if (string.IsNullOrEmpty(headData.MARKS))
{
error = error + "<br />提单号:" + headData.MBLNO + " 唛头含有中文或双字节字符";
error = error + "<br />提单号:" + headData.MBLNO + " 唛头不能为空";
}
else
{
error += formatlengthError("txt", headData.MARKS, 35, headData.MBLNO, "唛头", 0, "", false);
if (StringIsChinese(headData.MARKS))
{
error = error + "<br />提单号:" + headData.MBLNO + " 唛头含有中文或双字节字符";
}
else
{
error += formatlengthError("txt", headData.MARKS, 35, headData.MBLNO, "唛头", 0, "", false);
}
}
}

@ -1224,17 +1224,6 @@ namespace DS.WMS.Core.Op.Method
}
#endregion
#region 目的地
//目的地
if (order.DischargePortId > 0)
{
var portRlt = GetPortEDICode(order.DestinationId, portList, mapPortList, order.CarrierId, CONST_MAPPING_MODULE, order.DischargePort, "目的地");
if (portRlt.Succeeded)
primaryModel.DESTINATIONID = portRlt.Data;
}
#endregion
#region 交货地
//交货地
if (order.DeliveryPlaceId > 0)
@ -1246,6 +1235,35 @@ namespace DS.WMS.Core.Op.Method
}
#endregion
//INTTRA 订舱时改用交货地来填写到目的地
if (ediRouteEnum == EDIRouteEnum.INTTRA)
{
#region 目的地
//目的地
if (order.DeliveryPlaceId > 0)
{
var portRlt = GetPortEDICode(order.DeliveryPlaceId, portList, mapPortList, order.CarrierId, CONST_MAPPING_MODULE, order.DischargePort, "目的地");
if (portRlt.Succeeded)
primaryModel.DESTINATIONID = portRlt.Data;
}
#endregion
}
else
{
#region 目的地
//目的地
if (order.DestinationId > 0)
{
var portRlt = GetPortEDICode(order.DestinationId, portList, mapPortList, order.CarrierId, CONST_MAPPING_MODULE, order.DischargePort, "目的地");
if (portRlt.Succeeded)
primaryModel.DESTINATIONID = portRlt.Data;
}
#endregion
}
#region 到付地点
//到付地点
if (order.PayableAtId > 0)

Loading…
Cancel
Save