Esempio n. 1
0
        public static MicronBEAssyPlanInfo CreatePlanInfo(ILot lot, Mozart.SeePlan.DataModel.Step task)
        {
            MicronBEAssyPlanInfo plan  = new MicronBEAssyPlanInfo();
            MicronBEAssyBELot    beLot = lot as MicronBEAssyBELot;

            plan.Init(task);
            plan.LotID     = lot.LotID;
            plan.UnitQty   = lot.UnitQty;
            plan.ProductID = beLot.Product.ProductID;
            plan.ProcessID = beLot.Process.ProcessID;

            return(plan);
        }
Esempio n. 2
0
        public static List <MicronBEAssyBELot> GetSplitLots(MicronBEAssyBELot lot, double stdLotSize)
        {
            try
            {
                List <MicronBEAssyBELot> splitLots = new List <MicronBEAssyBELot>();

                int splitQty = (int)Math.Ceiling(lot.UnitQtyDouble / stdLotSize);

                double unitQty = lot.UnitQtyDouble;

                for (int i = 1; i <= splitQty; i++)
                {
                    string splitLotID = GenerateSplitNo(lot, i);

                    double splitLotQty = stdLotSize < unitQty ? stdLotSize : unitQty;

                    MicronBEAssyBELot splitLot = lot.Clone() as MicronBEAssyBELot;
                    splitLot.LotID = splitLotID;

                    splitLot.UnitQtyDouble = splitLotQty;

                    MicronBEAssyPlanInfo plan = new MicronBEAssyPlanInfo();

                    plan.Init(splitLot.CurrentStep);
                    plan.LotID     = splitLot.LotID;
                    plan.UnitQty   = splitLot.UnitQtyDouble;
                    plan.ProductID = splitLot.Product.ProductID;
                    plan.ProcessID = splitLot.Process.ProcessID;

                    splitLot.SetCurrentPlan(plan);

                    unitQty -= splitLotQty;

                    splitLots.Add(splitLot);
                }

                return(splitLots);
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
                return(null);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// </summary>
        /// <param name="lot"/>
        /// <param name="task"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public LoadInfo CREATE_LOAD_INFO0(ILot lot, Step task, ref bool handled, LoadInfo prevReturnValue)
        {
            try
            {
                MicronBEAssyPlanInfo plan = new MicronBEAssyPlanInfo();

                MicronBEAssyBELot beLot = lot as MicronBEAssyBELot;

                plan.Init(task);
                plan.LotID     = lot.LotID;
                plan.UnitQty   = lot.UnitQty;
                plan.ProductID = beLot.Product.ProductID;
                plan.ProcessID = beLot.Process.ProcessID;

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