Пример #1
0
        /// <summary>
        /// 历史结果记录是否符合要求
        /// </summary>
        /// <param name="model">历史结果数据</param>
        /// <returns></returns>
        public bool IsMatchTheRequire(HParaModel model)
        {
            if (R_InjectionQuantity != null)
            {
                if (!R_InjectionQuantity.IsInRange(model.R_InjectionQuantity))
                {
                    return(false);
                }
            }

            if (R_Asymmetry > 0)
            {
                if (R_Asymmetry != model.R_Asymmetry)
                {
                    return(false);
                }
            }

            if (R_RackTravel != null)
            {
                if (!R_RackTravel.IsInRange(model.R_RackTravel))
                {
                    return(false);
                }
            }

            return(true);
        }
        /// <summary>
        /// 历史测试记录是否符合要求
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool IsMatchRequire(HistoryModel model)
        {
            if (StartWork != null)
            {
                if (!StartWork.IsMatchTheRequire(model.StartWork))
                {
                    return(false);
                }
            }


            if (IdlingWork != null)
            {
                if (!IdlingWork.IsMatchTheRequire(model.IdlingWork))
                {
                    return(false);
                }
            }

            if (IdlingBreak != null)
            {
                if (!IdlingBreak.IsMatchTheRequire(model.IdlingBreak))
                {
                    return(false);
                }
            }

            if (ReviseBegin != null)
            {
                if (!ReviseBegin.IsMatchTheRequire(model.ReviseBegin))
                {
                    return(false);
                }
            }

            if (ReviseWork != null)
            {
                if (!ReviseWork.IsMatchTheRequire(model.ReviseWork))
                {
                    return(false);
                }
            }

            if (ReviseEnd != null)
            {
                if (!ReviseEnd.IsMatchTheRequire(model.ReviseEnd))
                {
                    return(false);
                }
            }

            if (DemWork != null)
            {
                if (!DemWork.IsMatchTheRequire(model.DemWork))
                {
                    return(false);
                }
            }

            if (AdjWork != null)
            {
                if (!AdjWork.IsMatchTheRequire(model.AdjWork))
                {
                    return(false);
                }
            }

            if (HighBreak != null)
            {
                if (!HighBreak.IsMatchTheRequire(model.HighBreak))
                {
                    return(false);
                }
            }

            if (Tem != null)
            {
                if (!Tem.IsInRange(model.Tem))
                {
                    return(false);
                }
            }

            return(true);
        }