|
|
|
@ -8252,27 +8252,11 @@ namespace Myshipping.Application
|
|
|
|
|
//一程装货港
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(multiline.FstPortLoadCode))
|
|
|
|
|
{
|
|
|
|
|
var sameList = portList.Where(a =>
|
|
|
|
|
!string.IsNullOrWhiteSpace(a.EdiCode)
|
|
|
|
|
&& a.EdiCode.Equals(multiline.FstPortLoadCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.Select(a => a.Code).ToList();
|
|
|
|
|
|
|
|
|
|
if (sameList == null || sameList.Count == 0)
|
|
|
|
|
throw Oops.Bah($"一程装货港{multiline.FstPortLoadCode}基础港口代码未找到");
|
|
|
|
|
|
|
|
|
|
var currPortInfo = ediPortList.FirstOrDefault(a =>
|
|
|
|
|
sameList.Contains(a.Code)
|
|
|
|
|
&& !string.IsNullOrWhiteSpace(a.CarrierCode)
|
|
|
|
|
&& a.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
if (currPortInfo == null)
|
|
|
|
|
{
|
|
|
|
|
currPortInfo = ediPortList.FirstOrDefault(a =>
|
|
|
|
|
sameList.Contains(a.Code));
|
|
|
|
|
}
|
|
|
|
|
var currPortInfo = ediLoadPortList.FirstOrDefault(a =>
|
|
|
|
|
a.Code.Equals(multiline.FstPortLoadCode, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
if (currPortInfo == null)
|
|
|
|
|
throw Oops.Bah($"一程装货港{multiline.FstPortLoadCode}的映射EDI代码未找到");
|
|
|
|
|
throw Oops.Bah($"一程装货港{multiline.FstPortLoadCode}的EDI代码未找到");
|
|
|
|
|
|
|
|
|
|
multiline.FstPortLoadCode = currPortInfo.MapCode?.Trim();
|
|
|
|
|
multiline.FstPortLoad = currPortInfo.MapName?.Trim();
|
|
|
|
@ -8309,27 +8293,11 @@ namespace Myshipping.Application
|
|
|
|
|
//二程装货港
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(multiline.SecPortLoadCode))
|
|
|
|
|
{
|
|
|
|
|
var sameList = portList.Where(a =>
|
|
|
|
|
!string.IsNullOrWhiteSpace(a.EdiCode)
|
|
|
|
|
&& a.EdiCode.Equals(multiline.SecPortLoadCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.Select(a => a.Code).ToList();
|
|
|
|
|
|
|
|
|
|
if (sameList == null || sameList.Count == 0)
|
|
|
|
|
throw Oops.Bah($"二程装货港{multiline.SecPortLoadCode}基础港口代码未找到");
|
|
|
|
|
|
|
|
|
|
var currPortInfo = ediPortList.FirstOrDefault(a =>
|
|
|
|
|
sameList.Contains(a.Code)
|
|
|
|
|
&& !string.IsNullOrWhiteSpace(a.CarrierCode)
|
|
|
|
|
&& a.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
if (currPortInfo == null)
|
|
|
|
|
{
|
|
|
|
|
currPortInfo = ediPortList.FirstOrDefault(a =>
|
|
|
|
|
sameList.Contains(a.Code));
|
|
|
|
|
}
|
|
|
|
|
var currPortInfo = ediLoadPortList.FirstOrDefault(a =>
|
|
|
|
|
a.Code.Equals(multiline.SecPortLoadCode, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
if (currPortInfo == null)
|
|
|
|
|
throw Oops.Bah($"二程装货港{multiline.SecPortLoadCode}的映射EDI代码未找到");
|
|
|
|
|
throw Oops.Bah($"二程装货港{multiline.SecPortLoadCode}的EDI代码未找到");
|
|
|
|
|
|
|
|
|
|
multiline.SecPortLoadCode = currPortInfo.MapCode?.Trim();
|
|
|
|
|
multiline.SecPortLoad = currPortInfo.MapName?.Trim();
|
|
|
|
@ -8366,27 +8334,11 @@ namespace Myshipping.Application
|
|
|
|
|
//三程装货港
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(multiline.ThdPortLoadCode))
|
|
|
|
|
{
|
|
|
|
|
var sameList = portList.Where(a =>
|
|
|
|
|
!string.IsNullOrWhiteSpace(a.EdiCode)
|
|
|
|
|
&& a.EdiCode.Equals(multiline.FstPortLoadCode, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.Select(a => a.Code).ToList();
|
|
|
|
|
|
|
|
|
|
if (sameList == null || sameList.Count == 0)
|
|
|
|
|
throw Oops.Bah($"三程装货港{multiline.ThdPortLoadCode}基础港口代码未找到");
|
|
|
|
|
|
|
|
|
|
var currPortInfo = ediPortList.FirstOrDefault(a =>
|
|
|
|
|
sameList.Contains(a.Code)
|
|
|
|
|
&& !string.IsNullOrWhiteSpace(a.CarrierCode)
|
|
|
|
|
&& a.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
if (currPortInfo == null)
|
|
|
|
|
{
|
|
|
|
|
currPortInfo = ediPortList.FirstOrDefault(a =>
|
|
|
|
|
sameList.Contains(a.Code));
|
|
|
|
|
}
|
|
|
|
|
var currPortInfo = ediLoadPortList.FirstOrDefault(a =>
|
|
|
|
|
a.Code.Equals(multiline.ThdPortLoadCode, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
if (currPortInfo == null)
|
|
|
|
|
throw Oops.Bah($"三程装货港{multiline.ThdPortLoadCode}的映射EDI代码未找到");
|
|
|
|
|
throw Oops.Bah($"三程装货港{multiline.ThdPortLoadCode}的EDI代码未找到");
|
|
|
|
|
|
|
|
|
|
multiline.ThdPortLoadCode = currPortInfo.MapCode?.Trim();
|
|
|
|
|
multiline.ThdPortLoad = currPortInfo.MapName?.Trim();
|
|
|
|
|