修改订舱EDI的签单方式映射

optimize
jianghaiqing 2 years ago
parent 5a9541065b
commit 139a771d89

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

Loading…
Cancel
Save