diff --git a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs index 9650d66d..eceb433e 100644 --- a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs @@ -3605,9 +3605,10 @@ namespace YLErp.Modules.SwapModule { item.FloatRateAbs = item.position.PosiNotionalValue == 0 ? 0 : item.InterestAmount / item.position.PosiNotionalValue; } - // 交易录入的债券类收益互换价格以小数保存,展示时转为百分比价格; - // 普通收益互换录入的是数量/原始数值,不做乘 100 转换。 - SetPosiPrice(item.position, item.StructureType == "普通债券类收益互换"); + // 是否 ×100 由标的资产类型决定(债券价格以小数保存,展示时转为百分比价格), + // 与存储层 GetStorageDeliveryPriceRound / GetSwapValuationPrice 的 IsBond 口径一致, + // 不依赖簿记结构类型 StructureType。 + SetPosiPrice(item.position); } return retListResult; } @@ -3652,10 +3653,10 @@ namespace YLErp.Modules.SwapModule position.SwapPositionValue = -position.SwapPositionValue; position.PosiDividendSum = -position.PosiDividendSum; } - private void SetPosiPrice(eod_swap_position position, bool? useBondPriceScale = null) + private void SetPosiPrice(eod_swap_position position) { var um = DataCacheProvider.GetUnderlyingDataSource().GetData(position.UnderlyingCode); - if (useBondPriceScale ?? (um != null && um.IsBond())) + if (um != null && um.IsBond()) { position.PosiNetPrice *= 100; position.UnderlyingPrice *= 100; diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js index d160d50e..f5e767a6 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/incomeSwapTrade.js @@ -46,7 +46,9 @@ const vue = new Vue({ } }, created() { - this.multiplier = this.deal.StructureType == '普通债券类收益互换' ? 100 : 1; + // 是否 ×100 由浮动腿标的资产类型决定(债券价格以小数保存,展示时转为百分比), + // 与存储层 SetPosiPrice/GetStorageDeliveryPriceRound 的 IsBond 口径一致,不依赖簿记结构类型。 + this.multiplier = this.IsBond(swapInstrumentType) ? 100 : 1; this.initDeal(); this.setValueDate(); }, diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js index 346174c4..72ff7698 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/unwindSwapTrade.js @@ -64,7 +64,7 @@ const vue = new Vue({ marginList: [], initPosiNetPrice: 0, multiplier: 1, - // EQD-6953 簿记模板=普通债券类收益互换 时启用 期末交割全价↔结算收益率(ExitYtm) 互算 + // EQD-6953 浮动腿标的为债券时启用 期末交割全价↔结算收益率(ExitYtm) 互算 isBondTRS: false, // 平仓比例展示/输入均为"占期初(original)"语义(A):默认与每次重开都基于原始名义本金。 // oriClosePercent = 剩余名义本金/期初名义本金 = 最多可平比例(不能平超过剩余持仓)。 @@ -77,13 +77,15 @@ const vue = new Vue({ minStartDate() { return this.deal.StartDate; }, - // EQD-6953:簿记模板为普通债券类收益互换 且 浮动腿标的为债券 时,才展示 源/AUTO/REV 标识并允许互算 + // EQD-6953:浮动腿标的为债券时,才展示 源/AUTO/REV 标识并允许互算 isBondUnwindLeg() { return this.isBondTRS && !!this.floatPosition && this.IsBond(this.floatPosition.UnderlyingInstrumentType); } }, created() { - this.isBondTRS = this.deal.StructureType == '普通债券类收益互换'; + // 是否债券收益互换由浮动腿标的资产类型决定(×100 展示口径与存储层 SetPosiPrice 的 IsBond 一致), + // 不依赖簿记结构类型 StructureType。 + this.isBondTRS = this.IsBond(swapInstrumentType); this.multiplier = this.isBondTRS ? 100 : 1; this.initDeal(); this.setValueDate(this.deal.ValueDate);