예제 #1
0
        /// <summary>
        /// </summary>
        /// <param name="step"/>
        /// <param name="assignedEqps"/>
        /// <param name="context"/>
        /// <param name="handled"/>
        public void ON_AFTER_ASSIGN_EQP0(WorkStep step, List <AssignEqp> assignedEqps, JobChangeContext context, ref bool handled)
        {
            try
            {
                Logger.MonitorInfo(string.Format("Assign Eqp -> STEP : {0}, EQP_ID : {1}, NowDT : {2}", step.Key.ToString(), assignedEqps.ElementAt(0).Target.EqpID, DateUtility.DbToString(FindHelper.GetNowDT())));

                MicronBEAssyWorkStep ws = step as MicronBEAssyWorkStep;
                double setupTime        = 0d;
                ws.AvailableDownTime = SimulationHelper.CalculateAvailableDownTime(step, assignedEqps.ElementAt(0), ref setupTime);

                Logger.MonitorInfo(string.Format("Available Down Time : {0}, Setup Time : {1}", ws.AvailableDownTime, setupTime));
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
            }

            //foreach (AssignEqp eqp in assignedEqps)
            //{
            //    eqp.Target.WakeUp();
            //}
        }