Ejemplo n.º 1
0
        /// <summary>
        /// 初始化质控引擎
        /// </summary>
        /// <returns>DataLayer.SystemData.ReturnValue</returns>
        public short InitializeEngine()
        {
            if (BugCheckRuleManager.RuleTable != null && BugCheckRuleManager.RuleTable.Count > 0)
            {
                return(SystemData.ReturnValue.OK);
            }

            //初始化规则Entry列表
            List <MedQCEntry> lstQCEntryList = null;
            short             shRet          = MedQCEntryAccess.Instance.GetQCEntryList(ref lstQCEntryList);

            if (shRet != SystemData.ReturnValue.OK)
            {
                return(SystemData.ReturnValue.FAILED);
            }
            if (lstQCEntryList == null || lstQCEntryList.Count <= 0)
            {
                return(SystemData.ReturnValue.CANCEL);
            }

            for (int index = 0; index < lstQCEntryList.Count; index++)
            {
                BugCheckEntryManager.AddEntry(this, lstQCEntryList[index]);
            }

            //初始化规则列表
            List <MedQCRule> lstQCRuleList = null;

            shRet = MedQCRuleAccess.Instance.GetQCRuleList(ref lstQCRuleList);
            if (shRet != SystemData.ReturnValue.OK)
            {
                return(SystemData.ReturnValue.FAILED);
            }
            if (lstQCRuleList == null || lstQCRuleList.Count <= 0)
            {
                return(SystemData.ReturnValue.CANCEL);
            }

            for (int index = 0; index < lstQCRuleList.Count; index++)
            {
                BugCheckRuleManager.AddRule(lstQCRuleList[index]);
            }
            return(SystemData.ReturnValue.OK);
        }
Ejemplo n.º 2
0
 public void Dispose()
 {
     BugCheckEntryManager.Dispose();
     BugCheckRuleManager.Dispose();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 执行文档缺陷检查
 /// </summary>
 /// <param name="lstBugList">文档缺陷列表</param>
 /// <returns>DataLayer.SystemData.ReturnValue</returns>
 public List <DocuemntBugInfo> PerformBugCheck()
 {
     BugCheckEntryManager.ComputeEntryOccurCount();
     return(BugCheckRuleManager.ExecuteRule());
 }