Example #1
0
        public double GetProductivty(int nOP)
        {
            double ret = 0.0;

            try
            {
                if (this.units == null || this.units.Count <= 0)
                {
                    return(ret);
                }

                int count = 0;

                //计算生产数量
                foreach (SubUnit unit in this.units)
                {
                    count += unit.COUNT;
                }

                //通过平均数量计算生产时间
                ret = CTUnitMDL.MathProductivity(count, nOP, this.startTime, this.endTime);

                return(ret);
            }
            catch
            {
                throw;
            }
        }
Example #2
0
        /// <summary>
        /// 获取当前时段的生产效率
        /// </summary>
        /// <param name="op">平均OP</param>
        /// <returns></returns>
        public string GetFormatProductivty(int nOP)
        {
            string ret = null;

            try
            {
                if (this.units == null || this.units.Count <= 0)
                {
                    return("0");
                }

                int count   = 0;
                int seconds = 0;

                //计算生产数量
                foreach (SubUnit unit in this.units)
                {
                    count   += unit.COUNT;
                    seconds += unit.SECONDS;
                }

                //通过平均数量计算生产时间
                ret = CTUnitMDL.MathProductivityToString(count, nOP, seconds);

                return(ret);
            }
            catch
            {
                throw;
            }
        }
Example #3
0
        public string GetOEEToString(int nCT)
        {
            string ret = null;

            try
            {
                if (this.units == null || this.units.Count <= 0)
                {
                    return("0%");
                }

                int count = 0;
                int total = 0;

                //计算生产数量
                foreach (SubUnit unit in this.units)
                {
                    count += unit.COUNT;

                    total += unit.SECONDS;
                    //加一个时间
                    total += nCT;
                }


                //通过平均数量计算生产时间
                ret = CTUnitMDL.MathOEEToString(count, nCT, total);

                return(ret);
            }
            catch
            {
                throw;
            }
        }
Example #4
0
        /// <summary>
        /// 获取OEE
        /// </summary>
        /// <param name="ct">单位时间的平均CT</param>
        /// <returns></returns>
        public string GetFormatOEE(int nCT)
        {
            string ret = null;

            try
            {
                if (this.units == null || this.units.Count <= 0)
                {
                    return("0%");
                }

                int count = 0;

                //计算生产数量
                foreach (SubUnit unit in this.units)
                {
                    count += unit.COUNT;
                }

                //通过平均数量计算生产时间
                ret = CTUnitMDL.MathOEEToString(count, nCT, this.startTime, this.endTime);

                return(ret);
            }
            catch
            {
                throw;
            }
        }
Example #5
0
 public string GetOEE(int count, int seconds)
 {
     return(CTUnitMDL.MathOEEToString(count, this.ct, seconds));
 }
Example #6
0
 public string GetOEE(int count, DateTime startTime, DateTime endTime)
 {
     return(CTUnitMDL.MathOEEToString(count, this.ct, startTime, endTime));
 }