//Post Process internal static void WriteUnpegHistory(FabPlanWip wip, string reason) { Outputs.UnpegHistory hist = new Outputs.UnpegHistory(); hist.VERSION_NO = ModelContext.Current.VersionNo; hist.FACTORY_ID = wip.FactoryID; hist.AREA_ID = wip.AreaID; hist.SHOP_ID = wip.ShopID; hist.STEP_ID = wip.StepID; hist.LOT_ID = wip.WipInfo.LotID; hist.UNPEG_REASON = reason; hist.REMAIN_QTY = wip.Qty; hist.PRODUCT_ID = wip.ProductID; hist.PRODUCT_VERSION = wip.ProductVersion; hist.PROCESS_ID = wip.ProcessID; hist.LOT_QTY = wip.Qty; hist.LOT_STATUS = wip.LotState.ToString(); hist.HOLD_CODE = wip.WipInfo.HoldCode; hist.WIP_PROCESS_ID = wip.WipInfo.WipProcessID; hist.WIP_STEP_ID = wip.WipInfo.WipStepID; hist.WIP_STATE = wip.WipInfo.WipState; hist.OWNER_TYPE = wip.WipInfo.OwnerType; OutputMart.Instance.UnpegHistory.Add(hist); }
/// <summary> /// </summary> /// <param name="x"/> /// <param name="y"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public int SORT_WIP0(MaterialInfo x, MaterialInfo y, ref bool handled, int prevReturnValue) { FabPlanWip a = x.Material as FabPlanWip; FabPlanWip b = y.Material as FabPlanWip; int cmp = 0; if (cmp == 0) { cmp = a.IsHold.CompareTo(b.IsHold); } //둘다 Hold일 경우 if (cmp == 0 && a.IsHold && b.IsHold) { //Hold > Move cmp = a.LotState.CompareTo(b.LotState); //가용시간 빠른 것 if (cmp == 0) { cmp = a.AvailableTime.CompareTo(b.AvailableTime); } } if (cmp == 0) { a.WipInfo.WipStateTime.CompareTo(b.WipInfo.WipStateTime); } if (cmp == 0) { cmp = a.WipInfo.Priority.CompareTo(b.WipInfo.Priority); } if (cmp == 0) { cmp = a.Qty.CompareTo(b.Qty); } if (cmp == 0) { cmp = a.ProductID.CompareTo(b.ProductID); } if (cmp == 0) { cmp = a.ProductVersion.CompareTo(b.ProductVersion); } return(cmp); }
/// <summary> /// </summary> /// <param name="target"/> /// <param name="m"/> /// <param name="isRun"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public bool CAN_PEG_MORE0(Mozart.SeePlan.Pegging.PegTarget target, Mozart.SeePlan.Pegging.IMaterial m, bool isRun, ref bool handled, bool prevReturnValue) { FabPlanWip wip = m.ToFabPlanWip(); FabPegTarget pt = target.ToFabPegTarget(); if (wip.IsHold == false) { return(true); } // Hold Peg 방지 옵션 //if (pt.CalcDate < wip.AvailableTime) // return false; return(true); }
/// <summary> /// </summary> /// <param name="pegPart"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public PegPart PREPARE_WIP0(PegPart pegPart, ref bool handled, PegPart prevReturnValue) { foreach (FabWipInfo wip in InputMart.Instance.FabWipInfo.Values) { FabPlanWip planWip = CreateHelper.CreatePlanWip(wip); //OwnerE 는 패깅하지 않음. if (wip.OwnerType == Constants.OwnerE) { PegHelper.WriteUnpegHistory(planWip, wip.OwnerType); continue; } InputMart.Instance.FabPlanWip.ImportRow(planWip); } return(pegPart); }
internal static void WritePeg(PegTarget target, IMaterial m, double qty) { Outputs.PegHistory hist = new Outputs.PegHistory(); FabStep step = target.PegPart.CurrentStage.Tag as FabStep; FabPegTarget pt = target as FabPegTarget; FabPlanWip wip = m as FabPlanWip; FabMoPlan mo = pt.MoPlan as FabMoPlan; var prod = (pt.PegPart as FabPegPart).Product as FabProduct; hist.VERSION_NO = ModelContext.Current.VersionNo; hist.FACTORY_ID = step.FactoryID; hist.AREA_ID = step.AreaID; hist.SHOP_ID = step.ShopID; hist.PRODUCT_ID = prod.ProductID; hist.PRODUCT_VERSION = wip.WipInfo.ProductVersion; hist.PRODUCT_TYPE = prod.ProductType.ToString(); hist.PROCESS_ID = prod.ProcessID; hist.STEP_ID = step.StepID; hist.PEG_QTY = qty; hist.LOT_ID = wip.Wip.LotID; hist.LOT_QTY = wip.Wip.UnitQty; hist.LOT_STATUS = wip.LotState.ToString(); hist.TARGET_DATE = pt.CalcDate; hist.TARGET_PRODUCT_ID = pt.ProductID; //hist.TARGET_PROCESS_ID = pt.ProcessID; hist.DEMAND_ID = mo.DemandID; hist.DEMAND_PRODUCT_ID = mo.PreMoPlan.ProductID; hist.DEMAND_PLAN_DATE = mo.DueDate; hist.DEMAND_QTY = mo.Qty; hist.WIP_PROCESS_ID = wip.WipInfo.WipProcessID; hist.WIP_STEP_ID = wip.WipInfo.WipStepID; hist.WIP_STATE = wip.WipInfo.WipState; hist.OWNER_TYPE = wip.WipInfo.OwnerType; hist.TARGET_KEY = pt.TargetKey; OutputMart.Instance.PegHistory.Add(hist); }
private void WriteUnpegHistory(FabPlanWip planWip) { if (planWip.Qty == 0) { return; } if (planWip.Qty == 0) { PegHelper.WriteUnpegHistory(planWip, "LOT_KIT_REMAIN"); } else if (planWip.MapCount == 0) { PegHelper.WriteUnpegHistory(planWip, "NO TARGET"); } else if (planWip.Qty > 0) { PegHelper.WriteUnpegHistory(planWip, "EXCESS"); } }
internal static void PrePareBankWip() { if (CellBankPlanWips == null) { CellBankPlanWips = new Dictionary <string, List <FabPlanWip> >(); } foreach (var item in InputMart.Instance.CellBankWips.Values) { FabPlanWip wip = CreateHelper.CreatePlanWip(item); string key = LcdHelper.CreateKey(item.ShopID, item.WipStepID); List <FabPlanWip> list; if (CellBankPlanWips.TryGetValue(key, out list) == false) { CellBankPlanWips.Add(key, list = new List <FabPlanWip>()); } list.Add(wip); } }