diff --git a/YLErpDAL/Modules/SwapModule/SwapDealService.cs b/YLErpDAL/Modules/SwapModule/SwapDealService.cs index ecb68d59..818d1d3c 100644 --- a/YLErpDAL/Modules/SwapModule/SwapDealService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapDealService.cs @@ -114,8 +114,8 @@ namespace YLErp.Modules.SwapModule return unwindData.ClosePercent == 1 || (remainingNotional == 0 && remainingQuantity == 0); } - // 待实现利息会进入 decimal(30,12) 日终快照 - private const int InterestCalculationPrecision = 12; + // 待实现利息会进入 decimal(30,12) 日终快照;精度常量统一引用 SwapInterest.FundingLegPrecision,消除重复定义。 + private const int InterestCalculationPrecision = SwapInterest.FundingLegPrecision; /// /// 手工平仓、手工互换及收益结算的利息事件按金额两位落库。 @@ -1583,8 +1583,8 @@ namespace YLErp.Modules.SwapModule // 利率构成按腿型封装:固定腿 → FixedRate;浮动腿 → Spread + IndexFixing(沿用旧实现 InterestRate+浮动利率 的口径)。 var isFixedLeg = string.IsNullOrEmpty(position.FloatRateUnderlyingCode); var legRate = isFixedLeg - ? new FundingLegRate(fixedRate: flowEvent.InterestRate) - : new FundingLegRate(spread: flowEvent.InterestRate, indexFixing: effectiveFloat); + ? FundingLegRate.Fixed(flowEvent.InterestRate) + : FundingLegRate.Floating(flowEvent.InterestRate, effectiveFloat); var accrualPolicy = new AccrualPolicy( convention: AccrualBoundary.Both, isCompound: false,