Ejemplo n.º 1
0
        public static void WriteActPeg(Mozart.SeePlan.Pegging.PegTarget target, Mozart.SeePlan.Pegging.IMaterial m, double qty)
        {
            try
            {
                MicronBEAssyPlanWip    wip = m as MicronBEAssyPlanWip;
                MicronBEAssyBEPegPart  pp  = target.PegPart as MicronBEAssyBEPegPart;
                MicronBEAssyBEMoMaster mo  = pp.MoMaster as MicronBEAssyBEMoMaster;

                PegHistory info = new PegHistory();

                info.LOT_ID        = LotType.ACT.ToString();
                info.LINE_ID       = wip.GetWipInfo().LineID;
                info.PRODUCT_ID    = wip.GetWipInfo().WipProductID;
                info.MAIN_QTY      = Convert.ToDecimal(wip.GetWipInfo().UnitQty);
                info.PEG_QTY       = Convert.ToDecimal(qty);
                info.STEP_ID       = StringUtility.IdentityNull;
                info.MO_PRODUCT_ID = mo.Product.ProductID;
                info.LOT_STATE     = StringUtility.IdentityNull;

                OutputMart.Instance.PegHistory.Add(info);
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <param name="entity"/>
        /// <returns/>
        public bool OnAfterLoad_ActInfo(ActInfo entity)
        {
            try
            {
                if (string.IsNullOrEmpty(entity.PRODUCT_ID))
                {
                    return(false);
                }

                MicronBEAssyWipInfo wipInfo = new MicronBEAssyWipInfo();
                wipInfo.LineID       = entity.LINE_ID;
                wipInfo.WipProductID = entity.PRODUCT_ID;
                wipInfo.UnitQty      = (double)entity.ACT_QTY;
                wipInfo.LotID        = "ACT";

                MicronBEAssyPlanWip actWip = new MicronBEAssyPlanWip(wipInfo);
                actWip.LotID = wipInfo.LotID;

                IComparable key = actWip.GetWipInfo().WipProductID;
                InputMart.Instance.MicronBEAssyActPlanWips.Add(key, actWip);

                return(false);
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
                return(false);
            }
        }
Ejemplo n.º 3
0
        public static void WriteUnpeg(MicronBEAssyPlanWip planWip, UnpegReason unpegReason)
        {
            try
            {
                MicronBEAssyWipInfo wipInfo = planWip.GetWipInfo();

                if (planWip.Product != null)
                {
                    WriteUnpeg(wipInfo.LineID, wipInfo.LotID, planWip.Product.ProductID,
                               planWip.MapStep.StepID, (decimal)wipInfo.UnitQty, (decimal)planWip.Qty,
                               planWip.Product.DesignID(), planWip.Product.IsBase(), wipInfo.CurrentState.ToString(),
                               unpegReason.ToString(), string.Empty);
                }
            }
            catch (Exception e)
            {
                WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0}   MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name));
            }
        }