public IActionResult viewRetrieval(List <string> req)
        {
            List <Requisition> selectedReq = requisitionService.getRequisitionsByIds(req);

            selectedReq.ForEach(x => x.status = ReqStatus.COLLECTION);
            dbcontext.UpdateRange(selectedReq);
            dbcontext.SaveChanges();
            System.Diagnostics.Debug.WriteLine("Selected Requests: " + selectedReq.Count);
            ViewData["Requisitions"] = selectedReq;

            List <RequisitionDetail> selectedReqD = new List <RequisitionDetail>();

            foreach (var r in selectedReq)
            {
                System.Diagnostics.Debug.WriteLine("Starting to loop through requisitions: " + "1");
                List <RequisitionDetail> rds = (from rd in dbcontext.requisitionDetails
                                                where rd.Requisition == r
                                                select rd).ToList();
                foreach (var rd in rds)
                {
                    System.Diagnostics.Debug.WriteLine("Checking for rd: " + rd.Id);
                    selectedReqD.Add(rd);
                }
            }
            //Retrieval List Generation Starts here
            ViewData["totalItemQty"] = rservice.getTotalQtyPerItem(selectedReqD);
            Dictionary <string, List <RequisitionDetail> > reqPerIt = rservice.getReqDetailPerItem(selectedReqD);

            rservice.recommendQty(reqPerIt);
            ViewData["reqPerDept"] = rservice.getReqPerDeptPerItem(reqPerIt);
            string   userid = HttpContext.Session.GetString("userId");
            Employee emp    = deptService.findEmployeeById(userid);

            ViewData["user"] = emp;
            return(View());
        }