/// <summary> /// 内部方法初始交易时间 /// 初始交易时间要先初始化交易所, /// 因为这里是取交易所ID来作主键,如果交易所没有交易时间,这里不添加记录 /// </summary> private void privateInitTradeTime() { List <CM_BourseType> btList = bourseTypes.GetAll(); List <CM_TradeTime> ttList = GetAllTradeTime(); tradeTimes.Reset();//重新初始化先清空再ADD if (Utils.IsNullOrEmpty(btList) || Utils.IsNullOrEmpty(ttList)) { return; } foreach (var item in btList) { var cacheList = new List <CM_TradeTime>(); foreach (var model in ttList) { if ((int)model.BourseTypeID == item.BourseTypeID) { cacheList.Add(model); } } if (!Utils.IsNullOrEmpty(cacheList)) { tradeTimes.Add(item.BourseTypeID, cacheList); } } }
/// <summary> /// 获取所有交易时间 /// </summary> /// <returns></returns> public List <CM_TradeTime> GetCacheALLCM_TradeTime() { List <CM_TradeTime> list = new List <CM_TradeTime>(); List <List <CM_TradeTime> > getall = tradeTimes.GetAll(); foreach (var item in getall) { list.AddRange(item); } return(list); }
/// <summary> /// 根据配置文件中IP和端口获取撮合中心 /// </summary> /// <returns></returns> public RC_MatchCenter GetCacheMatchCenterByConfig() { List <RC_MatchCenter> list = matchCenter.GetAll(); foreach (var item in list) { if (item.IP == AppConfig.GetConfigMatchCenterIP() && item.Port.Value == AppConfig.GetConfigMatchCenterPort()) { return(item); } } return(null); }
/// <summary> /// 根据商品类别缓存相关代码,目前这里只缓存期货类型下的相关类别,目前现货没有必要缓存 /// 调用此方法要先初始货品种类型与类别再调用些方法 /// </summary> private void privateInitCommotityByBreedClassID() { List <CM_BreedClass> list = breedClasss.GetAll(); foreach (var item in list) { if (!item.BreedClassTypeID.HasValue) { continue; } //目前只缓存股指期货或者是商品期货的代码 if ((Types.BreedClassTypeEnum)item.BreedClassTypeID.Value == Types.BreedClassTypeEnum.CommodityFuture || (Types.BreedClassTypeEnum)item.BreedClassTypeID.Value == Types.BreedClassTypeEnum.StockIndexFuture) { List <CM_Commodity> model = new List <CM_Commodity>(); model = GetAllCommodityByBreedClass(item.BreedClassID); if (model != null && model.Count > 0) { commotityQHByBreedClassID.Add(item.BreedClassID, model); } } } }
/// <summary> /// 获取所有港股实体 /// </summary> /// <returns></returns> public List <HK_Commodity> GetCacheAllHKCommodity() { return(hk_commodity.GetAll()); }
/// <summary> /// 获取港股最小交易价位 /// </summary> /// <returns></returns> public List <HK_MinPriceFieldRange> GetAllHKMinChangePriceFieldRange() { return(hk_MinPriceFiled.GetAll()); }
/// <summary> /// 获取熔断参数列表 /// </summary> /// <returns></returns> public List <CM_FuseTimesection> GetCacheCM_FuseTimesection() { return(fuseTimeSections.GetAll()); }
/// <summary> /// 获取所有撮合机列表--此列表数据在初始化时只是初始化本撮合中心下的所有撮合机并不是包含数据库中的所有撮合机 /// </summary> /// <returns></returns> public List <RC_MatchMachine> GetCacheRC_MatchMachine() { return(matchMachine.GetAll()); }
///<summary> /// 获取撮合机所分配的交易商品列表 /// </summary> public List <RC_TradeCommodityAssign> GetCacheTradeCommodityAssign() { return(tradeCommodityAssign.GetAll()); }
/// <summary> /// 获取现货上下限(涨跌幅)类型值列表 /// </summary> /// <returns></returns> public List <XH_SpotHighLowValue> GetCacheXH_SpotHighLowValue() { return(xh_SpotHighLowValues.GetAll()); }
/// <summary> /// 获取有效申报类型值列表 /// </summary> /// <returns></returns> public List <XH_ValidDeclareValue> GetCacheValidDeclareValues() { return(validDeclareValues.GetAll()); }
/// <summary> /// 获取缓存表中的熔断列表 /// </summary> /// <returns></returns> public List <CM_CommodityFuse> GetCacheCommodityFuse() { return(commodityFuses.GetAll()); }