修正基本费率和名义本金计算 使用开仓名义本金

This commit is contained in:
锦麟 王
2025-04-29 14:56:01 +08:00
parent 295f67a5ca
commit f39e516a66
@@ -142,7 +142,7 @@ namespace YLErp.Plugins.ShanXi.DocumentGenerator
dic["到期日期"] = trade.ExerciseDate?.ToString("yyyy年M月d日");
bool posiLong = swapPosition?.PositionType == (int)PositionTypeFlag.Short ? false : true;
var interestRate = interestMargin?.InterestRateDefault * 100 ?? 0;
var basicFee = trade.StockEqvNotionalReal == 0 ? 0 : ((double)((swapPosition?.PosiTradingFeePending) ?? 0) / trade.StockEqvNotionalReal) * 100;
var basicFee = (trade.OriginalStockEqvNotional ?? 0) == 0 ? 0 : ((double)((swapPosition?.PosiTradingFeePending) ?? 0) / (trade.OriginalStockEqvNotional ?? 0)) * 1000;
dic["基本费率"] = (basicFee * 2).ToString("f4");
dic["交易费用"] = (double)((swapPosition?.PosiTradingFeePending * 2) ?? 0);
dic["多头约定利率"] = "不适用";
@@ -209,8 +209,8 @@ namespace YLErp.Plugins.ShanXi.DocumentGenerator
var row = new JObject();
row["序号"] = ++count;
FormatToDict("名义本金", trade.StockEqvNotionalReal, row);
StockEqvNotionalRealSum += trade.StockEqvNotionalReal;
FormatToDict("名义本金", trade.OriginalStockEqvNotional, row);
StockEqvNotionalRealSum += trade.OriginalStockEqvNotional ?? 0;
row["成交日期"] = trade.TradeDate?.ToString("【yyyy】年【M】月【d】日");
row["开始日期"] = trade.StartDate?.ToString("【yyyy】年【M】月【d】日");
row["到期日期"] = trade.ExerciseDate?.ToString("【yyyy】年【M】月【d】日");