BugFix 添加信用债的计算
This commit is contained in:
@@ -52,7 +52,7 @@ namespace YLErp.Modules.CalculationModule
|
||||
|
||||
foreach (var td in tradeList)
|
||||
{
|
||||
if (td.TradeType == "商品期货")
|
||||
if (td.TradeType == "商品期货" || td.TradeType == "信用债")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -319,6 +319,7 @@ namespace YLErp.Modules.CalculationModule
|
||||
result = ForwardradeCalcService.CalcValue(td, spotPrice);
|
||||
}
|
||||
break;
|
||||
case "信用债":
|
||||
case "商品期货":
|
||||
_priceProvider.TryGetPrice(td.UnderlyingCode, out var spotPriceGet);
|
||||
result = new TradeValueResult()
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace YLErp.Modules.CalculationModule
|
||||
{
|
||||
switch (TradeType)
|
||||
{
|
||||
case "信用债":
|
||||
case "商品期货":
|
||||
case "场内期权":
|
||||
return BuySell.Contains("多头") ? "long" : "short";
|
||||
|
||||
@@ -132,6 +132,7 @@ namespace YLErp.Modules.CalculationModule
|
||||
}
|
||||
optionValue = ForwardradeCalcService.CalcValue(_trade, spotPrice);
|
||||
break;
|
||||
case "信用债":
|
||||
case "商品期货":
|
||||
case "股票":
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user