|
|
@ -2087,6 +2087,8 @@ namespace Myshipping.Application
|
|
|
|
// throw Oops.Bah("目的港代码和名称不能为空");
|
|
|
|
// throw Oops.Bah("目的港代码和名称不能为空");
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//起运港校验
|
|
|
|
if (string.IsNullOrEmpty(input.PORTLOADCODE))
|
|
|
|
if (string.IsNullOrEmpty(input.PORTLOADCODE))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw Oops.Bah("起运港代码不能为空");
|
|
|
|
throw Oops.Bah("起运港代码不能为空");
|
|
|
@ -2098,6 +2100,8 @@ namespace Myshipping.Application
|
|
|
|
throw Oops.Bah($"未找到匹配的起运港:{input.PORTLOADCODE}");
|
|
|
|
throw Oops.Bah($"未找到匹配的起运港:{input.PORTLOADCODE}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//目的港校验
|
|
|
|
if (string.IsNullOrEmpty(input.PORTDISCHARGECODE))
|
|
|
|
if (string.IsNullOrEmpty(input.PORTDISCHARGECODE))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw Oops.Bah("目的港代码不能为空");
|
|
|
|
throw Oops.Bah("目的港代码不能为空");
|
|
|
@ -2109,6 +2113,19 @@ namespace Myshipping.Application
|
|
|
|
throw Oops.Bah($"未找到匹配的目的港:{input.PORTDISCHARGECODE}");
|
|
|
|
throw Oops.Bah($"未找到匹配的目的港:{input.PORTDISCHARGECODE}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//目的地校验
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(input.DESTINATIONCODE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Bah("目的地代码不能为空");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var destination = portDestList.FirstOrDefault(x => x.Code == input.DESTINATIONCODE);
|
|
|
|
|
|
|
|
if (destination == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Bah($"未找到匹配的目的地:{input.DESTINATIONCODE}");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(input.SERVICECODE))
|
|
|
|
if (string.IsNullOrEmpty(input.SERVICECODE))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw Oops.Bah("运输条款代码不能为空");
|
|
|
|
throw Oops.Bah("运输条款代码不能为空");
|
|
|
@ -2227,7 +2244,6 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var destination = portDestList.FirstOrDefault(x => x.Code == input.DESTINATIONCODE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//赋值根据唯一代码匹配后的代码、名称等信息
|
|
|
|
//赋值根据唯一代码匹配后的代码、名称等信息
|
|
|
|
custOrder.CARRIER = carr.EnName;
|
|
|
|
custOrder.CARRIER = carr.EnName;
|
|
|
@ -2236,8 +2252,8 @@ namespace Myshipping.Application
|
|
|
|
custOrder.PORTDISCHARGE = portDest.EnName;
|
|
|
|
custOrder.PORTDISCHARGE = portDest.EnName;
|
|
|
|
custOrder.PORTDISCHARGEID = portDest.EdiCode;
|
|
|
|
custOrder.PORTDISCHARGEID = portDest.EdiCode;
|
|
|
|
custOrder.SERVICE = service.Name;
|
|
|
|
custOrder.SERVICE = service.Name;
|
|
|
|
custOrder.DESTINATION = destination?.EnName;
|
|
|
|
custOrder.DESTINATION = destination.EnName;
|
|
|
|
custOrder.DESTINATIONID = destination?.EdiCode;
|
|
|
|
custOrder.DESTINATIONID = destination.EdiCode;
|
|
|
|
custOrder.BLFRT = frt.EnName;
|
|
|
|
custOrder.BLFRT = frt.EnName;
|
|
|
|
|
|
|
|
|
|
|
|
//2024年4月19日,将分拆的收发通拼接到大文本的收发通中
|
|
|
|
//2024年4月19日,将分拆的收发通拼接到大文本的收发通中
|
|
|
|