Ejemplo n.º 1
0
        public static bool IsNeedSetupProfile(WorkEqp weqp, IHandlingBatch hb)
        {
            try
            {
                MicronBEAssyEqp eqp = null;
                if (InputMart.Instance.MicronBEAssyEqp.ContainsKey(weqp.Target.EqpID))
                {
                    eqp = InputMart.Instance.MicronBEAssyEqp[weqp.Target.EqpID];
                }

                if (eqp == null)
                {
                    return(false);
                }

                MicronBEAssyBELot lot = hb as MicronBEAssyBELot;

                BEStep     step = lot.CurrentStep;
                StepMaster sm   = InputMart.Instance.StepMasterView.FindRows(step.StepID).FirstOrDefault();

                if (sm == null)
                {
                    return(false);
                }

                foreach (var info in InputMart.Instance.SetupInfo.DefaultView)
                {
                    if (info.LINE_ID != eqp.LineID)
                    {
                        continue;
                    }

                    //if (UtilityHelper.StringToEnum(info.STEP_GROUP, StepGroup.NONE) != eqp.StepGroup)
                    //    continue;

                    //if (LikeUtility.Like(eqp.EqpModel, info.EQP_MODEL) == false)
                    //    continue;

                    SetupType type = SimulationHelper.CheckSetupProfile(weqp, hb);

                    if (type != SetupType.NONE)
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }

                return(false);
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
                return(false);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="partChangeInfo"/>
        /// <param name="isRun"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public PegPart APPLY_PART_CHANGE_INFO0(PegPart pegPart, object partChangeInfo, bool isRun, ref bool handled, PegPart prevReturnValue)
        {
            try
            {
                MicronBEAssyBEPegPart pp = pegPart as MicronBEAssyBEPegPart;

                pp.Product = partChangeInfo as Product;

#if DEBUG
                if (pp.Product.ProductID == "328622")
                {
                    Console.WriteLine();
                }
#endif

                AssyMcpPart mcpPart = pp.Product as AssyMcpPart;

                BEStep step = null;

                if (mcpPart.FinalProduct == null)
                {
                    return(pegPart);
                }

                if (mcpPart.FinalProduct.MaxSequence == 1 || mcpPart.IsMidPart)
                {
                    step = pp.Product.Process.FindStep(pp.CurrentStep.StepID);
                }
                else
                {
                    step = pp.Product.Process.LastStep;
                }

                pp.CurrentStep = step;

                if (mcpPart.IsMidPart == false)
                {
                    foreach (PegTarget target in pp.PegTargetList)
                    {
                        target.Qty = target.Qty * mcpPart.CompQty;
                    }
                }

                return(pp);
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
                return(pegPart);
            }
        }
Ejemplo n.º 3
0
        public static Time GetSetupTimeProfile(WorkEqp weqp, IHandlingBatch hb)
        {
            try
            {
                MicronBEAssyEqp eqp = null;
                if (InputMart.Instance.MicronBEAssyEqp.ContainsKey(weqp.Target.EqpID))
                {
                    eqp = InputMart.Instance.MicronBEAssyEqp[weqp.Target.EqpID];
                }

                if (eqp == null)
                {
                    return(default(Time));
                }

                MicronBEAssyBELot lot = hb as MicronBEAssyBELot;

                BEStep     step = lot.CurrentStep;
                StepMaster sm   = InputMart.Instance.StepMasterView.FindRows(step.StepID).FirstOrDefault();

                foreach (var info in InputMart.Instance.SetupInfo.DefaultView)
                {
                    if (info.LINE_ID != sm.LINE_ID)
                    {
                        continue;
                    }

                    //if (UtilityHelper.StringToEnum(info.STEP_GROUP, StepGroup.NONE) != eqp.StepGroup)
                    //    continue;

                    //if (LikeUtility.Like(eqp.EqpModel, info.EQP_MODEL) == false)
                    //    continue;

                    double setupTimeBySec = (double)info.SETUP_TIME;
                    return(Time.FromSeconds(setupTimeBySec));
                }

                return(default(Time));
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
                return(default(Time));
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <returns/>
        public PegPart UPDATE_TARGET_INFO(PegPart pegPart)
        {
            try
            {
                MicronBEAssyBEPegPart pp = pegPart as MicronBEAssyBEPegPart;
                BEStep step = pp.Product.Process.FindStep(pp.CurrentStep.StepID);

                if (pp.Product is AssyMcpPart)
                {
                    AssyMcpPart mcpPart = pp.Product as AssyMcpPart;
                }

                return(pp);
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
                return(default(PegPart));
            }
        }