Exemplo n.º 1
0
            public int Compare(PegPart x, PegPart y)
            {
                if (object.ReferenceEquals(x, y))
                {
                    return(0);
                }

                return(PegHelper.ComparePegPart(x, y));
            }
Exemplo n.º 2
0
        internal static void PrePareTargetbyCell_InTarget(MergedPegPart mg)
        {
            List <PegPart> list = new List <PegPart>(mg.Items);

            foreach (FabPegPart pp in list)
            {
                string arrayCode = CellCodeMaster.GetArrayCode(pp.Product.ProductID);
                string cfCode    = CellCodeMaster.GetCfCode(pp.Product.ProductID);

                var arrayProd = BopHelper.FindProduct(Constants.ArrayShop, arrayCode);
                var cfProd    = BopHelper.FindProduct(Constants.CF, cfCode);

                if (arrayProd == null || cfProd == null)
                {
                    ErrHist.WriteIf(string.Format("BuildFabOutTarget{0}", pp.Product.ProductID),
                                    ErrCategory.PEGGING,
                                    ErrLevel.ERROR,
                                    pp.Current.Step.FactoryID,
                                    pp.Current.Step.ShopID,
                                    Constants.NULL_ID,
                                    pp.Product.ProductID,
                                    Constants.NULL_ID,
                                    Constants.NULL_ID,
                                    Constants.NULL_ID,
                                    pp.Current.ShopID,
                                    "NOT FOUND PRODUCT",
                                    string.Format("Do not build TFT OutTarget")
                                    );

                    mg.Items.Remove(pp);

                    continue;
                }

                FabStep arrayStep = BopHelper.GetSafeDummyStep(pp.Current.FactoryID, Constants.ArrayShop, "0000");
                FabStep cfStep    = BopHelper.GetSafeDummyStep(pp.Current.FactoryID, Constants.CfShop, "0000");

                FabPegPart cfPP = PegMaster.CreateCellBankPegPart(pp, cfProd);
                cfPP.AddCurrentPlan(cfProd, cfStep);


                pp.AddCurrentPlan(arrayProd, arrayStep);
                pp.Product = arrayProd;

                foreach (FabPegTarget pt in pp.PegTargetList)
                {
                    pt.TargetKey = PegHelper.CreateTargetKey(pt.TargetKey, arrayProd.ProductID.Substring(0, 2));
                }



                mg.Items.Add(cfPP);
            }
        }
Exemplo n.º 3
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.º 4
0
        private static void ActPeg(List <MoPlan> moList, List <IMaterial> wips)
        {
            List <MoPlan> targets = new List <MoPlan>(moList);

            foreach (PreMoPlan target in targets)
            {
                for (int j = 0; j < wips.Count; j++)
                {
                    var m = wips[j];
                    if (m.Qty == 0)
                    {
                        continue;
                    }

                    if (target.Qty > m.Qty)
                    {
                        float qty = (float)m.Qty;
                        target.Qty -= qty;
                        m.Qty       = 0;
                        wips.RemoveAt(j--);

                        PegHelper.WriteActPeg(target, m, qty);
                    }
                    else
                    {
                        double qty = target.Qty;
                        m.Qty     -= qty;
                        target.Qty = 0;

                        if (m.Qty == 0)
                        {
                            wips.RemoveAt(j--);
                        }

                        PegHelper.WriteActPeg(target, m, qty);

                        moList.Remove(target);

                        break;
                    }
                }
            }
        }
Exemplo n.º 5
0
        internal static FabPegPart CreateCellBankPegPart(FabPegPart pp, FabProduct prod)
        {
            FabPegPart newPP = new FabPegPart(pp.MoMaster as FabMoMaster, prod);

            newPP.Steps = new List <PlanStep>(pp.Steps);

            foreach (FabPegTarget item in pp.PegTargetList)
            {
                FabPegTarget pt = item.Clone(newPP) as FabPegTarget;
                pt.TargetKey = PegHelper.CreateTargetKey(pt.TargetKey, prod.ProductID.Substring(0, 2));

                newPP.AddPegTarget(pt);

                if (newPP.SampleMs == null)
                {
                    newPP.SampleMs = pt;
                }
            }

            return(newPP);
        }