refactor(longshort): 全量移除多空组合(StructType)子系统死代码(无入口/无存量,按需求重写优于维护)

This commit is contained in:
hjhan
2026-08-13 09:50:25 +08:00
parent a86b496f87
commit af1b4fd27f
12 changed files with 1 additions and 845 deletions
@@ -43,43 +43,5 @@
"SwapMarginRebatePnl": 200,
"SwapMarginAmount": 40000
}
},
{
"id": "LONGSHORT_UNWIND",
"desc": "多空组合平仓(unwindLongShort):从0起,不含浮动盈亏(FloatPnlSum=0)",
"eventType": 4,
"deal": { "CloseQty": 0 },
"floatPosition": { "FloatPnlSum": 0, "PositionType": 1, "PayDirection": 1, "TradingFee": 0 },
"interestList": [],
"marginList": [
{ "InterestClosePnL": 150, "InterestDirection": 1, "InterestPrincipal": 20000 }
],
"expected": {
"SwapCloseAmount": 150,
"SwapRealizedPnL": 150,
"SwapMarginRebatePnl": 150,
"SwapMarginAmount": -20000
}
},
{
"id": "LONGSHORT_SWAP",
"desc": "多空组合互换(swapLongShort)SwapMarginAmount 用裸 InterestPrincipal(无符号) —— 已知差异",
"eventType": 5,
"deal": { "CloseQty": 0 },
"floatPosition": { "FloatPnlSum": 0, "PositionType": 1, "PayDirection": 1, "TradingFee": 0 },
"interestList": [],
"marginList": [
{ "InterestClosePnL": 100, "InterestDirection": 1, "InterestPrincipal": 18000 }
],
"expected": {
"SwapCloseAmount": 100,
"SwapRealizedPnL": 100,
"SwapMarginRebatePnl": 100,
"SwapMarginAmount": 18000
},
"knownDiscrepancies": {
"SwapMarginAmount": 36000
}
}
]
} ]
}
@@ -163,8 +163,6 @@ describe('swap price precision common wiring', () => {
edit: read('wwwroot/Scripts/app/swaptrade/swapTradeEdit.js'),
income: read('wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js'),
unwind: read('wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js'),
longShort: read('wwwroot/Scripts/app/swaptrade/swapLongShort.js'),
unwindLongShort: read('wwwroot/Scripts/app/swaptrade/unwindLongShort.js'),
view: read('wwwroot/Scripts/app/swaptrade/swapTradeView.js'),
flow: read('wwwroot/Scripts/app/swaptrade/SwapflowList.js'),
helper: precisionHelperSrc