wet 2 years ago
commit c7fb0cd358

@ -3304,7 +3304,7 @@ namespace Myshipping.Application
{ {
ChengZhongZhongLiang = ctn.WEIGHKGS.Value.ToString(), ChengZhongZhongLiang = ctn.WEIGHKGS.Value.ToString(),
ChengZhongShiJian = ctn.WEIGHDATE, ChengZhongShiJian = ctn.WEIGHDATE,
CTNALL = ctn.CTNALL, CTNALL = ctn.CTNALL.Replace("'", ""),
CNTRNO = ctn.CNTRNO, CNTRNO = ctn.CNTRNO,
SEALNO = ctn.SEALNO SEALNO = ctn.SEALNO
}); });
@ -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;

@ -62,14 +62,20 @@ namespace Myshipping.Core.Entity.CommonDB
/// </summary> /// </summary>
public string MapName { get; set; } public string MapName { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>
public string Remark { get; set; } public string Remark { get; set; }
/// <summary>
/// 船司代码
/// </summary>
public string CarrierCode { get; set; }
} }

@ -1102,11 +1102,21 @@
映射名称 映射名称
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Core.Entity.CommonDB.MappingIssueType.MapCode">
<summary>
映射代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CommonDB.MappingIssueType.Remark"> <member name="P:Myshipping.Core.Entity.CommonDB.MappingIssueType.Remark">
<summary> <summary>
备注 备注
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Core.Entity.CommonDB.MappingIssueType.CarrierCode">
<summary>
船司代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeLane.Code"> <member name="P:Myshipping.Core.Entity.CodeLane.Code">
<summary> <summary>
航线代码 航线代码

Loading…
Cancel
Save