public IActionResult PcsCompliance(int week = -1, int year = -1) { PcsComplianceViewModel pcsComplianceViewModel = new PcsComplianceViewModel(); ComplianceCalculator complianceChecker = new ComplianceCalculator(_pcsReworkParameters, _pcsScoringRepository, _pcsToleranceParameter, _pcsParameterRepository, _pcsActiveTempParameters, _helperMethods, _materialDetailsRepository); List <BatchReport> reportsThisWeek; pcsComplianceViewModel.ShouldShowNextWeekLink = ShouldShowLinkForNextWeek(week); pcsComplianceViewModel.ShouldShowNextPrviousLink = ShouldShowLinkForPreviousWeek(week); pcsComplianceViewModel.RecipesWithRework = _pcsReworkParameters.GetListOfAllReworkParemeters().Select(x => x.RecipeName).ToList(); pcsComplianceViewModel.CurrentWeek = SetCurrentWeekIfNotSetByUser(week); reportsThisWeek = GetBatchesForSelectedWeek(week, year); if (reportsThisWeek.Count != 0) { pcsComplianceViewModel.DailyResults = complianceChecker.GetResultsForEachDay(reportsThisWeek); pcsComplianceViewModel.GenerateDataSet(); } else { pcsComplianceViewModel.NoReportsThisWeek = true; } return(View(pcsComplianceViewModel)); }
// GET: PcsReworkSettings public async Task <IActionResult> Index() { return(View(_pcsReworkParameters.GetListOfAllReworkParemeters())); }
public PcsRework(IPcsReworkParameters pcsReworkParameters, IHelperMethods helperMethods) { _pcsReworkParameters = pcsReworkParameters; _helperMethods = helperMethods; Parameters = _pcsReworkParameters.GetListOfAllReworkParemeters(); }