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; } }