|
|
|
@ -899,7 +899,7 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
await SaveLog(entity, mlist);
|
|
|
|
|
if (!string.IsNullOrEmpty(mlist.MBLNO) && entity.MBLNO != mlist.MBLNO)
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.MBLNO) && entity.MBLNO != mlist.MBLNO)
|
|
|
|
|
{
|
|
|
|
|
//更改提单号
|
|
|
|
|
await UpdateMblno(entity);
|
|
|
|
@ -5279,8 +5279,8 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Bah($"字典未配置 url_set->{CONST_TSL_EDI_URL} 请联系管理员");
|
|
|
|
|
|
|
|
|
|
//获取个人对应的账户,这里GetAccountConfig逻辑优先取个人,个人没有配置取公司对应配置
|
|
|
|
|
userWebAccountConfig = GetAccountConfig(CONST_TSL_TYPE_CODE, UserManager.UserId, UserManager.TENANT_ID).GetAwaiter()
|
|
|
|
|
.GetResult();
|
|
|
|
|
userWebAccountConfig = await _webAccountConfig.GetAccountConfig(CONST_TSL_TYPE_CODE, UserManager.UserId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("批次={no} 获取获取网站的账户完成,result={Num}", batchNo, JSON.Serialize(userWebAccountConfig));
|
|
|
|
|
|
|
|
|
@ -6046,27 +6046,7 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取个人或公司网站账户配置
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="typeCode">账户类型代码</param>
|
|
|
|
|
/// <param name="userId">用户ID</param>
|
|
|
|
|
/// <param name="tendId">租户ID</param>
|
|
|
|
|
/// <returns>返回账户配置</returns>
|
|
|
|
|
private async Task<DjyWebsiteAccountConfig> GetAccountConfig(string typeCode, long userId, long tendId)
|
|
|
|
|
{
|
|
|
|
|
DjyWebsiteAccountConfig accountConfig = new DjyWebsiteAccountConfig();
|
|
|
|
|
accountConfig = await _djyWebsiteAccountConfigRepository.EntityContext.CopyNew().Queryable<DjyWebsiteAccountConfig>()
|
|
|
|
|
.FirstAsync(x => x.TypeCode == typeCode && x.CreatedUserId == userId);
|
|
|
|
|
|
|
|
|
|
if (accountConfig == null)
|
|
|
|
|
{
|
|
|
|
|
accountConfig = await _djyWebsiteAccountConfigRepository.EntityContext.CopyNew().Queryable<DjyWebsiteAccountConfig>()
|
|
|
|
|
.FirstAsync(x => x.TypeCode == typeCode && x.TenantId == tendId && x.IsTenant == true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return accountConfig;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 下载订舱、截单EDI
|
|
|
|
|
/// <summary>
|
|
|
|
|