|
|
@ -4002,6 +4002,38 @@ namespace Myshipping.Application
|
|
|
|
primaryModel.SERVICEEDICODE = currServiceInfo.MapCode?.Trim();
|
|
|
|
primaryModel.SERVICEEDICODE = currServiceInfo.MapCode?.Trim();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//签单方式EDI
|
|
|
|
|
|
|
|
var baseIssueTypeList = _cache.GetAllCodeIssueType().GetAwaiter().GetResult();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var baseIssueTypeInfo = baseIssueTypeList.FirstOrDefault(t =>
|
|
|
|
|
|
|
|
t.EnName.Equals(order.ISSUETYPE, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (baseServiceInfo == null)
|
|
|
|
|
|
|
|
throw Oops.Bah($"签单方式{order.ISSUETYPE}的基础代码未找到");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//付费方式映射
|
|
|
|
|
|
|
|
var ediIssueTypeList = _cache.GetAllMappingIssueType().GetAwaiter().GetResult()
|
|
|
|
|
|
|
|
.Where(t => t.Module.Equals(CONST_MAPPING_MODULE, StringComparison.OrdinalIgnoreCase)
|
|
|
|
|
|
|
|
).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(order.ISSUETYPE))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var currIssueTypeInfo = ediIssueTypeList.FirstOrDefault(t => !string.IsNullOrWhiteSpace(t.CarrierCode)
|
|
|
|
|
|
|
|
&& t.CarrierCode.Equals(order.CARRIERID, StringComparison.OrdinalIgnoreCase)
|
|
|
|
|
|
|
|
&& t.Code.Equals(baseServiceInfo.Code, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currIssueTypeInfo == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//如果没有对应的船司记录,则取默认的第一个代码对应的记录
|
|
|
|
|
|
|
|
currIssueTypeInfo = ediIssueTypeList.FirstOrDefault(t => t.Code.Equals(baseServiceInfo.Code, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currIssueTypeInfo == null)
|
|
|
|
|
|
|
|
throw Oops.Bah($"签单方式{order.ISSUETYPE}的EDI代码未找到");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
primaryModel.ISSUETYPE = currIssueTypeInfo.MapCode?.Trim();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
primaryModel.CARRIEREDICODE = ediSOSICfg.MapCode;
|
|
|
|
primaryModel.CARRIEREDICODE = ediSOSICfg.MapCode;
|
|
|
|
primaryModel.ORDERNO = order.BOOKINGNO;
|
|
|
|
primaryModel.ORDERNO = order.BOOKINGNO;
|
|
|
|
|
|
|
|
|
|
|
|