fix: C# 管理后端配置的邮件模板-缺少变量参数:交易编号、平仓总额
This commit is contained in:
@@ -166,13 +166,17 @@ namespace YLErp.Modules.ReportModule
|
||||
fileList.Add(Path.ChangeExtension(docInfo.AbsolutePath, extension));
|
||||
}
|
||||
}
|
||||
//组织邮件主体
|
||||
var mailInfo = EmailTemplateService.GenerateMailInfo(useTemplate.Value, new MailInfoRequestModel
|
||||
// 根据当前客户的结算确认书准备交易编号和平仓总额变量。
|
||||
var settlementRows = SettlementMailTemplateHelper.GetSettlementRows(DbContext, SettleBills, client.id);
|
||||
var mailRequest = new MailInfoRequestModel
|
||||
{
|
||||
ClientName = client.Name,
|
||||
TradeDate = valueDate.ToString("yyyy-MM-dd"),
|
||||
DocNumber = SettleBills.Count > 0 ? SettleBills[0].Code : string.Empty
|
||||
}) ?? new MailInfoResultModel
|
||||
};
|
||||
SettlementMailTemplateHelper.PopulateSettlementFields(mailRequest, settlementRows);
|
||||
//组织邮件主体
|
||||
var mailInfo = EmailTemplateService.GenerateMailInfo(useTemplate.Value, mailRequest) ?? new MailInfoResultModel
|
||||
{
|
||||
Body = string.Empty,
|
||||
Title = "清算确认书-" + valueDate.ToString("yyyy-MM-dd")
|
||||
@@ -316,7 +320,9 @@ namespace YLErp.Modules.ReportModule
|
||||
foreach (var client in clientListOn)
|
||||
{
|
||||
var SettleBills = theDaySettleDocList.Where(t => t.SellerId == client.id || t.BuyerId == client.id).ToList();
|
||||
var res = ts.Where(O => O.trade.ClientId == client.id).ToList();
|
||||
// 批量查询包含整个日期区间,此处仅保留当前结算日的数据。
|
||||
var res = SettlementMailTemplateHelper.ForValueDate(
|
||||
ts.Where(O => O.trade.ClientId == client.id), valueDate);
|
||||
if (SettleBills.Count > 0)
|
||||
{
|
||||
var fileList = new List<string>();
|
||||
@@ -338,14 +344,16 @@ namespace YLErp.Modules.ReportModule
|
||||
var sb = new StringBuilder();
|
||||
var instrumentTypeArr = new List<string>() { ConsGlobal.InstrumentType.Stock, ConsGlobal.InstrumentType.StockIF };
|
||||
SendEmailSettleBillHtml(sb, res);
|
||||
//组织邮件主体
|
||||
var mailInfo = EmailTemplateService.GenerateMailInfo(tempalte.Value, new MailInfoRequestModel
|
||||
var mailRequest = new MailInfoRequestModel
|
||||
{
|
||||
ClientName = client.Name,
|
||||
TradeDate = valueDate.ToString("yyyy-MM-dd"),
|
||||
TradeList = sb.ToString(),
|
||||
DocNumber = SettleBills.Count > 0 ? SettleBills[0].Code : string.Empty
|
||||
}) ?? new MailInfoResultModel
|
||||
};
|
||||
SettlementMailTemplateHelper.PopulateSettlementFields(mailRequest, res);
|
||||
//组织邮件主体
|
||||
var mailInfo = EmailTemplateService.GenerateMailInfo(tempalte.Value, mailRequest) ?? new MailInfoResultModel
|
||||
{
|
||||
Body = string.Empty,
|
||||
Title = "清算确认书-" + valueDate.ToString("yyyy-MM-dd")
|
||||
|
||||
Reference in New Issue
Block a user