修改INTTRA订舱

usertest
jianghaiqing 4 months ago
parent 1f9bd54a41
commit 54f6c6282a

@ -43,6 +43,7 @@ namespace DS.WMS.Core.Map.Method
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
user = _serviceProvider.GetRequiredService<IUser>();
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
_sysCacheService = _serviceProvider.GetRequiredService<ISysCacheService>();
}
public DataResult BatchDelMappingIssueType(IdModel req)
{

@ -1603,7 +1603,7 @@ namespace DS.WMS.Core.Op.Method
ediModel.BSLIST.Add(primaryModel);
var result = await InnerSendBookingOrClosingEDI(req, ediModel, ediRouteEnum);
var result = await InnerSendBookingOrClosingEDI(req, ediModel, ediRouteEnum, order.CarrierId);
_logger.Info("批次={no} 生成EDI文件完成 结果={result}", batchNo, JsonConvert.SerializeObject(result));
@ -2148,7 +2148,7 @@ namespace DS.WMS.Core.Op.Method
/// <param name="ediModel"></param>
/// <param name="ediRouteEnum"></param>
/// <returns></returns>
private async Task<EdiDataResult> InnerSendBookingOrClosingEDI(BookingOrClosingEDIOrderReq req, EDIBaseModel ediModel, EDIRouteEnum ediRouteEnum)
private async Task<EdiDataResult> InnerSendBookingOrClosingEDI(BookingOrClosingEDIOrderReq req, EDIBaseModel ediModel, EDIRouteEnum ediRouteEnum,long carrierId)
{
var result = new EdiDataResult();
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
@ -2331,7 +2331,7 @@ namespace DS.WMS.Core.Op.Method
{
//这里INTTRA单独取了船公司
var ediSOSICfg = tenantDb.Queryable<MappingCarrier>().First(t => t.Module.Equals(CONST_MAPPING_MODULE_INTTRA, StringComparison.OrdinalIgnoreCase)
&& t.Code == ediModel.BSLIST.FirstOrDefault().CARRIERID);
&& t.LinkId == carrierId);
if (ediSOSICfg == null || string.IsNullOrWhiteSpace(ediSOSICfg.MapCode))
throw new Exception($"CARRIERID={ediModel.BSLIST.FirstOrDefault().CARRIERID} INTTRA EDI订舱和截单 的船公司EDI代码未找到");

Loading…
Cancel
Save