refactor(swap): 误导布尔 swap 改名 interestWindowEmpty——按"计息窗口为空"本质命名
InitInterestDate 返回 true 的语义是"计息窗口为空→不计利息"(利率与金额归零), 判定只看日期窗口(interestStart>interestEnd)、与事件类型无关;旧名 swap 把 典型原因(互换当日已结息)当成了效果的名字,读者会误读为事件类型判断。 - SwapDealService: GetInterests 局部变量 + GetFloatRate/CalcUnwindInterest/ InitSwapDealInterest/CalcMarginInterest 四个签名参数及分支/日志/注释同步 - SwapTradeBaseService.InitInterestDate 返回值语义补入 XML 文档 - MarginInterestGoldenReplay/Shadow 测试命名参数同步 零行为变更。 验证:相关套件 51/51;全量 978 例 145 败与基线 diff=0
This commit is contained in:
@@ -365,6 +365,8 @@ namespace YLErp.Modules.SwapModule
|
||||
/// <param name="interestMode">计息方式</param>
|
||||
/// <param name="interestStart">计息开始日期</param>
|
||||
/// <param name="interestEnd">计息结束日期</param>
|
||||
/// <returns>true=计息窗口为空(interestStart>interestEnd,本次不计利息,调用方将利率与金额归零;
|
||||
/// 典型场景=互换当日已结息/不算头首日,但判定只看日期窗口,与事件类型无关);false=正常计息。</returns>
|
||||
public bool InitInterestDate(DateTime valueDate, DateTime? preSettleDate, trade td, bool tdClose, out DateTime interestStart, out DateTime interestEnd)
|
||||
{
|
||||
interestStart = td.StartDate.Value;
|
||||
|
||||
Reference in New Issue
Block a user