Exemple #1
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;
            }
        }