fix(swap): 修复平仓事件中事件日期=平仓日期的处理逻辑
- 将平仓条件判断从 UnwindDate 改为 EventDate - 移除不再使用的 priorClosePositionIds 变量 - 统一使用 NormalizeEventUnwindDate 替代 NormalizeIncomeUnwindDate - 在多个平仓方法中添加 NormalizeEventUnwindDate 调用 - 更新流程事件的 EventDate 和 UnwindDate 字段 - 修改单元测试以验证按 EventDate 分桶的逻辑 - 在前端控制器中将 unwindDate 设置为 valueDate - 添加 maxdate 属性到平仓日期选择器 - 实现事件日期与平仓日期的双向同步功能 - 更新利息列表获取接口使用统一日期参数
This commit is contained in:
@@ -396,6 +396,7 @@ namespace YLErp.Web.Controllers
|
||||
/// <returns></returns>
|
||||
public JsonResult GetUnwindInterestList(DateTime valueDate,DateTime unwindDate, int tradeId, decimal closePercent, int eventType, decimal notionalValue = 0, decimal posiNotionalValue = 0)
|
||||
{
|
||||
unwindDate = valueDate;
|
||||
// 前端按"占期初(original)"语义传 closePercent(A);后端 GetUnwindInterests 按"占剩余(remaining)"语义(B)计算。
|
||||
// 多空互换前端不传 notionalValue/posiNotionalValue(默认 0),则跳过转换保持原行为。
|
||||
var convertedClosePercent = SwapDealService.ToRemainingClosePercent(closePercent, notionalValue, posiNotionalValue);
|
||||
|
||||
Reference in New Issue
Block a user