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)); } }
/// <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); } }
public static MicronBEAssyWipInfo GetWipInfo(this MicronBEAssyPlanWip planWip) { try { return(planWip.Wip as MicronBEAssyWipInfo); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(default(MicronBEAssyWipInfo)); } }
/// <summary> /// </summary> /// <param name="target"/> /// <param name="m"/> /// <param name="qty"/> /// <param name="handled"/> public void UPDATE_PEG_INFO0(PegTarget target, IMaterial m, double qty, ref bool handled) { try { MicronBEAssyPlanWip wip = m as MicronBEAssyPlanWip; wip.PegCount++; } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); } }
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)); } }
public static void WritePeg(Mozart.SeePlan.Pegging.IMaterial m, Mozart.SeePlan.Pegging.PegTarget target, double qty) { try { MicronBEAssyPlanWip wip = m as MicronBEAssyPlanWip; MicronBEAssyBEPegPart pp = target.PegPart as MicronBEAssyBEPegPart; MicronBEAssyBEMoMaster mo = pp.MoMaster as MicronBEAssyBEMoMaster; MicronBEAssyBEMoPlan moPlan = target.MoPlan as MicronBEAssyBEMoPlan; PegHistory info = new PegHistory(); info.LOT_ID = wip.LotID; info.PRODUCT_ID = wip.Product.ProductID; info.STEP_ID = string.IsNullOrEmpty(wip.MapStep.StepID) ? StringUtility.IdentityNull : wip.MapStep.StepID; info.MAIN_QTY = Convert.ToDecimal(wip.Wip.UnitQty); info.PEG_QTY = Convert.ToDecimal(qty); info.LOT_STATE = wip.Wip.CurrentState.ToString(); info.LINE_ID = wip.Product.LineID; info.MO_PRODUCT_ID = mo.Product.ProductID; info.DESIGN_ID = wip.Product.DesignID(); info.DEMAND_ID = moPlan.DemandID; info.WEEK_NO = moPlan.WeekNo; info.IS_BASE = UtilityHelper.IsYN(pp.Product.IsBase()); if (pp.Product is AssyMcpPart) { info.COMP_SEQ = (pp.Product as AssyMcpPart).CompSeq; } else { info.COMP_SEQ = 1; } 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)); } }
public static PlanWip CreatePlanWip(IWipInfo wip) { try { MicronBEAssyWipInfo wipInfo = wip as MicronBEAssyWipInfo; MicronBEAssyPlanWip planWip = new MicronBEAssyPlanWip(wipInfo); planWip.MapStep = wipInfo.InitialStep; planWip.AvailableTime = FindHelper.GetEngineStartTime(); planWip.Product = wipInfo.Product; planWip.LotID = wipInfo.LotID; planWip.State = wipInfo.CurrentState.ToString(); return(planWip); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(default(PlanWip)); } }