private IEnumerable <BlackMaple.MachineFramework.MaterialToSendToExternalQueue> FindSendToExternalQueue(IEnumerable <LogMaterialAndPath> mats) { var ret = new List <BlackMaple.MachineFramework.MaterialToSendToExternalQueue>(); foreach (var mat in mats) { JobPlan job = GetJob(mat.Unique); if (job != null) { var q = job.GetOutputQueue(process: mat.Mat.Process, path: mat.Path); if (!string.IsNullOrEmpty(q) && _settings.ExternalQueues.ContainsKey(q)) { ret.Add(new BlackMaple.MachineFramework.MaterialToSendToExternalQueue() { Server = _settings.ExternalQueues[q], PartName = mat.PartName, Queue = q, Serial = _log.GetMaterialDetails(mat.Mat.MaterialID)?.Serial }); } } } return(ret); }
private Dictionary <long, string> FindUnloadQueues(IEnumerable <LogMaterialAndPath> mats) { var ret = new Dictionary <long, string>(); foreach (var mat in mats) { JobPlan job = GetJob(mat.Unique); if (job != null) { var q = job.GetOutputQueue(process: mat.Mat.Process, path: mat.Path); if (!string.IsNullOrEmpty(q) && _settings.Queues.ContainsKey(q)) { ret[mat.Mat.MaterialID] = q; } } } return(ret); }