From 43981e245b8540314364a90858ba30cb1ea94d7a Mon Sep 17 00:00:00 2001 From: tengyufan <1532636164@qq.com> Date: Thu, 30 Jul 2026 14:46:07 +0800 Subject: [PATCH] =?UTF-8?q?#EQD-6718=20=E5=9B=BD=E8=81=94=E6=B0=91?= =?UTF-8?q?=E7=94=9F-=E6=94=B6=E7=9B=8A=E4=BA=92=E6=8D=A2=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E6=94=B6=E6=94=AF=E6=96=B9=E5=90=91=EF=BC=8C=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=88=91=E6=96=B9=E6=94=B6=E5=8F=96=E6=B5=AE=E5=8A=A8?= =?UTF-8?q?=E6=94=B6=E7=9B=8A=20fix:=E5=9B=BD=E8=81=94=E6=B0=91=E7=94=9F?= =?UTF-8?q?=E6=94=B6=E7=9B=8A=E4=BA=92=E6=8D=A2=E9=9A=90=E8=97=8F=E6=94=B6?= =?UTF-8?q?=E6=94=AF=E6=96=B9=E5=90=91=EF=BC=8C=E9=BB=98=E8=AE=A4=E6=88=91?= =?UTF-8?q?=E6=96=B9=E6=94=B6=E5=8F=96=E6=B5=AE=E5=8A=A8=E6=94=B6=E7=9B=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增可配置开关 Erp.SwapFloatingIncomeReceiveOnlyMode,默认关闭,支持在普通模式与网厅适配模式之间切换 - 网厅适配模式下,新增及续做收益互换默认浮动端为我方收取,并隐藏新增、平仓、收益结算及查看页面的浮动端收支方向 - 普通模式保持原有展示和编辑逻辑,历史交易不修改原有浮动端收支方向 - 日终持仓风险_互换将浮动收支方向和标的多空合并为交易方向,并同步影响导出 - 交易方向映射收取+B为多头、收取+S为空头、支付+B为空头、支付+S为多头 - 新增交易方向映射专项前端单测 --- .../Configuration/Abstract/IErpConfig.cs | 8 ++- .../Configuration/ProjectSettings.cs | 8 ++- YLErpDAL/Modules/AppModule/AppUpgrader.cs | 1 + YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml | 11 ++- YLErpWeb/Views/SwapTrade2/SwapUnwind.cshtml | 11 ++- YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml | 9 +-- YLErpWeb/Views/SwapTrade2/TradeView.cshtml | 71 +++++++++++++------ YLErpWeb/fe-tests/eodPositionRisks.test.js | 39 ++++++++++ .../Scripts/app/swaptrade/EodPositionRisks.js | 31 ++++---- .../Scripts/app/swaptrade/swapTradeEdit.js | 12 +++- 10 files changed, 154 insertions(+), 47 deletions(-) create mode 100644 YLErpWeb/fe-tests/eodPositionRisks.test.js diff --git a/Framework/YLErp.Core/Configuration/Abstract/IErpConfig.cs b/Framework/YLErp.Core/Configuration/Abstract/IErpConfig.cs index 8e00b1b4..5e597013 100644 --- a/Framework/YLErp.Core/Configuration/Abstract/IErpConfig.cs +++ b/Framework/YLErp.Core/Configuration/Abstract/IErpConfig.cs @@ -696,6 +696,12 @@ namespace YLErp.Configuration /// 确认书生成时是否自动用印 /// bool IsAutoSealAfterGeneratedBook { get; } + + /// + /// 收益互换浮动收益端默认为我方收取,并隐藏收支方向 + /// + bool SwapFloatingIncomeReceiveOnlyMode { get; } + /// /// 衡泰内证账号 /// @@ -725,4 +731,4 @@ namespace YLErp.Configuration /// string EodExecCallbackUrl { get; } } -} \ No newline at end of file +} diff --git a/Framework/YLErp.Core/Configuration/ProjectSettings.cs b/Framework/YLErp.Core/Configuration/ProjectSettings.cs index f88f6d9c..7b4fe8ca 100644 --- a/Framework/YLErp.Core/Configuration/ProjectSettings.cs +++ b/Framework/YLErp.Core/Configuration/ProjectSettings.cs @@ -811,6 +811,12 @@ namespace YLErp /// 确认书生成时是否自动用印 /// public bool IsAutoSealAfterGeneratedBook { get; set; } = false; + + /// + /// 收益互换浮动收益端默认为我方收取,并隐藏收支方向 + /// + public bool SwapFloatingIncomeReceiveOnlyMode { get; set; } = false; + /// /// 衡泰内证账号 /// @@ -842,4 +848,4 @@ namespace YLErp public string EodExecCallbackUrl { get; set; } = string.Empty; } } -} \ No newline at end of file +} diff --git a/YLErpDAL/Modules/AppModule/AppUpgrader.cs b/YLErpDAL/Modules/AppModule/AppUpgrader.cs index 945744b1..583afcb1 100644 --- a/YLErpDAL/Modules/AppModule/AppUpgrader.cs +++ b/YLErpDAL/Modules/AppModule/AppUpgrader.cs @@ -306,6 +306,7 @@ namespace YLErp.Modules.AppModule //----------------------------------------------- configService.AddDataIfNotExists("ProjectConfig", "Erp.IsAutoSealAfterGeneratedBook", "false", "bool", "确认书生成时是否自动用印(IsAutoSealAndUploadFiles勾选时生效)"); configService.AddDataIfNotExists("ProjectConfig", "Erp.ReportFileBeginNumber", "0", "int", "报送文件开始编号"); + configService.AddDataIfNotExists("ProjectConfig", "Erp.SwapFloatingIncomeReceiveOnlyMode", "false", "bool", "收益互换浮动收益端默认为我方收取,并隐藏收支方向"); RemoveUnUsed(configService); } diff --git a/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml b/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml index 4d3d6a5a..0e702cde 100644 --- a/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml +++ b/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml @@ -4,6 +4,7 @@ Layout = "~/Views/Shared/_InfoLayout.cshtml"; bool isUseApproval = ViewBag.isUseApproval; bool isShowReCheckClose = ViewBag.IsShowReCheckClose; + bool hideFloatingIncomeDirection = PS.Config.ErpElement.SwapFloatingIncomeReceiveOnlyMode; } @section CSS{ @@ -140,7 +141,10 @@