|
|
|
@ -375,7 +375,7 @@ namespace Myshipping.Application
|
|
|
|
|
if (opEmailList.Count > 0)
|
|
|
|
|
opEmail = string.Join(";", opEmailList.Distinct().ToArray());
|
|
|
|
|
|
|
|
|
|
string emailTitle = $"Action Required - Container not picked up/{model.VESSEL}/{model.VOYNO}/ 未提箱订舱取消确认:{model.MBL_NO}";
|
|
|
|
|
string emailTitle = $"{model.MBL_NO}-{model.VESSEL}/{model.VOYNO}/ 未提箱订舱取消确认";
|
|
|
|
|
|
|
|
|
|
//提取当前公共邮箱的配置
|
|
|
|
|
DjyUserMailAccount publicMailAccount = _djyUserMailAccount.AsQueryable().Filter(null, true).First(x => x.TenantId == UserManager.TENANT_ID && x.ShowName == "PublicSend"
|
|
|
|
@ -512,6 +512,25 @@ namespace Myshipping.Application
|
|
|
|
|
baseHtml = baseHtml.Replace("#optel#", "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(model.MBL_NO))
|
|
|
|
|
{
|
|
|
|
|
baseHtml = baseHtml.Replace("#BillNo#", model.MBL_NO);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
baseHtml = baseHtml.Replace("#BillNo#", "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(model.VESSEL))
|
|
|
|
|
{
|
|
|
|
|
string s = $"{model.VESSEL}/{model.VOYNO}";
|
|
|
|
|
baseHtml = baseHtml.Replace("#VesselVoyno#", s);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
baseHtml = baseHtml.Replace("#VesselVoyno#", "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(tenantName))
|
|
|
|
|
{
|
|
|
|
|
baseHtml = baseHtml.Replace("#TenantCompanyName#", tenantName);
|
|
|
|
@ -524,19 +543,13 @@ namespace Myshipping.Application
|
|
|
|
|
HtmlDocument html = new HtmlDocument();
|
|
|
|
|
html.LoadHtml(baseHtml);
|
|
|
|
|
|
|
|
|
|
//From Port Start
|
|
|
|
|
HtmlNode tdPortNode = html.DocumentNode.SelectSingleNode("//td[@id='FromPort']");
|
|
|
|
|
|
|
|
|
|
if (tdPortNode == null)
|
|
|
|
|
throw Oops.Oh($"读取邮件模板格式错误,定位id='FromPort'失败");
|
|
|
|
|
|
|
|
|
|
result = html.DocumentNode.OuterHtml;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation($"生成货物运输计划已变更正文失败,原因:{ex.Message}");
|
|
|
|
|
_logger.LogInformation($"生成起运港未提箱正文失败,原因:{ex.Message}");
|
|
|
|
|
|
|
|
|
|
throw Oops.Bah($"生成货物运输计划已变更正文失败,原因:{ex.Message}");
|
|
|
|
|
throw Oops.Bah($"生成起运港未提箱正文失败,原因:{ex.Message}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|