refactor(return-leg): QuantityRollforward 改名 QtyRollforward

代码里统一用 Qty 表示数量, 命名更简洁。
文件/类/测试类同步改名: Quantity→Qty。
This commit is contained in:
hjhan
2026-08-11 10:40:17 +08:00
parent 279c640345
commit 59651b802e
3 changed files with 13 additions and 16 deletions
@@ -1,7 +1,7 @@
namespace YLErp.Modules.SwapModule.ReturnLegs;
/// <summary>
/// 标的端数量递推(quantity rollforward)。
/// 标的端数量递推(Qty Rollforward)。
///
/// 逐日推进持仓数量:今日数量 = 上一日终数量 + 今日开仓 - 今日平仓 + 公司行为调整。
///
@@ -9,7 +9,7 @@ namespace YLErp.Modules.SwapModule.ReturnLegs;
/// 预留给公司行为改造(送股/拆股/配股)——届时填入非零值。
/// 原代码(SwapEodPositionService:1980)只有开仓/平仓两项,硬编码了"数量只因交易变动"假设。
/// </summary>
public static class QuantityRollforward
public static class QtyRollforward
{
/// <summary>
/// 计算今日持仓数量。
@@ -1978,7 +1978,7 @@ namespace YLErp.Modules.SwapModule
var openFlowEvents = unwindEvents.Where(x => x.EventType == (int)SwapFlowEventTypeEnum.).ToList();
decimal unwindQty = unwindFlowEvents.Sum(s => s.Quantity);
decimal openQty = openFlowEvents.Sum(s => s.Quantity);
curretEod.PosiQuantity = QuantityRollforward.Calc(eod.PosiQuantity, openQty, unwindQty);
curretEod.PosiQuantity = QtyRollforward.Calc(eod.PosiQuantity, openQty, unwindQty);
if (unwindEvents.Count == 0)
{
curretEod.PosiNetPrice = position.PosiNetPrice;