/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="isRun"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public TimeSpan GET_TAT0(Mozart.SeePlan.Pegging.PegPart pegPart, bool isRun, ref bool handled, TimeSpan prevReturnValue) { try { MicronBEAssyBEPegPart pp = pegPart as MicronBEAssyBEPegPart; StepTat stepTat = FindHelper.FindTAT(pp.Product.ProductID, pp.CurrentStep.StepID, pp.Product.LineID); if (stepTat == null) { return(TimeSpan.FromSeconds(0)); } double tat = 0; if (isRun) { tat = (double)stepTat.RUN_TAT; } else { tat = (double)stepTat.WAIT_TAT; } return(TimeSpan.FromSeconds(tat)); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(default(TimeSpan)); } }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="isRun"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public TimeSpan GET_TAT0(Mozart.SeePlan.Pegging.PegPart pegPart, bool isRun, ref bool handled, TimeSpan prevReturnValue) { MicronBETestBEPegPart pp = pegPart as MicronBETestBEPegPart; double tat = FindHelper.FindTAT(pp.Product.LineID, pp.Product.ProductID, pp.CurrentStep.StepID, isRun); return(TimeSpan.FromSeconds(tat)); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public double GET_YIELD0(Mozart.SeePlan.Pegging.PegPart pegPart, ref bool handled, double prevReturnValue) { MicronBETestBEPegPart pp = pegPart as MicronBETestBEPegPart; double yield = FindHelper.FindYield(pp.Product.LineID, pp.Product.ProductID, pp.CurrentStep.StepID); return(yield); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public IList <Mozart.SeePlan.Pegging.IMaterial> GET_ACTS0(Mozart.SeePlan.Pegging.PegPart pegPart, ref bool handled, IList <IMaterial> prevReturnValue) { List <IMaterial> list = new List <IMaterial>(); try { MicronBEAssyBEPegPart pp = pegPart as MicronBEAssyBEPegPart; foreach (MicronBEAssyPlanWip wip in InputMart.Instance.MicronBEAssyActPlanWips.Values) { if (wip.GetWipInfo().WipProductID != pp.Product.ProductID || wip.GetWipInfo().LineID != pp.Product.LineID) { continue; } list.Add(wip); } } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); } return(list); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <returns/> public PegPart WRITE_LOADED_DEMAND(Mozart.SeePlan.Pegging.PegPart pegPart) { foreach (var item in InputMart.Instance.FabMoMaster.Values) { foreach (FabMoPlan mo in item.MoPlanList) { Outputs.LoadedDemand row = new Outputs.LoadedDemand(); row.VERSION_NO = ModelContext.Current.VersionNo; row.FACTORY_ID = mo.FactoryID; row.SHOP_ID = mo.ShopID; row.DEMAND_ID = mo.DemandID; row.PRODUCT_ID = mo.PreMoPlan.ProductID; row.PLAN_DATE = mo.DueDate; row.PLAN_QTY = Convert.ToDecimal(mo.Qty); row.PRIORITY = (string)mo.Priority; row.TARGET_KEY = mo.TargetKey; OutputMart.Instance.LoadedDemand.Add(row); } } return(pegPart); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="isRun"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public List <object> GET_PART_CHANGE_INFOS0(Mozart.SeePlan.Pegging.PegPart pegPart, bool isRun, ref bool handled, List <object> prevReturnValue) { if (isRun) { return(null); } FabPegPart pp = pegPart as FabPegPart; FabProduct product = pp.Product as FabProduct; FabStep step = pp.CurrentStage.Tag as FabStep; if (product.HasPrevInterBom == false) { return(null); } FabInterBom interbom; if (product.TryGetPrevInterRoute(step, out interbom) == false) { return(null); } List <object> result = new List <object>() { interbom }; return(result); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <returns/> public Step GETLASTPEGGINGSTEP(Mozart.SeePlan.Pegging.PegPart pegPart) { MicronBETestBEPegPart pp = pegPart as MicronBETestBEPegPart; MicronBETestProcess process = pp.Product.Process as MicronBETestProcess; return(process.LastStep); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="isRun"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public List <object> GET_PART_CHANGE_INFOS0(Mozart.SeePlan.Pegging.PegPart pegPart, bool isRun, ref bool handled, List <object> prevReturnValue) { try { MicronBEAssyBEStep currentStep = pegPart.CurrentStep as MicronBEAssyBEStep; MicronBEAssyBEPegPart pp = pegPart as MicronBEAssyBEPegPart; List <object> list = new List <object>(); if (isRun) { if (pp.Product is AssyMcpProduct) { AssyMcpProduct mcpProduct = pp.Product as AssyMcpProduct; string stepID = string.Empty; if (mcpProduct.HasPrevs && mcpProduct.Prevs.ElementAt(0) is AssyMcpPart) { stepID = (mcpProduct.Prevs.ElementAt(0) as AssyMcpPart).PartChangeStep; } if (stepID == currentStep.StepID) { list.AddRange(mcpProduct.Prevs); } } else if (pp.Product is AssyMcpPart) { #if DEBUG if (currentStep.StepID == "DIE ATTACH") { Console.WriteLine(); } #endif AssyMcpPart mcpPart = pp.Product as AssyMcpPart; if (mcpPart.IsMidPart) { string stepID = string.Empty; if (mcpPart.HasPrevs && mcpPart.Prevs.ElementAt(0) is AssyMcpPart) { stepID = (mcpPart.Prevs.ElementAt(0) as AssyMcpPart).PartChangeStep; } if (stepID == currentStep.StepID) { list.AddRange(mcpPart.Prevs); } } } } return(list); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(new List <object>()); } }
public override Mozart.SeePlan.Pegging.PegPart PrepareTarget(Mozart.SeePlan.Pegging.PegPart pegPart) { bool handled = false; Mozart.SeePlan.Pegging.PegPart returnValue = null; returnValue = this.fPREPARE_TARGET.PREPARE_TARGET0(pegPart, ref handled, returnValue); return(returnValue); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public double GET_YIELD0(Mozart.SeePlan.Pegging.PegPart pegPart, ref bool handled, double prevReturnValue) { FabPegPart pp = pegPart.ToFabPegPart(); FabStep step = pp.Current.Step; return(step.GetYield(pp.FabProduct.ProductID)); }
public override Mozart.SeePlan.Pegging.PegPart ApplyPartChangeInfo(Mozart.SeePlan.Pegging.PegPart pegPart, object partChangeInfo, bool isRun) { bool handled = false; Mozart.SeePlan.Pegging.PegPart returnValue = null; returnValue = this.fpCHANGE_PART.APPLY_PART_CHANGE_INFO0(pegPart, partChangeInfo, isRun, ref handled, returnValue); return(returnValue); }
public override bool UseTargetTat(Mozart.SeePlan.Pegging.PegPart pegPart, Mozart.SeePlan.Pegging.PegStage stage, bool isRun) { bool handled = false; bool returnValue = false; returnValue = this.fpSHIFT_TAT.USE_TARGET_TAT0(pegPart, stage, isRun, ref handled, returnValue); return(returnValue); }
public override object GetStepPlanKey(Mozart.SeePlan.Pegging.PegPart pegPart) { bool handled = false; object returnValue = null; returnValue = this.fpWRITE_TARGET.GET_STEP_PLAN_KEY0(pegPart, ref handled, returnValue); return(returnValue); }
public override Mozart.SeePlan.Pegging.PegPart PrepareWip(Mozart.SeePlan.Pegging.PegPart pegPart) { bool handled = false; Mozart.SeePlan.Pegging.PegPart returnValue = null; returnValue = this.fpPREPARE_WIP.PREPARE_WIP0(pegPart, ref handled, returnValue); return(returnValue); }
public override System.TimeSpan GetTat(Mozart.SeePlan.Pegging.PegPart pegPart, bool isRun) { bool handled = false; System.TimeSpan returnValue = default(System.TimeSpan); returnValue = this.fpSHIFT_TAT.GET_TAT0(pegPart, isRun, ref handled, returnValue); return(returnValue); }
public override Mozart.SeePlan.Pegging.PegPart BuildInPlan(Mozart.SeePlan.Pegging.PegPart pegPart) { bool handled = false; Mozart.SeePlan.Pegging.PegPart returnValue = null; returnValue = this.fpBUILD_INPLAN.BUILD_IN_PLAN0(pegPart, ref handled, returnValue); return(returnValue); }
public override bool UseTargetYield(Mozart.SeePlan.Pegging.PegPart pegPart, Mozart.SeePlan.Pegging.PegStage stage) { bool handled = false; bool returnValue = false; returnValue = this.fpAPPLY_YIELD.USE_TARGET_YIELD0(pegPart, stage, ref handled, returnValue); return(returnValue); }
public override double GetYield(Mozart.SeePlan.Pegging.PegPart pegPart) { bool handled = false; double returnValue = 0D; returnValue = this.fpAPPLY_YIELD.GET_YIELD0(pegPart, ref handled, returnValue); return(returnValue); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="handled"/> public void WRITE_UNPEG0(Mozart.SeePlan.Pegging.PegPart pegPart, ref bool handled) { try { foreach (MicronBEAssyPlanWip planWip in InputMart.Instance.MicronBEAssyPlanWip.Values) { if (planWip.Qty <= 0) { continue; } if (planWip.MapCount > 0) { WriteHelper.WriteUnpeg(planWip, UnpegReason.EXCESS); } else { WriteHelper.WriteUnpeg(planWip, UnpegReason.NO_TARGET); } } List <string> list = new List <string>(); foreach (var key in InputMart.Instance.MicronBEAssyBEMoMaster.Keys) { list.Add(key); } foreach (MicronBEAssyPlanWip wip in InputMart.Instance.MicronBEAssyActPlanWips.Values) { if (wip.Qty <= 0) { continue; } if (wip.MapCount > 0) { WriteHelper.WriteUnpeg(wip, UnpegReason.EXCESS); } else { if (list.Contains(wip.GetWipInfo().WipProductID)) { WriteHelper.WriteUnpeg(wip, UnpegReason.EXCESS); } else { WriteHelper.WriteUnpeg(wip, UnpegReason.NO_TARGET); } } } } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); } }
/// <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) { try { WriteHelper.WriteStepTarget(pegPart, isOut); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); } }
/// <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); } }
public Step GETLASTPEGGINGSTEP(Mozart.SeePlan.Pegging.PegPart pegPart) { if (InputMart.Instance.GlobalParameters.ApplyCellOutPlan == false) { return(null); } FabPegPart pp = pegPart.ToFabPegPart(); return(pp.Current.Step);; }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public double GET_YIELD0(Mozart.SeePlan.Pegging.PegPart pegPart, ref bool handled, double prevReturnValue) { try { MicronBEAssyBEPegPart pp = pegPart as MicronBEAssyBEPegPart; double yield = FindHelper.FindYield(pp.Product.ProductID, pp.CurrentStep.StepID, pp.Product.LineID); return(yield); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(1d); } }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <returns/> public Step GETLASTPEGGINGSTEP(Mozart.SeePlan.Pegging.PegPart pegPart) { try { MicronBEAssyBEPegPart pp = pegPart as MicronBEAssyBEPegPart; MicronBEAssyProcess process = pp.Product.Process as MicronBEAssyProcess; return(process.LastStep); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(default(Step)); } }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="isRun"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public IList <Mozart.SeePlan.Pegging.IMaterial> GET_WIPS0(Mozart.SeePlan.Pegging.PegPart pegPart, bool isRun, ref bool handled, IList <IMaterial> prevReturnValue) { if (pegPart.CurrentStage.State == "CellBankStage") { return(PegMaster.GetBankWip(pegPart)); } var pp = pegPart as FabPegPart; var prod = pp.Product; var step = pegPart.CurrentStage.Tag as FabStep; var rows = InputMart.Instance.FabPlanWipView.FindRows(step); List <IMaterial> result = new List <IMaterial>(); foreach (FabPlanWip planWip in rows) { if (planWip.Qty == 0) { continue; } if (isRun != planWip.IsRunWip) { continue; } if (planWip.ProductID != prod.ProductID) { if (planWip.Product.IsTestProduct == false) { continue; } if (planWip.Product.MainProductID != prod.ProductID) { continue; } } planWip.MapCount++; result.Add(planWip); } return(result); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="isRun"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public IList <Mozart.SeePlan.Pegging.IMaterial> GET_WIPS0(Mozart.SeePlan.Pegging.PegPart pegPart, bool isRun, ref bool handled, IList <IMaterial> prevReturnValue) { MicronBETestBEPegPart pp = pegPart as MicronBETestBEPegPart; List <IMaterial> wips = new List <IMaterial>(); ICollection <MicronBETestPlanWip> wipList; if (InputMart.Instance.MicronBETestPlanWip.TryGetValue(pegPart.CurrentStep.StepID, out wipList)) { foreach (MicronBETestPlanWip wip in wipList) { if (wip.Qty <= 0) { continue; } if (pp.Product.ProductID != wip.Product.ProductID) { continue; } if (isRun) { if (wip.Wip.CurrentState != EntityState.RUN) { continue; } } else { if (wip.Wip.CurrentState != EntityState.WAIT) { continue; } } wips.Add(wip); wip.MapCount++; } } return(wips); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="handled"/> public void WRITE_UNPEG0(Mozart.SeePlan.Pegging.PegPart pegPart, ref bool handled) { //Wip foreach (var wip in InputMart.Instance.FabPlanWip.Rows) { WriteUnpegHistory(wip); } //Cell BankWip foreach (var item in PegMaster.CellBankPlanWips.Values) { foreach (var wip in item) { WriteUnpegHistory(wip); } } }
public static void WriteStepTarget(Mozart.SeePlan.Pegging.PegPart pegPart, bool isOut) { try { MicronBEAssyBEPegPart pp = pegPart as MicronBEAssyBEPegPart; foreach (MicronBEAssyBEPegTarget target in pegPart.PegTargetList) { MicronBEAssyBEMoPlan moPlan = target.Mo as MicronBEAssyBEMoPlan; MicronBEAssyBEMoMaster moMaster = moPlan.MoMaster as MicronBEAssyBEMoMaster; StepTarget info = new StepTarget(); info.LINE_ID = pp.Product.LineID; info.PRODUCT_ID = pp.Product.ProductID; info.PROCESS_ID = pp.CurrentStep.RouteID; info.STEP_ID = pp.CurrentStep.StepID; if (isOut) { info.OUT_QTY = Convert.ToDecimal(target.Qty); } else { info.IN_QTY = Convert.ToDecimal(target.Qty); } info.TARGET_DATE = target.DueDate; info.MO_PRODUCT_ID = moPlan.ProductID; info.DESIGN_ID = pp.Product.DesignID(); info.DEMAND_ID = moPlan.DemandID; info.WEEK_NO = moPlan.WeekNo; info.SEQUENCE = (pp.CurrentStep as MicronBEAssyBEStep).Sequence; info.IS_BASE = UtilityHelper.IsYN(pp.Product.IsBase()); OutputMart.Instance.StepTarget.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="pegPart"/> /// <returns/> public PegPart CELL_PART_CHANGE(Mozart.SeePlan.Pegging.PegPart pegPart) { //MergedPegPart mp = pegPart as MergedPegPart; //foreach (FabPegPart pp in mp.Items) //{ // CellBom bom = CellCodeMaster.FindCellBomAtToList(pp.FabProduct.ShopID, pp.FabProduct.ProductID, "00001"); // if (bom != null) // { // FabProduct prod // BopHelper.FindProduct(pp.Product.sho // } //} return(pegPart); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <returns/> public Step GETLASTPEGGINGSTEP(Mozart.SeePlan.Pegging.PegPart pegPart) { try { string areaName = (Pegger.Current.CurrentModel as IPeggerModel2).CurrentArea.Name; if (areaName.IsNullOrEmpty() == false && areaName == "PRODUCTION_LINE") { return((pegPart as MicronBEAssyBEPegPart).Product.Process.LastStep); } else { //MicronBEAssyProcess proc = new MicronBEAssyProcess("-"); //MicronBEAssyBEStep step = new MicronBEAssyBEStep("DieBank"); //proc.Steps.Add(step); return(null); } } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(default(Step)); } }