修改TSL EDI 增加订舱编号对应和判断必填

optimize
jianghaiqing 2 years ago
parent 124b32b6f6
commit fada25d486

@ -4236,7 +4236,20 @@ namespace Myshipping.Application
} }
primaryModel.CARRIEREDICODE = ediSOSICfg.MapCode; primaryModel.CARRIEREDICODE = ediSOSICfg.MapCode;
primaryModel.ORDERNO = order.BOOKINGNO;
//这里除了TSL订舱编号默认都对应到业务编号订舱保存时自动生成
if (ediRouteEnum == EDIRouteEnum.TSL)
{
if(string.IsNullOrWhiteSpace(order.CUSTNO))
throw Oops.Bah($"船公司是{order.CARRIERID} 订舱编号不能为空");
primaryModel.ORDERNO = order.CUSTNO;
}
else
{
primaryModel.ORDERNO = order.BOOKINGNO;
}
var curBasePkgs = basePkgsList.FirstOrDefault(p => p.Name.Equals(order.KINDPKGS, StringComparison.OrdinalIgnoreCase)); var curBasePkgs = basePkgsList.FirstOrDefault(p => p.Name.Equals(order.KINDPKGS, StringComparison.OrdinalIgnoreCase));

@ -16,7 +16,7 @@ namespace Myshipping.Application
{ {
config.ForType<BookingOrder, MsOpSeaeEDIBaseModel>() config.ForType<BookingOrder, MsOpSeaeEDIBaseModel>()
.Map(dest => dest.WEITUO, src => src.WEITUO) .Map(dest => dest.WEITUO, src => src.WEITUO)
.Map(dest => dest.ORDERNO, src => src.BSNO) .Map(dest => dest.ORDERNO, src => src.CUSTNO)
.Map(dest => dest.MBLNO, src => src.MBLNO) .Map(dest => dest.MBLNO, src => src.MBLNO)
.Map(dest => dest.BLFRT, src => src.BLFRT) .Map(dest => dest.BLFRT, src => src.BLFRT)
.Map(dest => dest.VESSEL, src => src.VESSEL) .Map(dest => dest.VESSEL, src => src.VESSEL)

Loading…
Cancel
Save