コード例 #1
0
ファイル: ProcessControl.cs プロジェクト: parkheenam/test
        /// <summary>
        /// </summary>
        /// <param name="aeqp"/>
        /// <param name="hb"/>
        /// <param name="handled"/>
        public void ON_CUSTOM_LOAD0(AoEquipment aeqp, IHandlingBatch hb, ref bool handled)
        {
            try
            {
                MicronBEAssyBELot lot = hb as MicronBEAssyBELot;

                string stepID     = hb.CurrentStep.StepID;
                double stdLotSize = SimulationHelper.GetStdLotSize(stepID, lot.Product.LineID, lot.Product.ProductID);

                if (stdLotSize > 0 && stdLotSize < lot.UnitQtyDouble)
                {
                    List <MicronBEAssyBELot> splitLots = SimulationHelper.GetSplitLots(lot, stdLotSize);

                    foreach (MicronBEAssyBELot splitLot in splitLots)
                    {
                        splitLot.ReservationEqp = aeqp;
                        AoFactory.Current.In(splitLot);
                        aeqp.AddInBuffer(splitLot);
                        SimulationHelper.CollectEqpPlan(splitLot, aeqp, LoadState.WAIT.ToString());
                    }

                    string waitPlanKey = SimulationHelper.GetEqpPlanKey(lot, string.Empty, LoadState.WAIT.ToString());
                    if (InputMart.Instance.EqpPlans.ContainsKey(waitPlanKey))
                    {
                        InputMart.Instance.EqpPlans.Remove(waitPlanKey);
                    }
                }
                else
                {
                    AoFactory.Current.In(lot);
                    aeqp.AddInBuffer(lot);
                }
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
            }
        }