public void Work(DayTime dayTime) { IWork wo = Inspection.Work(dayTime, _bigData, Name); if (wo != null) { if (wo.NonConformance) { Machine.AddToQueue(wo); _mes.NonConformance(wo.Id); } else { OutputBuffer.Enqueue(wo); _mes.Complete(wo.Id); } } wo = Machine.Work(_bigData.IsBreakdown(this.Name, dayTime)); if (wo != null) { wo.NonConformance = false; Inspection.AddToQueue(wo); } else { wo = Machine.CurrentWorkorder; if (wo != null) { _mes.StartProgress(wo.Id); } } }