chore(cleanup): 清理编译器已证明的死代码残留(CS0219/CS0162/CS0169)

- 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错误。
This commit is contained in:
hjhan
2026-08-24 13:55:16 +08:00
parent 733ade024a
commit 610279c3aa
4 changed files with 1 additions and 24 deletions
@@ -13,7 +13,6 @@ namespace YLErp.Modules.ApiModule
{
public class YLErpWebApiHelper
{
private string baseUrl;
private Func<string> tokenFunc;
private HttpHelper httpHelper;
public YLErpWebApiHelper(Func<string> tokenFunc)
@@ -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<string> checkUnderlying(List<CheckQuotaMoitorModel> positionList, List<CheckQuotaMoitorModel> posiList, string tag_prefix, QuotaSetting[] settings, List<QuotaSetting> settingAll, bool warning)
@@ -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;
@@ -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(() =>
{