feat(bond): 支持债券与股票基金公司行为现金流计算的差异化处理 - init2
- 修改 CalcPayment 方法添加 useBondPriceScale 参数区分债券和股票/基金的金额计算口径 - 债券利息按每100元面值票息通过BondPriceConverter转为入库金额,股票基金分红直接计算 - 在BondPaymentService中添加详细的参数说明文档注释 - 更新SwapDealService中分红计算逻辑,根据标的类型自动选择合适的金额转换方式 - 新增CorporateActionEventLifecycleTest单元测试验证公司行为事件生命周期管理 - 添加SplitCorporateActionTddTest测试验证拆合股功能 - 优化FundCorporateActionRollbackAndUnwindTest扩展到股票类型测试 - 更新前端OperationHistory页面表格列宽和显示格式支持更长的说明信息
This commit is contained in:
@@ -69,7 +69,10 @@ namespace YLErp.Modules.SwapModule
|
||||
public List<(DateTime valueDate, int eventType, string reason, UnwindData data)> SwapEvents { get; } = new();
|
||||
|
||||
/// <summary>捕获落库的互换流水明细</summary>
|
||||
public List<swap_flow_event> PersistedFlowEvents { get; } = new();
|
||||
public List<swap_flow_event> PersistedFlowEvents => DbContext.swap_flow_event.Local.ToList();
|
||||
|
||||
/// <summary>捕获资金流水的金额、操作类型和发生日</summary>
|
||||
public List<(double amount, string action, DateTime valueDate)> ClientCashCallDetails { get; } = new();
|
||||
|
||||
public AutoSwapEodService(
|
||||
List<trade> trades, List<swap_position> positions,
|
||||
@@ -112,6 +115,13 @@ namespace YLErp.Modules.SwapModule
|
||||
protected override void ClearSwapPositionsForCompose(trade td, DateTime tradeDate, List<int> eventTypes) { }
|
||||
public override void ClearSwapPositions(trade td, DateTime valueDate, List<int> eventTypes, bool delAfter) { }
|
||||
|
||||
public override int AddClientCashInCashOut(OtcTradeBase td, double amount, string action, DateTime valueDate)
|
||||
{
|
||||
ClientCashCalls.Add((amount, action));
|
||||
ClientCashCallDetails.Add((amount, action, valueDate));
|
||||
return ClientCashCalls.Count;
|
||||
}
|
||||
|
||||
protected override swap_event AddSwapEvent(DateTime tradeDate, int swapTradeId, int eventType,
|
||||
string data, int clientCashId, bool save, string reason)
|
||||
{
|
||||
@@ -509,6 +519,9 @@ namespace YLErp.Modules.SwapModule
|
||||
$"分红支付日({actualPayDate:yyyy-MM-dd})不应早于结算日({PayDate:yyyy-MM-dd})");
|
||||
Assert.IsFalse(QdpModule.QdpCalendarHelper.IsHoliday(actualPayDate),
|
||||
$"分红支付日({actualPayDate:yyyy-MM-dd})必须落在非假日");
|
||||
Assert.AreEqual(1, svc.ClientCashCallDetails.Count, "应生成 1 条分红资金流水");
|
||||
Assert.AreEqual(actualPayDate, svc.ClientCashCallDetails[0].valueDate,
|
||||
"资金发生日应使用分红支付日");
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
|
||||
Reference in New Issue
Block a user