From 89da38fab9a453f89a653c1435242b7820dc726b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8D=E9=94=90?= <1565842059@qq.com> Date: Mon, 27 Jul 2026 13:35:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor(swap):=20=E4=BA=92=E6=8D=A2=E5=BC=80?= =?UTF-8?q?=E5=B9=B3=E4=BB=93=E4=BA=8B=E4=BB=B6=E6=B5=81=E6=B0=B4=20?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=B0=8F=E6=95=B0=E7=82=B9=E7=B2=BE=E5=BA=A6?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将InitYtm属性从decimal?类型更改为string类型 - 调整TradingAmountAvg、TradingAmountFeeAvg和Quantity字段的小数位数从4位改为2位 - 修改InitYtm的赋值逻辑,添加空值检查并应用OtcFormatMoney格式化方法 - 统一货币金额格式化参数设置,移除分组符号并指定小数位数 --- YLErpDAL/Model/SwapFlowEventExportModel.cs | 2 +- YLErpDAL/Modules/SwapModule/SwapFlowService.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/YLErpDAL/Model/SwapFlowEventExportModel.cs b/YLErpDAL/Model/SwapFlowEventExportModel.cs index d710bf22..d37cd6d0 100644 --- a/YLErpDAL/Model/SwapFlowEventExportModel.cs +++ b/YLErpDAL/Model/SwapFlowEventExportModel.cs @@ -99,6 +99,6 @@ namespace YLErp.Model public string OptLog { get; set; } - public decimal? InitYtm { get; set; } + public string InitYtm { get; set; } } } diff --git a/YLErpDAL/Modules/SwapModule/SwapFlowService.cs b/YLErpDAL/Modules/SwapModule/SwapFlowService.cs index 30a40623..f31bec68 100644 --- a/YLErpDAL/Modules/SwapModule/SwapFlowService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapFlowService.cs @@ -372,9 +372,9 @@ namespace YLErp.Modules.SwapModule exportModel.PositionType = item.PositionType==1?"多头":"空头"; exportModel.UnderlyingCode = item.UnderlyingCode; exportModel.MatuirityDate = item.MatuirityDate.OtcFormatDate(); - exportModel.TradingAmountAvg = item.TradingAmountAvg.OtcFormatMoney(grouping: false); - exportModel.TradingAmountFeeAvg = item.TradingAmountFeeAvg.OtcFormatMoney(grouping: false); - exportModel.Quantity = item.Quantity.OtcFormatMoney(false, 4); + exportModel.TradingAmountAvg = item.TradingAmountAvg.OtcFormatMoney(false, 2); + exportModel.TradingAmountFeeAvg = item.TradingAmountFeeAvg.OtcFormatMoney(false, 2); + exportModel.Quantity = item.Quantity.OtcFormatMoney(false, 2); exportModel.TradingAmount = item.TradingAmount.OtcFormatMoney(false, 2); exportModel.ContractSize = item.ContractSize.ToString(); exportModel.TradingFee = item.TradingFee.OtcFormatMoney(false, 2); @@ -383,7 +383,7 @@ namespace YLErp.Modules.SwapModule exportModel.MarkClosePnl = item.MarkClosePnl.OtcFormatMoney(false, 2); exportModel.DividendIn = item.DividendIn.OtcFormatMoney(false, 2); exportModel.OptLog = item.OptLog; - exportModel.InitYtm = item.InitYtm; + exportModel.InitYtm = item.InitYtm?.OtcFormatMoney(false, 9); list.Add(exportModel); } var tplFilePath = OtcAppContext.MapPath("/App_Docs");