예제 #1
0
        /// <summary>
        /// </summary>
        /// <param name="pegPart"/>
        /// <param name="isOut"/>
        /// <param name="handled"/>
        public void WRITE_TARGET0(Mozart.SeePlan.Pegging.PegPart pegPart, bool isOut, ref bool handled)
        {
            FabPegPart pp      = pegPart as FabPegPart;
            FabStep    step    = pegPart.CurrentStage.Tag as FabStep;
            FabProduct product = pp.Product as FabProduct;

            foreach (FabPegTarget pt in pegPart.PegTargetList)
            {
                PegHelper.WriteStepTarget(pt, isOut, step.StepType);
            }
        }
예제 #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);
        }