feat(bond): 支持债券与股票基金公司行为现金流计算的差异化处理 - init2

- 修改 CalcPayment 方法添加 useBondPriceScale 参数区分债券和股票/基金的金额计算口径
- 债券利息按每100元面值票息通过BondPriceConverter转为入库金额,股票基金分红直接计算
- 在BondPaymentService中添加详细的参数说明文档注释
- 更新SwapDealService中分红计算逻辑,根据标的类型自动选择合适的金额转换方式
- 新增CorporateActionEventLifecycleTest单元测试验证公司行为事件生命周期管理
- 添加SplitCorporateActionTddTest测试验证拆合股功能
- 优化FundCorporateActionRollbackAndUnwindTest扩展到股票类型测试
- 更新前端OperationHistory页面表格列宽和显示格式支持更长的说明信息
This commit is contained in:
张名锐
2026-08-19 17:48:34 +08:00
parent ddf233678d
commit aa3548e77f
19 changed files with 1342 additions and 104 deletions
@@ -6,6 +6,8 @@ namespace YLErp.Modules.SwapModule
[TestClass]
public class FundCorporateActionRollbackAndUnwindTest
{
// 生产恢复范围已从原 Fund-only 扩展到 TRS Fund/Stock;本组继续使用 Fund 夹具,
// 验证共享的登记日/EffectiveDate 边界和回退、平仓基线。
private static readonly DateTime ExDate = new(2026, 8, 17);
[TestMethod]
@@ -51,15 +53,15 @@ namespace YLErp.Modules.SwapModule
}
[TestMethod]
public void FCA_UW_002_非Fund和最新Eod后已有完成流水时保持实时持仓()
public void FCA_UW_002_股票与最新Eod后已有完成流水时保持实时持仓()
{
var nonFund = CreateRealtimeFundPosition();
nonFund.UnderlyingInstrumentType = ConsGlobal.InstrumentType.Stock;
var eod = CreateEod(ExDate, 2000m, 50m);
Assert.IsFalse(SwapEodPositionService.RestoreFundPositionFromEod(nonFund, eod));
Assert.AreEqual(1000m, nonFund.PosiQuantity);
Assert.AreEqual(100m, nonFund.PosiGrossPrice);
Assert.IsTrue(SwapEodPositionService.RestoreFundPositionFromEod(nonFund, eod));
Assert.AreEqual(2000m, nonFund.PosiQuantity);
Assert.AreEqual(50m, nonFund.PosiGrossPrice);
var td = SwapDealTestFactory.CreateTrade();
var realtime = CreateRealtimeFundPosition();