private PcsParameterTotals GetAllActiveDropTemps(List <BatchReport> todaysReports)
        {
            List <IPcsIndividualParameters> temps = new List <IPcsIndividualParameters>();
            var activeTempLimits = _pcsActiveTempParameters.GetAllTempParameters().Result;

            foreach (var report in todaysReports)
            {
                Vessel  mainMixerVessel = report.AllVessels.Where(x => x.VesselType == Vessel.VesselTypes.MainMixer).First();
                decimal dropTemp        = _helperMethods.GetTemperatureOfActiveDrop(mainMixerVessel);
                if (activeTempLimits.Any(x => x.Recipe == report.Recipe))
                {
                    temps.Add(new PcsActiveTemps("Active Drop Temp", report.Campaign.ToString() + "-" + report.BatchNo.ToString(), report.Recipe, dropTemp, report.RecipeType, _pcsActiveTempParameters, _pcsToleranceParameter));
                }
                else
                {
                    Debug.WriteLine($"Compliance checker (function GetAllActiveDropTemps) could not retrieve limits for {report.Recipe} therefore it was ignored");
                }
            }

            return(new PcsParameterTotals("Actives Drop Temp", temps, _pcsScoringRepository));
        }
Esempio n. 2
0
 // GET: PcsTempTargetsSettings
 public async Task <IActionResult> Index()
 {
     return(View(await _pcsActiveTempParameters.GetAllTempParameters()));
     //return View(await _context.PcsTempsTargets.ToListAsync());
 }