Exemplo n.º 1
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public object GET_STEP_PLAN_KEY0(PegPart pegPart, ref bool handled, object prevReturnValue)
        {
            MicronBEAssyBEPegPart          pp  = pegPart as MicronBEAssyBEPegPart;
            Tuple <string, string, string> key = Tuple.Create(pp.Product.LineID, pp.CurrentStep.StepID, pp.Product.ProductID);

            return(key);
        }
Exemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public PegPart PREPARE_TARGET0(PegPart pegPart, ref bool handled, PegPart prevReturnValue)
        {
            //초기화
            PegMaster.InitPegMaster();

            //최초 MergedPegPart 생성.
            MergedPegPart mpp = pegPart as MergedPegPart;

            switch (pegPart.CurrentStage.StageID)
            {
            case ("InitStage"):
                PrePareTarget_Fab(mpp);
                break;

            case ("CellPreStage"):
                PrePareTarget_Cell(mpp);
                break;

            default:
                break;
            }


            return(mpp);
        }
Exemplo n.º 3
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public PegPart PREPARE_WIP0(PegPart pegPart, ref bool handled, PegPart prevReturnValue)
        {
            try
            {
                List <IWipInfo> wipInfoList = PrepareWipRuleHelper.GetWipInfoList();

                List <PlanWip> planWips = new List <PlanWip>();
                foreach (IWipInfo wipInfo in wipInfoList)
                {
                    List <PlanWip> planWipList = PrepareWipRuleHelper.GetPlanWips(wipInfo);

                    if (planWipList != null && planWipList.Count > 0)
                    {
                        planWips.AddRange(planWipList);
                    }
                }

                PrepareWipRuleHelper.RegisterInputMart(planWips);

                return(pegPart);
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
                return(default(PegPart));
            }
        }
Exemplo n.º 4
0
        internal static IList <IMaterial> GetBankWip(PegPart pegPart)
        {
            FabPegPart pp   = pegPart.ToFabPegPart();
            FabProduct prod = pp.Current.Product;
            FabStep    step = pp.Current.Step;

            string key = LcdHelper.CreateKey(step.ShopID, step.StepID);

            List <FabPlanWip> list;

            CellBankPlanWips.TryGetValue(key, out list);

            if (list == null)
            {
                return(null);
            }

            List <IMaterial> result = new List <IMaterial>();

            foreach (var item in list)
            {
                if (item.ProductID == prod.ProductID)
                {
                    result.Add(item);
                }
            }

            return(result);
        }
Exemplo n.º 5
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public PegPart PREPARE_TARGET0(PegPart pegPart, ref bool handled, PegPart prevReturnValue)
        {
            try
            {
                MergedPegPart mp = pegPart as MergedPegPart;

                foreach (MicronBEAssyBEMoMaster moMaster in InputMart.Instance.MicronBEAssyBEMoMaster.Values)
                {
                    MicronBEAssyBEPegPart pp = new MicronBEAssyBEPegPart(moMaster, moMaster.Product);

                    foreach (MicronBEAssyBEMoPlan moPlan in moMaster.MoPlanList)
                    {
                        MicronBEAssyBEPegTarget target = new MicronBEAssyBEPegTarget(pp, moPlan);
                        pp.AddPegTarget(target);
                    }

                    mp.Merge(pp);
                }

                return(mp);
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
                return(default(PegPart));
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public object GET_STEP_PLAN_KEY0(PegPart pegPart, ref bool handled, object prevReturnValue)
        {
            if (pegPart.CurrentStage.State == "CellBankStage")
            {
                return(null);
            }


            return((pegPart as FabPegPart).Product.ProductID);
        }
Exemplo n.º 7
0
 /// <summary>
 /// </summary>
 /// <param name="pegPart"/>
 /// <returns/>
 public PegPart INIT_SUPPLY_PLAN(PegPart pegPart)
 {
     try
     {
         return(pegPart);
     }
     catch (Exception e)
     {
         WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
         return(default(PegPart));
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// </summary>
 /// <param name="pegPart"/>
 /// <param name="currentStep"/>
 /// <returns/>
 public Step GETPREVPEGGINGSTEP(PegPart pegPart, Step currentStep)
 {
     try
     {
         return(currentStep.GetDefaultPrevStep());
     }
     catch (Exception e)
     {
         WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
         return(default(Step));
     }
 }
Exemplo n.º 9
0
        public PegPart CELL_BANK_PREPARE(PegPart pegPart)
        {
            MergedPegPart mg = pegPart as MergedPegPart;

            //PREPARE_TARGET
            PegMaster.PrePareTargetbyCell_InTarget(mg);

            //PREPARE_WIP
            PegMaster.PrePareBankWip();

            return(pegPart);
        }
Exemplo n.º 10
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);
            }
        }
Exemplo n.º 11
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)
        {
            FabInterBom bom = partChangeInfo as FabInterBom;

            FabPegPart pp = pegPart.ToFabPegPart();


            pp.AddCurrentPlan(bom.Product, bom.CurrentStep);

            pp.Product  = bom.ChangeProduct;
            pp.InterBom = bom;

            return(pp);
        }
Exemplo n.º 12
0
        internal static Step GetLastPeggingStgep(PegPart pegPart)
        {
            FabPegPart pp      = pegPart as FabPegPart;
            FabProduct product = pp.Product as FabProduct;
            Step       step    = product.Process.LastStep;

            pp.AddCurrentPlan(product, step as FabStep);

            //StepTarget 추가기록
            foreach (FabPegTarget pt in pp.PegTargetList)
            {
                PegHelper.WriteStepTarget(pt, true, Constants.OUT, true);
            }

            return(step);
        }
Exemplo n.º 13
0
        internal static Step GetPrevPeggingStep(PegPart pegPart, Step currentStep)
        {
            Step prevStep = currentStep.GetDefaultPrevStep();

            FabPegPart pp = pegPart.ToFabPegPart();

            if (pp.HasInterBom)
            {
                prevStep    = pp.InterBom.ChangeStep;
                pp.InterBom = null;
            }

            pp.AddCurrentPlan(pp.FabProduct, prevStep as FabStep);

            return(prevStep);
        }
Exemplo n.º 14
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public PegPart PREPARE_WIP0(PegPart pegPart, ref bool handled, PegPart prevReturnValue)
        {
            foreach (FabWipInfo wip in InputMart.Instance.FabWipInfo.Values)
            {
                FabPlanWip planWip = CreateHelper.CreatePlanWip(wip);

                //OwnerE 는 패깅하지 않음.
                if (wip.OwnerType == Constants.OwnerE)
                {
                    PegHelper.WriteUnpegHistory(planWip, wip.OwnerType);
                    continue;
                }

                InputMart.Instance.FabPlanWip.ImportRow(planWip);
            }

            return(pegPart);
        }
Exemplo n.º 15
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public PegPart PREPARE_TARGET0(PegPart pegPart, ref bool handled, PegPart prevReturnValue)
        {
            MergedPegPart mp = new MergedPegPart();

            foreach (MicronBETestBEMoMaster moMaster in InputMart.Instance.MicronBETestBEMoMaster.Values)
            {
                MicronBETestBEPegPart pp = new MicronBETestBEPegPart(moMaster, moMaster.Product);

                foreach (MicronBETestBEMoPlan moPlan in moMaster.MoPlanList)
                {
                    MicronBETestBEPegTarget target = new MicronBETestBEPegTarget(pp, moPlan);
                    pp.AddPegTarget(target);
                }

                mp.Merge(pp);
            }

            return(mp);
        }
Exemplo n.º 16
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));
            }
        }
Exemplo n.º 17
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public PegPart PREPARE_WIP0(PegPart pegPart, ref bool handled, PegPart prevReturnValue)
        {
            List <IWipInfo> wipInfoList = PrepareWipRuleHelper.GetWipInfoList();

            List <PlanWip> planWips = new List <PlanWip>();

            foreach (IWipInfo wipInfo in wipInfoList)
            {
                List <PlanWip> planWipList = PrepareWipRuleHelper.GetPlanWips(wipInfo);

                if (planWipList != null && planWipList.Count > 0)
                {
                    planWips.AddRange(planWipList);
                }
            }

            PrepareWipRuleHelper.RegisterInputMart(planWips);

            return(pegPart);
        }
Exemplo n.º 18
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public PegPart BUILD_IN_PLAN0(PegPart pegPart, ref bool handled, PegPart prevReturnValue)
        {
            foreach (FabPegPart pp in (pegPart as MergedPegPart).Items)
            {
                FabProduct prod = pp.Product as FabProduct;
                FabStep    step = pp.Current.Step;

                foreach (FabPegTarget pt in pp.PegTargetList)
                {
                    PegHelper.WriteStepTarget(pt, false, Constants.IN, true);

                    if (pt.Qty > 0)
                    {
                        ShopInTarget inTarget = InputMart.Instance.ShopInTargetView.FindRows(step.ShopID, prod.ProductID, pt.CalcDate).FirstOrDefault();

                        if (inTarget == null)
                        {
                            inTarget = CreateHelper.CreateShopInTarget(pt, prod, step);
                            InputMart.Instance.ShopInTarget.Rows.Add(inTarget);
                        }

                        inTarget.TargetQty += (int)pt.CalcQty;

                        var mo = pt.MoPlan as FabMoPlan;
                        if (inTarget.Mo.Contains(mo) == false)
                        {
                            inTarget.Mo.Add(mo);
                        }

                        if (inTarget.Targets.Contains(pt) == false)
                        {
                            inTarget.Targets.Add(pt);
                        }
                    }
                }
            }

            return(pegPart);
        }
Exemplo n.º 19
0
        public Step GETPREVPEGGINGSTEP(PegPart pegPart, Step currentStep)
        {
            if (InputMart.Instance.GlobalParameters.ApplyCellOutPlan == false)
            {
                return(null);
            }

            FabPegPart pp = pegPart.ToFabPegPart();

            if (pp.Current.StepID == "0000")
            {
                string stepID = BopHelper.IsArrayShop(pp.FabProduct.ShopID) ? "9900" : "9990";

                FabStep step = BopHelper.GetSafeDummyStep(pp.Current.FactoryID, pp.Current.ShopID, stepID);

                pp.AddCurrentPlan(pp.FabProduct, step);

                return(step);
            }

            return(null);
        }
Exemplo n.º 20
0
        internal static int ComparePegPart(PegPart x, PegPart y)
        {
            FabPegPart a = x.ToFabPegPart();
            FabPegPart b = y.ToFabPegPart();

            int cmp = a.SampleMs.DueDate.CompareTo(b.SampleMs.DueDate);

            if (cmp == 0)
            {
                cmp = a.SampleMs.LineType.CompareTo(b.SampleMs.LineType);
            }

            if (cmp == 0)
            {
                cmp = a.SampleMs.Qty.CompareTo(b.SampleMs.Qty);
            }

            if (cmp == 0)
            {
                cmp = a.Product.ProductID.CompareTo(b.Product.ProductID);
            }

            return(cmp);
        }
Exemplo n.º 21
0
 /// <summary>
 /// </summary>
 /// <param name="pegPart"/>
 /// <param name="currentStep"/>
 /// <returns/>
 public Step GETPREVPEGGINGSTEP(PegPart pegPart, Step currentStep)
 {
     return(currentStep.GetDefaultPrevStep());
 }
Exemplo n.º 22
0
 internal static FabPegPart ToFabPegPart(this PegPart pegPart)
 {
     return(pegPart as FabPegPart);
 }
Exemplo n.º 23
0
 /// <summary>
 /// </summary>
 /// <param name="pegPart"/>
 /// <param name="stage"/>
 /// <param name="handled"/>
 /// <param name="prevReturnValue"/>
 /// <returns/>
 public bool USE_TARGET_YIELD0(PegPart pegPart, PegStage stage, ref bool handled, bool prevReturnValue)
 {
     return(false);
 }
Exemplo n.º 24
0
 /// <summary>
 /// </summary>
 /// <param name="pegPart"/>
 /// <param name="stage"/>
 /// <param name="isRun"/>
 /// <param name="handled"/>
 /// <param name="prevReturnValue"/>
 /// <returns/>
 public bool USE_TARGET_TAT0(PegPart pegPart, PegStage stage, bool isRun, ref bool handled, bool prevReturnValue)
 {
     return(true);
 }
Exemplo n.º 25
0
 /// <summary>
 /// </summary>
 /// <param name="x"/>
 /// <param name="y"/>
 /// <returns/>
 public int COMPAREPEGPART(PegPart x, PegPart y)
 {
     return(PegHelper.ComparePegPart(x, y));
 }
Exemplo n.º 26
0
 /// <summary>
 /// </summary>
 /// <param name="pegPart"/>
 /// <param name="currentStep"/>
 /// <returns/>
 public Step GETPREVPEGGINGSTEP(PegPart pegPart, Step currentStep)
 {
     return(PegHelper.GetPrevPeggingStep(pegPart, currentStep));
 }