refactor(swap)+test: 删 GetInterests/CalcSwapInterests 死参数 needPrice/grossPrice;补工厂→接缝映射钉子
死参数收口(另一半): - SwapDealService.GetInterests 删 needPrice/grossPrice(体内零消费,2026-08 验证); InitSwapDealInterest.needPrice 同为死参数一并删 - SwapEodPositionService.CalcSwapInterests 签名+转发同步;两个 EOD 生产调用点 (SaveAutoEodInterestPosition/SaveEodInterestPositionCopy) 重排实参; CalcEodPostCloseSettleInterests/GetIntradayUnwindInterests 委托同步 - 14 个测试文件 ~44 处直调点机械更新(8 处 override 签名 + 36 处调用实参) - 注意:EOD 编排链(DealInterests→Save*家族)的 grossPrice(期初不含费价)有真实用途,保留未动 新增钉子:CalcEodPostCloseSettleInterests 工厂→接缝参数映射测试—— CalcSwapInterestsCapture 捕获 stub 断言 EodPostCloseSettle 的完整转发契约 (posi=平仓后剩余/closePosi=平掉额/恒1/settment:false/orginPv 等 11 项)。 该段位置转发含三个相邻同型 decimal,编译器不查错位,此测试兜底。 验证:定向 241 测试通过(含 T0/T1 Excel 验证期望值、EntrySemantics 精确值钉子—— 任何 decimal 错位即红);全量 903=145失败/746通过/12跳过,与基线逐位一致。
This commit is contained in:
@@ -324,7 +324,7 @@ namespace YLErp.Modules.SwapModule
|
||||
new List<swap_position> { position },
|
||||
posiNotional, posiNotional, posiNotional, posiNotional, closePercent,
|
||||
(int)SwapEventTypeEnum.平仓,
|
||||
false, false, 0, posiNotional, false, settment: false, newCalcLast: newCalcLast, closeList: closeList);
|
||||
false, posiNotional, false, settment: false, newCalcLast: newCalcLast, closeList: closeList);
|
||||
|
||||
AssertInterestEqual(1, interests.Count);
|
||||
return interests[0];
|
||||
@@ -348,7 +348,7 @@ namespace YLErp.Modules.SwapModule
|
||||
new List<swap_position> { position },
|
||||
Principal, Principal, Principal, Principal, 1m,
|
||||
(int)SwapEventTypeEnum.平仓,
|
||||
false, false, 0, Principal, false, settment: true, newCalcLast: false, closeList: closeList);
|
||||
false, Principal, false, settment: true, newCalcLast: false, closeList: closeList);
|
||||
|
||||
AssertInterestEqual(1, interests.Count);
|
||||
return interests[0];
|
||||
@@ -373,7 +373,7 @@ namespace YLErp.Modules.SwapModule
|
||||
new List<swap_position> { position },
|
||||
Principal, Principal, Principal, Principal, closePercent,
|
||||
(int)SwapEventTypeEnum.自动互换,
|
||||
false, false, 0, Principal, false, settment: false, newCalcLast: false, closeList: closeList);
|
||||
false, Principal, false, settment: false, newCalcLast: false, closeList: closeList);
|
||||
|
||||
AssertInterestEqual(1, interests.Count);
|
||||
return interests[0];
|
||||
@@ -409,7 +409,7 @@ namespace YLErp.Modules.SwapModule
|
||||
new List<swap_position> { position },
|
||||
posiNotional, posiNotional, posiNotional, posiNotional, closePercent,
|
||||
(int)SwapEventTypeEnum.平仓,
|
||||
false, false, 0, posiNotional, false, settment: false, newCalcLast: newCalcLast, closeList: closeList);
|
||||
false, posiNotional, false, settment: false, newCalcLast: newCalcLast, closeList: closeList);
|
||||
|
||||
AssertInterestEqual(1, interests.Count);
|
||||
return interests[0];
|
||||
@@ -432,7 +432,7 @@ namespace YLErp.Modules.SwapModule
|
||||
new List<swap_position> { position },
|
||||
Principal, Principal, Principal, Principal, 1m,
|
||||
(int)SwapEventTypeEnum.平仓,
|
||||
false, false, 0, Principal, false, settment: true, newCalcLast: false, closeList: closeList);
|
||||
false, Principal, false, settment: true, newCalcLast: false, closeList: closeList);
|
||||
|
||||
AssertInterestEqual(1, interests.Count);
|
||||
return interests[0];
|
||||
@@ -1718,7 +1718,7 @@ namespace YLErp.Modules.SwapModule
|
||||
new List<swap_position> { position },
|
||||
posiNotional, posiNotional, posiNotional, posiNotional, closePercent,
|
||||
(int)SwapEventTypeEnum.平仓,
|
||||
false, false, 0, posiNotional, false, settment: false, newCalcLast: newCalcLast, closeList: closeList);
|
||||
false, posiNotional, false, settment: false, newCalcLast: newCalcLast, closeList: closeList);
|
||||
|
||||
AssertInterestEqual(1, interests.Count);
|
||||
return interests[0];
|
||||
@@ -1749,7 +1749,7 @@ namespace YLErp.Modules.SwapModule
|
||||
new List<swap_position> { position },
|
||||
posiNotional, posiNotional, posiNotional, posiNotional, closePercent,
|
||||
(int)SwapEventTypeEnum.平仓,
|
||||
false, false, 0, posiNotional, false, settment: false, newCalcLast: newCalcLast, closeList: closeList);
|
||||
false, posiNotional, false, settment: false, newCalcLast: newCalcLast, closeList: closeList);
|
||||
|
||||
AssertInterestEqual(1, interests.Count);
|
||||
return interests[0];
|
||||
|
||||
Reference in New Issue
Block a user