From 3e4ce66d0315db9a2ee03e9af3a33027582aa20c Mon Sep 17 00:00:00 2001 From: yoganandhank Date: Thu, 7 Mar 2024 12:37:22 +0000 Subject: [PATCH] Updated controller Updated controller file --- contoller/Maincontroller.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/contoller/Maincontroller.java b/contoller/Maincontroller.java index 4436f2e..2134b69 100644 --- a/contoller/Maincontroller.java +++ b/contoller/Maincontroller.java @@ -1,6 +1,7 @@ package in.gov.chennaicorporation.gccoffice.pgr.contoller; import java.util.ArrayList; + import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; @@ -117,6 +118,8 @@ public class Maincontroller { @GetMapping("/dashboard") public String home(Model model, + @RequestParam(required = false) String sFrDate, + @RequestParam(required = false) String sToDate, @RequestParam(required = false) String DEPT_NAME, @RequestParam(required = false) String DEPTID) { System.out.println("ageanalysislist"); @@ -127,13 +130,13 @@ public class Maincontroller { // DEPTID is provided, call the query method if( DEPT_NAME!=null && !DEPT_NAME.isEmpty() && DEPTID!=null && !DEPTID.isEmpty() ) { - List> reopenzonewisedashboardList = reopenzonewiseDaskboards.getReopenZonewisedashboardquery(DEPTID); - List> zonewisedashboardList = zonewiseDaskboards.getzonewisedaskboardQuery(DEPTID); + List> reopenzonewisedashboardList = reopenzonewiseDaskboards.getReopenZonewisedashboardquery(sFrDate,sToDate,DEPTID); + List> zonewisedashboardList = zonewiseDaskboards.getzonewisedaskboardQuery(sFrDate,sToDate,DEPTID); model.addAttribute("reopenzonewisedashboardList", reopenzonewisedashboardList); model.addAttribute("zonewisedashboardList", zonewisedashboardList); - List> ageanalysisdashboardList = ageanalysisDaskboards.getdashboardquery(DEPT_NAME); + List> ageanalysisdashboardList = ageanalysisDaskboards.getdashboardquery(sFrDate,sToDate,DEPT_NAME); model.addAttribute("ageanalysisdashboardList", ageanalysisdashboardList); @@ -143,6 +146,8 @@ public class Maincontroller { model.addAttribute("complaintdept1",complaintdept1); model.addAttribute("DEPT_NAME", DEPT_NAME); model.addAttribute("DEPTID", DEPTID); + model.addAttribute("sFrDate", sFrDate); + model.addAttribute("sToDate", sToDate); return "modules/pgr/index"; }