jianghaiqing 1 year ago
commit 4ada8d21f1

@ -9,6 +9,7 @@ using Myshipping.Core;
using Myshipping.Core.Entity;
using Myshipping.Core.Helper;
using Myshipping.Core.Service;
using Myshipping.Core.Service.Dict.Dto;
using Newtonsoft.Json.Linq;
using NPOI.HSSF.UserModel;
using SqlSugar;
@ -203,7 +204,7 @@ namespace Myshipping.Application.EDI
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()}");
@ -808,7 +809,7 @@ namespace Myshipping.Application.EDI
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()}");
@ -997,6 +998,24 @@ namespace Myshipping.Application.EDI
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同功能模块代码翻译而成
public static string GetFrtEDICode(string FRT)

@ -3662,8 +3662,9 @@ namespace Myshipping.Application
throw Oops.Bah(BookingErrorCode.BOOK127);
}
var config = _cache.GetAllTenantParam().Result.FirstOrDefault(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "VGM_SEND_CHANNEL");
if (config != null && config.ItemCode == "USE_MYSHIPPING") //使用大简云发送vgm
var config = _cache.GetAllTenantParam().Result.FirstOrDefault(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "VgmDirectSendCarrierId");
var arrCarr = config.ItemCode.Split(",", StringSplitOptions.RemoveEmptyEntries);
if (!arrCarr.Contains(order.CARRIERID)) //使用大简云发送vgm
{
//ETD不能为空
if (!order.ETD.HasValue)

Loading…
Cancel
Save