|
|
|
@ -2452,19 +2452,23 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
var primaryModel = order.Adapt<MsOpSeaeEDIBaseModel>();
|
|
|
|
|
|
|
|
|
|
//场站
|
|
|
|
|
var ediYardList = _cache.GetAllMappingYard().GetAwaiter().GetResult()
|
|
|
|
|
//起运港是CNTAO并且船公司是太平需要判断场站EDI
|
|
|
|
|
if (order.PORTLOADID == "CNTAO" && ediRouteEnum == EDIRouteEnum.PIL)
|
|
|
|
|
{
|
|
|
|
|
//场站
|
|
|
|
|
var ediYardList = _cache.GetAllMappingYard().GetAwaiter().GetResult()
|
|
|
|
|
.Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase)).ToList();
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(order.YARDID))
|
|
|
|
|
{
|
|
|
|
|
var currYardInfo = ediYardList.FirstOrDefault(t => t.Code.Equals(order.YARDID, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(order.YARDID))
|
|
|
|
|
{
|
|
|
|
|
var currYardInfo = ediYardList.FirstOrDefault(t => t.Code.Equals(order.YARDID, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
if (currYardInfo == null)
|
|
|
|
|
throw Oops.Bah($"场站{order.YARDID}的EDI代码未找到");
|
|
|
|
|
if (currYardInfo == null)
|
|
|
|
|
throw Oops.Bah($"场站{order.YARDID}的EDI代码未找到");
|
|
|
|
|
|
|
|
|
|
primaryModel.YARDEDICODE = currYardInfo.MapCode?.Trim();
|
|
|
|
|
primaryModel.YARD = currYardInfo.MapName?.Trim();
|
|
|
|
|
primaryModel.YARDEDICODE = currYardInfo.MapCode?.Trim();
|
|
|
|
|
primaryModel.YARD = currYardInfo.MapName?.Trim();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
primaryModel.CARRIEREDICODE = ediSOSICfg.MapCode;
|
|
|
|
|