Files
zszq-trs/YLErpDAL/Modules/SwapModule/FundingLegs/FixedAmountLeg.cs
T
hjhan 70550af29a refactor(funding-leg): 清理CalcNotional死参数posiLong/posiShort+修正过时InterestMode注释
- 删除 IFundingLegStrategy.CalcNotional 的 posiLong/posiShort 死参数(多空存续腿界面已禁用,三个实现均不读取),同步三个实现签名、SwapDealService 唯一调用点、FundingLegStrategyTest 7 处调用
- 修正 SwapPosition/SwapFlowEvent/EodSwapPosition 的 InterestMode 字段注释(去掉已删的 3/4,补全 5/6/9)
- 重写 SwapUnwindFloatingLegDiagnosticTdd 过时类注释

零行为变化;编译 0 错误;FundingLegStrategyTest 11/11 通过。
2026-08-13 08:51:21 +08:00

18 lines
730 B
C#

using YLErp.DBModels;
namespace YLErp.Modules.SwapModule.FundingLegs;
/// <summary>
/// 固定值融资腿(InterestMode=固定值)。
/// 计息基数由合约约定(InterestPrincipalFix),无论平仓比例多少都恒等于该值。
/// 业务规则:固定值就是合同写死的固定数额(Amount),永远不变。
/// 不叫 FixedNotionalLeg——"固定值"不一定是"名义本金(Notional)",避免与 ContractNotionalLeg 概念撞车。
/// </summary>
public sealed class FixedAmountLeg : IFundingLegStrategy
{
public InterestModeEnum Mode => InterestModeEnum.固定值;
public NotionalResult CalcNotional(decimal fix, decimal posiNotional, decimal closePercent)
=> new(fix, fix, 1m);
}