internal int GetCurrenStepWaitWipQty(AoEquipment aeqp, FabStep currentStep, string productVersion, decimal allowRunDownTime) { if (allowRunDownTime <= 0) { return(0); } FabAoEquipment eqp = aeqp.ToFabAoEquipment(); List <FabLot> wips = GetStepWipList(currentStep, WipType.Wait, productVersion); int qty = 0; foreach (var lot in wips) { //해당 설비에서 로딩가능한 대기재공인지 Lot if (eqp != null && EqpArrangeMaster.IsLoadable_CheckOnly(eqp, lot) == false) { continue; } //잔여 AllowTime 안에 Hold가 풀리는지 if (lot.IsHold) { Time remainHold = lot.HoldTime - (eqp.NowDT - lot.HoldStartTime); if ((decimal)remainHold.TotalHours > allowRunDownTime) { continue; } } //Min Qtime (최소대기시간) 내에 풀리는지? if (lot.CurrentFabPlan.LotFilterInfo.FilterType == DispatchFilter.MinQtime) { if ((decimal)lot.CurrentFabPlan.LotFilterInfo.RemainMinStayTime.TotalHours > allowRunDownTime) { continue; } } qty += lot.UnitQty; } return(qty); }
/// <summary> /// 나의 직전 Step(Sub포함) Target시간+Move시간(잔여시간) 이내에 TrackOut 될 수 있는 Lot수량 /// </summary> internal int GetPrevStepRunWipQty(AoEquipment aeqp, FabStep currentStep, string productVersion, DateTime targetTime) { List <FabLot> runWips = GetPrevStepWipList(currentStep, WipType.Run, productVersion); int qty = 0; foreach (var lot in runWips) { if (EqpArrangeMaster.IsLoadable_CheckOnly(aeqp as FabAoEquipment, lot)) { continue; } FabPlanInfo plan = lot.CurrentFabPlan; if (plan.IsLoaded) { AoEquipment prevEqp = AoFactory.Current.GetEquipment(plan.LoadedResource.Key); AoProcess proc = prevEqp.Processes[0]; Time tkOutTime = proc.GetUnloadingTime(lot); tkOutTime += TransferMaster.GetTransferTime(prevEqp, aeqp); if (targetTime < tkOutTime) { continue; } } else { Time tkOutTime = plan.TrackInTime + plan.AoBucketTime; if (targetTime < tkOutTime) { continue; } } qty += lot.UnitQty; } return(qty); }