|
|
@ -9,6 +9,7 @@ using Myshipping.Core;
|
|
|
|
using Myshipping.Core.Entity;
|
|
|
|
using Myshipping.Core.Entity;
|
|
|
|
using Myshipping.Core.Helper;
|
|
|
|
using Myshipping.Core.Helper;
|
|
|
|
using Myshipping.Core.Service;
|
|
|
|
using Myshipping.Core.Service;
|
|
|
|
|
|
|
|
using Myshipping.Core.Service.Dict.Dto;
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
using NPOI.HSSF.UserModel;
|
|
|
|
using NPOI.HSSF.UserModel;
|
|
|
|
using SqlSugar;
|
|
|
|
using SqlSugar;
|
|
|
@ -203,7 +204,7 @@ namespace Myshipping.Application.EDI
|
|
|
|
return new KeyValuePair<bool, string>(false, $"箱型({ctn.CTNALL})不匹配(EDI类型:XHZ_GLJ),无法发送下货纸,请联系管理员");
|
|
|
|
return new KeyValuePair<bool, string>(false, $"箱型({ctn.CTNALL})不匹配(EDI类型:XHZ_GLJ),无法发送下货纸,请联系管理员");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sbData.AppendLine($"13:{(order.ISCONTAINERSOC.HasValue && order.ISCONTAINERSOC.Value ? "SOC" : GetCarrierEDICode(order.CARRIERID, "XHZ_GLJ"))}:{ctnFind.Size}:{ctnEdi.MapCode}:{ctn.CTNNUM}:{ExchangeStr(ctn.REMARK)}:N");//箱经营人代码 尺寸 箱型 箱数 备注 加重箱
|
|
|
|
sbData.AppendLine($"13:{(order.ISCONTAINERSOC.HasValue && order.ISCONTAINERSOC.Value ? "SOC" : GetCtnForCarrier(order.CARRIERID, "XHZ_GLJ", dictData))}:{ctnFind.Size}:{ctnEdi.MapCode}:{ctn.CTNNUM}:{ExchangeStr(ctn.REMARK)}:N");//箱经营人代码 尺寸 箱型 箱数 备注 加重箱
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Log.Information($"生成下货纸报文:{sbData.ToString()}");
|
|
|
|
Log.Information($"生成下货纸报文:{sbData.ToString()}");
|
|
|
@ -808,7 +809,7 @@ namespace Myshipping.Application.EDI
|
|
|
|
return new KeyValuePair<bool, string>(false, $"箱型({ctn.CTNALL})不匹配(EDI类型:XHZ_GLX),无法发送下货纸,请联系管理员");
|
|
|
|
return new KeyValuePair<bool, string>(false, $"箱型({ctn.CTNALL})不匹配(EDI类型:XHZ_GLX),无法发送下货纸,请联系管理员");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sbData.AppendLine($"13:{(order.ISCONTAINERSOC.HasValue && order.ISCONTAINERSOC.Value ? "SOC" : GetCarrierEDICode(order.CARRIERID, "XHZ_GLX"))}:{ctnFind.Size}:{ctnEdi.MapCode}:{ctn.CTNNUM}:{ExchangeStr(ctn.REMARK)}:N");//箱经营人代码 尺寸 箱型 箱数 备注 加重箱
|
|
|
|
sbData.AppendLine($"13:{(order.ISCONTAINERSOC.HasValue && order.ISCONTAINERSOC.Value ? "SOC" : GetCtnForCarrier(order.CARRIERID, "XHZ_GLJ", dictData))}:{ctnFind.Size}:{ctnEdi.MapCode}:{ctn.CTNNUM}:{ExchangeStr(ctn.REMARK)}:N");//箱经营人代码 尺寸 箱型 箱数 备注 加重箱
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Log.Information($"生成下货纸报文:{sbData.ToString()}");
|
|
|
|
Log.Information($"生成下货纸报文:{sbData.ToString()}");
|
|
|
@ -997,6 +998,24 @@ namespace Myshipping.Application.EDI
|
|
|
|
return EDICODE;
|
|
|
|
return EDICODE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 获取箱属船司代码
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
public static string GetCtnForCarrier(string carrid, string EDINAME, List<DictDataDto> dictData)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var xiaHuoZhiCarrierBelongMapping = dictData.Where(x => x.TypeCode == "XiaHuoZhiCarrierBelongMapping").ToList();//港联捷、港联欣下货纸的箱属映射配置
|
|
|
|
|
|
|
|
var map = xiaHuoZhiCarrierBelongMapping.FirstOrDefault(x => x.Code == carrid);
|
|
|
|
|
|
|
|
if (map != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return map.Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return GetCarrierEDICode(carrid, EDINAME);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取付费方式edi代码(根据东胜7同功能模块代码翻译而成)
|
|
|
|
//获取付费方式edi代码(根据东胜7同功能模块代码翻译而成)
|
|
|
|
public static string GetFrtEDICode(string FRT)
|
|
|
|
public static string GetFrtEDICode(string FRT)
|
|
|
|