feat(settlement): 添加标的类型判断逻辑支持价格表分流

- 在ConsGlobal中为所有标的类型常量添加中文注释说明
- 新增UseStockPriceTable方法用于判断标的类型是否使用股票价格表
- 修改SettlementPriceImportService中的价格表分流逻辑
- 添加单元测试验证股指期货、基金等进入股票价格表的逻辑
- 确保Shibor、利率收益率和债券指数进入正确的商品期货价格表
This commit is contained in:
张名锐
2026-07-31 16:57:49 +08:00
parent a507d0ce66
commit 2eba4ce2a9
3 changed files with 49 additions and 28 deletions
@@ -85,6 +85,21 @@ namespace YLErp.Modules.EodModule
#endregion
#region
[TestMethod]
[Description("股指期货和基金进入股票价格表,Shibor、利率收益率和债券指数进入商品期货价格表")]
public void _按标的类型选择股票价格表()
{
Assert.IsTrue(SettlementPriceImportService.UseStockPriceTable(ConsGlobal.InstrumentType.StockIF));
Assert.IsTrue(SettlementPriceImportService.UseStockPriceTable(ConsGlobal.InstrumentType.Fund));
Assert.IsFalse(SettlementPriceImportService.UseStockPriceTable(ConsGlobal.InstrumentType.Shibor));
Assert.IsFalse(SettlementPriceImportService.UseStockPriceTable(ConsGlobal.InstrumentType.RateYield));
Assert.IsFalse(SettlementPriceImportService.UseStockPriceTable(ConsGlobal.InstrumentType.BondIndex));
}
#endregion
#region 3"人工"/"系统"
[TestMethod]