Пример #1
0
        public static void DoOpen()
        {
            LogHelper.WriteInfo("执行期货开市动作DoOpen");

            DoBaseData();

            try
            {
                //还没到开市,不处理
                if (CanDoOpen())
                {
                    if (ScheduleManager.CanEndCache())
                    {
                        MemoryDataManager.End();
                    }
                    DoFutureDayCheck();
                }
            }
            catch (Exception ex)
            {
                LogHelper.WriteError("期货开市DoOpen处理异常", ex);
            }
            //add 2010-03-16 添加对期货的清算判断,如果发现前一日没有清算完成则设置期货是否清算异常系统暂停交易,使用期台不能下单
            string   errMsg = "";
            DateTime ReckoningDateTime;
            bool     isReckoning = false;

            isReckoning = StatusTableChecker.IsFutureReckoningFaultRecovery(out ReckoningDateTime, out errMsg);
            if (isReckoning)
            {
                IList <CM_BreedClass> list = MCService.CommonPara.GetAllBreedClass();
                foreach (var item in list)
                {
                    if (item.BreedClassTypeID.Value == (int)GTA.VTS.Common.CommonObject.Types.BreedClassTypeEnum.CommodityFuture ||
                        item.BreedClassTypeID.Value == (int)GTA.VTS.Common.CommonObject.Types.BreedClassTypeEnum.StockIndexFuture)
                    {
                        ScheduleManager.IsFutureReckoningErrorStopTrade = true;
                        break;
                    }
                }
            }
            //else
            //{
            //    ScheduleManager.IsFutureReckoningErrorStopTrade = false;
            //}
            //==================


            ScheduleManager.HasDoneFutureOpen = true;
            ScheduleManager.HasDoneOpenNotify();
        }
Пример #2
0
        public static void DoOpen()
        {
            LogHelper.WriteInfo("执行现货开市动作DoOpen");
            try
            {
                //关闭内存表管理器
                if (ScheduleManager.CanEndCache())
                {
                    MemoryDataManager.End();
                }
            }
            catch (Exception ex)
            {
                LogHelper.WriteError("现货开市DoOpen处理异常", ex);
            }
            DoBaseData();

            //DoCacheOrder();

            ScheduleManager.HasDoneStockOpen = true;
            ScheduleManager.HasDoneOpenNotify();
        }