Пример #1
0
        private static void AddDcnTarget(ShopInTarget inTarget)
        {
            if (inTarget == null)
            {
                return;
            }

            //CELL 제외
            if (BopHelper.IsCellShop(inTarget.ShopID))
            {
                return;
            }

            int qty = (int)inTarget.TargetQty;

            if (qty <= 0)
            {
                return;
            }

            var product = inTarget.Product;

            if (product == null)
            {
                return;
            }

            FabStep inTargetStep = inTarget.TargetStep;

            if (inTargetStep == null)
            {
                return;
            }

            var dcnMst = ReleasePlanMaster.DcnMst;

            string shopID = product.ShopID;

            //ARRAY=A000, CF=C000
            string   stepID     = ReleasePlanMaster.GetShopStep(shopID);
            DateTime targetDate = inTarget.TargetDate;

            DcnTarget target = new DcnTarget()
            {
                InTarget   = inTarget,
                TargetStep = inTargetStep,
                Product    = product,
                StepID     = stepID,
                TargetDate = targetDate,
                TargetQty  = qty
            };

            dcnMst.AllTargets.Add(target);
        }
Пример #2
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);
        }
Пример #3
0
        private static void AddCellInQty(this CellInProfile profile, DateTime matTime, int matQty, ShopInTarget inTarget)
        {
            InInfo info = CreateHelper.CreateInInfo(profile, matTime, matQty, inTarget);

            AddInfo(profile.CellInfos, info);
        }