From 610279c3aa4cc6ab4e89cd281e5404f7c703f661 Mon Sep 17 00:00:00 2001 From: hjhan Date: Mon, 24 Aug 2026 13:55:16 +0800 Subject: [PATCH] =?UTF-8?q?chore(cleanup):=20=E6=B8=85=E7=90=86=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=99=A8=E5=B7=B2=E8=AF=81=E6=98=8E=E7=9A=84=E6=AD=BB?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=AE=8B=E7=95=99(CS0219/CS0162/CS0169)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SwapEodPositionService: 删除衡泰推送残留的swapInsertEnum/swapPosiEnum赋值及fposition判空赋值块,赋值后从未读取(CS0219×2) - TradeConfirmService: if(addlog)分支仅剩三个同源死赋值(原衡泰推送调用已删),删赋值并将if/else翻转为if(!addlog),保留原else的Task.Run实时持仓刷新(CS0219×3) - QuotaMonitorService.checkTrade: 唯一存活case互换价格偏离比例恒return,删除switch后不可达收尾段(CS0162);删除从未使用的posiVal与重复的currentValue=null赋值 - YLErpWebApiHelper: 删除从未赋值/读取的私有字段baseUrl(CS0169) UnderlyingDbDataSource.DataSourceUpdated(CS0067)为IDataSourceEvent接口契约成员且DataCacheManager经接口订阅,不属死代码,保留不动。全量重编YLErpDAL通过,0警告0错误。 --- YLErpDAL/Modules/ApiModule/YLErpWebApiHelper.cs | 1 - YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs | 9 --------- YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs | 7 ------- .../TradeModule/DealModule/TradeConfirmService.cs | 8 +------- 4 files changed, 1 insertion(+), 24 deletions(-) diff --git a/YLErpDAL/Modules/ApiModule/YLErpWebApiHelper.cs b/YLErpDAL/Modules/ApiModule/YLErpWebApiHelper.cs index 197c9285..d5a5dc29 100644 --- a/YLErpDAL/Modules/ApiModule/YLErpWebApiHelper.cs +++ b/YLErpDAL/Modules/ApiModule/YLErpWebApiHelper.cs @@ -13,7 +13,6 @@ namespace YLErp.Modules.ApiModule { public class YLErpWebApiHelper { - private string baseUrl; private Func tokenFunc; private HttpHelper httpHelper; public YLErpWebApiHelper(Func tokenFunc) diff --git a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs index e2f7c1f4..b81e4219 100644 --- a/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs +++ b/YLErpDAL/Modules/RiskModule/QuotaMonitorService.cs @@ -6204,9 +6204,6 @@ namespace YLErp.Modules.RiskModule throw new ArgumentException($"“{nameof(tag_prefix)}”不能是 Null 或为空", nameof(tag_prefix)); } double? currentValue = null; - - currentValue = null; - double posiVal = 0; CheckQuotaMoitorModel current = positionList.FirstOrDefault(x => x.Current); var tag = $"{tag_prefix}({checkItem.quotaType})"; switch (checkItem.quotaType) @@ -6235,12 +6232,6 @@ namespace YLErp.Modules.RiskModule default: return null; } - checkItem.currentValue = Math.Round(currentValue ?? 0, 2); - if (!ValidateQuoteResult(checkItem)) - { - return checkItem; - } - return null; } private List checkUnderlying(List positionList, List posiList, string tag_prefix, QuotaSetting[] settings, List settingAll, bool warning) diff --git a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs index 9650d66d..aa586c41 100644 --- a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs @@ -1741,13 +1741,6 @@ namespace YLErp.Modules.SwapModule decimal closeFee = 0;//当日平仓费用 decimal closeMtmPnl = 0;//当日平仓盈亏 var posiType = fposition == null ? 0 : fposition.PositionType; - var swapInsertEnum = SwapPushDataEnum.收益互换交易新增; - var swapPosiEnum = SwapPushDataEnum.互换资产交易新增; - if (fposition != null) - { - swapInsertEnum = SwapPushDataEnum.收益互换交易修改; - swapPosiEnum = SwapPushDataEnum.互换资产交易修改; - } eventList.ForEach(x => { x.EventId = swapEvent.id; diff --git a/YLErpDAL/Modules/TradeModule/DealModule/TradeConfirmService.cs b/YLErpDAL/Modules/TradeModule/DealModule/TradeConfirmService.cs index 536504ed..799b9915 100644 --- a/YLErpDAL/Modules/TradeModule/DealModule/TradeConfirmService.cs +++ b/YLErpDAL/Modules/TradeModule/DealModule/TradeConfirmService.cs @@ -403,13 +403,7 @@ namespace YLErp.Modules.TradeModule.DealModule } var swap_event= swapEventService.UpdateSwapEvent(); swapEventService.AddSwapEventDate(openDate.Value, td.id, (int)SwapEventTypeEnum.确认交易, "", 0, true, history); - if (addlog) - { - var swapInsertEnum = SwapPushDataEnum.收益互换交易新增; - var posiInsertEnum = SwapPushDataEnum.互换资产交易新增; - var marginInsertEnum = SwapPushDataEnum.预付金交易新增; - } - else + if (!addlog) { Task.Run(() => {