优化协议编号获取逻辑及利率字段展示格式
This commit is contained in:
@@ -187,7 +187,21 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator
|
||||
? client.Name
|
||||
: $"{client.Manager}作为管理人代表{client.Name}";
|
||||
|
||||
dic["主协议编号"] = client.MainProtocolCode ?? "";
|
||||
// 主协议编号:优先取 client 表字段,为空时从 client_meta 表兜底
|
||||
var mainProtocolCode = client.MainProtocolCode;
|
||||
if (string.IsNullOrWhiteSpace(mainProtocolCode))
|
||||
{
|
||||
mainProtocolCode = Context.GetClientMeta(client.id, ConsTradeMetaKey.MainProtocolCode)?.MetaValue;
|
||||
}
|
||||
dic["主协议编号"] = mainProtocolCode ?? "";
|
||||
|
||||
// 补充协议编号:优先取 client 表字段,为空时从 client_meta 表兜底
|
||||
var supProtocolCode = client.SupProtocolCode;
|
||||
if (string.IsNullOrWhiteSpace(supProtocolCode))
|
||||
{
|
||||
supProtocolCode = Context.GetClientMeta(client.id, ConsTradeMetaKey.SupProtocolCode)?.MetaValue;
|
||||
}
|
||||
dic["补充协议编号"] = supProtocolCode ?? "";
|
||||
dic["名义本金"] = trade.OriginalStockEqvNotional?.ToString("N2") ?? "0.00";
|
||||
|
||||
// 银行账户信息
|
||||
@@ -208,7 +222,7 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator
|
||||
var bond = JsonHelper.Deserialize<UnderlyingBond>(underlying.ExJson) ?? new UnderlyingBond();
|
||||
dic["参考标的发行人"] = bond.UnderlyingIssuer ?? "";
|
||||
dic["参考标的担保人"] = "";
|
||||
dic["票面利率"] = (bond.CouponRate ?? 0).ToString("N4");
|
||||
dic["票面利率"] = ((double)(bond.CouponRate ?? 0) * 100).ToString("N4");
|
||||
dic["参考标的到期日"] = underlying.MaturityDate?.ToString("yyyy年M月d日") ?? "";
|
||||
}
|
||||
|
||||
@@ -326,7 +340,7 @@ namespace YLErp.Plugins.GuoLian.DocumentGenerator
|
||||
dic["利率类型"] = "浮动利率";
|
||||
dic["IsFloat"] = "☑";
|
||||
dic["固定利率"] = "";
|
||||
dic["利差"] = ((double)interestMargin.InterestRateDefault * 10000).ToString("N2");
|
||||
dic["利差"] = ((double)interestMargin.InterestRateDefault * 10000).ToString("N0");
|
||||
dic["重置频率"] = (interestMargin.interest_rest_days ?? 0) + "天";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user