Esempio n. 1
0
        //////////////////////////////////////////////////////////////////////////////
        #region Define Functions

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public bool KPIInitialVar()
        {
            try {
                //是否取服务器时间
                bTimeMode = KPI_SystemDal.GetKPITimeMode() == 1 ? true : false;
                //偏置时间
                nOffset = KPI_SystemDal.GetKPIOffset();
                //初始所有List<>
                ltUnits = KPI_UnitDal.GetValidEntity();
                ltSeqs  = KPI_SeqDal.GetValidEntity();
                ltKpis  = KpiDal.GetValidEntity();

                //实时、手录、曲线指标
                ltReals  = KPI_RealTagDal.GetAllEntity();
                ltInputs = KPI_InputTagDal.GetAllEntity();
                ltCurves = CurveTagDal.GetAllEntity();
                //计算周期
                List <CycleEntity> ltCYs = CycleDal.GetAllEntity();
                dicCYs = new Dictionary <string, CycleEntity>();
                foreach (CycleEntity cye in ltCYs)
                {
                    dicCYs[cye.CycleID] = cye;
                }

                //经济指标
                ltECs    = ECTagDal.GetValidEntity();
                ltXLines = ECTagDal.GetAllXLineEntity();
                ltScores = ECTagDal.GetAllScoreEntity();
                /////////////////////////////////////////////////////////////////
                //安全指标
                dicUnitStatus = new Dictionary <string, bool>();
                dicUnitPEs    = new Dictionary <string, double>();
                dicTags       = new Dictionary <string, double>();
                dicRealTag    = new Dictionary <string, RealTag>();
            }
            catch (Exception ex) {
                LogUtil.LogMessage(ex.ToString());

                return(false);
            }

            return(true);
        }