修改EDI ESL、YML、YT,增加付款方式、到付地点、预付地点校验

optimize
jianghaiqing 2 years ago
parent bb481c15fd
commit 26aa8d0a62

@ -609,6 +609,32 @@ namespace Myshipping.Application.EDI.ESL
}
//2023-03-03 经过测试东胜的EDI根据付费方式区分 到付-需要填到付地点不能填预付地点,预付只能填预付地点不能填到付地点
//跟韩工确认增加判断
if (!string.IsNullOrWhiteSpace(headData.BLFRT) && headData.BLFRT.IndexOf("PREPAID") >= 0)
{
if (string.IsNullOrWhiteSpace(headData.PREPARDAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是预付,预付地点不能为空";
}
if (!string.IsNullOrWhiteSpace(headData.PAYABLEAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是预付,到付地点不能填写";
}
}
else if (!string.IsNullOrWhiteSpace(headData.BLFRT) && headData.BLFRT.IndexOf("COLLECT") >= 0)
{
if (string.IsNullOrWhiteSpace(headData.PAYABLEAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是到付,到付地点不能为空";
}
if (!string.IsNullOrWhiteSpace(headData.PREPARDAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是到付,预付地点不能填写";
}
}
}
return error;
}

@ -643,6 +643,32 @@ namespace Myshipping.Application.EDI.YML
}
//2023-03-03 经过测试东胜的EDI根据付费方式区分 到付-需要填到付地点不能填预付地点,预付只能填预付地点不能填到付地点
//跟韩工确认增加判断
if (!string.IsNullOrWhiteSpace(headData.BLFRT) && headData.BLFRT.IndexOf("PREPAID") >= 0)
{
if(string.IsNullOrWhiteSpace(headData.PREPARDAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是预付,预付地点不能为空";
}
if (!string.IsNullOrWhiteSpace(headData.PAYABLEAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是预付,到付地点不能填写";
}
}
else if (!string.IsNullOrWhiteSpace(headData.BLFRT) && headData.BLFRT.IndexOf("COLLECT") >= 0)
{
if (string.IsNullOrWhiteSpace(headData.PAYABLEAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是到付,到付地点不能为空";
}
if (!string.IsNullOrWhiteSpace(headData.PREPARDAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是到付,预付地点不能填写";
}
}
}
return error;
}
@ -723,7 +749,7 @@ namespace Myshipping.Application.EDI.YML
}
else ISSUETYPE = "EXP";
//2023-03-03 测试东胜到付会自动填,新的订舱确认只读取页面写入值,经韩工确认
r.WriteLine("03:" + ISSUETYPE + ":" + bill.ISSUEPLACEID.Trim() + ":" + bill.ISSUEPLACE.Trim() + ":" + GetDateStr(bill.ISSUEDATE, "yyyyMMdd") + ":" + GetBillNum2(bill.NOBILL) + ":" + bill.PREPARDAT + ":" + bill.PAYABLEAT + "'");
icount++;

@ -633,6 +633,33 @@ namespace Myshipping.Application.EDI.YT
}
//2023-03-03 经过测试东胜的EDI根据付费方式区分 到付-需要填到付地点不能填预付地点,预付只能填预付地点不能填到付地点
//跟韩工确认增加判断
if (!string.IsNullOrWhiteSpace(headData.BLFRT) && headData.BLFRT.IndexOf("PREPAID") >= 0)
{
if (string.IsNullOrWhiteSpace(headData.PREPARDAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是预付,预付地点不能为空";
}
if (!string.IsNullOrWhiteSpace(headData.PAYABLEAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是预付,到付地点不能填写";
}
}
else if (!string.IsNullOrWhiteSpace(headData.BLFRT) && headData.BLFRT.IndexOf("COLLECT") >= 0)
{
if (string.IsNullOrWhiteSpace(headData.PAYABLEAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是到付,到付地点不能为空";
}
if (!string.IsNullOrWhiteSpace(headData.PREPARDAT))
{
error = error + "<br />提单号:" + headData.MBLNO + " 付费方式是到付,预付地点不能填写";
}
}
}
return error;
}

Loading…
Cancel
Save