From 2eb6617129f7b04e72c63057bf9ced87d6d558ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=B9=E6=B5=B7?= Date: Fri, 25 Apr 2025 16:06:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=A0=87=E7=9A=84=E7=8E=B0?= =?UTF-8?q?=E4=BB=B7=EF=BC=8C=E5=B1=95=E7=A4=BA=E6=A0=87=E7=9A=84=E5=9D=87?= =?UTF-8?q?=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExchangeTradeModule/ExchangeTradeQueryService.cs | 7 ++++--- .../wwwroot/Scripts/app/trade/exchange/positionList.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs b/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs index d27f0f8e..8996b016 100644 --- a/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs +++ b/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs @@ -70,7 +70,7 @@ namespace YLErp.Modules.ExchangeTradeModule BookId = o.BookId, PositionCount = o.Position, OptionCode = o.InstrumentCode, - //PositionCost = o.PositionCost, + PositionCost = o.PositionCost, PositionType = o.PositionType == PositionTypeFlag.Long ? "多头" : "空头", UnderlyingCode = o.UnderlyingCode, ValueDate = o.UpdateTime, @@ -123,8 +123,9 @@ namespace YLErp.Modules.ExchangeTradeModule { item.Position = item.PositionCount / Underlying.ContractSize * Underlying.CountRatio; } - item.UnderlyingPrice = Underlying.Price.OtcFormat(OtcFormatFlag.marginRate); - item.PositionCost = item.PositionCount * Underlying.CountRatio; + var price = item.Position==0?0: item.PositionCost / item.Position; + item.UnderlyingPrice = (price*100).OtcFormat(OtcFormatFlag.umprice); + //item.PositionCost = item.PositionCount * Underlying.CountRatio; item.CountRatio = Underlying.CountRatio; } diff --git a/YLErpWeb/wwwroot/Scripts/app/trade/exchange/positionList.js b/YLErpWeb/wwwroot/Scripts/app/trade/exchange/positionList.js index 24552a1f..e2b39e55 100644 --- a/YLErpWeb/wwwroot/Scripts/app/trade/exchange/positionList.js +++ b/YLErpWeb/wwwroot/Scripts/app/trade/exchange/positionList.js @@ -212,7 +212,7 @@ function getColModelGrid() { label: '交易方向' }, { name: 'UnderlyingPrice', - label: '标的现价' + label: '标的均价' } ]; }