{i+1} | {(currList[i].SEND_TIME.HasValue ? currList[i].SEND_TIME.Value.ToString("yyyy-MM-dd HH:mm:ss") : "")} | ");
tableBuilder.Append($"{currList[i].STATUS_NAME} | {currList[i].BOOKING_REFERENCE} | {currList[i].PLACERECEIPT_CITY} | {currList[i].PLACEDELIVERY_CITY} | ");
tableBuilder.Append($"{currList[i].CTN_STAT} | {(currList[i].ETD.HasValue ? currList[i].ETD.Value.ToString("yyyy-MM-dd HH:mm") : "")} | ");
tableBuilder.Append($"{(currList[i].TOTAL_CARGO_WEIGHT.HasValue? currList[i].TOTAL_CARGO_WEIGHT.Value.ToString():"")} | {currList[i].PRICE_REFERENCE} | ");
tableBuilder.Append($"{(currList[i].IS_RECV_BC ? "1" : "")} | {(currList[i].IS_RECV_BK_CANCEL ? "1" : "")} | {(currList[i].JOB_TIME.HasValue ? currList[i].JOB_TIME.Value.ToString("yyyy-MM-dd HH:mm") : "")} |
");
tableNode.ChildNodes.Add(HtmlNode.CreateNode(tableBuilder.ToString()));
}
}
emailHtml = html.DocumentNode.OuterHtml;
_logger.LogInformation($"填充完邮件正文");
EmailApiUserDefinedDto emailApiUserDefinedDto = new EmailApiUserDefinedDto
{
SendTo = opUser.Email,
CCTo = string.Join(";", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList().ToArray()),
Title = $"马士基API定时订舱统计报告 {nowDate.ToString("yyyy-MM-dd HH:mm:ss")}",
Body = emailHtml,
Account = publicMailAccount.MailAccount?.Trim(),
Password = publicMailAccount.Password?.Trim(),
Server = publicMailAccount.SmtpServer?.Trim(),
Port = publicMailAccount.SmtpPort.HasValue ? publicMailAccount.SmtpPort.Value : 465,
UseSSL = publicMailAccount.SmtpSSL.HasValue ? publicMailAccount.SmtpSSL.Value : true,
Attaches = new List