refactor(swap): EQD-6977 罚息标志管道——UnwindData/InterestCalcRequest/GetUnwindInterests 透传 isPenaltyInterest
新增 UnwindData.IsPenaltyInterest(bool);InterestCalcRequest 加 IsPenaltyInterest 字段+私有ctor参数+IntradayUnwind 工厂可选参(default false);GetUnwindInterests 加 isPenaltyInterest 可选参并透传 IntradayUnwind。零行为变化,现有调用方经默认值不受影响,Penalty 套件 11/11 通过。
This commit is contained in:
@@ -36,19 +36,24 @@ public sealed class InterestCalcRequest
|
||||
public bool NewCalcLast { get; }
|
||||
public List<swap_flow_event> CloseList { get; }
|
||||
|
||||
/// <summary>是否计罚息(EQD-6977):利息端按持有至到期计息。由平仓页下拉经 UnwindData 透传;默认 false。</summary>
|
||||
public bool IsPenaltyInterest { get; }
|
||||
|
||||
private InterestCalcRequest(
|
||||
trade td, trade_extend tradeExtend, DateTime valueDate, DateTime unwindDate,
|
||||
List<eod_swap_position> eodPositions, List<swap_position> positions,
|
||||
decimal posiNotionalValue,
|
||||
decimal closePosiNotionalValue, decimal closePercent,
|
||||
int eventType, bool tdClose, decimal orginPv,
|
||||
bool add, bool newCalcLast, List<swap_flow_event> closeList)
|
||||
bool add, bool newCalcLast, List<swap_flow_event> closeList,
|
||||
bool isPenaltyInterest = false)
|
||||
{
|
||||
Td = td; TradeExtend = tradeExtend; ValueDate = valueDate; UnwindDate = unwindDate;
|
||||
EodPositions = eodPositions; Positions = positions;
|
||||
PosiNotionalValue = posiNotionalValue; ClosePosiNotionalValue = closePosiNotionalValue;
|
||||
ClosePercent = closePercent; EventType = eventType; TdClose = tdClose; OrginPv = orginPv;
|
||||
Add = add; NewCalcLast = newCalcLast; CloseList = closeList;
|
||||
IsPenaltyInterest = isPenaltyInterest;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -62,10 +67,11 @@ public sealed class InterestCalcRequest
|
||||
List<eod_swap_position> eodPositions, List<swap_position> positions,
|
||||
decimal preCloseNotional, decimal closedNotional, decimal closePercentRemaining,
|
||||
int eventType, bool tdClose, decimal orginPv,
|
||||
bool add, bool newCalcLast, List<swap_flow_event> closeList)
|
||||
bool add, bool newCalcLast, List<swap_flow_event> closeList,
|
||||
bool isPenaltyInterest = false)
|
||||
=> new(td, tradeExtend, valueDate, unwindDate, eodPositions, positions,
|
||||
preCloseNotional, closedNotional, closePercentRemaining,
|
||||
eventType, tdClose, orginPv, add, newCalcLast, closeList);
|
||||
eventType, tdClose, orginPv, add, newCalcLast, closeList, isPenaltyInterest);
|
||||
|
||||
/// <summary>
|
||||
/// 【EOD 当日有平仓后的收盘结息】场景(→ CalcEodPostCloseSettleInterests,settment:false 全额结息)。
|
||||
|
||||
Reference in New Issue
Block a user