Browse Source

First commit..

master
unknown 3 years ago
commit
bf593dbf07
  1. 189
      contoller/ApiController.java
  2. 460
      contoller/Maincontroller.java
  3. 292
      contoller/PgrApiController.java
  4. 37
      dbconnection/DBConnection.java
  5. 8
      model/pgrreport.java
  6. 1555
      pgr/allreportlist.html
  7. 1691
      pgr/index.html
  8. 246
      pgr/qaqc.html
  9. 270
      pgr/useridageanalysis.html
  10. 258
      pgr/useridwisereport/ageanalysis.html
  11. 440
      pgr/useridwisereport/complaintreports/ageanalysiscomplaintslist.html
  12. 421
      pgr/useridwisereport/complaintreports/mobileageanalysiscomplaintlist.html
  13. 420
      pgr/useridwisereport/complaintreports/reopenzonecomplaintlist.html
  14. 362
      pgr/useridwisereport/complaintreports/zonecomplaintlist.html
  15. 267
      pgr/useridwisereport/mobileageanalysis.html
  16. 257
      pgr/useridwisereport/reopenedzonewise.html
  17. 299
      pgr/useridwisereport/zonewise.html
  18. 106
      repository/Options.java
  19. 25
      repository/Rowmappercomplaintgroup.java
  20. 23
      repository/Rowmappercomplainttype.java
  21. 94
      service/AgeAnalysisComplaintDetails.java
  22. 133
      service/AgeAnalysisComplaintReports.java
  23. 140
      service/AgeAnalysisDaskboards.java
  24. 139
      service/AgeAnalysisReports.java
  25. 170
      service/AllReports.java
  26. 11
      service/HtmlEntityDecoder.java
  27. 89
      service/MobileAgeAnalysisComplaintDetails.java
  28. 137
      service/MobileAgeAnalysisComplaintReports.java
  29. 129
      service/MobileAgeAnalysisReports.java
  30. 114
      service/QaQcReports.java
  31. 150
      service/ReopenZoneWiseDaskboards.java
  32. 104
      service/ReopenZonewiseComplaintDetails.java
  33. 156
      service/ReopenZonewiseComplaintReports.java
  34. 128
      service/ReopenZonewiseReports.java
  35. 155
      service/ZoneWiseDaskboards.java
  36. 98
      service/ZonewiseComplaintDetails.java
  37. 123
      service/ZonewiseComplaintReports.java
  38. 132
      service/ZonewiseReports.java

189
contoller/ApiController.java

@ -0,0 +1,189 @@
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;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisComplaintReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.AllReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.QaQcReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZonewiseComplaintReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZonewiseReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseComplaintDetails;
import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseComplaintReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseReports;
@RestController
@RequestMapping("/pgr/api")
public class ApiController {
@Autowired
private AllReports allreports;
private QaQcReports qaqcreports;
private ZonewiseReports zonewisereports;
private ReopenZonewiseReports reopenzonewisereports;
private AgeAnalysisReports ageanalysisreports;
private ZonewiseComplaintReports zonecomplaintreports;
private ReopenZonewiseComplaintReports reopenzonecomplaintreports;
private AgeAnalysisComplaintReports ageanalysiscomplaintreports;
private ZonewiseComplaintDetails zonecomplaintdetails;
@Autowired
public ApiController(
AllReports allreports,
QaQcReports qaqcreports,
ZonewiseReports zonewisereports,
ZonewiseComplaintReports zonecomplaintreports,
ZonewiseComplaintDetails zonecomplaintdetails,
ReopenZonewiseReports reopenzonewisereports,
AgeAnalysisReports ageanalysisreports,
ReopenZonewiseComplaintReports reopenzonecomplaintreports,
AgeAnalysisComplaintReports ageanalysiscomplaintreports) {
this.allreports=allreports;
this.qaqcreports=qaqcreports;
this.zonewisereports=zonewisereports;
this.reopenzonewisereports=reopenzonewisereports;
this.ageanalysisreports=ageanalysisreports;
this.zonecomplaintreports=zonecomplaintreports;
this.reopenzonecomplaintreports=reopenzonecomplaintreports;
this.ageanalysiscomplaintreports=ageanalysiscomplaintreports;
this.zonecomplaintdetails=zonecomplaintdetails;
}
@GetMapping("/allreportlist")
public List<Map<String, Object>> Allreport(
@RequestParam(required = false) String sFrDate,
@RequestParam(required = false) String sToDate,
@RequestParam(required = false) String sRptGroup,
@RequestParam(required = false) String sRptType,
@RequestParam(required = false) String cbCompStatus,
@RequestParam(required = false) String mode){
List<Map<String, Object>> pgrreportlist = new ArrayList<>();
// Pass the additional parameters to the check method
if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() ) {
pgrreportlist= allreports.check(sFrDate, sToDate, sRptGroup, sRptType, cbCompStatus,mode);
}
return pgrreportlist;
}
@GetMapping("/qaqc")
public List<Map<String, Object>> Qaqc(
@RequestParam(required = false) String sFrDate,
@RequestParam(required = false) String sToDate){
System.out.println("qaqcreportlist... " + sFrDate + "..toDate...." + sToDate);
List<Map<String, Object>> qaqclist = new ArrayList<>();
if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() ) {
qaqclist= qaqcreports.check1(sFrDate, sToDate);
}
return qaqclist;
}
@GetMapping("/zonewise")
public List<Map<String, Object>> Zonewise(
@RequestParam(required = false) String sFrDate,
@RequestParam( required = false) String sToDate,
@RequestParam(required = false) String DEPT_NAME){
System.out.println("zonewisereportlist");
List<Map<String, Object>> zonewiseList = new ArrayList<>();
if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
zonewiseList= zonewisereports.getZonewise(sFrDate, sToDate,DEPT_NAME);
}
return zonewiseList;
}
@GetMapping("/reopenedzonewise")
public List<Map<String, Object>> Reopenzone(
@RequestParam(required = false) String sFrDate,
@RequestParam( required = false) String sToDate,
@RequestParam(required = false) String DEPT_NAME){
System.out.println("reopenzonewisereportlist");
List<Map<String, Object>> reopenzonewiseList = new ArrayList<>();
if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
reopenzonewiseList= reopenzonewisereports.getReopenZonewise(sFrDate, sToDate,DEPT_NAME);
}
return reopenzonewiseList;
}
@GetMapping("/ageanalysis")
public List<Map<String, Object>> Ageanalysis(
@RequestParam(required = false) String sFrDate,
@RequestParam( required = false) String sToDate,
@RequestParam(required = false) String DEPT_NAME){
System.out.println("ageanalysisreportlist");
List<Map<String, Object>> ageanalysisList = new ArrayList<>();
if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
ageanalysisList= ageanalysisreports.getAgeAnalysiswise(sFrDate, sToDate,DEPT_NAME);
}
return ageanalysisList;
}
@GetMapping("/zonecomplaintlist")
public List<Map<String, Object>> ZoneComplaintList(
@RequestParam(required = false) String sFrDate,
@RequestParam( required = false) String sToDate,
@RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
@RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId) {
System.out.println("zonecomplaintlist");
List<Map<String, Object>> zoneComplaintList = new ArrayList<>();
if(deptId!=null && pgrUserId!=null ) {
zoneComplaintList= zonecomplaintreports.getZoneWiseComplaints(sFrDate,sToDate,deptId, pgrUserId);
}
return zoneComplaintList;
}
@GetMapping("/reopenzonecomplaintlist")
public List<Map<String, Object>> ReopenZoneComplaintList(
@RequestParam(required = false) String sFrDate,
@RequestParam( required = false) String sToDate,
@RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
@RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId){
System.out.println("reopenzonecomplaintlist");
List<Map<String, Object>> reopenzoneComplaintList = new ArrayList<>();
if(deptId!=null && pgrUserId!=null ) {
reopenzoneComplaintList= reopenzonecomplaintreports.getReopenZoneWiseComplaints(sFrDate,sToDate,deptId, pgrUserId);
}
return reopenzoneComplaintList;
}
@GetMapping("/ageanalysiscomplaintslist")
public List<Map<String, Object>> AgeAnalysisComplaintList(
@RequestParam(required = false) String sFrDate,
@RequestParam( required = false) String sToDate,
@RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
@RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId){
System.out.println("ageanalysiscomplaintlist");
List<Map<String, Object>> ageanalysisComplaintList = new ArrayList<>();
if(deptId!=null && pgrUserId!=null ) {
ageanalysisComplaintList= ageanalysiscomplaintreports.getAgeAnalysisComplaints(sFrDate,sToDate,deptId, pgrUserId);
}
return ageanalysisComplaintList;
}
}

460
contoller/Maincontroller.java

@ -0,0 +1,460 @@
package in.gov.chennaicorporation.gccoffice.pgr.contoller;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.client.RestTemplate;
import ch.qos.logback.core.recovery.ResilientSyslogOutputStream;
import in.gov.chennaicorporation.gccoffice.configuration.AppConfig;
import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisComplaintDetails;
import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisComplaintReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisDaskboards;
import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.AllReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.MobileAgeAnalysisComplaintDetails;
//import in.gov.chennaicorporation.gccoffice.pgr.service.MobileAgeAnalysisComplaintReports;
//import in.gov.chennaicorporation.gccoffice.pgr.service.MobileAgeAnalysisReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.QaQcReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZoneWiseDaskboards;
import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZonewiseComplaintDetails;
import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZonewiseComplaintReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZonewiseReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.ZoneWiseDaskboards;
import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseComplaintDetails;
import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseComplaintReports;
import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseReports;
@RequestMapping("/pgr")
@Controller("pgrController")
public class Maincontroller {
// private final RestTemplate restTemplate;
// private final AppConfig appConfig;
@Autowired
private ZoneWiseDaskboards zonewiseDaskboards;
private ReopenZoneWiseDaskboards reopenzonewiseDaskboards;
private AgeAnalysisDaskboards ageanalysisDaskboards;
private AllReports allReports;
private QaQcReports qaqcReports;
private ZonewiseReports zonewiseReports;
private ReopenZonewiseReports reopenzonewiseReports;
private AgeAnalysisReports ageanalysisReports;
//private MobileAgeAnalysisReports mobileageanalysisReports;
private ZonewiseComplaintReports zonewisecomplaintReports;
private ReopenZonewiseComplaintReports reopenzonewisecomplaintReports;
private AgeAnalysisComplaintReports ageanalysiscomplaintReports;
//private MobileAgeAnalysisComplaintReports mobileageanalysiscomplaintReports;
private ZonewiseComplaintDetails zonewisecomplaintDetails;
private ReopenZonewiseComplaintDetails reopenzonewisecomplaintDetails;
private AgeAnalysisComplaintDetails ageanalysisComplaintDetails;
private MobileAgeAnalysisComplaintDetails mobileageanalysisComplaintDetails;
@Autowired
public Maincontroller( RestTemplate restTemplate, AppConfig appConfig,
ZoneWiseDaskboards zonewiseDaskboards,
ReopenZoneWiseDaskboards reopenzonewiseDaskboards,
AgeAnalysisDaskboards ageanalysisDaskboards,
AllReports allReports, QaQcReports qaqcReports,
ZonewiseReports zonewiseReports, ReopenZonewiseReports reopenzonewiseReports,
AgeAnalysisReports ageanalysisReports,
//MobileAgeAnalysisReports mobileageanalysisReports,
ZonewiseComplaintReports zonewisecomplaintReports,
ReopenZonewiseComplaintReports reopenzonewisecomplaintReports,
AgeAnalysisComplaintReports ageanalysiscomplaintReports,
//MobileAgeAnalysisComplaintReports mobileageanalysiscomplaintReports,
ZonewiseComplaintDetails zonewisecomplaintDetails,
ReopenZonewiseComplaintDetails reopenzonewisecomplaintDetails,
AgeAnalysisComplaintDetails ageanalysisComplaintDetails,
MobileAgeAnalysisComplaintDetails mobileageanalysisComplaintDetails) {
/*
* this.restTemplate=restTemplate; this.appConfig=appConfig;
*/
this.zonewiseDaskboards=zonewiseDaskboards;
this.reopenzonewiseDaskboards=reopenzonewiseDaskboards;
this.ageanalysisDaskboards=ageanalysisDaskboards;
this.allReports=allReports;
this.qaqcReports=qaqcReports;
this.zonewiseReports=zonewiseReports;
this.reopenzonewiseReports=reopenzonewiseReports;
this.ageanalysisReports=ageanalysisReports;
//this.mobileageanalysisReports=mobileageanalysisReports;
this.zonewisecomplaintReports=zonewisecomplaintReports;
this.reopenzonewisecomplaintReports=reopenzonewisecomplaintReports;
this.ageanalysiscomplaintReports=ageanalysiscomplaintReports;
//this.mobileageanalysiscomplaintReports=mobileageanalysiscomplaintReports;
this.zonewisecomplaintDetails=zonewisecomplaintDetails;
this.reopenzonewisecomplaintDetails=reopenzonewisecomplaintDetails;
this.ageanalysisComplaintDetails=ageanalysisComplaintDetails;
this.mobileageanalysisComplaintDetails=mobileageanalysisComplaintDetails;
}
@GetMapping({"", "/", "/index"})
public String home(Model model)
{
return "modules/pgr/index";
}
//This mapping used for viewing bar and piechart
@GetMapping("/dashboard")
public String home(Model model,
@RequestParam(required = false) String DEPT_NAME,
@RequestParam(required = false) String DEPTID) {
System.out.println("ageanalysislist");
System.out.println("reopenzonewiselist");
// Check if DEPTID is provided (assuming DEPT_NAME is optional)
if (StringUtils.isNotBlank(DEPTID)) {
// DEPTID is provided, call the query method
List<Map<String, Object>> reopenzonewisedashboardList = reopenzonewiseDaskboards.getReopenZonewisedashboardquery(DEPTID);
List<Map<String, Object>> zonewisedashboardList = zonewiseDaskboards.getzonewisedaskboardQuery(DEPTID);
model.addAttribute("reopenzonewisedashboardList", reopenzonewisedashboardList);
model.addAttribute("zonewisedashboardList", zonewisedashboardList);
}
// Check if DEPT_NAME is provided
if (StringUtils.isNotBlank(DEPT_NAME)) {
List<Map<String, Object>> ageanalysisdashboardList = ageanalysisDaskboards.getdashboardquery(DEPT_NAME);
model.addAttribute("ageanalysisdashboardList", ageanalysisdashboardList);
}
model.addAttribute("DEPT_NAME", DEPT_NAME);
model.addAttribute("DEPTID", DEPTID);
return "modules/pgr/index";
}
//This mapping used for get all public complaints to view
@GetMapping("/allreportlist")
public String Allreport(Model model,
@RequestParam(required = false) String sFrDate,
@RequestParam(required = false) String sToDate,
@RequestParam(required = false) String sRptGroup,
@RequestParam(required = false) String sRptType,
@RequestParam(required = false) String cbCompStatus,
@RequestParam(required = false) String mode) {
System.out.println("allreportlist...fromDate... " + sFrDate + "..toDate...." + sToDate);
System.out.println("group : " + sRptGroup);
System.out.println("type : " + sRptType);
System.out.println("status : " + cbCompStatus);
System.out.println("mode : " + mode);
List<Map<String, Object>> pgrreportlist = new ArrayList<>();
// Pass the additional parameters to the check method
if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() ) {
pgrreportlist= allReports.check(sFrDate, sToDate, sRptGroup, sRptType, cbCompStatus,mode);
}
model.addAttribute("pgrreportlist", pgrreportlist);
model.addAttribute("sFrDate",sFrDate);
model.addAttribute("sToDate",sToDate);
model.addAttribute("sRptGroup",sRptGroup);
model.addAttribute("sRptType",sRptType==null?0:sRptType);
model.addAttribute("cbCompStatus",cbCompStatus==null?0:cbCompStatus);
model.addAttribute("mode",mode==null?0:mode);
return "modules/pgr/allreportlist";
}
//This mapping used for get to view QAQC reports
@GetMapping("/qaqc")
public String Qaqc(Model model,
@RequestParam(required = false) String sFrDate,
@RequestParam(required = false) String sToDate) {
System.out.println("qaqcreportlist... " + sFrDate + "..toDate...." + sToDate);
List<Map<String, Object>> qaqclist = new ArrayList<>();
// List<Map<String, Object>> qaqclist = qaqcReports.check1(sFrDate, sToDate);
if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() ) {
qaqclist= qaqcReports.check1(sFrDate, sToDate);
}
model.addAttribute("qaqclist", qaqclist);
model.addAttribute("sFrDate", sFrDate);
model.addAttribute("sToDate", sToDate);
return "modules/pgr/qaqc";
}
//This mapping used for to see each zone uisng userIDwise withreopen reports for all public complaints
@GetMapping("/useridwisereport/zonewise")
public String Zonewise(
Model model,
@RequestParam(required = false) String sFrDate,
@RequestParam( required = false) String sToDate,
@RequestParam(required = false) String DEPT_NAME) {
System.out.println("zonewisereportlist");
System.out.println("fromdate : " +sFrDate);
System.out.println("todate : " +sToDate);
System.out.println("deptname : " + DEPT_NAME);
List<Map<String, Object>> zonewiseList = new ArrayList<>();
if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
zonewiseList= zonewiseReports.getZonewise(sFrDate, sToDate,DEPT_NAME);
}
//List<Map<String, Object>> zonewiseList = zonewiseReports.getZonewise(sFrDate, sToDate,DEPT_NAME);
model.addAttribute("zonewiselist", zonewiseList);
model.addAttribute("sFrDate", sFrDate);
model.addAttribute("sToDate", sToDate);
model.addAttribute("DEPT_NAME", DEPT_NAME);
return "modules/pgr/useridwisereport/zonewise";
}
//This mapping used to see a complaints using in popup message with all details of public who complaint for that problem
@GetMapping("/zonecomplaintlist")
public String ZoneComplaintList(
Model model,
@RequestParam(required = false )String sFrDate,
@RequestParam(required = false )String sToDate,
@RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
@RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId) {
System.out.println("zonecomplaintlist");
List<Map<String, Object>> zoneComplaintList = new ArrayList<>();
// Pass the additional parameters to the check method
// List<Map<String, Object>> qaqclist = qaqcReports.check1(sFrDate, sToDate);
if(deptId!=null && pgrUserId!=null ) {
zoneComplaintList= zonewisecomplaintReports.getZoneWiseComplaints(sFrDate,sToDate,deptId, pgrUserId);
}
//List<Map<String, Object>> zoneComplaintList = zonewisecomplaintReports.getZoneWiseComplaints(deptId,pgrUserId);
model.addAttribute("zonecomplaintlist", zoneComplaintList);
return "modules/pgr/useridwisereport/complaintreports/zonecomplaintlist";
}
//This mapping used to get zone wise with reopen complaint details to passing with complaint number
@GetMapping("/zonecomplaintdetail")
public ResponseEntity<?> ZoneComplaintDetail(Model model,@RequestParam("complaintno") String COMPLAINTNUMBER) {
System.out.println("\nzonecomplaintdetails.........:"+COMPLAINTNUMBER);
List<Map<String, Object>> pgrreportList = zonewisecomplaintDetails.check(COMPLAINTNUMBER);
// model.addAttribute("zonecomplaintlist",zonewisecomplaintDetails.check(COMPLAINTID));
if (pgrreportList != null) {
return ResponseEntity.ok(pgrreportList);
} else {
return ResponseEntity.notFound().build();
}
}
//This mapping used for to see each zone uisng userIDwise without reopen reports for all public complaints
@GetMapping("/useridwisereport/reopenedzonewise")
public String Reopenzone(Model model,
@RequestParam(required = false) String sFrDate,
@RequestParam( required = false) String sToDate,
@RequestParam(required = false) String DEPT_NAME) {
System.out.println("reopenzonewisereportlist");
System.out.println("fromdate : " +sFrDate);
System.out.println("todate : " +sToDate);
System.out.println("deptname : " + DEPT_NAME);
List<Map<String, Object>> reopenzonewiseList = new ArrayList<>();
if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
reopenzonewiseList= reopenzonewiseReports.getReopenZonewise(sFrDate, sToDate,DEPT_NAME);
}
//List<Map<String, Object>> reopenzonewiseList = reopenzonewiseReports.getReopenZonewise();
model.addAttribute("reopenzonewiselist", reopenzonewiseList);
model.addAttribute("sFrDate", sFrDate);
model.addAttribute("sToDate", sToDate);
model.addAttribute("DEPT_NAME", DEPT_NAME);
// model.addAttribute("reopenzonewiselist", reopenzonewiseReports.check());
return "modules/pgr/useridwisereport/reopenedzonewise";
}
//This mapping used for to see each zone using userIDwise without reopen reports for all public complaints
@GetMapping("/reopenzonecomplaintlist")
public String ReopenZoneComplaintList(
Model model,
@RequestParam( required = false) String sFrDate,
@RequestParam( required = false) String sToDate,
@RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
@RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId) {
System.out.println("reopenzonecomplaintlist");
List<Map<String, Object>> reopenzoneComplaintList = new ArrayList<>();
if(deptId!=null && pgrUserId!=null ) {
reopenzoneComplaintList= reopenzonewisecomplaintReports.getReopenZoneWiseComplaints(sFrDate, sToDate,deptId, pgrUserId);
}
model.addAttribute("reopenzonecomplaintlist", reopenzoneComplaintList);
return "modules/pgr/useridwisereport/complaintreports/reopenzonecomplaintlist";
}
//This mapping used to get zone wise without reopen complaint details to passing with complaint number
@GetMapping("/reopenzonecomplaintdetail")
public ResponseEntity<?> ReopenZoneComplaintDetail(Model model,@RequestParam("complaintno") String COMPLAINTNUMBER) {
System.out.println("\nreopenzonecomplaintdetails.........:"+COMPLAINTNUMBER);
List<Map<String, Object>> pgrreportList = reopenzonewisecomplaintDetails.check(COMPLAINTNUMBER);
// model.addAttribute("zonecomplaintlist",zonewisecomplaintDetails.check(COMPLAINTID));
if (pgrreportList != null) {
return ResponseEntity.ok(pgrreportList);
} else {
return ResponseEntity.notFound().build();
}
}
//This mapping used for to see age analysis all zone wise reports
@GetMapping("/useridwisereport/ageanalysis")
public String Ageanalysis(Model model,
@RequestParam(required = false) String sFrDate,
@RequestParam( required = false) String sToDate,
@RequestParam(required = false) String DEPT_NAME) {
System.out.println("ageanalysisreportlist");
System.out.println("fromdte : " +sFrDate);
System.out.println("todte : " +sToDate);
System.out.println("deptname : " + DEPT_NAME);
List<Map<String, Object>> ageanalysisList = new ArrayList<>();
if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
ageanalysisList= reopenzonewiseReports.getReopenZonewise(sFrDate, sToDate,DEPT_NAME);
}
// List<Map<String, Object>> ageanalysisList = ageanalysisReports.getAgeAnalysiswise();
model.addAttribute("ageanalysislist", ageanalysisList);
model.addAttribute("sFrDate", sFrDate);
model.addAttribute("sToDate", sToDate);
model.addAttribute("DEPT_NAME", DEPT_NAME);
//model.addAttribute("ageanalysislist", ageanalysisReports.check());
return "modules/pgr/useridwisereport/ageanalysis";
}
@GetMapping("/ageanalysiscomplaintslist")
public String AgeAnalysisComplaintList(Model model,
@RequestParam(required = false)String sFrDate,
@RequestParam(required = false)String sToDate,
@RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
@RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId) {
System.out.println("ageanalysiscomplaintlist");
List<Map<String, Object>> ageanalysisComplaintList = new ArrayList<>();
// List<Map<String, Object>> ageanalysisComplaintList = ageanalysiscomplaintReports.getAgeAnalysisComplaints(deptId,pgrUserId);
if(deptId!=null && pgrUserId!=null ) {
ageanalysisComplaintList= ageanalysiscomplaintReports.getAgeAnalysisComplaints(sFrDate,sToDate,deptId, pgrUserId);
}
model.addAttribute("ageanalysiscomplaintlist", ageanalysisComplaintList);
//model.addAttribute("ageanalysiscomplaintlist",ageanalysiscomplaintReports.check());
return "modules/pgr/useridwisereport/complaintreports/ageanalysiscomplaintslist";
}
//This mapping used to get zone wise age analysis complaint details to passing with complaint number
@GetMapping("/ageanalysiscomplaintdetail")
public ResponseEntity<?> AgeAnalysisComplaintDetail(Model model,@RequestParam("complaintno") String COMPLAINTNUMBER) {
System.out.println("\nnageanalysiscomplaintdetails.........:"+COMPLAINTNUMBER);
List<Map<String, Object>> pgrreportList = ageanalysisComplaintDetails.check(COMPLAINTNUMBER);
// model.addAttribute("zonecomplaintlist",zonewisecomplaintDetails.check(COMPLAINTID));
if (pgrreportList != null) {
return ResponseEntity.ok(pgrreportList);
} else {
return ResponseEntity.notFound().build();
}
}
}

292
contoller/PgrApiController.java

@ -0,0 +1,292 @@
//package in.gov.chennaicorporation.gccoffice.pgr.contoller;
//
//import java.text.ParseException;
//
//import java.text.SimpleDateFormat;
//import java.util.ArrayList;
//import java.util.Date;
//import java.util.List;
//import java.util.Map;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.core.io.InputStreamResource;
//import org.springframework.core.io.Resource;
//import org.springframework.http.HttpHeaders;
//import org.springframework.http.HttpStatus;
//import org.springframework.http.MediaType;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisComplaintReports;
//import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisDaskboards;
//import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisReports;
//import in.gov.chennaicorporation.gccoffice.pgr.service.AllReports;
//import in.gov.chennaicorporation.gccoffice.pgr.service.MobileAgeAnalysisComplaintReports;
//import in.gov.chennaicorporation.gccoffice.pgr.service.MobileAgeAnalysisReports;
//import in.gov.chennaicorporation.gccoffice.pgr.service.QaQcReports;
//import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZonewiseComplaintReports;
//import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZonewiseReports;
//import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseComplaintDetails;
//import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseComplaintReports;
//import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseReports;
//
//@RestController
//@RequestMapping("/pgr/api")
//public class PgrApiController {
//
// @Autowired
// private AllReports allReports;
// private QaQcReports qaqcReports;
// private ZonewiseReports zonewiseReports;
//
// private ReopenZonewiseReports reopenzonewiseReports;
// private AgeAnalysisDaskboards ageanalysisDaskboards;
// private AgeAnalysisReports ageanalysisReports;
// private MobileAgeAnalysisReports mobileageanalysisReports;
// private ZonewiseComplaintReports zonewisecomplaintReports;
// private ReopenZonewiseComplaintReports reopenzonewisecomplaintReports;
// private AgeAnalysisComplaintReports ageanalysiscomplaintReports;
// private MobileAgeAnalysisComplaintReports mobileageanalysiscomplaintReports;
// private ZonewiseComplaintDetails zonewisecomplaintDetails;
//
//
// @Autowired
// public PgrApiController(AllReports allReports, QaQcReports qaqcReports,
// ZonewiseReports zonewiseReports, ReopenZonewiseReports reopenzonewiseReports,
// AgeAnalysisReports ageanalysisReports,
// MobileAgeAnalysisReports mobileAgeAnalysisReports,
// ZonewiseComplaintReports zonewisecomplaintReports,
// ReopenZonewiseComplaintReports reopenzonewisecomplaintReports,
// AgeAnalysisComplaintReports ageanalysiscomplaintReports,
// MobileAgeAnalysisComplaintReports mobileageanalysiscomplaintReports,
// ZonewiseComplaintDetails zonewisecomplaintDetails) {
// this.allReports= allReports;
// this.qaqcReports=qaqcReports;
// this.zonewiseReports=zonewiseReports;
// this.reopenzonewiseReports=reopenzonewiseReports;
// this.ageanalysisReports=ageanalysisReports;
// this.mobileageanalysisReports=mobileageanalysisReports;
// this.zonewisecomplaintReports=zonewisecomplaintReports;
// this.reopenzonewisecomplaintReports=reopenzonewisecomplaintReports;
// this.ageanalysiscomplaintReports=ageanalysiscomplaintReports;
// this.mobileageanalysiscomplaintReports=mobileageanalysiscomplaintReports;
// this.zonewisecomplaintDetails=zonewisecomplaintDetails;
// }
//
// @GetMapping("/getAllReports")
// public List getAllReports() {
//
// System.out.println("AllReports Api...");
// return allReports.check(null, null, null, null, null, null);
// }
//
//
//// @GetMapping("/getMyQuery")
//// public String getMyQuery( @RequestParam(required = false) String sFrDate,
//// @RequestParam(required = false) String sToDate,
//// @RequestParam(required = false) String sRptGroup,
//// @RequestParam(required = false) String sRptType,
//// @RequestParam(required = false) String cbCompStatus,
//// @RequestParam(required = false) String mode){
//// System.out.println("hi how are you");
//// List<Map<String, Object>> pgrreportlist = new ArrayList<>();
//// // Pass the additional parameters to the check method
//// if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() ) {
//// pgrreportlist= allReports.check(sFrDate, sToDate, sRptGroup, sRptType, cbCompStatus,mode);
//// }
////
////
//// return pgrreportlist();
//// }
//
//
//
// @GetMapping("/getMyQuery")
// public List<Map<String, Object>> getMyQuery(
// @RequestParam(required = false) String sFrDate,
// @RequestParam(required = false) String sToDate,
// @RequestParam(required = false) String sRptGroup,
// @RequestParam(required = false) String sRptType,
// @RequestParam(required = false) String cbCompStatus,
// @RequestParam(required = false) String mode) {
//
// System.out.println("Get all reports.....");
// List<Map<String, Object>> pgrreportlist = new ArrayList<>();
//
// // Pass the additional parameters to the check method
// if (sFrDate != null && !sFrDate.isEmpty() && sToDate != null && !sToDate.isEmpty()) {
// pgrreportlist = allReports.check(sFrDate, sToDate, sRptGroup, sRptType, cbCompStatus, mode);
// }
//
// return pgrreportlist;
// }
//
//// @GetMapping("/getMyQuery")
//// public ResponseEntity<List<Map<String, Object>>> getMyQuery(
//// @RequestParam(required = false) String sFrDate,
//// @RequestParam(required = false) String sToDate,
//// @RequestParam(required = false) String sRptGroup,
//// @RequestParam(required = false) String sRptType,
//// @RequestParam(required = false) String cbCompStatus,
//// @RequestParam(required = false) String mode) {
////
//// // Log statement
//// System.out.println("Request received with parameters: " + sFrDate + ", " + sToDate + ", " + sRptGroup + ", " + sRptType + ", " + cbCompStatus + ", " + mode);
////
//// List<Map<String, Object>> pgrreportlist = new ArrayList<>();
////
//// // Pass the additional parameters to the check method
//// if (sFrDate != null && !sFrDate.isEmpty() && sToDate != null && !sToDate.isEmpty()) {
//// pgrreportlist = allReports.check(sFrDate, sToDate, sRptGroup, sRptType, cbCompStatus, mode);
//// }
////
//// // Return the response in JSON format
//// return new ResponseEntity<>(pgrreportlist, HttpStatus.OK);
//// }
//
//
//
//
// @GetMapping("/dashboard")
// public Map<String, Object> getDashboardData(@RequestParam(required = false) String DEPT_NAME) {
// // Call your service method to get the dashboard data based on the department
// List<Map<String, Object>> ageanalysisdashboardList = ageanalysisDaskboards.getdashboardquery(DEPT_NAME);
//
// // Assuming you want to return the first item from the list (you may need to adjust this based on your actual logic)
// Map<String, Object> result = ageanalysisdashboardList.isEmpty() ? Map.of() : ageanalysisdashboardList.get(0);
//
// return result;
// }
//
// @GetMapping("/filtered-reports")
//
// public List<Map<String, Object>> filterReports(@RequestParam("sFrDate") String sFrDate,@RequestParam("sToDate") String sToDate){
//
// // Set the dates in the service
//
// allReports.setdates(sFrDate, sToDate);
//
//
//
// // Call the check method to get the filtered data
//
// List<Map<String, Object>> filteredReports = allReports.check(sFrDate, sToDate, sToDate, sToDate, sToDate);
//
//
//
// return filteredReports;
//
// }
//
// @GetMapping("/getqaqcQuery")
// public List getqaqcQuery(){
// System.out.println("hi how are you qaqc");
// return qaqcReports.check1();
// }
//
// @GetMapping("/getzoneQuery")
// public List getzoneQuery(){
// System.out.println("hi how are you zonewise");
// return zonewiseReports.check();
// }
//
// @GetMapping("/getzonecomplaintQuery")
// public List getzonecomplaintQuery(@PathVariable String nos){
// System.out.println("hi how are you zonewisecomplaints");
// return zonewisecomplaintReports.check(nos, nos, nos, nos, nos, nos, nos);
// }
//
// @GetMapping("/getzonecomplaintdetailsQuery")
// public List getzonecomdetailsQuery(@PathVariable String COMPLAINTNUMBER){
// System.out.println("hi how are you zonewisecomplaintsdetails");
// return zonewisecomplaintDetails.check(COMPLAINTNUMBER);
// }
//
// @GetMapping("/getreopenzoneQuery")
// public List getreopenzoneQuery(){
// System.out.println("hi how are you reopenzonewise");
// return reopenzonewiseReports.check();
// }
//
// @GetMapping("/getreopenzonecomplaintQuery")
// public List getreopenzonecomplaintQuery(){
// System.out.println("hi how are you reopenzonewisecomplaints");
// return reopenzonewisecomplaintReports.check();
// }
//
//
//
// @GetMapping("/getageanalysisQuery")
// public List getageanalysisQuery(){
// System.out.println("hi how are you ageanalysis");
// return ageanalysisReports.check();
// }
//
// @GetMapping("/getageanalysiscomplaintQuery")
// public List getageanalysiscomplaintQuery(){
// System.out.println("hi how are you ageanalysiscomplaints");
// return ageanalysiscomplaintReports.check();
// }
//
// @GetMapping("/getmobileageanalysisQuery")
// public List getmobileageanalysisQuery(){
// System.out.println("hi how are you mobileageanalysis");
// return mobileageanalysisReports.check();
// }
//
// @GetMapping("/getmobileageanalysiscomplaintQuery")
// public List getmobileageanalysiscomplaintQuery(){
// System.out.println("hi how are you mobileageanalysiscomplaints");
// return mobileageanalysiscomplaintReports.check();
// }
//
// @GetMapping("/getreports")
// public ResponseEntity<Resource> getreports(@RequestParam String sFrDate,
// @RequestParam String sToDate
// ) {
//
//
// System.out.println(sFrDate+" "+sToDate);
// String datetype;
// String type = "";
// if(type.equals("new")) {
// datetype="ct.entrydate";
// }else if(type.equals("modify")) {
// datetype="mt.modifydate";
// }
// else {
// datetype=type;
// }
// SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd");
// SimpleDateFormat outputFormat = new SimpleDateFormat("dd/MM/yyyy");
// String frDate="";
// String toDate="";
// try {
//
// Date sFrdate = inputFormat.parse(sFrDate);
// Date sTodate = inputFormat.parse(sToDate);
//
// frDate = outputFormat.format(sFrdate);
// toDate = outputFormat.format(sTodate);
//
// System.out.println(frDate + " " + toDate );
//
//
// } catch (ParseException e) {
// e.printStackTrace();
// }
// return (ResponseEntity<Resource>) allReports.check(sFrDate,sToDate, toDate, toDate, toDate);
//
// // InputStreamResource file = new InputStreamResource(allReports.check(frDate,toDate));
//
//// return ResponseEntity.ok()
//// .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename)
//// .contentType(MediaType.parseMediaType("application/vnd.ms-excel"))
//// .body(file);
// }
//
//}

37
dbconnection/DBConnection.java

@ -0,0 +1,37 @@
package in.gov.chennaicorporation.gccoffice.pgr.dbconnection;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import org.springframework.stereotype.Component;
@Component
public class DBConnection {
private static Connection dbcon;
private static final String l_sUrl = "jdbc:oracle:thin:@10.1.0.14:1521:chncorp";
private static final String user="FAS";
private static final String password="FAS";
public static Connection getConnection() {
try {
Connection pgr_Con = DriverManager.getConnection(l_sUrl,user,password);
System.out.println("pgr_conn Con :"+ l_sUrl );
dbcon=pgr_Con;
return pgr_Con;
} catch (SQLException e) {
e.printStackTrace();
}
return dbcon;
}
}

8
model/pgrreport.java

@ -0,0 +1,8 @@
package in.gov.chennaicorporation.gccoffice.pgr.model;
public class pgrreport {
private String sDate;
private String eDate;
}

1555
pgr/allreportlist.html
File diff suppressed because it is too large
View File

1691
pgr/index.html
File diff suppressed because it is too large
View File

246
pgr/qaqc.html

@ -0,0 +1,246 @@
<!DOCTYPE html>
<html lang="en" dir="">
<meta charset="UTF-8">
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="wrapper">
<!-- header top menu Start -->
<header th:replace="~{fragments/modules/base/header :: header}"></header>
<!-- header top menu end -->
<div class="page-wrap">
<!--=============== Left Menu side Start ================-->
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
<!--=============== Left side End ================-->
<div class="main-content">
<div class="container-fluid">
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">
<i class="fa fa-list-alt bg-blue"></i>
<div class="d-inline">
<h5>PGR COMPLAINT QA/QC</h5>
<span>PGR COMPLAINT QA/QC Reports list module</span>
</div>
</div>
</div>
<div class="col-lg-4">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item">PGR Complaints</li>
<li class="breadcrumb-item">QA/QC Reports</li>
</ol>
</nav>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-block">
<form class="" action="" onsubmit="getReport()">
<div class="row">
<div class="col">
<label for="fromDate" class="">From Date</label>
<input type="date" class="form-control" id="fromDate" name="sFrDate" th:value="${sFrDate}" data-date-format="dd/mm/yy" required>
</div>
<div class="col">
<label for="toDate" class="">To Date</label>
<input type="date" class="form-control" id="toDate" name="sToDate" th:value="${sToDate}" data-date-format="dd/mm/yy" required>
</div>
<div class="col">
<br>
<button type="submit" class="btn btn-sm btn-primary btn-lg float-right">Search</button>
</div>
</div>
</form>
<br>
<div>
<table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="100%">
<thead class="thead-dark">
<tr role="row">
<th class="text-center no-sort" width="1%">S.No</th>
<th class="text-center" width="10%">Complaint Number</th>
<th class="text-center" width="10%">Department</th>
<th class="text-center" width="10%">Complaint Type Name</th>
<th class="text-center" width="10%">Complaint Date</th>
<th class="text-center" width="10%">Time</th>
<th class="text-center" width="10%">Complaint Details</th>
<th class="text-center" width="10%">Complaint Name</th>
<th class="text-center" width="10%">Complaint Mobile Number</th>
<th class="text-center" width="10%">Official Name</th>
<th class="text-center" width="10%">Official Mobile Number</th>
<th class="text-center" width="10%">Completion Date</th>
<th class="text-center" width="10%">Status</th>
</tr>
</theadclass="thead-dark">
<tbody>
<tr th:each="qaqc, i : ${qaqclist}" class="qaqcreportlist">
<td th:text="${i.count}">0</td>
<td class="text-center" th:text="${qaqc.COMPLAINTNUMBER }"></td>
<td class="text-center" th:text="${qaqc.DEPT_NAME }"></td>
<td class="text-center" th:text="${qaqc.COMPLAINTTYPENAME}"></td>
<td th:text="${qaqc.COMPLAINTDATE}"></td>
<td th:text="${qaqc.COMPLAINTTIME}"></td>
<td th:text="${qaqc.COMPLAINTDETAILS}"></td>
<td th:text="${qaqc.COMPLAINANTFIRSTNAME}"></td>
<td th:text="${qaqc.COMPLAINANTMOBILENUMBER}"></td>
<td th:text="${qaqc.USER_NAME}"></td>
<td th:text="${qaqc.MOBILE_NUMBER}"></td>
<td th:text="${qaqc.COMPLAINTCOMPLETIONDATE}"></td>
<td th:text="${qaqc.STATUS}"></td>
</tr>
</tbody>
<tfoot class="thead-dark">
<tr>
<th class="text-center">S.No</th>
<th class="text-center">Complaint Number</th>
<th class="text-center">Department</th>
<th class="text-center">Complaint Type Name</th>
<th class="text-center">Complaint Date</th>
<th class="text-center">Time</th>
<th class="text-center">Complaint Details</th>
<th class="text-center">Complaint Name</th>
<th class="text-center">Complaint Mobile Number</th>
<th class="text-center">Official Name</th>
<th class="text-center">Official Mobile Number</th>
<th class="text-center">Completion Date</th>
<th class="text-center">Status</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
</div>
</div>
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
<script th:replace="~{fragments/modules/base/script :: script}"></script>
<script>
$(document).ready(function() {
// DataTables buttons configuration
var buttons = [
{
extend: 'pageLength',
className: 'btn btn-warning'
},
{
title: 'Data export',
extend: 'copyHtml5',
text: 'Copy',
className: 'btn btn-secondary',
id: 'copyBtn'
},
{
extend: 'excelHtml5',
text: 'Excel',
className: 'btn btn-secondary',
id: 'excelBtn'
},
{
extend: 'csvHtml5',
text: 'CSV',
className: 'btn btn-secondary',
id: 'csvBtn'
},
{
extend: 'pdfHtml5',
text: 'PDF',
className: 'btn btn-secondary',
id: 'pdfBtn'
},
// Additional button
/* {
text: '<i class="far fa-plus-square"></i> Add New Asset',
className: 'btn btn-warning',
action: function () {
callAdd();
}
} */
];
$('#assetDatatable').DataTable( {
dom: 'Bftip',
columnDefs: [
{ targets: 'no-sort', orderable: false }
],
lengthMenu: [
[ 50, 100, 200, 500, -1 ],
[ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
],
scrollY: '50vh',
fixedColumns: {
left: 1,
right: 1
},
buttons: [buttons],
fixedHeader: true,
autoWidth: true,
responsive: true,
searching: false,
select: false,
processing: false,
} );
} );
function callAdd(){
$('#addForm').modal({
backdrop: 'static',
keyboard: false
})
$('#addForm').modal('show');
}
function getReport(){
alert("Hello Developers")
let sFrDate = document.getElementById("fromdate").value;
let sToDate = document.getElementById("todate").value;
/* let toDate = new Date(sToDate);
// Add one day to the toDate
toDate.setDate(toDate.getDate() + 1);
let modifiedToDate = toDate.toISOString().split('T')[0]; */
window.location.href='/qaqc?sFrDate='+sFrDate+'&sToDate='+sToDate;
}
</script>
</body>
</html>

270
pgr/useridageanalysis.html

@ -0,0 +1,270 @@
<!DOCTYPE html>
<html lang="en" dir="">
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="wrapper">
<!-- header top menu Start -->
<header th:replace="~{fragments/modules/base/header :: header}"></header>
<!-- header top menu end -->
<div class="page-wrap">
<!--=============== Left Menu side Start ================-->
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
<!--=============== Left side End ================-->
<div class="main-content">
<div class="container-fluid">
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">
<i class="ik ik-layers bg-blue"></i>
<div class="d-inline">
<h5>PGR COMPLAINT AGE ANALYSIS</h5>
<span>PGR COMPLAINT AGE ANALYSIS Reports list module</span>
</div>
</div>
</div>
<div class="col-lg-4">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item">PGR Complaints</li>
<li class="breadcrumb-item">User ID Wise Reports</li>
<li class="breadcrumb-item active" aria-current="page">PGR COMPLAINT AGE ANALYSIS Reports List</li>
</ol>
</nav>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-block">
<div>
<table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="100%">
<thead class="thead-dark">
<tr role="row">
<th class="text-center no-sort" width="1%">S.No</th>
<th class="text-center" width="10%">Department</th>
<th class="text-center" width="10%">User Name</th>
<th class="text-center" width="10%">Mobile Number</th>
<th class="text-center" width="10%">Nos</th>
</tr>
</theadclass="thead-dark">
<tbody>
<tr th:each="asset, i : ${assetlist}" class="assetlist">
<td th:text="${i.count}">0</td>
<td class="text-center" th:text="${asset.assetCategory.catName}"></td>
<td class="text-center" th:text="${asset.zoneId}"></td>
<td class="text-center" th:text="${asset.divId}"></td>
<td th:text="${asset.assetName}"></td>
<td th:text="${asset.assetAddress}"></td>
<td th:text="${asset.assetCode}"></td>
<td class="text-center" th:if="${asset.isActive}"><span class="badge bg-success">Active</span></td>
<td class="text-center" th:unless="${asset.isActive}"><span class="badge bg-warning">InActive</span></td>
<td class="text-center">
<a th:href="@{#}" th:onclick="return callEdit([[${asset.assetId}]])" data-animation="true" data-toggle="tooltip" data-placement="top" title="Edit" data-original-title="Edit"><i class="ik ik-edit f-16 text-green"></i></a>
<a th:href="@{#}" th:onclick="return callDelete([[${asset.assetName}]], [[${asset.assetId}]] );" data-animation="true" data-toggle="tooltip" data-placement="top" title="Delete" data-original-title="Delete"><i class="ik ik-trash-2 f-16 text-red"></i></a>
</td>
</tr>
</tbody>
<tfoot class="thead-dark">
<tr>
<th class="text-center">S.No</th>
<th class="text-center">Department</th>
<th class="text-center">User Name</th>
<th class="text-center">Mobile Number</th>
<th class="text-center">Nos</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
</div>
</div>
<div class="modal fade" id="addForm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterLabel">Master Category Form</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<div class="form-group row">
<label for="catName" class="col-sm-12 col-form-label">Asset Category Name</label>
<div class="col-sm-12">
<input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
</div>
</div>
<div class="form-group row">
<label for="isActive" class="col-sm-12 col-form-label">IsActive</label>
<div class="col-sm-12">
<select class="form-control" id="isActive" name="isActive" >
<option value=1>Yes</option>
<option value=0>No</option>
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="addForm2" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="#" th:action="@{/saveCategory}" method="post">
<div class="block block-rounded block-themed block-transparent mb-0">
<div class="block-header bg-primary-dark">
<h3 class="block-title">Master Category Form</h3>
<div class="block-options">
<button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close">
<i class="fa fa-fw fa-times"></i>
</button>
</div>
</div>
<div class="block-content">
<div class="form-group row">
<label for="exampleInputUsername2" class="col-sm-3 col-form-label">Username</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="exampleInputUsername2" placeholder="Username">
</div>
</div>
<div class="form-group row">
<label for="exampleInputEmail2" class="col-sm-3 col-form-label">Email</label>
<div class="col-sm-9">
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Email">
</div>
</div>
<div class="row">
<div class="mb-3">
<label for="catName">Asset Category Name</label>
<input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
<!--<small id="emailHelp" class="form-text text-muted">Set of assets grouped under this unique category</small>-->
</div>
<div class="mb-3">
<label class="form-check-label">IsActive</label>
<select class="form-select" id="isActive" name="isActive" >
<option value=1>Yes</option>
<option value=0>No</option>
</select>
</div>
</div><!--end row-->
</div><!--end modal-body-->
</div>
<div class="block-content block-content-full text-end bg-body">
<button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary btn-sm">Save</button>
</div><!--end modal-footer-->
</form>
</div><!--end modal-content-->
</div><!--end modal-dialog-->
</div><!--end modal-->
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
<script th:replace="~{fragments/modules/base/script :: script}"></script>
<script>
$(document).ready(function() {
// DataTables buttons configuration
var buttons = [
{
extend: 'pageLength',
className: 'btn btn-warning'
},
{
title: 'Data export',
extend: 'copyHtml5',
text: 'Copy',
className: 'btn btn-secondary',
id: 'copyBtn'
},
{
extend: 'excelHtml5',
text: 'Excel',
className: 'btn btn-secondary',
id: 'excelBtn'
},
{
extend: 'csvHtml5',
text: 'CSV',
className: 'btn btn-secondary',
id: 'csvBtn'
},
{
extend: 'pdfHtml5',
text: 'PDF',
className: 'btn btn-secondary',
id: 'pdfBtn'
},
// Additional button
{
text: '<i class="far fa-plus-square"></i> Add New Asset',
className: 'btn btn-warning',
action: function () {
callAdd();
}
}
];
$('#assetDatatable').DataTable( {
dom: 'Bftip',
columnDefs: [
{ targets: 'no-sort', orderable: false }
],
lengthMenu: [
[ 50, 100, 200, 500, -1 ],
[ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
],
scrollY: '50vh',
fixedColumns: {
left: 1,
right: 1
},
buttons: [buttons],
fixedHeader: true,
autoWidth: true,
responsive: true,
searching: false,
select: false,
processing: false,
} );
} );
function callAdd(){
$('#addForm').modal({
backdrop: 'static',
keyboard: false
})
$('#addForm').modal('show');
}
</script>
</body>
</html>

258
pgr/useridwisereport/ageanalysis.html

@ -0,0 +1,258 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="wrapper">
<!-- header top menu Start -->
<header th:replace="~{fragments/modules/base/header :: header}"></header>
<!-- header top menu end -->
<div class="page-wrap">
<!--=============== Left Menu side Start ================-->
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
<!--=============== Left side End ================-->
<div class="main-content">
<div class="container-fluid">
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">
<i class="fa fa-calendar bg-blue"></i>
<div class="d-inline">
<h5>PGR COMPLAINT AGE ANALYSIS</h5>
<span>PGR COMPLAINT AGE ANALYSIS Reports list module</span>
</div>
</div>
</div>
<div class="col-lg-4">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item">PGR Complaints</li>
<li class="breadcrumb-item">User ID Wise Reports</li>
<li class="breadcrumb-item active" aria-current="page">AGE ANALYSIS</li>
</ol>
</nav>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-block">
<form class="" action="" onsubmit="getReport()">
<div class="row">
<div class="col-md-6">
<label for="fromDate" class="">From Date</label>
<input type="date" class="form-control" id="fromDate"
name="sFrDate" th:value="${sFrDate}" data-date-format="dd/mm/yy" required>
</div>
<div class="col-md-6">
<label for="toDate" class="">To Date</label> <input
type="date" class="form-control" id="toDate" name="sToDate" th:value="${sToDate}"
data-date-format="dd/mm/yy" required>
</div>
</div>
<div class="col-md-12">
<label for="deptName">Select Department:</label> <select
class="form-control text-center" name="DEPT_NAME" id="zone">
<option value="0">All Zone</option>
<option value="NA-THIRUVOTTIYUR"
th:selected="${DEPT_NAME=='NA-THIRUVOTTIYUR'}">NA-THIRUVOTTIYUR</option>
<option value="NB-MANALI"
th:selected="${DEPT_NAME=='NB-MANALI'}">NB-MANALI</option>
<option value="NC-MADHAVARAM"
th:selected="${DEPT_NAME=='NC-MADHAVARAM'}">NC-MADHAVARAM</option>
<option value="ND-TONDIARPET"
th:selected="${DEPT_NAME=='ND-TONDIARPET'}">ND-TONDIARPET</option>
<option value="NE-ROYAPURAM"
th:selected="${DEPT_NAME=='NE-ROYAPURAM'}">NE-ROYAPURAM</option>
<option value="NF-THIRU-VI-KA NAGAR"
th:selected="${DEPT_NAME=='NF-THIRU-VI-KA NAGAR'}">NF-THIRU-VI-KA
NAGAR</option>
<option value="NG-AMBATTUR"
th:selected="${DEPT_NAME=='NG-AMBATTUR'}">NG-AMBATTUR</option>
<option value="NH-ANNA NAGAR"
th:selected="${DEPT_NAME=='NH-ANNA NAGAR'}">NH-ANNA
NAGAR</option>
<option value="NJ-TEYNAMPET"
th:selected="${DEPT_NAME=='NJ-TEYNAMPET'}">NJ-TEYNAMPET</option>
<option value="NK-KODAMBAKKAM"
th:selected="${DEPT_NAME=='NK-KODAMBAKKAM'}">NK-KODAMBAKKAM</option>
<option value="NL-VALASARAVAKKAM"
th:selected="${DEPT_NAME=='NL-VALASARAVAKKAM'}">NL-VALASARAVAKKAM</option>
<option value="NM-ALANDUR"
th:selected="${DEPT_NAME=='NM-ALANDUR'}">NM-ALANDUR</option>
<option value="NN-ADYAR" th:selected="${DEPT_NAME=='NN-ADYAR'}">NN-ADYAR</option>
<option value="NP-PERUNGUDI"
th:selected="${DEPT_NAME=='NP-PERUNGUDI'}">NP-PERUNGUDI</option>
<option value="NQ-SHOZHINGANALLUR"
th:selected="${DEPT_NAME=='NQ-SHOZHINGANALLUR'}">NQ-SHOZHINGANALLUR</option>
<option value="S-Chief Engineer Office (SWD, BRR, SP)"
th:selected="${DEPT_NAME=='S-Chief Engineer Office (SWD, BRR, SP)'}">S-Chief
Engineer Office (SWD, BRR, SP)</option>
<option value="SP-SPECIAL PROJECTS"
th:selected="${DEPT_NAME=='SP-SPECIAL PROJECTS'}">SP-SPECIAL
PROJECTS</option>
</select>
<!-- <div style="display: flex; justify-content: space-between; align-items: center; margin-top:11px;">
<button type="submit" class="btn btn-sm btn-primary">Submit</button>
</div> -->
</div>
<div class="col-md-6" style="display: flex; justify-content: space-between; align-items: center; margin-top:11px;">
<button type="submit" class=" btn btn-sm btn-primary btn-l">search</button>
</div>
</form>
<br>
<br>
<div>
<table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="100%">
<thead class="thead-dark">
<tr role="row">
<th class="text-center no-sort" width="1%">S.No</th>
<th class="text-center" width="10%">Department</th>
<th class="text-center" width="10%">User Name</th>
<th class="text-center" width="10%">Mobile Number</th>
<th class="text-center" width="10%">Nos</th>
</tr>
</theadclass="thead-dark">
<tbody>
<tr th:each="ageanwise, i : ${ageanalysislist}" class="ageanalysisreportlist">
<td th:text="${i.count}">0</td>
<td class="text-center" th:text="${ageanwise.DEPT_NAME}"></td>
<td class="text-center" th:text="${ageanwise.USER_NAME}"></td>
<td class="text-center" th:text="${ageanwise.MOBILENO}"></td>
<td><a
th:href="@{'/pgr/ageanalysiscomplaintslist/?Deptid=' + ${ageanwise.DEPTID} + '&PgrUserID=' + ${ageanwise.IDUSER} + '&nos=' + ${ageanwise.NOS}+ '&sFrDate=' + ${#strings.replace(sFrDate, '/', '%2F')} + '&sToDate=' + ${#strings.replace(sToDate, '/', '%2F')}}"
target="_self" th:text="${ageanwise.NOS}"
style="color: blue; text-decoration: underline;cursor:default;"> View
details </a></td>
</tr>
</tbody>
<tfoot class="thead-dark">
<tr>
<th class="text-center">S.No</th>
<th class="text-center">Department</th>
<th class="text-center">User Name</th>
<th class="text-center">Mobile Number</th>
<th class="text-center">Nos</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
</div>
</div>
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
<script th:replace="~{fragments/modules/base/script :: script}"></script>
<script>
$(document).ready(function() {
// DataTables buttons configuration
var buttons = [
{
extend: 'pageLength',
className: 'btn btn-warning'
},
{
title: 'Data export',
extend: 'copyHtml5',
text: 'Copy',
className: 'btn btn-secondary',
id: 'copyBtn'
},
{
extend: 'excelHtml5',
text: 'Excel',
className: 'btn btn-secondary',
id: 'excelBtn'
},
{
extend: 'csvHtml5',
text: 'CSV',
className: 'btn btn-secondary',
id: 'csvBtn'
},
{
extend: 'pdfHtml5',
text: 'PDF',
className: 'btn btn-secondary',
id: 'pdfBtn'
},
// Additional button
/* {
text: '<i class="far fa-plus-square"></i> Add New Asset',
className: 'btn btn-warning',
action: function () {
callAdd();
}
} */
];
$('#assetDatatable').DataTable( {
dom: 'Bftip',
columnDefs: [
{ targets: 'no-sort', orderable: false }
],
lengthMenu: [
[ 50, 100, 200, 500, -1 ],
[ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
],
scrollY: '50vh',
fixedColumns: {
left: 1,
right: 1
},
buttons: [buttons],
fixedHeader: true,
autoWidth: true,
responsive: true,
searching: false,
select: false,
processing: false,
} );
} );
function callAdd(){
$('#addForm').modal({
backdrop: 'static',
keyboard: false
})
$('#addForm').modal('show');
}
</script>
</body>
</html>

440
pgr/useridwisereport/complaintreports/ageanalysiscomplaintslist.html

@ -0,0 +1,440 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tamil+Font">
<style>
.tamil-text {
font-family: 'Tamil Font', sans-serif;
}
</style>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="wrapper">
<!-- header top menu Start -->
<header th:replace="~{fragments/modules/base/header :: header}"></header>
<!-- header top menu end -->
<div class="page-wrap">
<!--=============== Left Menu side Start ================-->
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
<!--=============== Left side End ================-->
<div class="main-content">
<div class="container-fluid">
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-6">
<div class="page-header-title">
<i class="fas fa-receipt bg-blue"></i>
<div class="d-inline">
<h5>PGR COMPLAINT AGE ANALYSIS</h5>
<span>PGR COMPLAINT AGE ANALYSIS Reports list module</span>
</div>
</div>
</div>
<div class="col-lg-6">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item">PGR Complaints</li>
<li class="breadcrumb-item">User ID Wise Reports</li>
<li class="breadcrumb-item active" aria-current="page">AGE ANALYSIS</li>
</ol>
</nav>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-block">
<div>
<table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="100%">
<thead class="thead-dark">
<tr role="row">
<th class="text-center no-sort" width="1%">S.No</th>
<th class="text-center" width="10%">Complaint No</th>
<th class="text-center" width="10%">Department</th>
<th class="text-center" width="10%">Complaint Type</th>
<th class="text-center" width="10%">Complaint Date</th>
<th class="text-center" width="10%">Complaint Details</th>
<th class="text-center" width="10%">Person Name</th>
<th class="text-center" width="10%">User Name</th>
</tr>
</theadclass="thead-dark">
<tbody>
<tr th:each="ageancomplaint, i : ${ageanalysiscomplaintlist}" class="ageanalysiscomplaintreportlists">
<td th:text="${i.count}">0</td>
<td><a href="#" th:onclick="return callview([[${ageancomplaint.COMPLAINTID}]]);" th:text="${ageancomplaint.COMPLAINTNUMBER}" data-bs-toggle="tooltip" data-bs-animation="true" data-bs-placement="top" title="View complaint details" style="color: blue; text-decoration: underline;cursor:default;"><i class="far fa-bookmark" style="font-size: 18px; "></i></a></td>
<td class="text-center" th:text="${ageancomplaint.DEPT_NAME}"></td>
<td th:text="${ageancomplaint.COMPLAINTTITLE}"></td>
<td th:text="${ageancomplaint.COMPLAINTDATE}"></td>
<td th:utext="${ageancomplaint.COMPLAINTDETAILS}"></td>
<!-- <td th:text="${ageancomplaint.COMPLAINTDETAILS}"></td> -->
<td th:text="${ageancomplaint.COMPLAINANTFIRSTNAME}"></td>
<td th:text="${ageancomplaint.USER_NAME}"></td>
</tr>
</tbody>
<tfoot class="thead-dark">
<tr>
<th class="text-center">S.No</th>
<th class="text-center">Complaint No</th>
<th class="text-center">Department</th>
<th class="text-center">Complaint Type</th>
<th class="text-center">Complaint Date</th>
<th class="text-center">Complaint Details</th>
<th class="text-center">Person Name</th>
<th class="text-center">User Name</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
</div>
</div>
----------------------------------------------------------
<div class="modal fade" id="infoForm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="exampleModalCenterLabel">Complaint Details</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<!-- <div id="modelbodyhtml">
<center>Loading...</center>
</div> -->
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comno">Complaint No:</label>
<input type="text" class="form-control text-center" name="comno" id="comno" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="dep">Department:</label>
<input type="text" class="form-control text-center" name="dep" id="dep" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comtyp">Complaint Type:</label>
<input type="text" class="form-control text-center" name="comtyp" id="comtyp" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comdat">Complaint Date</label>
<input type="text" class="form-control text-center" name="comdat" id="comdat" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="perna">Person Name:</label>
<input type="text" class="form-control text-center" name="perna" id="perna" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="addr">Address:</label>
<input type="text" class="form-control text-center" name="addr" id="addr" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="pinco">Pin-code:</label>
<input type="text" class="form-control text-center" name="pinco" id="pinco" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="mobno">Mobile Number:</label>
<input type="text" class="form-control text-center" name="mobno" id="mobno" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="email">Email</label>
<input type="text" class="form-control text-center" name="email" id="email" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comptit">Complaint Title:</label>
<input type="text" class="form-control text-center" name="comptit" id=comptit disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="compldet">Complaint Details:</label>
<!-- <textarea type="text" class="form-control text-center" name="compldet" id="compldet" disabled />
--> <textarea class="form-control " name="compldet" id="compldet" disabled ></textarea>
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comlo">Complaint Location:</label>
<textarea class="form-control " name="comlo" id="comlo" disabled ></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
<!-- </form> -->
</div>
</div>
</div>
----------------------------------------------------------
<div class="modal fade" id="addForm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterLabel">Master Category Form</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<div class="form-group row">
<label for="catName" class="col-sm-12 col-form-label">Asset Category Name</label>
<div class="col-sm-12">
<input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
</div>
</div>
<div class="form-group row">
<label for="isActive" class="col-sm-12 col-form-label">IsActive</label>
<div class="col-sm-12">
<select class="form-control" id="isActive" name="isActive" >
<option value=1>Yes</option>
<option value=0>No</option>
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="addForm2" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="#" th:action="@{/saveCategory}" method="post">
<div class="block block-rounded block-themed block-transparent mb-0">
<div class="block-header bg-primary-dark">
<h3 class="block-title">Master Category Form</h3>
<div class="block-options">
<button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close">
<i class="fa fa-fw fa-times"></i>
</button>
</div>
</div>
<div class="block-content">
<div class="form-group row">
<label for="exampleInputUsername2" class="col-sm-3 col-form-label">Username</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="exampleInputUsername2" placeholder="Username">
</div>
</div>
<div class="form-group row">
<label for="exampleInputEmail2" class="col-sm-3 col-form-label">Email</label>
<div class="col-sm-9">
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Email">
</div>
</div>
<div class="row">
<div class="mb-3">
<label for="catName">Asset Category Name</label>
<input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
<!--<small id="emailHelp" class="form-text text-muted">Set of assets grouped under this unique category</small>-->
</div>
<div class="mb-3">
<label class="form-check-label">IsActive</label>
<select class="form-select" id="isActive" name="isActive" >
<option value=1>Yes</option>
<option value=0>No</option>
</select>
</div>
</div><!--end row-->
</div><!--end modal-body-->
</div>
<div class="block-content block-content-full text-end bg-body">
<button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary btn-sm">Save</button>
</div><!--end modal-footer-->
</form>
</div><!--end modal-content-->
</div><!--end modal-dialog-->
</div><!--end modal-->
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
<script th:replace="~{fragments/modules/base/script :: script}"></script>
<script>
function callview(COMPLAINTNUMBER){
alert("Wait for Popup message");
$.ajax({
type: "GET",
url: '/pgr/ageanalysiscomplaintdetail',
data: {
'complaintno': COMPLAINTNUMBER
},
success: function (data) {
showcomplaintInfo(data);
}
});
return false;
}
function showcomplaintInfo(ageanalysiscomplaint){
$('#infoForm').modal({
backdrop: 'static',
keyboard: false
});
console.log(ageanalysiscomplaint[0]["COMPLAINTTITLE"]);
$("#comptit").val(ageanalysiscomplaint[0]["COMPLAINTTITLE"]);
$("#email").val(ageanalysiscomplaint[0]["COMPLAINANTEMAIL"]);
$("#comno").val(ageanalysiscomplaint[0]["COMPLAINTNUMBER"]);
$("#dep").val(ageanalysiscomplaint[0]["DEPT_NAME"]);
$("#comdat").val(ageanalysiscomplaint[0]["COMPLAINTDATE"]);
$("#perna").val(ageanalysiscomplaint[0]["COMPLAINANTFIRSTNAME"]);
$("#addr").val(ageanalysiscomplaint[0]["COMPLAINANTADDRESS"]);
$("#mobno").val(ageanalysiscomplaint[0]["MOBILENUMBER"]);
$("#pinco").val(ageanalysiscomplaint[0]["PINCODE"]);
$("#compldet").val(ageanalysiscomplaint[0]["COMPLAINTDETAILS"]);
$("#comlo").val(ageanalysiscomplaint[0]["COMPLAINTLOCATION"]);
//$("#testmail").html(zonecomplaint[0]["COMPLAINANTEMAIL"]); //testmail
/* document.getElementById("sno").value =zonecomplaint.i.count;
document.getElementById("comno").value =zonecomplaint.COMPLAINTNUMBER;
document.getElementById("dep").value =zonecomplaint.DEPT_NAME;
document.getElementById("comtyp").value =zonecomplaint.COMPLAINTTITLE;
document.getElementById("comdat").value =zonecomplaint.COMPLAINTDATE;
document.getElementById("perna").value =zonecomplaint.COMPLAINANTFIRSTNAME;
document.getElementById("addr").value =zonecomplaint.COMPLAINANTADDRESS;
document.getElementById("pinco").value =zonecomplaint.PINCODE;
document.getElementById("mobno").value =zonecomplaint.MOBILENUMBER;
document.getElementById("comptit").value =zonecomplaint.COMPLAINANTEMAIL;
document.getElementById("compldet").value =zonecomplaint.COMPLAINTDETAILS;
document.getElementById("comlo").value =zonecomplaint.COMPLAINTLOCATION; */
$('#infoForm').modal('show');
return false;
}
$(document).ready(function() {
// DataTables buttons configuration
var buttons = [
{
extend: 'pageLength',
className: 'btn btn-warning'
},
{
title: 'Data export',
extend: 'copyHtml5',
text: 'Copy',
className: 'btn btn-secondary',
id: 'copyBtn'
},
{
extend: 'excelHtml5',
text: 'Excel',
className: 'btn btn-secondary',
id: 'excelBtn'
},
{
extend: 'csvHtml5',
text: 'CSV',
className: 'btn btn-secondary',
id: 'csvBtn'
},
{
extend: 'pdfHtml5',
text: 'PDF',
className: 'btn btn-secondary',
id: 'pdfBtn',
title:'ZoneWise'
},
// Additional button
/*
{
text: '<i class="far fa-plus-square"></i> Add New Asset',
className: 'btn btn-warning',
action: function () {
callAdd();
}
}
*/
];
$('#assetDatatable').DataTable( {
dom: 'Bftip',
columnDefs: [
{ targets: 'no-sort', orderable: false }
],
lengthMenu: [
[ 50, 100, 200, 500, -1 ],
[ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
],
scrollY: '50vh',
fixedColumns: {
left: 1,
right: 1
},
buttons: [buttons],
fixedHeader: true,
autoWidth: true,
responsive: true,
searching: false,
select: false,
processing: false,
} );
} );
function callAdd(){
$('#addForm').modal({
backdrop: 'static',
keyboard: false
})
$('#addForm').modal('show');
}
function replaceEmojis(text) {
// Replace Unicode emoji sequences with corresponding HTML entities
return text.replace(/([\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F700}-\u{1F77F}\u{1F780}-\u{1F7FF}\u{1F800}-\u{1F8FF}\u{1F900}-\u{1F9FF}\u{1FA00}-\u{1FA6F}\u{2600}-\u{26FF}\u{2700}-\u{27BF}])/gu, (match) => `&#${match.codePointAt(0)};`);
}
</script>
</body>
</html>

421
pgr/useridwisereport/complaintreports/mobileageanalysiscomplaintlist.html

@ -0,0 +1,421 @@
<!DOCTYPE html>
<html lang="en" dir="">
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="wrapper">
<!-- header top menu Start -->
<header th:replace="~{fragments/modules/base/header :: header}"></header>
<!-- header top menu end -->
<div class="page-wrap">
<!--=============== Left Menu side Start ================-->
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
<!--=============== Left side End ================-->
<div class="main-content">
<div class="container-fluid">
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-6">
<div class="page-header-title">
<i class="fas fa-receipt bg-blue"></i>
<div class="d-inline">
<h5>PGR COMPLAINT Mobile AGE ANALYSIS</h5>
<span>PGR COMPLAINT Mobile AGE ANALYSIS Reports list module</span>
</div>
</div>
</div>
<div class="col-lg-6">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item">PGR Complaints</li>
<li class="breadcrumb-item">User ID Wise Reports</li>
<li class="breadcrumb-item active" aria-current="page">Mobile AGE ANALYSIS</li>
</ol>
</nav>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-block">
<div>
<table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="100%">
<thead class="thead-dark">
<tr role="row">
<th class="text-center no-sort" width="1%">S.No</th>
<th class="text-center" width="10%">Complaint No</th>
<th class="text-center" width="10%">Department</th>
<th class="text-center" width="10%">Complaint Type</th>
<th class="text-center" width="10%">Complaint Date</th>
<th class="text-center" width="10%">Complaint Details</th>
<th class="text-center" width="10%">Person Name</th>
<th class="text-center" width="10%">User Name</th>
</tr>
</theadclass="thead-dark">
<tbody>
<tr th:each="mobageancomplaint, i : ${mobileageanalysiscomplaintlist}" class="mobileageanalysiscomplaintreportlists">
<td th:text="${i.count}">0</td>
<td><a href="#" th:onclick="return callview([[${mobageancomplaint.COMPLAINTID}]]);" th:text="${mobageancomplaint.COMPLAINTNUMBER}" data-bs-toggle="tooltip" data-bs-animation="true" data-bs-placement="top" title="View complaint details" style="color: blue; text-decoration: underline;cursor:default;"><i class="far fa-bookmark" style="font-size: 18px; "></i></a></td>
<td class="text-center" th:text="${mobageancomplaint.DEPT_NAME}"></td>
<td class="text-center" th:text="${mobageancomplaint.COMPLAINTTITLE}"></td>
<td th:text="${mobageancomplaint.COMPLAINTDATE}"></td>
<td th:text="${mobageancomplaint.COMPLAINTDETAILS}"></td>
<td th:text="${mobageancomplaint.COMPLAINANTFIRSTNAME}"></td>
<td class="text-center" th:text="${mobageancomplaint.USER_NAME}"></td>
</tr>
</tbody>
<tfoot class="thead-dark">
<tr>
<th class="text-center">S.No</th>
<th class="text-center">Complaint No</th>
<th class="text-center">Department</th>
<th class="text-center">Complaint Type</th>
<th class="text-center">Complaint Date</th>
<th class="text-center">Complaint Details</th>
<th class="text-center">Person Name</th>
<th class="text-center">User Name</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
----------------------------------------------------------
<div class="modal fade" id="infoForm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="exampleModalCenterLabel">Complaint Details</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<!-- <div id="modelbodyhtml">
<center>Loading...</center>
</div> -->
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comno">Complaint No:</label>
<input type="text" class="form-control text-center" name="comno" id="comno" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="dep">Department:</label>
<input type="text" class="form-control text-center" name="dep" id="dep" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comtyp">Complaint Type:</label>
<input type="text" class="form-control text-center" name="comtyp" id="comtyp" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comdat">Complaint Date</label>
<input type="text" class="form-control text-center" name="comdat" id="comdat" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="perna">Person Name:</label>
<input type="text" class="form-control text-center" name="perna" id="perna" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="addr">Address:</label>
<input type="text" class="form-control text-center" name="addr" id="addr" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="pinco">Pin-code:</label>
<input type="text" class="form-control text-center" name="pinco" id="pinco" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="mobno">Mobile Number:</label>
<input type="text" class="form-control text-center" name="mobno" id="mobno" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="email">Email</label>
<input type="text" class="form-control text-center" name="email" id="email" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comptit">Complaint Title:</label>
<input type="text" class="form-control text-center" name="comptit" id=comptit disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="compldet">Complaint Details:</label>
<!-- <textarea type="text" class="form-control text-center" name="compldet" id="compldet" disabled />
--> <textarea class="form-control " name="compldet" id="compldet" disabled ></textarea>
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comlo">Complaint Location:</label>
<textarea class="form-control " name="comlo" id="comlo" disabled ></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
<!-- </form> -->
</div>
</div>
</div>
----------------------------------------------------------
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
</div>
</div>
<div class="modal fade" id="addForm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterLabel">Master Category Form</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<div class="form-group row">
<label for="catName" class="col-sm-12 col-form-label">Asset Category Name</label>
<div class="col-sm-12">
<input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
</div>
</div>
<div class="form-group row">
<label for="isActive" class="col-sm-12 col-form-label">IsActive</label>
<div class="col-sm-12">
<select class="form-control" id="isActive" name="isActive" >
<option value=1>Yes</option>
<option value=0>No</option>
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="addForm2" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="#" th:action="@{/saveCategory}" method="post">
<div class="block block-rounded block-themed block-transparent mb-0">
<div class="block-header bg-primary-dark">
<h3 class="block-title">Master Category Form</h3>
<div class="block-options">
<button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close">
<i class="fa fa-fw fa-times"></i>
</button>
</div>
</div>
<div class="block-content">
<div class="form-group row">
<label for="exampleInputUsername2" class="col-sm-3 col-form-label">Username</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="exampleInputUsername2" placeholder="Username">
</div>
</div>
<div class="form-group row">
<label for="exampleInputEmail2" class="col-sm-3 col-form-label">Email</label>
<div class="col-sm-9">
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Email">
</div>
</div>
<div class="row">
<div class="mb-3">
<label for="catName">Asset Category Name</label>
<input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
<!--<small id="emailHelp" class="form-text text-muted">Set of assets grouped under this unique category</small>-->
</div>
<div class="mb-3">
<label class="form-check-label">IsActive</label>
<select class="form-select" id="isActive" name="isActive" >
<option value=1>Yes</option>
<option value=0>No</option>
</select>
</div>
</div><!--end row-->
</div><!--end modal-body-->
</div>
<div class="block-content block-content-full text-end bg-body">
<button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary btn-sm">Save</button>
</div><!--end modal-footer-->
</form>
</div><!--end modal-content-->
</div><!--end modal-dialog-->
</div><!--end modal-->
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
<script th:replace="~{fragments/modules/base/script :: script}"></script>
<script>
function callview(COMPLAINTNUMBER){
alert(COMPLAINTNUMBER);
$.ajax({
type: "GET",
url: '/pgr/mobileageanalysiscomplaintdetail',
data: {
'complaintno': COMPLAINTNUMBER
},
success: function (data) {
showcomplaintInfo(data);
}
});
return false;
}
function showcomplaintInfo(mobileageanalysiscomplaint){
$('#infoForm').modal({
backdrop: 'static',
keyboard: false
});
console.log(mobileageanalysiscomplaint[0]["COMPLAINTTITLE"]);
$("#comptit").val(mobileageanalysiscomplaint[0]["COMPLAINTTITLE"]);
$("#email").val(mobileageanalysiscomplaint[0]["COMPLAINANTEMAIL"]);
$("#comno").val(mobileageanalysiscomplaint[0]["COMPLAINTNUMBER"]);
$("#dep").val(mobileageanalysiscomplaint[0]["DEPT_NAME"]);
$("#comdat").val(mobileageanalysiscomplaint[0]["COMPLAINTDATE"]);
$("#perna").val(mobileageanalysiscomplaint[0]["COMPLAINANTFIRSTNAME"]);
$("#addr").val(mobileageanalysiscomplaint[0]["COMPLAINANTADDRESS"]);
$("#mobno").val(mobileageanalysiscomplaint[0]["MOBILENUMBER"]);
$("#pinco").val(mobileageanalysiscomplaint[0]["PINCODE"]);
$("#compldet").val(mobileageanalysiscomplaint[0]["COMPLAINTDETAILS"]);
$("#comlo").val(mobileageanalysiscomplaint[0]["COMPLAINTLOCATION"]);
//$("#testmail").html(zonecomplaint[0]["COMPLAINANTEMAIL"]); //testmail
/* document.getElementById("sno").value =zonecomplaint.i.count;
document.getElementById("comno").value =zonecomplaint.COMPLAINTNUMBER;
document.getElementById("dep").value =zonecomplaint.DEPT_NAME;
document.getElementById("comtyp").value =zonecomplaint.COMPLAINTTITLE;
document.getElementById("comdat").value =zonecomplaint.COMPLAINTDATE;
document.getElementById("perna").value =zonecomplaint.COMPLAINANTFIRSTNAME;
document.getElementById("addr").value =zonecomplaint.COMPLAINANTADDRESS;
document.getElementById("pinco").value =zonecomplaint.PINCODE;
document.getElementById("mobno").value =zonecomplaint.MOBILENUMBER;
document.getElementById("comptit").value =zonecomplaint.COMPLAINANTEMAIL;
document.getElementById("compldet").value =zonecomplaint.COMPLAINTDETAILS;
document.getElementById("comlo").value =zonecomplaint.COMPLAINTLOCATION; */
$('#infoForm').modal('show');
return false;
}
$(document).ready(function() {
// DataTables buttons configuration
var buttons = [
{
extend: 'pageLength',
className: 'btn btn-warning'
},
{
title: 'Data export',
extend: 'copyHtml5',
text: 'Copy',
className: 'btn btn-secondary',
id: 'copyBtn'
},
{
extend: 'excelHtml5',
text: 'Excel',
className: 'btn btn-secondary',
id: 'excelBtn'
},
{
extend: 'csvHtml5',
text: 'CSV',
className: 'btn btn-secondary',
id: 'csvBtn'
},
{
extend: 'pdfHtml5',
text: 'PDF',
className: 'btn btn-secondary',
id: 'pdfBtn',
title:'ZoneWise'
},
// Additional button
/*
{
text: '<i class="far fa-plus-square"></i> Add New Asset',
className: 'btn btn-warning',
action: function () {
callAdd();
}
}
*/
];
$('#assetDatatable').DataTable( {
dom: 'Bftip',
columnDefs: [
{ targets: 'no-sort', orderable: false }
],
lengthMenu: [
[ 50, 100, 200, 500, -1 ],
[ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
],
scrollY: '50vh',
fixedColumns: {
left: 1,
right: 1
},
buttons: [buttons],
fixedHeader: true,
autoWidth: true,
responsive: true,
searching: false,
select: false,
processing: false,
} );
} );
function callAdd(){
$('#addForm').modal({
backdrop: 'static',
keyboard: false
})
$('#addForm').modal('show');
}
</script>
</body>
</html>

420
pgr/useridwisereport/complaintreports/reopenzonecomplaintlist.html

@ -0,0 +1,420 @@
<!DOCTYPE html>
<html lang="en" dir="">
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="wrapper">
<!-- header top menu Start -->
<header th:replace="~{fragments/modules/base/header :: header}"></header>
<!-- header top menu end -->
<div class="page-wrap">
<!--=============== Left Menu side Start ================-->
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
<!--=============== Left side End ================-->
<div class="main-content">
<div class="container-fluid">
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-6">
<div class="page-header-title">
<i class="fas fa-receipt bg-blue"></i>
<div class="d-inline">
<h5>PGR COMPLAINT Reopen Zone Wise</h5>
<span>PGR COMPLAINT Reopen Zone Wise Reports list module</span>
</div>
</div>
</div>
<div class="col-lg-6">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item">PGR Complaints</li>
<li class="breadcrumb-item">User ID Wise Reports</li>
<li class="breadcrumb-item active" aria-current="page">Reopen Zone Wise</li>
</ol>
</nav>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-block">
<div>
<table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="100%">
<thead class="thead-dark">
<tr role="row">
<th class="text-center no-sort" width="1%">S.No</th>
<th class="text-center" width="10%">Complaint No</th>
<th class="text-center" width="10%">Department</th>
<th class="text-center" width="10%">Complaint Type</th>
<th class="text-center" width="10%">Complaint Date</th>
<th class="text-center" width="10%">Complaint Details</th>
<th class="text-center" width="10%">Person Name</th>
<th class="text-center" width="10%">User Name</th>
</tr>
</theadclass="thead-dark">
<tbody>
<tr th:each="reopenzonecomplaint, i : ${reopenzonecomplaintlist}" class="reopenzonecomplaintreportlists">
<td th:text="${i.count}">0</td>
<td><a href="#" th:onclick="return callview([[${reopenzonecomplaint.COMPLAINTID}]]);" th:text="${reopenzonecomplaint.COMPLAINTNUMBER}" data-bs-toggle="tooltip" data-bs-animation="true" data-bs-placement="top" title="View complaint details" style="color: blue; text-decoration: underline;cursor:default;"><i class="far fa-bookmark" style="font-size: 18px; "></i></a></td>
<td class="text-center" th:text="${reopenzonecomplaint.DEPT_NAME}"></td>
<td th:text="${reopenzonecomplaint.COMPLAINTTITLE}"></td>
<td th:text="${reopenzonecomplaint.COMPLAINTDATE}"></td>
<td class="text-center" th:text="${reopenzonecomplaint.COMPLAINTDETAILS}"></td>
<td th:text="${reopenzonecomplaint.COMPLAINANTFIRSTNAME}"></td>
<td th:text="${reopenzonecomplaint.USER_NAME}"></td>
</tr>
</tbody>
<tfoot class="thead-dark">
<tr>
<th class="text-center">S.No</th>
<th class="text-center">Complaint No</th>
<th class="text-center">Department</th>
<th class="text-center">Complaint Type</th>
<th class="text-center">Complaint Date</th>
<th class="text-center">Complaint Details</th>
<th class="text-center">Person Name</th>
<th class="text-center">User Name</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
----------------------------------------------------------
<div class="modal fade" id="infoForm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="exampleModalCenterLabel">Complaint Details</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<!-- <div id="modelbodyhtml">
<center>Loading...</center>
</div> -->
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comno">Complaint No:</label>
<input type="text" class="form-control text-center" name="comno" id="comno" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="dep">Department:</label>
<input type="text" class="form-control text-center" name="dep" id="dep" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comtyp">Complaint Type:</label>
<input type="text" class="form-control text-center" name="comtyp" id="comtyp" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comdat">Complaint Date</label>
<input type="text" class="form-control text-center" name="comdat" id="comdat" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="perna">Person Name:</label>
<input type="text" class="form-control text-center" name="perna" id="perna" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="addr">Address:</label>
<input type="text" class="form-control text-center" name="addr" id="addr" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="pinco">Pin-code:</label>
<input type="text" class="form-control text-center" name="pinco" id="pinco" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="mobno">Mobile Number:</label>
<input type="text" class="form-control text-center" name="mobno" id="mobno" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="email">Email</label>
<input type="text" class="form-control text-center" name="email" id="email" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comptit">Complaint Title:</label>
<input type="text" class="form-control text-center" name="comptit" id=comptit disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="compldet">Complaint Details:</label>
<!-- <textarea type="text" class="form-control text-center" name="compldet" id="compldet" disabled />
--> <textarea class="form-control " name="compldet" id="compldet" disabled ></textarea>
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comlo">Complaint Location:</label>
<textarea class="form-control " name="comlo" id="comlo" disabled ></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
<!-- </form> -->
</div>
</div>
</div>
----------------------------------------------------------
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
</div>
</div>
<div class="modal fade" id="addForm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterLabel">Master Category Form</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<div class="form-group row">
<label for="catName" class="col-sm-12 col-form-label">Asset Category Name</label>
<div class="col-sm-12">
<input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
</div>
</div>
<div class="form-group row">
<label for="isActive" class="col-sm-12 col-form-label">IsActive</label>
<div class="col-sm-12">
<select class="form-control" id="isActive" name="isActive" >
<option value=1>Yes</option>
<option value=0>No</option>
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="addForm2" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="#" th:action="@{/saveCategory}" method="post">
<div class="block block-rounded block-themed block-transparent mb-0">
<div class="block-header bg-primary-dark">
<h3 class="block-title">Master Category Form</h3>
<div class="block-options">
<button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close">
<i class="fa fa-fw fa-times"></i>
</button>
</div>
</div>
<div class="block-content">
<div class="form-group row">
<label for="exampleInputUsername2" class="col-sm-3 col-form-label">Username</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="exampleInputUsername2" placeholder="Username">
</div>
</div>
<div class="form-group row">
<label for="exampleInputEmail2" class="col-sm-3 col-form-label">Email</label>
<div class="col-sm-9">
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Email">
</div>
</div>
<div class="row">
<div class="mb-3">
<label for="catName">Asset Category Name</label>
<input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
<!--<small id="emailHelp" class="form-text text-muted">Set of assets grouped under this unique category</small>-->
</div>
<div class="mb-3">
<label class="form-check-label">IsActive</label>
<select class="form-select" id="isActive" name="isActive" >
<option value=1>Yes</option>
<option value=0>No</option>
</select>
</div>
</div><!--end row-->
</div><!--end modal-body-->
</div>
<div class="block-content block-content-full text-end bg-body">
<button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary btn-sm">Save</button>
</div><!--end modal-footer-->
</form>
</div><!--end modal-content-->
</div><!--end modal-dialog-->
</div><!--end modal-->
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
<script th:replace="~{fragments/modules/base/script :: script}"></script>
<script>
function callview(COMPLAINTNUMBER){
alert(COMPLAINTNUMBER);
$.ajax({
type: "GET",
url: '/pgr/reopenzonecomplaintdetail',
data: {
'complaintno': COMPLAINTNUMBER
},
success: function (data) {
showcomplaintInfo(data);
}
});
return false;
}
function showcomplaintInfo(reopenzonecomplaint){
$('#infoForm').modal({
backdrop: 'static',
keyboard: false
});
console.log(reopenzonecomplaint[0]["COMPLAINTTITLE"]);
$("#comptit").val(reopenzonecomplaint[0]["COMPLAINTTITLE"]);
$("#email").val(reopenzonecomplaint[0]["COMPLAINANTEMAIL"]);
$("#comno").val(reopenzonecomplaint[0]["COMPLAINTNUMBER"]);
$("#dep").val(reopenzonecomplaint[0]["DEPT_NAME"]);
$("#comdat").val(reopenzonecomplaint[0]["COMPLAINTDATE"]);
$("#perna").val(reopenzonecomplaint[0]["COMPLAINANTFIRSTNAME"]);
$("#addr").val(reopenzonecomplaint[0]["COMPLAINANTADDRESS"]);
$("#mobno").val(reopenzonecomplaint[0]["MOBILENUMBER"]);
$("#pinco").val(reopenzonecomplaint[0]["PINCODE"]);
$("#compldet").val(reopenzonecomplaint[0]["COMPLAINTDETAILS"]);
$("#comlo").val(reopenzonecomplaint[0]["COMPLAINTLOCATION"]);
//$("#testmail").html(zonecomplaint[0]["COMPLAINANTEMAIL"]); //testmail
/* document.getElementById("sno").value =zonecomplaint.i.count;
document.getElementById("comno").value =zonecomplaint.COMPLAINTNUMBER;
document.getElementById("dep").value =zonecomplaint.DEPT_NAME;
document.getElementById("comtyp").value =zonecomplaint.COMPLAINTTITLE;
document.getElementById("comdat").value =zonecomplaint.COMPLAINTDATE;
document.getElementById("perna").value =zonecomplaint.COMPLAINANTFIRSTNAME;
document.getElementById("addr").value =zonecomplaint.COMPLAINANTADDRESS;
document.getElementById("pinco").value =zonecomplaint.PINCODE;
document.getElementById("mobno").value =zonecomplaint.MOBILENUMBER;
document.getElementById("comptit").value =zonecomplaint.COMPLAINANTEMAIL;
document.getElementById("compldet").value =zonecomplaint.COMPLAINTDETAILS;
document.getElementById("comlo").value =zonecomplaint.COMPLAINTLOCATION; */
$('#infoForm').modal('show');
return false;
}
$(document).ready(function() {
// DataTables buttons configuration
var buttons = [
{
extend: 'pageLength',
className: 'btn btn-warning'
},
{
title: 'Data export',
extend: 'copyHtml5',
text: 'Copy',
className: 'btn btn-secondary',
id: 'copyBtn'
},
{
extend: 'excelHtml5',
text: 'Excel',
className: 'btn btn-secondary',
id: 'excelBtn'
},
{
extend: 'csvHtml5',
text: 'CSV',
className: 'btn btn-secondary',
id: 'csvBtn'
},
{
extend: 'pdfHtml5',
text: 'PDF',
className: 'btn btn-secondary',
id: 'pdfBtn',
title:'ZoneWise'
},
// Additional button
/*
{
text: '<i class="far fa-plus-square"></i> Add New Asset',
className: 'btn btn-warning',
action: function () {
callAdd();
}
}
*/
];
$('#assetDatatable').DataTable( {
dom: 'Bftip',
columnDefs: [
{ targets: 'no-sort', orderable: false }
],
lengthMenu: [
[ 50, 100, 200, 500, -1 ],
[ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
],
scrollY: '50vh',
fixedColumns: {
left: 1,
right: 1
},
buttons: [buttons],
fixedHeader: true,
autoWidth: true,
responsive: true,
searching: false,
select: false,
processing: false,
} );
} );
function callAdd(){
$('#addForm').modal({
backdrop: 'static',
keyboard: false
})
$('#addForm').modal('show');
}
</script>
</body>
</html>

362
pgr/useridwisereport/complaintreports/zonecomplaintlist.html

@ -0,0 +1,362 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}">
<meta charset="UTF-8">
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="wrapper">
<!-- header top menu Start -->
<header th:replace="~{fragments/modules/base/header :: header}"></header>
<!-- header top menu end -->
<div class="page-wrap">
<!--=============== Left Menu side Start ================-->
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
<!--=============== Left side End ================-->
<div class="main-content">
<div class="container-fluid">
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-6">
<div class="page-header-title">
<i class="fas fa-receipt bg-blue"></i>
<div class="d-inline">
<h5>PGR COMPLAINT Zone Wise</h5>
<span>PGR COMPLAINT Zone Wise Reports list module</span>
</div>
</div>
</div>
<div class="col-lg-6">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item">PGR Complaints</li>
<li class="breadcrumb-item">User ID Wise Reports</li>
<li class="breadcrumb-item active" aria-current="page">Zone Wise</li>
</ol>
</nav>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-block">
<div>
<table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="100%">
<thead class="thead-dark">
<tr role="row">
<th class="text-center no-sort" width="1%">S.No</th>
<th class="text-center" width="10%">Complaint No</th>
<th class="text-center" width="10%">Department</th>
<th class="text-center" width="10%">Complaint Type</th>
<th class="text-center" width="10%">Complaint Date</th>
<th class="text-center" width="10%">Complaint Details</th>
<th class="text-center" width="10%">Person Name</th>
<th class="text-center" width="10%">User Name</th>
</tr>
</theadclass="thead-dark">
<tbody>
<tr th:each="zonecomplaint, i : ${zonecomplaintlist}" class="zonecomplaintreportlists">
<td th:text="${i.count}">0</td>
<td>
<!-- <a th:href="@{'/pgr/zonecomplaintdetail/' + ${zonecomplaint.COMPLAINTID}}" target="_self" th:text="${zonecomplaint.COMPLAINTNUMBER}">View details</a> -->
<a href="#" th:onclick="return callview([[${zonecomplaint.COMPLAINTID}]]);" th:text="${zonecomplaint.COMPLAINTNUMBER}" data-bs-toggle="tooltip" data-bs-animation="true" data-bs-placement="top" title="View complaint details" style="color: blue; text-decoration: underline;cursor:default;"><i class="far fa-bookmark" style="font-size: 18px; "></i></a>
<td th:text="${zonecomplaint.DEPT_NAME}"></td>
<td th:text="${zonecomplaint.COMPLAINTTITLE}"></td>
<td th:text="${zonecomplaint.COMPLAINTDATE}"></td>
<td th:utext="${zonecomplaint.COMPLAINTDETAILS }"></td>
<td th:text="${zonecomplaint.COMPLAINANTFIRSTNAME}"></td>
<td th:text="${zonecomplaint.USER_NAME}"></td>
</tr>
</tbody>
<tfoot class="thead-dark">
<tr>
<th class="text-center">S.No</th>
<th class="text-center">Complaint No</th>
<th class="text-center">Department</th>
<th class="text-center">Complaint Type</th>
<th class="text-center">Complaint Date</th>
<th class="text-center">Complaint Details</th>
<th class="text-center">Person Name</th>
<th class="text-center">User Name</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
</div>
</div>
------------------------------------------
<div class="modal fade" id="infoForm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="exampleModalCenterLabel">Complaint Details</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<!-- <div id="modelbodyhtml">
<center>Loading...</center>
</div> -->
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comno">Complaint No:</label>
<input type="text" style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center" name="comno" id="comno" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="dep">Department:</label>
<input type="text" style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center" name="dep" id="dep" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comtyp">Complaint Type:</label>
<input type="text" style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center" name="comtyp" id="comtyp" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comdat">Complaint Date:</label>
<input type="text" style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center" name="comdat" id="comdat" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="perna">Person Name:</label>
<input type="text" style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center" name="perna" id="perna" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="addr">Address:</label>
<input type="text" style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center" name="addr" id="addr" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="pinco">Pin-code:</label>
<input type="text" style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center" name="pinco" id="pinco" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="mobno">Mobile Number:</label>
<input type="text" style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center" name="mobno" id="mobno" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="email">Email:</label>
<input type="text" style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center" name="email" id="email" disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comptit">Complaint Title:</label>
<input type="text" style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center" name="comptit" id=comptit disabled />
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="compldet">Complaint Details:</label>
<!-- <textarea type="text" class="form-control text-center" name="compldet" id="compldet" disabled />
--> <textarea style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center " name="compldet" id="compldet" disabled ></textarea>
</div>
<div class="form-group row">
<label class="col-sm-12 col-form-label" for="comlo">Complaint Location:</label>
<textarea style="color: #000000; font-weight: bold; font-size: 15px;" class="form-control text-center " name="comlo" id="comlo" disabled ></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
<!-- </form> -->
</div>
</div>
</div>
------------------------------------------------------------
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
<script th:replace="~{fragments/modules/base/script :: script}"></script>
<script>
function callview(COMPLAINTNUMBER){
alert("wait for popup message...");
$.ajax({
type: "GET",
url: '/pgr/zonecomplaintdetail',
data: {
'complaintno': COMPLAINTNUMBER
},
success: function (data) {
showcomplaintInfo(data);
}
});
return false;
}
function showcomplaintInfo(zonecomplaint){
$('#infoForm').modal({
backdrop: 'static',
keyboard: false
});
console.log(zonecomplaint[0]["COMPLAINTTITLE"]);
$("#comptit").val(zonecomplaint[0]["COMPLAINTTITLE"]);
$("#email").val(zonecomplaint[0]["COMPLAINANTEMAIL"]);
$("#comno").val(zonecomplaint[0]["COMPLAINTNUMBER"]);
$("#dep").val(zonecomplaint[0]["DEPT_NAME"]);
$("#comdat").val(zonecomplaint[0]["COMPLAINTDATE"]);
$("#perna").val(zonecomplaint[0]["COMPLAINANTFIRSTNAME"]);
$("#addr").val(zonecomplaint[0]["COMPLAINANTADDRESS"]);
$("#mobno").val(zonecomplaint[0]["MOBILENUMBER"]);
$("#pinco").val(zonecomplaint[0]["PINCODE"]);
$("#compldet").val(zonecomplaint[0]["COMPLAINTDETAILS"]);
$("#comlo").val(zonecomplaint[0]["COMPLAINTLOCATION"]);
//$("#testmail").html(zonecomplaint[0]["COMPLAINANTEMAIL"]); //testmail
/* document.getElementById("sno").value =zonecomplaint.i.count;
document.getElementById("comno").value =zonecomplaint.COMPLAINTNUMBER;
document.getElementById("dep").value =zonecomplaint.DEPT_NAME;
document.getElementById("comtyp").value =zonecomplaint.COMPLAINTTITLE;
document.getElementById("comdat").value =zonecomplaint.COMPLAINTDATE;
document.getElementById("perna").value =zonecomplaint.COMPLAINANTFIRSTNAME;
document.getElementById("addr").value =zonecomplaint.COMPLAINANTADDRESS;
document.getElementById("pinco").value =zonecomplaint.PINCODE;
document.getElementById("mobno").value =zonecomplaint.MOBILENUMBER;
document.getElementById("comptit").value =zonecomplaint.COMPLAINANTEMAIL;
document.getElementById("compldet").value =zonecomplaint.COMPLAINTDETAILS;
document.getElementById("comlo").value =zonecomplaint.COMPLAINTLOCATION; */
$('#infoForm').modal('show');
return false;
}
$(document).ready(function() {
// DataTables buttons configuration
var buttons = [
{
extend: 'pageLength',
className: 'btn btn-warning'
},
{
title: 'Data export',
extend: 'copyHtml5',
text: 'Copy',
className: 'btn btn-secondary',
id: 'copyBtn'
},
{
extend: 'excelHtml5',
text: 'Excel',
className: 'btn btn-secondary',
id: 'excelBtn'
},
{
extend: 'csvHtml5',
text: 'CSV',
className: 'btn btn-secondary',
id: 'csvBtn'
},
{
extend: 'pdfHtml5',
text: 'PDF',
className: 'btn btn-secondary',
id: 'pdfBtn',
title:'ZoneWise'
},
// Additional button
/*
{
text: '<i class="far fa-plus-square"></i> Add New Asset',
className: 'btn btn-warning',
action: function () {
callAdd();
}
}
*/
];
$('#assetDatatable').DataTable( {
dom: 'Bftip',
columnDefs: [
{ targets: 'no-sort', orderable: false }
],
lengthMenu: [
[ 50, 100, 200, 500, -1 ],
[ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
],
scrollY: '50vh',
fixedColumns: {
left: 1,
right: 1
},
buttons: [buttons],
fixedHeader: true,
autoWidth: true,
responsive: true,
searching: false,
select: false,
processing: false,
} );
} );
function callAdd(){
$('#addForm').modal({
backdrop: 'static',
keyboard: false
})
$('#addForm').modal('show');
}
/* htmlcode = '<div class="form-group row"><label class="col-sm-6 col-form-label" for="comno">Complaint No:</label><label class="col-sm-6 col-form-label" for="comno">'+zonecomplaint[0]["COMPLAINTTITLE"]+'</label></div>';
$("#modelbodyhtml").html(htmlcode); */
</script>
</body>
</html>

267
pgr/useridwisereport/mobileageanalysis.html

@ -0,0 +1,267 @@
<!DOCTYPE html>
<html lang="en" dir="">
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="wrapper">
<!-- header top menu Start -->
<header th:replace="~{fragments/modules/base/header :: header}"></header>
<!-- header top menu end -->
<div class="page-wrap">
<!--=============== Left Menu side Start ================-->
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
<!--=============== Left side End ================-->
<div class="main-content">
<div class="container-fluid">
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">
<i class="fa fa-columns bg-blue"></i>
<div class="d-inline">
<h5>PGR COMPLAINT Mobile AGE ANALYSIS</h5>
<span>PGR COMPLAINT Mobile AGE ANALYSIS Reports list module</span>
</div>
</div>
</div>
<div class="col-lg-4">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item">PGR Complaints</li>
<li class="breadcrumb-item">User ID Wise Reports</li>
<li class="breadcrumb-item active" aria-current="page">Mobile AGE ANALYSIS</li>
</ol>
</nav>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-block">
<div>
<table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="100%">
<thead class="thead-dark">
<tr role="row">
<th class="text-center no-sort" width="1%">S.No</th>
<th class="text-center" width="10%">Department</th>
<th class="text-center" width="10%">User Name</th>
<th class="text-center" width="10%">Mobile Number</th>
<th class="text-center" width="10%">Nos</th>
</tr>
</theadclass="thead-dark">
<tbody>
<tr th:each="mobageanwise, i : ${mobileageanalysislist}" class="mobileageanalysislist">
<td th:text="${i.count}">0</td>
<td class="text-center" th:text="${mobageanwise.DEPT_NAME}"></td>
<td class="text-center" th:text="${mobageanwise.USER_NAME}"></td>
<td class="text-center" th:text="${mobageanwise.MOBILENO}"></td>
<td><a
th:href="@{'/pgr/mobileageanalysiscomplaintlist/?Deptid=' + ${mobageanwise.DEPTID} + '&PgrUserID=' + ${mobageanwise.IDUSER} + '&nos=' + ${mobageanwise.NOS}}"
target="_self" th:text="${mobageanwise.NOS}"
style="color: blue; text-decoration: underline;cursor:default;"> View
details </a></td>
</tr>
</tbody>
<tfoot class="thead-dark">
<tr>
<th class="text-center">S.No</th>
<th class="text-center">Department</th>
<th class="text-center">User Name</th>
<th class="text-center">Mobile Number</th>
<th class="text-center">Nos</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
</div>
</div>
<div class="modal fade" id="addForm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterLabel">Master Category Form</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<div class="form-group row">
<label for="catName" class="col-sm-12 col-form-label">Asset Category Name</label>
<div class="col-sm-12">
<input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
</div>
</div>
<div class="form-group row">
<label for="isActive" class="col-sm-12 col-form-label">IsActive</label>
<div class="col-sm-12">
<select class="form-control" id="isActive" name="isActive" >
<option value=1>Yes</option>
<option value=0>No</option>
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="addForm2" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="#" th:action="@{/saveCategory}" method="post">
<div class="block block-rounded block-themed block-transparent mb-0">
<div class="block-header bg-primary-dark">
<h3 class="block-title">Master Category Form</h3>
<div class="block-options">
<button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close">
<i class="fa fa-fw fa-times"></i>
</button>
</div>
</div>
<div class="block-content">
<div class="form-group row">
<label for="exampleInputUsername2" class="col-sm-3 col-form-label">Username</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="exampleInputUsername2" placeholder="Username">
</div>
</div>
<div class="form-group row">
<label for="exampleInputEmail2" class="col-sm-3 col-form-label">Email</label>
<div class="col-sm-9">
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Email">
</div>
</div>
<div class="row">
<div class="mb-3">
<label for="catName">Asset Category Name</label>
<input type="text" class="form-control" name="catName" id="catName" placeholder="Category Name" required>
<!--<small id="emailHelp" class="form-text text-muted">Set of assets grouped under this unique category</small>-->
</div>
<div class="mb-3">
<label class="form-check-label">IsActive</label>
<select class="form-select" id="isActive" name="isActive" >
<option value=1>Yes</option>
<option value=0>No</option>
</select>
</div>
</div><!--end row-->
</div><!--end modal-body-->
</div>
<div class="block-content block-content-full text-end bg-body">
<button type="button" class="btn btn-de-secondary btn-sm" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary btn-sm">Save</button>
</div><!--end modal-footer-->
</form>
</div><!--end modal-content-->
</div><!--end modal-dialog-->
</div><!--end modal-->
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
<script th:replace="~{fragments/modules/base/script :: script}"></script>
<script>
$(document).ready(function() {
// DataTables buttons configuration
var buttons = [
{
extend: 'pageLength',
className: 'btn btn-warning'
},
{
title: 'Data export',
extend: 'copyHtml5',
text: 'Copy',
className: 'btn btn-secondary',
id: 'copyBtn'
},
{
extend: 'excelHtml5',
text: 'Excel',
className: 'btn btn-secondary',
id: 'excelBtn'
},
{
extend: 'csvHtml5',
text: 'CSV',
className: 'btn btn-secondary',
id: 'csvBtn'
},
{
extend: 'pdfHtml5',
text: 'PDF',
className: 'btn btn-secondary',
id: 'pdfBtn'
},
// Additional button
{
text: '<i class="far fa-plus-square"></i> Add New Asset',
className: 'btn btn-warning',
action: function () {
callAdd();
}
}
];
$('#assetDatatable').DataTable( {
dom: 'Bftip',
columnDefs: [
{ targets: 'no-sort', orderable: false }
],
lengthMenu: [
[ 50, 100, 200, 500, -1 ],
[ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
],
scrollY: '50vh',
fixedColumns: {
left: 1,
right: 1
},
buttons: [buttons],
fixedHeader: true,
autoWidth: true,
responsive: true,
searching: false,
select: false,
processing: false,
} );
} );
function callAdd(){
$('#addForm').modal({
backdrop: 'static',
keyboard: false
})
$('#addForm').modal('show');
}
</script>
</body>
</html>

257
pgr/useridwisereport/reopenedzonewise.html

@ -0,0 +1,257 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="wrapper">
<!-- header top menu Start -->
<header th:replace="~{fragments/modules/base/header :: header}"></header>
<!-- header top menu end -->
<div class="page-wrap">
<!--=============== Left Menu side Start ================-->
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
<!--=============== Left side End ================-->
<div class="main-content">
<div class="container-fluid">
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">
<i class="far fa-closed-captioning bg-blue"></i>
<div class="d-inline">
<h5>PGR COMPLAINT Reopen Zone Wise</h5>
<span>PGR COMPLAINT Reopen Zone Wise Reports list module</span>
</div>
</div>
</div>
<div class="col-lg-4">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item">PGR Complaints</li>
<li class="breadcrumb-item">User ID Wise Reports</li>
<li class="breadcrumb-item active" aria-current="page">Reopen Zone Wise</li>
</ol>
</nav>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-block">
<form class="" action="" onsubmit="getReport()">
<div class="row">
<div class="col-md-6">
<label for="fromDate" class="">From Date</label>
<input type="date" class="form-control" id="fromDate"
name="sFrDate" th:value="${sFrDate}" data-date-format="dd/mm/yy" required>
</div>
<div class="col-md-6">
<label for="toDate" class="">To Date</label> <input
type="date" class="form-control" id="toDate" name="sToDate" th:value="${sToDate}"
data-date-format="dd/mm/yy" required>
</div>
</div>
<div class="col-md-12">
<label for="deptName">Select Department:</label> <select
class="form-control text-center" name="DEPT_NAME" id="zone">
<option value="0">All Zone</option>
<option value="NA-THIRUVOTTIYUR"
th:selected="${DEPT_NAME=='NA-THIRUVOTTIYUR'}">NA-THIRUVOTTIYUR</option>
<option value="NB-MANALI"
th:selected="${DEPT_NAME=='NB-MANALI'}">NB-MANALI</option>
<option value="NC-MADHAVARAM"
th:selected="${DEPT_NAME=='NC-MADHAVARAM'}">NC-MADHAVARAM</option>
<option value="ND-TONDIARPET"
th:selected="${DEPT_NAME=='ND-TONDIARPET'}">ND-TONDIARPET</option>
<option value="NE-ROYAPURAM"
th:selected="${DEPT_NAME=='NE-ROYAPURAM'}">NE-ROYAPURAM</option>
<option value="NF-THIRU-VI-KA NAGAR"
th:selected="${DEPT_NAME=='NF-THIRU-VI-KA NAGAR'}">NF-THIRU-VI-KA
NAGAR</option>
<option value="NG-AMBATTUR"
th:selected="${DEPT_NAME=='NG-AMBATTUR'}">NG-AMBATTUR</option>
<option value="NH-ANNA NAGAR"
th:selected="${DEPT_NAME=='NH-ANNA NAGAR'}">NH-ANNA
NAGAR</option>
<option value="NJ-TEYNAMPET"
th:selected="${DEPT_NAME=='NJ-TEYNAMPET'}">NJ-TEYNAMPET</option>
<option value="NK-KODAMBAKKAM"
th:selected="${DEPT_NAME=='NK-KODAMBAKKAM'}">NK-KODAMBAKKAM</option>
<option value="NL-VALASARAVAKKAM"
th:selected="${DEPT_NAME=='NL-VALASARAVAKKAM'}">NL-VALASARAVAKKAM</option>
<option value="NM-ALANDUR"
th:selected="${DEPT_NAME=='NM-ALANDUR'}">NM-ALANDUR</option>
<option value="NN-ADYAR" th:selected="${DEPT_NAME=='NN-ADYAR'}">NN-ADYAR</option>
<option value="NP-PERUNGUDI"
th:selected="${DEPT_NAME=='NP-PERUNGUDI'}">NP-PERUNGUDI</option>
<option value="NQ-SHOZHINGANALLUR"
th:selected="${DEPT_NAME=='NQ-SHOZHINGANALLUR'}">NQ-SHOZHINGANALLUR</option>
<option value="S-Chief Engineer Office (SWD, BRR, SP)"
th:selected="${DEPT_NAME=='S-Chief Engineer Office (SWD, BRR, SP)'}">S-Chief
Engineer Office (SWD, BRR, SP)</option>
<option value="SP-SPECIAL PROJECTS"
th:selected="${DEPT_NAME=='SP-SPECIAL PROJECTS'}">SP-SPECIAL
PROJECTS</option>
</select>
</div>
<div class="col-md-6" style="display: flex; justify-content: space-between; align-items: center; margin-top:11px;">
<button type="submit" class=" btn btn-sm btn-primary btn-l">search</button>
</div>
</form>
<br>
<br>
<div>
<table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="100%">
<thead class="thead-dark">
<tr role="row">
<th class="text-center no-sort" width="1%">S.No</th>
<th class="text-center" width="10%">Department</th>
<th class="text-center" width="10%">User Name</th>
<th class="text-center" width="10%">Mobile Number</th>
<th class="text-center" width="10%">Nos</th>
</tr>
</theadclass="thead-dark">
<tbody>
<tr th:each="reopenzonewise, i : ${reopenzonewiselist}" class="zonewisereportlist">
<td th:text="${i.count}">0</td>
<td class="text-center" th:text="${reopenzonewise.DEPT_NAME}"></td>
<td class="text-center" th:text="${reopenzonewise.USER_NAME}"></td>
<td th:text="${reopenzonewise.MOBILENO}"></td>
<td><a
th:href="@{'/pgr/reopenzonecomplaintlist/?Deptid=' + ${reopenzonewise.DEPTID} + '&PgrUserID=' + ${reopenzonewise.IDUSER} + '&nos=' + ${reopenzonewise.NOS}+ '&sFrDate=' + ${#strings.replace(sFrDate, '/', '%2F')} + '&sToDate=' + ${#strings.replace(sToDate, '/', '%2F')}}"
target="_self" th:text="${reopenzonewise.NOS}"
style="color: blue; text-decoration: underline;cursor:default;"> View
details </a></td>
</tr>
<!--th:href="@{'/pgr/reopenzonecomplaintlist/?Deptid=' + ${reopenzonewise.DEPTID} + '&PgrUserID=' + ${reopenzonewise.IDUSER} + '&nos=' + ${reopenzonewise.NOS}}"
-->
</tbody>
<tfoot class="thead-dark">
<tr>
<th class="text-center">S.No</th>
<th class="text-center">Department</th>
<th class="text-center">User Name</th>
<th class="text-center">Mobile Number</th>
<th class="text-center">Nos</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
</div>
</div>
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
<script th:replace="~{fragments/modules/base/script :: script}"></script>
<script>
$(document).ready(function() {
// DataTables buttons configuration
var buttons = [
{
extend: 'pageLength',
className: 'btn btn-warning'
},
{
title: 'Data export',
extend: 'copyHtml5',
text: 'Copy',
className: 'btn btn-secondary',
id: 'copyBtn'
},
{
extend: 'excelHtml5',
text: 'Excel',
className: 'btn btn-secondary',
id: 'excelBtn'
},
{
extend: 'csvHtml5',
text: 'CSV',
className: 'btn btn-secondary',
id: 'csvBtn'
},
{
extend: 'pdfHtml5',
text: 'PDF',
className: 'btn btn-secondary',
id: 'pdfBtn'
},
// Additional button
/* {
text: '<i class="far fa-plus-square"></i> Add New Asset',
className: 'btn btn-warning',
action: function () {
callAdd();
}
}
*/
];
$('#assetDatatable').DataTable( {
dom: 'Bftip',
columnDefs: [
{ targets: 'no-sort', orderable: false }
],
lengthMenu: [
[ 50, 100, 200, 500, -1 ],
[ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
],
scrollY: '50vh',
fixedColumns: {
left: 1,
right: 1
},
buttons: [buttons],
fixedHeader: true,
autoWidth: true,
responsive: true,
searching: false,
select: false,
processing: false,
} );
} );
function callAdd(){
$('#addForm').modal({
backdrop: 'static',
keyboard: false
})
$('#addForm').modal('show');
}
</script>
</body>
</html>

299
pgr/useridwisereport/zonewise.html

@ -0,0 +1,299 @@
<!DOCTYPE html>
<html lang="en" dir="">
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="wrapper">
<!-- header top menu Start -->
<header th:replace="~{fragments/modules/base/header :: header}"></header>
<!-- header top menu end -->
<div class="page-wrap">
<!--=============== Left Menu side Start ================-->
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
<!--=============== Left side End ================-->
<div class="main-content">
<div class="container-fluid">
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-6">
<div class="page-header-title">
<i class="fas fa-receipt bg-blue"></i>
<div class="d-inline">
<h5>PGR COMPLAINT Zone Wise</h5>
<span>PGR COMPLAINT Zone Wise Reports list module</span>
</div>
</div>
</div>
<div class="col-lg-6">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/index"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item">PGR Complaints</li>
<li class="breadcrumb-item">User ID Wise Reports</li>
<li class="breadcrumb-item active" aria-current="page">Zone Wise</li>
</ol>
</nav>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-block">
<!-- <form class ="" action="" onsubmit="getReport()">
<div class="row">
<div class="col">
<label for="fromDate" class="">From Date</label>
<input type="date" class="form-control" id="fromDate" name="sFrDate" data-date-format="dd/mm/yy" required>
</div>
<div class="col">
<label for="toDate" class="">To Date</label>
<input type="date" class="form-control" id="toDate" name="sToDate" data-date-format="dd/mm/yy" required>
</div>
<div class="col">
<br>
<button type="submit" class="btn btn-sm btn-primary btn-lg float-right">search</button>
</div>
</div>
</form> -->
<form class="" action="" onsubmit="getReport()">
<div class="row">
<div class="col-md-6">
<label for="fromDate" class="">From Date</label>
<input type="date" class="form-control" id="fromDate"
name="sFrDate" th:value="${sFrDate}" data-date-format="dd/mm/yy" required>
</div>
<div class="col-md-6">
<label for="toDate" class="">To Date</label> <input
type="date" class="form-control" id="toDate" name="sToDate" th:value="${sToDate}"
data-date-format="dd/mm/yy" required>
</div>
</div>
<div class="col-md-12">
<label for="deptName">Select Department:</label> <select
class="form-control text-center" name="DEPT_NAME" id="zone">
<option value="0">All Zone</option>
<option value="NA-THIRUVOTTIYUR"
th:selected="${DEPT_NAME=='NA-THIRUVOTTIYUR'}">NA-THIRUVOTTIYUR</option>
<option value="NB-MANALI"
th:selected="${DEPT_NAME=='NB-MANALI'}">NB-MANALI</option>
<option value="NC-MADHAVARAM"
th:selected="${DEPT_NAME=='NC-MADHAVARAM'}">NC-MADHAVARAM</option>
<option value="ND-TONDIARPET"
th:selected="${DEPT_NAME=='ND-TONDIARPET'}">ND-TONDIARPET</option>
<option value="NE-ROYAPURAM"
th:selected="${DEPT_NAME=='NE-ROYAPURAM'}">NE-ROYAPURAM</option>
<option value="NF-THIRU-VI-KA NAGAR"
th:selected="${DEPT_NAME=='NF-THIRU-VI-KA NAGAR'}">NF-THIRU-VI-KA
NAGAR</option>
<option value="NG-AMBATTUR"
th:selected="${DEPT_NAME=='NG-AMBATTUR'}">NG-AMBATTUR</option>
<option value="NH-ANNA NAGAR"
th:selected="${DEPT_NAME=='NH-ANNA NAGAR'}">NH-ANNA
NAGAR</option>
<option value="NJ-TEYNAMPET"
th:selected="${DEPT_NAME=='NJ-TEYNAMPET'}">NJ-TEYNAMPET</option>
<option value="NK-KODAMBAKKAM"
th:selected="${DEPT_NAME=='NK-KODAMBAKKAM'}">NK-KODAMBAKKAM</option>
<option value="NL-VALASARAVAKKAM"
th:selected="${DEPT_NAME=='NL-VALASARAVAKKAM'}">NL-VALASARAVAKKAM</option>
<option value="NM-ALANDUR"
th:selected="${DEPT_NAME=='NM-ALANDUR'}">NM-ALANDUR</option>
<option value="NN-ADYAR" th:selected="${DEPT_NAME=='NN-ADYAR'}">NN-ADYAR</option>
<option value="NP-PERUNGUDI"
th:selected="${DEPT_NAME=='NP-PERUNGUDI'}">NP-PERUNGUDI</option>
<option value="NQ-SHOZHINGANALLUR"
th:selected="${DEPT_NAME=='NQ-SHOZHINGANALLUR'}">NQ-SHOZHINGANALLUR</option>
<option value="S-Chief Engineer Office (SWD, BRR, SP)"
th:selected="${DEPT_NAME=='S-Chief Engineer Office (SWD, BRR, SP)'}">S-Chief
Engineer Office (SWD, BRR, SP)</option>
<option value="SP-SPECIAL PROJECTS"
th:selected="${DEPT_NAME=='SP-SPECIAL PROJECTS'}">SP-SPECIAL
PROJECTS</option>
</select>
</div>
<div class="col-md-6" style="display: flex; justify-content: space-between; align-items: center; margin-top:11px;">
<button type="submit" class=" btn btn-sm btn-primary btn-l">search</button>
</div>
</form>
<br>
<br>
<div>
<table id="assetDatatable" class="table table-striped table-bordered table-hover dataTable" role="grid" width="100%">
<thead class="thead-dark">
<tr role="row">
<th class="text-center no-sort" width="1%">S.No</th>
<th class="text-center" width="10%">Department</th>
<th class="text-center" width="10%">User Name</th>
<th class="text-center" width="10%">Mobile Number</th>
<th class="text-center" width="10%">Nos</th>
</tr>
</theadclass="thead-dark">
<tbody>
<tr th:each="zonewise, i : ${zonewiselist}" class="zonewisereportlist">
<td th:text="${i.count}">0</td>
<td class="text-center" th:text="${zonewise.DEPT_NAME}"></td>
<td class="text-center" th:text="${zonewise.USER_NAME}"></td>
<td th:text="${zonewise.MOBILENO}"></td>
<td><a
th:href="@{'/pgr/zonecomplaintlist/?Deptid=' + ${zonewise.DEPTID} + '&PgrUserID=' + ${zonewise.IDUSER} + '&nos=' + ${zonewise.NOS} + '&sFrDate=' + ${#strings.replace(sFrDate, '/', '%2F')} + '&sToDate=' + ${#strings.replace(sToDate, '/', '%2F')}}"
target="_self" th:text="${zonewise.NOS}"
style="color: blue; text-decoration: underline;cursor:default;"> View
details </a></td>
<!-- th:href="@{'/pgr/zonecomplaintlist/?Deptid=' + ${zonewise.DEPTID} + '&PgrUserID=' + ${zonewise.IDUSER} + '&nos=' + ${zonewise.NOS}}"-->
<!-- <td>
<a th:href="@{'/pgr/zonecomplaintlist/' + ${zonewise.NOS} + '?iPenReOpen=' + ${iPenReOpen} + '&Complainttype=' + ${sComplaintType} + '&RptID=' + ${rptId} + '&Deptid=' + ${deptId} + '&ZoneAge=' + ${zoneAge} + '&FrDate=' + ${fromDate} + '&ToDate=' + ${toDate}+ '&PgrUserID=' + ${pgruserid}}"
target="_self" th:text="${zonewise.NOS}" style="color: blue; text-decoration: underline;">
View details
</a>
</td> -->
<!-- <td>
<a th:href="@{'/pgr/zonecomplaintlist/' + ${zonewise.NOS}}" target="_self" th:text="${zonewise.NOS}" style="color: blue; text-decoration: underline;">View details</a>
</td> -->
</tr>
</tbody>
<tfoot class="thead-dark">
<tr>
<th class="text-center">S.No</th>
<th class="text-center">Department</th>
<th class="text-center">User Name</th>
<th class="text-center">Mobile Number</th>
<th class="text-center">Nos</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
</div>
</div>
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
<script th:replace="~{fragments/modules/base/script :: script}"></script>
<script>
$(document).ready(function() {
// DataTables buttons configuration
var buttons = [
{
extend: 'pageLength',
className: 'btn btn-warning'
},
{
title: 'Data export',
extend: 'copyHtml5',
text: 'Copy',
className: 'btn btn-secondary',
id: 'copyBtn'
},
{
extend: 'excelHtml5',
text: 'Excel',
className: 'btn btn-secondary',
id: 'excelBtn'
},
{
extend: 'csvHtml5',
text: 'CSV',
className: 'btn btn-secondary',
id: 'csvBtn'
},
{
extend: 'pdfHtml5',
text: 'PDF',
className: 'btn btn-secondary',
id: 'pdfBtn',
title:'ZoneWise'
},
// Additional button
/*
{
text: '<i class="far fa-plus-square"></i> Add New Asset',
className: 'btn btn-warning',
action: function () {
callAdd();
}
}
*/
];
$('#assetDatatable').DataTable( {
dom: 'Bftip',
columnDefs: [
{ targets: 'no-sort', orderable: false }
],
lengthMenu: [
[ 50, 100, 200, 500, -1 ],
[ '50 rows', '100 rows', '200 rows','500 rows', 'Show all' ]
],
scrollY: '50vh',
fixedColumns: {
left: 1,
right: 1
},
buttons: [buttons],
fixedHeader: true,
autoWidth: true,
responsive: true,
searching: false,
select: false,
processing: false,
} );
} );
function callAdd(){
$('#addForm').modal({
backdrop: 'static',
keyboard: false
})
$('#addForm').modal('show');
}
function getReport(){
alert("wait for response..")
let sFrDate = document.getElementById("fromDate").value;
let sToDate = document.getElementById("toDate").value;
let DEPT_NAME = document.getElementById("zone")
window.location.href='/zonewise?sFrDate='+sFrDate+'&sToDate='+sToDate+'&DEPT_NAME='+DEPT_NAME;
}
</script>
</body>
</html>

106
repository/Options.java

@ -0,0 +1,106 @@
//package in.gov.chennaicorporation.gccoffice.pgr.repository;
//
//import java.sql.Connection;
//import java.sql.ResultSet;
//import java.sql.SQLException;
//import java.util.List;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.jdbc.core.JdbcTemplate;
//import org.springframework.jdbc.core.RowMapper;
//import org.springframework.stereotype.Repository;
//
//import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
//
//@Repository
//public class Options {
// @Autowired
// DBConnection dbcon;
//
// @Autowired
// @Qualifier("mysqlPGRJdbcTemplate")
// private JdbcTemplate jdbcTemplate; // Use JdbcTemplate or any other Spring Data repository
//
// public List<ComplaintGroup> getComplaintGroups() {
// return jdbcTemplate.query("SELECT * FROM eggr_complaintgroup", new Rowmappercomplaintgroup());
// }
//
// public static class Rowmappercomplaintgroup implements RowMapper<ComplaintGroup> {
// @Override
// public ComplaintGroup mapRow(ResultSet rs, int rowNum) throws SQLException {
// ComplaintGroup complaintGroup = new ComplaintGroup();
//
// Connection con = DBConnection.getConnection();
// stmt3 = con.prepareStatement(query);
// complaintGroup.setId(rs.getLong("id"));
// complaintGroup.setComplaintGroupName(rs.getString("complaint_group_name"));
// return complaintGroup;
// }
// }
//
// public static class ComplaintGroup {
// private Long id;
// private String complaintGroupName;
//
// public long getId() {
// return id;
// }
//
// public void setId(long id) {
// this.id = id;
// }
//
// public String getComplaintGroupName() {
// return complaintGroupName;
// }
//
// public void setComplaintGroupName(String complaintGroupName) {
// this.complaintGroupName = complaintGroupName;
// }
// }
//
// public List<ComplaintType> getComplaintTypes() {
// return jdbcTemplate.query("SELECT * FROM EGGR_COMPLAINTTYPES", new Rowmappercomplainttype());
// }
//
// public static class Rowmappercomplainttype implements RowMapper<ComplaintType> {
// @Override
// public ComplaintType mapRow(ResultSet rs, int rowNum) throws SQLException {
// ComplaintType complaintType = new ComplaintType();
// complaintType.setId(rs.getLong("id"));
// complaintType.setComplaintTypeName(rs.getString("complaint_type_name"));
// return complaintType;
// }
// }
//
// public static class ComplaintType {
// private Long id;
// private String complaintTypeName;
//
// public long getId() {
// return id;
// }
//
// public void setId(long id) {
// this.id = id;
// }
//
// public String getComplaintTypeName() {
// return complaintTypeName;
// }
//
// public void setComplaintTypeName(String complaintTypeName) {
// this.complaintTypeName = complaintTypeName;
// }
// }
//
//
//
//
//
// public List<String> asList(String pending, String completed,String forwarded,String reopened) {
// // TODO Auto-generated method stub
// return null;
// }
//}

25
repository/Rowmappercomplaintgroup.java

@ -0,0 +1,25 @@
//package in.gov.chennaicorporation.gccoffice.pgr.repository;
//import org.springframework.jdbc.core.RowMapper;
//
//
//import in.gov.chennaicorporation.gccoffice.pgr.repository.Options.ComplaintGroup;
//
//
//import java.sql.ResultSet;
//import java.sql.SQLException;
//
//public class Rowmappercomplaintgroup implements RowMapper<ComplaintGroup> {
//
// @Override
// public ComplaintGroup mapRow(ResultSet rs, int rowNum) throws SQLException {
// ComplaintGroup complaintGroup = new ComplaintGroup();
// complaintGroup.setId(rs.getLong("id"));
// complaintGroup.setComplaintGroupName(rs.getString("complaint_group_name")); // Adjust column name
// return complaintGroup;
// }
//
//
//
//
//}
//

23
repository/Rowmappercomplainttype.java

@ -0,0 +1,23 @@
//package in.gov.chennaicorporation.gccoffice.pgr.repository;
//
//import java.sql.ResultSet;
//import java.sql.SQLException;
//
//import org.springframework.jdbc.core.RowMapper;
//
//import in.gov.chennaicorporation.gccoffice.pgr.repository.Options.ComplaintType;
//
//public class Rowmappercomplainttype implements RowMapper<ComplaintType> {
//
// @Override
// public ComplaintType mapRow(ResultSet rs, int rowNum) throws SQLException {
// ComplaintType ComplaintType = new ComplaintType();
// ComplaintType.setId(rs.getLong("id"));
// ComplaintType.setComplaintGroupName(rs.getString("complaint_group_name")); // Adjust column name
// return ComplaintType;
// }
//
//
//
//
//}

94
service/AgeAnalysisComplaintDetails.java

@ -0,0 +1,94 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class AgeAnalysisComplaintDetails {
@Autowired
DBConnection dbcon;
public String sFrDate ="";
public String sToDate ="";
public String getageanalysiscomdetailsQuery(String lCmpID) {
Connection connection = DBConnection.getConnection();; // Initialize your database connection
System.out.println("ICmpID.............:"+lCmpID);
String query = "select a.*,nvl(to_char(a.complaintdate,'dd-mm-rrrr'),' ') compdate,c.DEPT_NAME from eggr_complaintdetails@erp a,EG_DEPARTMENT@ERP c where a.deptid=c.id_dept and a.complaintid="+ lCmpID;
System.out.println(query);
try {
PreparedStatement preparedStatement = connection.prepareStatement(query);
preparedStatement.setString(1, lCmpID); // Bind the parameter
ResultSet resultSet = preparedStatement.executeQuery();
// Process the result set and return the result
resultSet.close();
preparedStatement.close();
} catch (SQLException e) {
// Handle any SQL errors
e.printStackTrace();
} finally {
// Close the database connection
}
return query;
}
public List<Map<String, Object>> check(String lCmpID) {
Connection con =DBConnection.getConnection();
Statement stmt3;
try {
stmt3 = con.createStatement();
System.out.println( "checkingageanalysiscomplaintdetails...");
ResultSet rs3 = stmt3.executeQuery(getageanalysiscomdetailsQuery(lCmpID));
List<Map<String, Object>> rows = new ArrayList<>();
while (rs3.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs3.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs3.getObject(i);
System.out.println(columnName+" :"+columnValue);
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
}
catch (Exception e){
e.printStackTrace();
}
return null;
}
}

133
service/AgeAnalysisComplaintReports.java

@ -0,0 +1,133 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class AgeAnalysisComplaintReports {
@Autowired
DBConnection dbcon;
public String sFrDate ="";
public String sToDate ="";
public String getAgeAnalysisComplaintQuery(String sFrDate,String sToDate,Integer iDeptID, Integer iPgrUserID) {
int iPenReOpen = 0;
StringBuilder queryBuilder = new StringBuilder();
queryBuilder.append("SELECT a.*, NVL(TO_CHAR(a.complaintdate, 'dd-mm-rrrr'), ' ') compdate, c.DEPT_NAME, u.user_name FROM ");
queryBuilder.append("eggr_complaintdetails@erp a, EG_DEPARTMENT@ERP c, eggr_redressaldetails@erp b, eg_user@erp u ");
queryBuilder.append("WHERE a.deptid = c.id_dept AND (NVL(DEPT_NAME, '0') NOT LIKE 'F%' AND DEPT_NAME IS NOT NULL) ");
queryBuilder.append("AND a.complaintid = b.complaintid AND complaintdate >= TO_DATE('25-Oct-2010', 'DD-Mon-YYYY') ");
queryBuilder.append("AND u.id_user = b.redressalofficerid ");
if (iPenReOpen == 0) {
queryBuilder.append("AND b.COMPLAINTSTATUSID IN (2, 3, 4, 9) ");
} else if (iPenReOpen == 1) {
queryBuilder.append("AND b.COMPLAINTSTATUSID IN (2, 3, 4) ");
} else if (iPenReOpen == 2) {
queryBuilder.append("AND b.COMPLAINTSTATUSID IN (9) ");
}
/* if (iRptID == 1) {
queryBuilder.append("AND NVL(a.RECEIVINGCENTERID, 0) = 1 ");
} else if (iRptID == 2) {
queryBuilder.append("AND NVL(a.RECEIVINGCENTERID, 0) != 1 ");
}
*/
if (iDeptID != 0) {
queryBuilder.append("AND NVL(a.deptid, 0) = ").append(iDeptID).append(" ");
}
/*
if (iDaysID == 1) {
queryBuilder.append("AND (SYSDATE - complaintdate) > 90 ");
} else if (iDaysID == 2) {
queryBuilder.append("AND SYSDATE - complaintdate > 60 AND SYSDATE - complaintdate <= 90 ");
} else if (iDaysID == 3) {
queryBuilder.append("AND SYSDATE - complaintdate > 30 AND SYSDATE - complaintdate <= 60 ");
} else if (iDaysID == 4) {
queryBuilder.append("AND SYSDATE - complaintdate > 15 AND SYSDATE - complaintdate <= 30 ");
} else if (iDaysID == 5) {
queryBuilder.append("AND SYSDATE - complaintdate > 0 AND SYSDATE - complaintdate <= 15 ");
}
*/
if (iPgrUserID != 0 && iDeptID != 37) {
queryBuilder.append("AND NVL(b.redressalofficerid, 0) = ").append(iPgrUserID).append(" ");
}
if (!sFrDate.isEmpty() && !sToDate.isEmpty()) {
queryBuilder.append("AND TRUNC(complaintdate) BETWEEN TO_DATE('").append(sFrDate).append("', 'yyyy/MM/dd') ");
queryBuilder.append("AND TO_DATE('").append(sToDate).append("', 'yyyy/MM/dd') ");
}
/*
if ("52,1,22,32,57,59,70,18,69,7,71,19,58,75,43".equals(sComplainttype)) {
queryBuilder.append("AND a.complainttype NOT IN ('52,1,22,32,57,59,70,18,69,7,71,19,75,58,43,146,97,113,114,130,145,118,138,99,152,119,181,112,166') ");
} else if (!"0".equals(sComplainttype)) {
queryBuilder.append("AND complainttype IN (").append(sComplainttype).append(") ");
}
*/
queryBuilder.append("ORDER BY user_name, a.complaintdate");
String sqlQuery = queryBuilder.toString();
System.out.println("sQry: " + sqlQuery);
return sqlQuery;
}
public List<Map<String, Object>> getAgeAnalysisComplaints(String sFrDate,String sToDate, Integer deptId, Integer pgrUserId) {
Connection con =DBConnection.getConnection();
Statement stmt3;
try {
stmt3 = con.createStatement();
System.out.println( "checkingAgeAnalysiscomreports...");
// String sComplainttype ="52,1,22,32,57,59,70,18,69,7,71,19,75,58,43,146,97,113,114,130,145,118,138,99,152,119,181,112,166";
ResultSet rs4 = stmt3.executeQuery(getAgeAnalysisComplaintQuery(sFrDate,sToDate,deptId, pgrUserId ));
List<Map<String, Object>> rows = new ArrayList<>();
while (rs4.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs4.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs4.getObject(i);
//System.out.println(columnName+" :"+columnValue);
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
}
catch (Exception e){
e.printStackTrace();
}
return null;
}
}

140
service/AgeAnalysisDaskboards.java

@ -0,0 +1,140 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class AgeAnalysisDaskboards {
@Autowired
DBConnection dbcon;
public String sFrDate ="";
public String sToDate ="";
public String getgenlysisdaskboardQuery(String DEPT_NAME) {
String sQry = "SELECT c.dept_name, a.deptid, a.days_90, a.days_90_pen, a.days_90_reopen, "
+ "a.days_61_90, a.days_61_90_pen, a.days_61_90_reopen, "
+ "a.days_31_60, a.days_31_60_pen, a.days_31_60_reopen, "
+ "a.days_16_30, a.days_16_30_pen, a.days_16_30_reopen, "
+ "a.days_0_15, a.days_0_15_pen, a.days_0_15_reopen, "
+ "a.Total, a.Total_pen, a.Total_reopen "
+ "FROM ( "
+ "SELECT "
+ "a.deptid, "
+ "nvl(sum(case when sysdate - a.complaintdate > 90 then 1 end), '0') AS days_90, "
+ "nvl(sum(case when sysdate - a.complaintdate > 90 AND b.COMPLAINTSTATUSID IN (2, 3, 4) then 1 end), '0') AS days_90_pen, "
+ "nvl(sum(case when sysdate - a.complaintdate > 90 AND b.COMPLAINTSTATUSID IN (9) then 1 end), '0') AS days_90_reopen, "
+ "nvl(sum(case when sysdate - a.complaintdate > 60 AND sysdate - a.complaintdate <= 90 then 1 end), '0') AS days_61_90, "
+ "nvl(sum(case when sysdate - a.complaintdate > 60 AND sysdate - a.complaintdate <= 90 AND b.COMPLAINTSTATUSID IN (2, 3, 4) then 1 end), '0') AS days_61_90_pen, "
+ "nvl(sum(case when sysdate - a.complaintdate > 60 AND sysdate - a.complaintdate <= 90 AND b.COMPLAINTSTATUSID IN (9) then 1 end), '0') AS days_61_90_reopen, "
+ "nvl(sum(case when sysdate - a.complaintdate > 30 AND sysdate - a.complaintdate <= 60 then 1 end), '0') AS days_31_60, "
+ "nvl(sum(case when sysdate - a.complaintdate > 30 AND sysdate - a.complaintdate <= 60 AND b.COMPLAINTSTATUSID IN (2, 3, 4) then 1 end), '0') AS days_31_60_pen, "
+ "nvl(sum(case when sysdate - a.complaintdate > 30 AND sysdate - a.complaintdate <= 60 AND b.COMPLAINTSTATUSID IN (9) then 1 end), '0') AS days_31_60_reopen, "
+ "nvl(sum(case when sysdate - a.complaintdate > 15 AND sysdate - a.complaintdate <= 30 then 1 end), '0') AS days_16_30, "
+ "nvl(sum(case when sysdate - a.complaintdate > 15 AND sysdate - a.complaintdate <= 30 AND b.COMPLAINTSTATUSID IN (2, 3, 4) then 1 end), '0') AS days_16_30_pen, "
+ "nvl(sum(case when sysdate - a.complaintdate > 15 AND sysdate - a.complaintdate <= 30 AND b.COMPLAINTSTATUSID IN (9) then 1 end), '0') AS days_16_30_reopen, "
+ "nvl(sum(case when sysdate - a.complaintdate > 0 AND sysdate - a.complaintdate <= 15 then 1 end), '0') AS days_0_15, "
+ "nvl(sum(case when sysdate - a.complaintdate > 0 AND sysdate - a.complaintdate <= 15 AND b.COMPLAINTSTATUSID IN (2, 3, 4) then 1 end), '0') AS days_0_15_pen, "
+ "nvl(sum(case when sysdate - a.complaintdate > 0 AND sysdate - a.complaintdate <= 15 AND b.COMPLAINTSTATUSID IN (9) then 1 end), '0') AS days_0_15_reopen, "
+ "nvl(count(*), '0') AS Total, "
+ "nvl(count(case when b.COMPLAINTSTATUSID IN (2, 3, 4) then 1 end), '0') AS Total_pen, "
+ "nvl(count(case when b.COMPLAINTSTATUSID IN (9) then 1 end), '0') AS Total_reopen "
+ "FROM eggr_complaintdetails@erp a, eggr_redressaldetails@erp b "
+ "WHERE a.complaintid = b.complaintid ";
int iRptID = 0;
if (iRptID == 1) sQry += " AND nvl(RECEIVINGCENTERID,0) = 1 ";
else if (iRptID == 2) sQry += " AND nvl(RECEIVINGCENTERID,0) != 1 ";
String sComplainttype = "0";
if (sComplainttype.equals("52,1,22,32,57,59,70,18,69,7,71,19,58,75"))
sQry += " AND complainttype NOT IN(" + sComplainttype + ") ";
else if (!sComplainttype.equals("0")) sQry += " AND complainttype IN(" + sComplainttype + ") ";
if (!sFrDate.equals("")) {
if (sToDate == null || sToDate.equals("")) sToDate = sFrDate;
sQry += " AND trunc(a.complaintdate) BETWEEN to_date('" + sFrDate + "','dd/mm/yyyy') AND to_date('" + sToDate + "','dd/mm/yyyy') ";
}
if (!sComplainttype.equals("0")) {
sQry += " AND a.deptid >= 33 ";
}
if (DEPT_NAME != null && !DEPT_NAME.equals("0")) {
// Add condition to filter by dept_name
sQry += " AND EXISTS (SELECT 1 FROM EG_DEPARTMENT@ERP c WHERE a.deptid = c.id_dept AND (NVL(c.DEPT_NAME, 0) NOT LIKE 'F%' AND c.DEPT_NAME IS NOT NULL) AND c.dept_name = :deptName) ";
}
sQry += " AND a.complaintdate >= '25-oct-2010' GROUP BY a.deptid) a, EG_DEPARTMENT@ERP c " +
"WHERE a.deptid = c.id_dept AND (NVL(DEPT_NAME, 0) NOT LIKE 'F%' AND DEPT_NAME IS NOT NULL)";
System.out.println("ageanalysisquery : "+ sQry);
return sQry;
}
public List<Map<String, Object>> getdashboardquery(String DEPT_NAME) {
Connection con = DBConnection.getConnection();
try {
PreparedStatement pstmt = con.prepareStatement(getgenlysisdaskboardQuery(DEPT_NAME));
if (DEPT_NAME != null && !DEPT_NAME.equals("0")) {
// Set the parameter value for :deptName
pstmt.setString(1, DEPT_NAME);
}
System.out.println("sQry : " + pstmt.toString()); // Check the generated SQL query
ResultSet rs3 = pstmt.executeQuery();
List<Map<String, Object>> rows = new ArrayList<>();
while (rs3.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs3.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs3.getObject(i);
System.out.println(columnName + " : " + columnValue);
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
con.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
return null;
}
}

139
service/AgeAnalysisReports.java

@ -0,0 +1,139 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class AgeAnalysisReports {
@Autowired
DBConnection dbcon;
public String getageanalysisQuery(String sFrDate,String sToDate,String DEPT_NAME) {
String sQry= "Select c.dept_name,a.iduser,a.user_name,nvl(b.extrafield2,' ') MOBILENO,a.nos,a.deptid from (SELECT cd.deptid,u.user_name, COUNT (cd.complaintid) nos,max(u.id_user) iduser"
+" FROM eggr_complaintdetails@erp cd,"
+" eggr_redressaldetails@erp rd,"
+" eggr_complaintstatus@erp st,"
+" eg_user@erp u"
+" WHERE cd.complaintid = rd.complaintid "
+" AND rd.complaintstatusid = st.complaintstatusid"
+" AND rd.redressalofficerid = u.id_user and complaintdate >= '25-oct-2010'";
int iPenReOpen = 0;
if ( iPenReOpen == 0 )
sQry += " AND st.statusname IN ('REGISTERED', 'PROCESSING', 'FORWARDED','REOPENED') and rd.COMPLAINTSTATUSID IN(2,3,4,9) ";
else if ( iPenReOpen == 1 ) // Pending
sQry += " AND st.statusname IN ('REGISTERED', 'PROCESSING', 'FORWARDED') and rd.COMPLAINTSTATUSID IN(2,3,4) ";
else if ( iPenReOpen == 2 ) // ReOpen
sQry += " AND st.statusname IN ('REOPENED') and rd.COMPLAINTSTATUSID IN(9) ";
int iRptID = 0;
if ( iRptID == 1 ) sQry += " and nvl(RECEIVINGCENTERID,0)=1 ";
else if ( iRptID == 2 ) sQry += " and nvl(RECEIVINGCENTERID,0) !=1 ";
//Object sComplainttype = "";
// if ( sComplainttype .equals("52,1,22,32,57,59,70,18,69,7,71,19,58,75,43") ) sQry += " and complainttype not in("+ sComplainttype +") ";
// else if ( !sComplainttype.equals("0") ) sQry += " and complainttype in("+ sComplainttype +") ";
//if ( !sFrDate.equals("") ) sQry += " and trunc(complaintdate)=to_date('"+ sFrDate +"','dd/mm/yyyy') ";
if ( !sFrDate.equals("") )
{
if (sToDate == null || sToDate.equals("") ) sToDate = sFrDate;
//sQry += " trunc(complaintdate)=to_date('"+ sFrDate +"','dd/mm/yyyy') and ";
sQry += " and trunc(complaintdate) between to_date('"+ sFrDate +"','yyyy/mm/dd') and to_date('"+ sToDate +"','yyyy/mm/dd') ";
}
int iDaysID = 0;
if ( iDaysID == 1 ) sQry += " and (sysdate-complaintdate)>90 ";
else if ( iDaysID == 2 ) sQry += " and sysdate-complaintdate>60 and sysdate-complaintdate<=90 ";
else if ( iDaysID == 3 ) sQry += " and sysdate-complaintdate>30 and sysdate-complaintdate<=60 ";
else if ( iDaysID == 4 ) sQry += " and sysdate-complaintdate>15 and sysdate-complaintdate<=30 ";
else if ( iDaysID == 5 ) sQry += " and sysdate-complaintdate>0 and sysdate-complaintdate<=15 ";
sQry += " GROUP BY cd.deptid,u.user_name ORDER BY cd.deptid,u.user_name) a , eg_user@erp b,eg_department@erp c where a.deptid=c.id_dept(+) and ";
sQry += " a.user_name=b.user_name AND (NVL(DEPT_NAME,0) NOT LIKE 'F%' AND DEPT_NAME IS NOT NULL)";
int iDeptID = 0;
if ( (iDeptID == 48 || iDeptID == 49 || iDeptID == 50) && iPenReOpen == 2) // ReOpen & Region
{
if ( iDeptID == 48 )
sQry += " and nvl(a.deptid,0) in (32,33,34,35,36,48)";
else if ( iDeptID == 49 )
sQry += " and nvl(a.deptid,0) in (42,43,44,45,46,49)";
else if ( iDeptID == 50 )
sQry += " and nvl(a.deptid,0) in (37,38,39,40,41,50)";
}
else if ( iDeptID != 0 ) sQry += " and nvl(a.deptid,0)= "+ iDeptID;
if (DEPT_NAME != null && !DEPT_NAME.equals("0")) {
sQry += " AND UPPER(NVL(DEPT_NAME, '')) = UPPER('" + DEPT_NAME + "')";
}
//if ( sComplainttype.equals("52,1,22,32,57,59,70,18,69,7,71") ) sQry += " and a.complainttype not in("+ sComplainttype +") ";
//else if ( !sComplainttype.equals("") ) sQry += " and complainttype in("+ sComplainttype +") ";
sQry += " order by c.dept_name,a.user_name";
System.out.println("Gen Query:" + sQry);
return sQry;
}
public List<Map<String, Object>> getAgeAnalysiswise(String sFrDate,String sToDate,String DEPT_NAME) {
Connection con =DBConnection.getConnection();
Statement stmt3;
try {
stmt3 = con.createStatement();
System.out.println( "checkingAgeAnalysis...");
ResultSet rs3 = stmt3.executeQuery(getageanalysisQuery(sFrDate,sToDate,DEPT_NAME));
List<Map<String, Object>> rows = new ArrayList<>();
while (rs3.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs3.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs3.getObject(i);
//System.out.println(columnName+" :"+columnValue);
if (columnValue instanceof String) {
columnValue = HtmlEntityDecoder.convertHtmlEntitiesToUtf8((String) columnValue);
}
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
}
catch (Exception e){
e.printStackTrace();
}
return null;
}
}

170
service/AllReports.java

@ -0,0 +1,170 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
//import in.gov.chennaicorporation.gccoffice.pgr.repository.PgrReportRepository;
@Service
public class AllReports{
@Autowired
DBConnection dbcon;
public String getQuery(String sFrDate, String sToDate, String sRptGroup, String sRptType, String cbCompStatus,String mode) {
String sQry = "SELECT z.name AS zone_name, dn.name AS division_name, location.name AS location, " +
"dept_name, TO_CHAR(complaintdate, 'dd-mm-yyyy') COMPDATE, TO_CHAR(complaintdate, 'HH24:MI:SS') Time, " +
"cs.statusname AS status, usr.user_name, cd.complaintnumber, " +
"decode(cd.ID_MODE,1,'Internet',2,'Phone',3,'Paper form',4,'WHATSAPP',5,'FLOOD CONTROL',6,'MOBILE APPLICATION',7,'SOCIAL MEDIA',8,'NEWS PAPER') AS \"MODE\","+
"COALESCE(ct.complainttypename, 'Unspecified') AS complainttypename, cg.complaintgroupname " +
"FROM eggr_complaintdetails@erp cd " +
"INNER JOIN eggr_redressaldetails@erp rd ON cd.complaintid = rd.complaintid " +
"INNER JOIN eggr_complaintstatus@erp cs ON rd.complaintstatusid = cs.complaintstatusid " +
"INNER JOIN eggr_complainttypes@erp ct ON TRIM(cd.complainttype) = ct.complainttypeid " +
"INNER JOIN eg_user@erp usr ON rd.redressalofficerid = usr.id_user " +
"LEFT JOIN eg_department@erp d ON cd.deptid = d.id_dept " +
"INNER JOIN eggr_complaintgroup@erp cg ON cg.id_complaintgroup = ct.complaintgroup_id " +
"INNER JOIN eg_boundary@erp dn ON dn.id_bndry = cd.bndry " +
"INNER JOIN eg_boundary@erp z ON dn.parent = z.id_bndry " +
"INNER JOIN eg_boundary@ERP LOCATION ON LOCATION.id_bndry = cd.locbndryid " +
"WHERE " +
"(cd.deptid IS NULL OR (cd.deptid < 21 OR cd.deptid > 30)) " +
"AND complaintdate BETWEEN TO_DATE(?, 'yyyy-MM-dd') " +
"AND (TO_DATE(?, 'yyyy-MM-dd') + 1)";
// Add conditions based on parameters
List<String> conditions = new ArrayList<>();
List<Object> params = new ArrayList<>();
params.add(sFrDate);
params.add(sToDate);
if (cbCompStatus != null && cbCompStatus.equals("Pending")) {
conditions.add("cs.complaintstatusid NOT IN (5,6,8,10,11)");
} else if (cbCompStatus != null && cbCompStatus.equals("Completed")) {
conditions.add("cs.complaintstatusid IN (5,6,8,10,11)");
}
if (cbCompStatus != null && cbCompStatus.equals("Reopened")) {
conditions.add("cs.complaintstatusid IN (9)");
}
if (cbCompStatus != null && cbCompStatus.equals("Forwarded")) {
conditions.add("cs.complaintstatusid IN (3)");
}
if (sRptGroup != null && !sRptGroup.equals("0")) {
conditions.add("cg.complaintgroupname = ?");
params.add(sRptGroup);
}
if (sRptType != null && !sRptType.equals("0")) {
conditions.add("ct.complainttypename = ?");
params.add(sRptType);
}
if (mode != null && !mode.equals("0")) {
conditions.add("cd.ID_MODE = ?");
params.add(mode);
}
if (!conditions.isEmpty()) {
sQry += " AND " + String.join(" AND ", conditions);
}
sQry += " ORDER BY zone_name, division_name, complaintdate ";
System.out.println("allreports Query:" + sQry);
return sQry;
}
public List<Map<String, Object>> check(String sFrDate, String sToDate, String sRptGroup, String sRptType, String cbCompStatus,String mode) {
Connection con = DBConnection.getConnection();
PreparedStatement stmt3 = null;
try {
String query = getQuery(sFrDate, sToDate, sRptGroup, sRptType, cbCompStatus,mode);
stmt3 = con.prepareStatement(query);
// Set parameters
int parameterIndex = 1;
stmt3.setString(parameterIndex++, sFrDate);
stmt3.setString(parameterIndex++, sToDate);
if (sRptGroup != null && !sRptGroup.equals("0")) {
stmt3.setString(parameterIndex++, sRptGroup);
}
if (sRptType != null && !sRptType.equals("0")) {
stmt3.setString(parameterIndex++, sRptType);
}
if (cbCompStatus != null && !cbCompStatus.equals("0")) {
// No need to set a parameter for the status condition
}
if (mode != null && !mode.equals("0")) {
stmt3.setString(parameterIndex++, mode);
}
ResultSet rs3 = stmt3.executeQuery();
List<Map<String, Object>> rows = new ArrayList<>();
while (rs3.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs3.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs3.getObject(i);
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (stmt3 != null) {
stmt3.close();
}
con.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
return null;
}
}

11
service/HtmlEntityDecoder.java

@ -0,0 +1,11 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import org.apache.commons.text.StringEscapeUtils;
public class HtmlEntityDecoder {
public static String convertHtmlEntitiesToUtf8(String html) {
String utf8String = StringEscapeUtils.unescapeHtml4(html);
return utf8String;
}
}

89
service/MobileAgeAnalysisComplaintDetails.java

@ -0,0 +1,89 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class MobileAgeAnalysisComplaintDetails {
@Autowired
DBConnection dbcon;
public String getmobileageanalysiscomdetailsQuery(String lCmpID) {
Connection connection = DBConnection.getConnection();; // Initialize your database connection
System.out.println("ICmpID.............:"+lCmpID);
String query = "select a.*,nvl(to_char(a.complaintdate,'dd-mm-rrrr'),' ') compdate,c.DEPT_NAME from eggr_complaintdetails@erp a,EG_DEPARTMENT@ERP c where a.deptid=c.id_dept and a.complaintid="+ lCmpID;
System.out.println(query);
try {
PreparedStatement preparedStatement = connection.prepareStatement(query);
preparedStatement.setString(1, lCmpID); // Bind the parameter
ResultSet resultSet = preparedStatement.executeQuery();
// Process the result set and return the result
resultSet.close();
preparedStatement.close();
} catch (SQLException e) {
// Handle any SQL errors
e.printStackTrace();
} finally {
// Close the database connection
}
return query;
}
public List<Map<String, Object>> check(String lCmpID) {
Connection con =DBConnection.getConnection();
Statement stmt3;
try {
stmt3 = con.createStatement();
System.out.println( "checkingmobileageanalysiscomplaintdetails...");
ResultSet rs3 = stmt3.executeQuery(getmobileageanalysiscomdetailsQuery(lCmpID));
List<Map<String, Object>> rows = new ArrayList<>();
while (rs3.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs3.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs3.getObject(i);
System.out.println(columnName+" :"+columnValue);
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
}
catch (Exception e){
e.printStackTrace();
}
return null;
}
}

137
service/MobileAgeAnalysisComplaintReports.java

@ -0,0 +1,137 @@
//package in.gov.chennaicorporation.gccoffice.pgr.service;
//
//import java.sql.Connection;
//import java.sql.ResultSet;
//import java.sql.ResultSetMetaData;
//import java.sql.Statement;
//import java.util.ArrayList;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
//
//
//@Service
//public class MobileAgeAnalysisComplaintReports {
//
// @Autowired
// DBConnection dbcon;
//
// public String sFrDate ="";
// public String sToDate ="";
//
//
//
// public String getMobileAgeAnalysisComplaintQuery(Integer iDeptID, Integer iPgrUserID) {
//
// int iPenReOpen = 0;
//
// StringBuilder queryBuilder = new StringBuilder();
// queryBuilder.append("SELECT a.*, NVL(TO_CHAR(a.complaintdate, 'dd-mm-rrrr'), ' ') compdate, c.DEPT_NAME, u.user_name FROM ");
// queryBuilder.append("eggr_complaintdetails@erp a, EG_DEPARTMENT@ERP c, eggr_redressaldetails@erp b, eg_user@erp u ");
// queryBuilder.append("WHERE a.deptid = c.id_dept AND (NVL(DEPT_NAME, '0') NOT LIKE 'F%' AND DEPT_NAME IS NOT NULL) ");
// queryBuilder.append("AND a.complaintid = b.complaintid AND complaintdate >= TO_DATE('25-Oct-2010', 'DD-Mon-YYYY') ");
// queryBuilder.append("AND u.id_user = b.redressalofficerid ");
//
// if (iPenReOpen == 0) {
// queryBuilder.append("AND b.COMPLAINTSTATUSID IN (2, 3, 4, 9) ");
// } else if (iPenReOpen == 1) {
// queryBuilder.append("AND b.COMPLAINTSTATUSID IN (2, 3, 4) ");
// } else if (iPenReOpen == 2) {
// queryBuilder.append("AND b.COMPLAINTSTATUSID IN (9) ");
// }
//
// /* if (iRptID == 1) {
// queryBuilder.append("AND NVL(a.RECEIVINGCENTERID, 0) = 1 ");
// } else if (iRptID == 2) {
// queryBuilder.append("AND NVL(a.RECEIVINGCENTERID, 0) != 1 ");
// }
//*/
// if (iDeptID != 0) {
// queryBuilder.append("AND NVL(a.deptid, 0) = ").append(iDeptID).append(" ");
// }
///*
// if (iDaysID == 1) {
// queryBuilder.append("AND (SYSDATE - complaintdate) > 90 ");
// } else if (iDaysID == 2) {
// queryBuilder.append("AND SYSDATE - complaintdate > 60 AND SYSDATE - complaintdate <= 90 ");
// } else if (iDaysID == 3) {
// queryBuilder.append("AND SYSDATE - complaintdate > 30 AND SYSDATE - complaintdate <= 60 ");
// } else if (iDaysID == 4) {
// queryBuilder.append("AND SYSDATE - complaintdate > 15 AND SYSDATE - complaintdate <= 30 ");
// } else if (iDaysID == 5) {
// queryBuilder.append("AND SYSDATE - complaintdate > 0 AND SYSDATE - complaintdate <= 15 ");
// }
//*/
// if (iPgrUserID != 0 && iDeptID != 37) {
// queryBuilder.append("AND NVL(b.redressalofficerid, 0) = ").append(iPgrUserID).append(" ");
// }
//
// if (!sFrDate.isEmpty() && !sToDate.isEmpty()) {
// queryBuilder.append("AND TRUNC(complaintdate) BETWEEN TO_DATE('").append(sFrDate).append("', 'DD/MM/YYYY') ");
// queryBuilder.append("AND TO_DATE('").append(sToDate).append("', 'DD/MM/YYYY') ");
// }
///*
// if ("52,1,22,32,57,59,70,18,69,7,71,19,58,75,43".equals(sComplainttype)) {
// queryBuilder.append("AND a.complainttype NOT IN ('52,1,22,32,57,59,70,18,69,7,71,19,75,58,43,146,97,113,114,130,145,118,138,99,152,119,181,112,166') ");
// } else if (!"0".equals(sComplainttype)) {
// queryBuilder.append("AND complainttype IN (").append(sComplainttype).append(") ");
// }
//*/
// queryBuilder.append("ORDER BY user_name, a.complaintdate");
//
// String sqlQuery = queryBuilder.toString();
// System.out.println("sQry: " + sqlQuery);
// return sqlQuery;
// }
//
//
//
//
//
//
//
// public List<Map<String, Object>> getMobileAgeAnalysisComplaints( Integer deptId, Integer pgrUserId) {
// Connection con =DBConnection.getConnection();
// Statement stmt3;
// try {
// stmt3 = con.createStatement();
//
//
// System.out.println( "checkingmobileageanalysiscomreports...");
// //String sComplainttype ="52,1,22,32,57,59,70,18,69,7,71,19,75,58,43,146,97,113,114,130,145,118,138,99,152,119,181,112,166";
// ResultSet rs4 = stmt3.executeQuery(getMobileAgeAnalysisComplaintQuery(deptId, pgrUserId));
//
//
// List<Map<String, Object>> rows = new ArrayList<>();
//
// while (rs4.next()) {
//
// Map<String, Object> row = new HashMap<>();
//
//
// ResultSetMetaData metaData = rs4.getMetaData();
// int columnCount = metaData.getColumnCount();
// for (int i = 1; i <= columnCount; i++) {
// String columnName = metaData.getColumnName(i);
// Object columnValue = rs4.getObject(i);
// // System.out.println(columnName+" :"+columnValue);
// row.put(columnName, columnValue);
// }
//
//
// rows.add(row);
// }
// return rows;
// }
// catch (Exception e){
// e.printStackTrace();
// }
// return null;
//}
//
//}

129
service/MobileAgeAnalysisReports.java

@ -0,0 +1,129 @@
//package in.gov.chennaicorporation.gccoffice.pgr.service;
//
//import java.sql.Connection;
//import java.sql.ResultSet;
//import java.sql.ResultSetMetaData;
//import java.sql.Statement;
//import java.util.ArrayList;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
//
//@Service
//public class MobileAgeAnalysisReports {
//
// @Autowired
// DBConnection dbcon;
//
// public String sFrDate ="";
// public String sToDate ="";
//
//
//
// public String getmobileageanalysisQuery(int iPenReOpen, int iRptID, int iDaysID, int iDeptID) {
// String sQry= "Select c.dept_name,a.iduser,a.user_name,nvl(b.extrafield2,' ') MOBILENO,a.nos,a.deptid from (SELECT cd.deptid,u.user_name, COUNT (cd.complaintid) nos,max(u.id_user) iduser"
// +" FROM eggr_complaintdetails@erp cd,"
// +" eggr_redressaldetails@erp rd,"
// +" eggr_complaintstatus@erp st,"
// +" eg_user@erp u"
// +" WHERE cd.complaintid = rd.complaintid "
// +" AND rd.complaintstatusid = st.complaintstatusid"
// +" AND rd.redressalofficerid = u.id_user and complaintdate >= '25-oct-2010'";
//
// if ( iPenReOpen == 0 )
// sQry += " AND st.statusname IN ('REGISTERED', 'PROCESSING', 'FORWARDED','REOPENED') and rd.COMPLAINTSTATUSID IN(2,3,4,9) ";
// else if ( iPenReOpen == 1 ) // Pending
// sQry += " AND st.statusname IN ('REGISTERED', 'PROCESSING', 'FORWARDED') and rd.COMPLAINTSTATUSID IN(2,3,4) ";
// else if ( iPenReOpen == 2 ) // ReOpen
// sQry += " AND st.statusname IN ('REOPENED') and rd.COMPLAINTSTATUSID IN(9) ";
//
// if ( iRptID == 1 ) sQry += " and nvl(RECEIVINGCENTERID,0)=1 ";
// else if ( iRptID == 2 ) sQry += " and nvl(RECEIVINGCENTERID,0) !=1 ";
// //Object sComplainttype = "";
//// if ( sComplainttype .equals("52,1,22,32,57,59,70,18,69,7,71,19,58,75,43") ) sQry += " and complainttype not in("+ sComplainttype +") ";
//// else if ( !sComplainttype.equals("0") ) sQry += " and complainttype in("+ sComplainttype +") ";
//
// //if ( !sFrDate.equals("") ) sQry += " and trunc(complaintdate)=to_date('"+ sFrDate +"','dd/mm/yyyy') ";
// if ( !sFrDate.equals("") )
// {
// if (sToDate == null || sToDate.equals("") ) sToDate = sFrDate;
// //sQry += " trunc(complaintdate)=to_date('"+ sFrDate +"','dd/mm/yyyy') and ";
// sQry += " and trunc(complaintdate) between to_date('"+ sFrDate +"','dd/mm/yyyy') and to_date('"+ sToDate +"','dd/mm/yyyy') ";
// }
//
// if ( iDaysID == 1 ) sQry += " and (sysdate-complaintdate)>90 ";
// else if ( iDaysID == 2 ) sQry += " and sysdate-complaintdate>60 and sysdate-complaintdate<=90 ";
// else if ( iDaysID == 3 ) sQry += " and sysdate-complaintdate>30 and sysdate-complaintdate<=60 ";
// else if ( iDaysID == 4 ) sQry += " and sysdate-complaintdate>15 and sysdate-complaintdate<=30 ";
// else if ( iDaysID == 5 ) sQry += " and sysdate-complaintdate>0 and sysdate-complaintdate<=15 ";
//
// sQry += " GROUP BY cd.deptid,u.user_name ORDER BY cd.deptid,u.user_name) a , eg_user@erp b,eg_department@erp c where a.deptid=c.id_dept(+) and ";
// sQry += " a.user_name=b.user_name AND (NVL(DEPT_NAME,0) NOT LIKE 'F%' AND DEPT_NAME IS NOT NULL)";
//
// if ( (iDeptID == 48 || iDeptID == 49 || iDeptID == 50) && iPenReOpen == 2) // ReOpen & Region
// {
// if ( iDeptID == 48 )
// sQry += " and nvl(a.deptid,0) in (32,33,34,35,36,48)";
// else if ( iDeptID == 49 )
// sQry += " and nvl(a.deptid,0) in (42,43,44,45,46,49)";
// else if ( iDeptID == 50 )
// sQry += " and nvl(a.deptid,0) in (37,38,39,40,41,50)";
// }
// else if ( iDeptID != 0 ) sQry += " and nvl(a.deptid,0)= "+ iDeptID;
//
//
//
// //if ( sComplainttype.equals("52,1,22,32,57,59,70,18,69,7,71") ) sQry += " and a.complainttype not in("+ sComplainttype +") ";
// //else if ( !sComplainttype.equals("") ) sQry += " and complainttype in("+ sComplainttype +") ";
//
// sQry += " order by c.dept_name,a.user_name";
// System.out.println("Gen Query:" + sQry);
// return sQry.toString();
// }
//
// public List<Map<String, Object>> getMobileAgeAnalysiswise(String iPenReOpen, String sComplaintType, String rptId, String deptId, String zoneAge,String PgrUserID,String fromDate, String toDate) {
// Connection con =DBConnection.getConnection();
// Statement stmt3;
// try {
// stmt3 = con.createStatement();
//
//
// System.out.println( "checkingMobileAgeAnalysis...");
// ResultSet rs3 = stmt3.executeQuery(getmobileageanalysisQuery(0, 0, 0, 0));
//
//
// List<Map<String, Object>> rows = new ArrayList<>();
//
// while (rs3.next()) {
//
// Map<String, Object> row = new HashMap<>();
//
//
// ResultSetMetaData metaData = rs3.getMetaData();
// int columnCount = metaData.getColumnCount();
// for (int i = 1; i <= columnCount; i++) {
// String columnName = metaData.getColumnName(i);
// Object columnValue = rs3.getObject(i);
// System.out.println(columnName+" :"+columnValue);
// row.put(columnName, columnValue);
// }
//
//
// rows.add(row);
// }
// return rows;
// }
// catch (Exception e){
// e.printStackTrace();
// }
// return null;
//
//}
//
//
//}

114
service/QaQcReports.java

@ -0,0 +1,114 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class QaQcReports {
@Autowired
DBConnection dbcon;
public String getqaqcQuery(String sFrDate, String sToDate) {
String sQry= " select cd.COMPLAINTNUMBER,dep.DEPT_NAME,ct.COMPLAINTTYPENAME,"+
" TO_CHAR(cd.COMPLAINTDATE,'DD-MM-RRRR') COMPLAINTDATE,"+
" TO_CHAR(cd.COMPLAINTDATE,'HH:MI:SS AM') COMPLAINTTIME,"+
" cd.COMPLAINTDETAILS,cd.COMPLAINANTFIRSTNAME, cd.MOBILENUMBER AS COMPLAINANTMOBILENUMBER, usr.USER_NAME, usr.extrafield2 as Mobile_number, "+
" c.compl_date as COMPLAINTCOMPLETIONDATE, "+
" DECODE ( qa.STATUS,null,'Not Attended','Attended') STATUS "+
" from EGGR_COMPLAINTDETAILS@erp cd , eg_department@erp dep, EGGR_COMPLAINTTYPES@erp ct, eg_user@erp usr, eggr_qams_store@erp qa, EGGR_REDRESSALDETAILS@erp rd, "+
" (SELECT c.redressalid, MAX(c.TIMESTAMP) compl_date "+
" FROM eggr_status_tracker@erp c,eggr_redressaldetails@ERP d WHERE c.statusid in(5,10) AND d.COMPLAINTSTATUSID in(5,10) "+
" AND d.REDRESSALID=c.redressalid GROUP BY c.redressalid) c "+
" where cd.DEPTID=dep.ID_DEPT and cd.COMPLAINTTYPE=ct.COMPLAINTTYPEID AND rd.COMPLAINTID =cd.COMPLAINTID "+
//" and ct.COMPLAINTTYPENAME in ('Removal of garbage', 'Removal of fallen trees', 'Stagnation of water') "+
" AND rd.REDRESSALOFFICERID =usr.id_user and qa.FDBK_OBJ_REF =cd.COMPLAINTID(+) and "+
" rd.COMPLAINTSTATUSID not in(2,3,4,9) and rd.redressalid=c.redressalid(+) and ";
String sFrTime = "00:00:00 AM";
String sToTime = "";
// String sFrDate = "";
// String sToDate = "";
if (sFrTime.toUpperCase().equals("00:00:00 AM"))
{
sQry+=" TRUNC(cd.COMPLAINTDATE) between TO_DATE('"+sFrDate+"', 'yyyy-MM-dd') and TO_DATE('"+sToDate+"', 'yyyy-MM-dd') ";
}
else
{
sQry+=" cd.COMPLAINTDATE between TO_DATE('"+sFrDate+" "+sFrTime+"', 'DD-MM-RRRR hh:mi:ss am') and TO_DATE('"+sToDate+" "+sToTime+ "', 'DD-MM-RRRR hh:mi:ss am') ";
}
sQry+=" order by dept_name";
System.out.println("qaqcquery:" + sQry);
return sQry;
}
public List<Map<String, Object>> check1(String sFrDate, String sToDate) {
Connection con =DBConnection.getConnection();
Statement stmt3;
try {
stmt3 = con.createStatement();
System.out.println( "checkingqaqc...");
ResultSet rs3 = stmt3.executeQuery(getqaqcQuery(sFrDate, sToDate));
List<Map<String, Object>> rows = new ArrayList<>();
while (rs3.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs3.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs3.getObject(i);
//System.out.println(columnName+" :"+columnValue);
if (columnValue instanceof String) {
columnValue = HtmlEntityDecoder.convertHtmlEntitiesToUtf8((String) columnValue);
}
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
}
catch (Exception e){
e.printStackTrace();
}
return null;
}
}

150
service/ReopenZoneWiseDaskboards.java

@ -0,0 +1,150 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class ReopenZoneWiseDaskboards {
@Autowired
DBConnection dbcon;
public String sFrDate ="";
public String sToDate ="";
public String getReopenZonewisedaskboardQuery(String DEPTID) {
String sQry = "SELECT * FROM (SELECT a.deptid, " +
"nvl(sum(case when complainttype in (52,146) then 1 end),0) as \"NonBURSTLT\", " +
"nvl(sum(case when complainttype in (1,97) then 1 end),0) as \"REOFGAR\", " +
"nvl(sum(case when complainttype in (22,32,57,59,70,113,114,130,145) then 1 end),0) as \"ROAD\", " +
"nvl(sum(case when complainttype in (18,118) then 1 end),0) as \"MOSQUITE\", " +
"nvl(sum(case when complainttype in (69,138) then 1 end),0) as \"WATER\", " +
"nvl(sum(case when complainttype in (7,99) then 1 end),0) as \"REOFDEB\", " +
"nvl(sum(case when complainttype in (71,152) then 1 end),0) as \"TREE\", " +
"nvl(sum(case when complainttype in (19,119) then 1 end),0) as \"DOGS\", " +
"nvl(sum(case when complainttype in (75,181) then 1 end),0) as \"ENCMTN\", " +
"nvl(sum(case when complainttype in (58,112) then 1 end),0) as \"POT\", " +
"nvl(sum(case when complainttype in (43,166) then 1 end),0) as \"PTAX\", " +
"nvl(sum(case when complainttype not in (52,1,22,32,57,59,70,18,69,7,71,19,75,58,43,146,97,113,114,130,145,118,138,99,152,119,181,112,166) then 1 end),0) as \"OTHERS\", " +
"COUNT(*) as Total FROM eggr_complaintdetails@erp a, eggr_redressaldetails@erp b WHERE ";
int iRptID = 0;
if (iRptID == 1) {
sQry += "nvl(RECEIVINGCENTERID,0) = 1 AND ";
} else if (iRptID == 2) {
sQry += "nvl(RECEIVINGCENTERID,0) != 1 AND ";
}
if (!sFrDate.equals("")) {
if (sToDate == null || sToDate.equals("")) {
sToDate = sFrDate;
}
sQry += "trunc(complaintdate) BETWEEN to_date('" + sFrDate + "','dd/mm/yyyy') AND to_date('" + sToDate + "','dd/mm/yyyy') AND ";
}
sQry += "a.complaintid = b.complaintid AND b.COMPLAINTSTATUSID IN (2,3,4) AND TRUNC(COMPLAINTDATE) >= trunc(sysdate-730) " +
"AND a.deptid = " + DEPTID + // Add condition for specific DEPTID
" GROUP BY a.deptid) a INNER JOIN EG_DEPARTMENT@ERP c ON a.deptid = c.id_dept " +
"LEFT OUTER JOIN (SELECT a.deptid, " +
"nvl(sum(case when sysdate-complaintdate>90 and b.COMPLAINTSTATUSID IN(2,3,4) then 1 end),'0') as days_90_pen, " +
"nvl(sum(case when sysdate-complaintdate>60 and sysdate-complaintdate<=90 and b.COMPLAINTSTATUSID IN(2,3,4) then 1 end),'0') as days_61_90_pen, " +
"nvl(sum(case when sysdate-complaintdate>30 and sysdate-complaintdate<=60 and b.COMPLAINTSTATUSID IN(2,3,4) then 1 end),'0') as days_31_60_pen, " +
"nvl(sum(case when sysdate-complaintdate>15 and sysdate-complaintdate<=30 and b.COMPLAINTSTATUSID IN(2,3,4) then 1 end),'0') as days_16_30_pen, " +
"nvl(sum(case when sysdate-complaintdate<=15 and b.COMPLAINTSTATUSID IN(2,3,4) then 1 end),'0') as days_0_15_pen, " +
"nvl(count(case when b.COMPLAINTSTATUSID IN(2,3,4) then 1 end),'0') as Total_pen " +
"FROM eggr_complaintdetails@erp a, eggr_redressaldetails@erp b " +
"WHERE a.complaintid = b.complaintid AND TRUNC(COMPLAINTDATE) >= trunc(sysdate-730) ";
if (iRptID == 1) {
sQry += "AND nvl(RECEIVINGCENTERID,0) = 1 ";
} else if (iRptID == 2) {
sQry += "AND nvl(RECEIVINGCENTERID,0) != 1 ";
}
if (!sFrDate.equals("")) {
if (sToDate == null || sToDate.equals("")) {
sToDate = sFrDate;
}
sQry += "AND trunc(complaintdate) BETWEEN to_date('" + sFrDate + "','dd/mm/yyyy') AND to_date('" + sToDate + "','dd/mm/yyyy') ";
}
if (DEPTID != null && !DEPTID.equals("0")) {
sQry += "AND EXISTS (SELECT 1 FROM EG_DEPARTMENT@ERP c WHERE a.deptid = c.id_dept " +
"AND (NVL(c.id_dept, 0) NOT LIKE 'F%' AND c.id_dept IS NOT NULL) " +
"AND c.id_dept = " + DEPTID + ") ";
}
sQry += "GROUP BY a.deptid) d ON d.deptid = c.id_dept " +
"WHERE (NVL(DEPT_NAME,0) NOT LIKE 'F%' AND DEPT_NAME IS NOT NULL) " +
"AND a.deptid >= 32 " +
"ORDER BY a.deptid";
System.out.println("PGR sQry : " + sQry);
return sQry;
}
public List<Map<String, Object>> getReopenZonewisedashboardquery(String DEPTID) {
Connection con = DBConnection.getConnection();
try {
String query = getReopenZonewisedaskboardQuery(DEPTID);
PreparedStatement pstmt = con.prepareStatement(query);
if (query.contains(":deptID") && DEPTID != null && !DEPTID.equals("0")) {
pstmt.setString(1, DEPTID);
}
System.out.println("Checking ReOpen Zonewise Dashboard...");
System.out.println("sQry : " + pstmt.toString()); // Check the generated SQL query
ResultSet rs = pstmt.executeQuery();
List<Map<String, Object>> rows = new ArrayList<>();
while (rs.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs.getObject(i);
//System.out.println(columnName + " : " + columnValue);
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
con.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
return null;
}
}

104
service/ReopenZonewiseComplaintDetails.java

@ -0,0 +1,104 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class ReopenZonewiseComplaintDetails {
@Autowired
DBConnection dbcon;
public String sFrDate ="";
public String sToDate ="";
public String getreopenzonecomdetailsQuery(String lCmpID) {
Connection connection = DBConnection.getConnection();; // Initialize your database connection
System.out.println("ICmpID.............:"+lCmpID);
String query = "select a.*,nvl(to_char(a.complaintdate,'dd-mm-rrrr'),' ') compdate,c.DEPT_NAME from eggr_complaintdetails@erp a,EG_DEPARTMENT@ERP c where a.deptid=c.id_dept and a.complaintid="+ lCmpID;
System.out.println(query);
try {
PreparedStatement preparedStatement = connection.prepareStatement(query);
preparedStatement.setString(1, lCmpID); // Bind the parameter
ResultSet resultSet = preparedStatement.executeQuery();
// Process the result set and return the result
resultSet.close();
preparedStatement.close();
} catch (SQLException e) {
// Handle any SQL errors
e.printStackTrace();
} finally {
// Close the database connection
}
return query;
}
public List<Map<String, Object>> check(String lCmpID) {
Connection con =DBConnection.getConnection();
Statement stmt3;
try {
stmt3 = con.createStatement();
System.out.println( "checkingreopenzonewisecomplaintdetails...");
ResultSet rs3 = stmt3.executeQuery(getreopenzonecomdetailsQuery(lCmpID));
List<Map<String, Object>> rows = new ArrayList<>();
while (rs3.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs3.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs3.getObject(i);
//System.out.println(columnName+" :"+columnValue);
if (columnValue instanceof String) {
columnValue = HtmlEntityDecoder.convertHtmlEntitiesToUtf8((String) columnValue);
}
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
}
catch (Exception e){
e.printStackTrace();
}
return null;
}
}

156
service/ReopenZonewiseComplaintReports.java

@ -0,0 +1,156 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class ReopenZonewiseComplaintReports {
@Autowired
DBConnection dbcon;
public String sFrDate ="";
public String sToDate ="";
public String getReopenZoneComplaintQuery(String sFrDate,String sToDate,Integer iDeptID, Integer iPgrUserID) {
int iPenReOpen = 1;
StringBuilder queryBuilder = new StringBuilder();
queryBuilder.append("SELECT a.*, NVL(TO_CHAR(a.complaintdate, 'dd-mm-rrrr'), ' ') compdate, c.DEPT_NAME, u.user_name FROM ");
queryBuilder.append("eggr_complaintdetails@erp a, EG_DEPARTMENT@ERP c, eggr_redressaldetails@erp b, eg_user@erp u ");
queryBuilder.append("WHERE a.deptid = c.id_dept AND (NVL(DEPT_NAME, '0') NOT LIKE 'F%' AND DEPT_NAME IS NOT NULL) ");
queryBuilder.append("AND a.complaintid = b.complaintid AND complaintdate >= TO_DATE('25-Oct-2010', 'DD-Mon-YYYY') ");
queryBuilder.append("AND u.id_user = b.redressalofficerid ");
if (iPenReOpen == 0) {
queryBuilder.append("AND b.COMPLAINTSTATUSID IN (2, 3, 4, 9) ");
} else if (iPenReOpen == 1) {
queryBuilder.append("AND b.COMPLAINTSTATUSID IN (2, 3, 4) ");
} else if (iPenReOpen == 2) {
queryBuilder.append("AND b.COMPLAINTSTATUSID IN (9) ");
}
/* if (iRptID == 1) {
queryBuilder.append("AND NVL(a.RECEIVINGCENTERID, 0) = 1 ");
} else if (iRptID == 2) {
queryBuilder.append("AND NVL(a.RECEIVINGCENTERID, 0) != 1 ");
}
*/
if (iDeptID != 0) {
queryBuilder.append("AND NVL(a.deptid, 0) = ").append(iDeptID).append(" ");
}
/* if (iDaysID == 1) {
queryBuilder.append("AND (SYSDATE - complaintdate) > 90 ");
} else if (iDaysID == 2) {
queryBuilder.append("AND SYSDATE - complaintdate > 60 AND SYSDATE - complaintdate <= 90 ");
} else if (iDaysID == 3) {
queryBuilder.append("AND SYSDATE - complaintdate > 30 AND SYSDATE - complaintdate <= 60 ");
} else if (iDaysID == 4) {
queryBuilder.append("AND SYSDATE - complaintdate > 15 AND SYSDATE - complaintdate <= 30 ");
} else if (iDaysID == 5) {
queryBuilder.append("AND SYSDATE - complaintdate > 0 AND SYSDATE - complaintdate <= 15 ");
}
*/
if (iPgrUserID != 0 && iDeptID != 37) {
queryBuilder.append("AND NVL(b.redressalofficerid, 0) = ").append(iPgrUserID).append(" ");
}
if (!sFrDate.isEmpty() && !sToDate.isEmpty()) {
queryBuilder.append("AND TRUNC(complaintdate) BETWEEN TO_DATE('").append(sFrDate).append("', 'yyyy/MM/dd') ");
queryBuilder.append("AND TO_DATE('").append(sToDate).append("', 'yyyy/MM/dd') ");
}
/* if ("52,1,22,32,57,59,70,18,69,7,71,19,58,75,43".equals(sComplainttype)) {
queryBuilder.append("AND a.complainttype NOT IN ('52,1,22,32,57,59,70,18,69,7,71,19,75,58,43,146,97,113,114,130,145,118,138,99,152,119,181,112,166') ");
} else if (!"0".equals(sComplainttype)) {
queryBuilder.append("AND complainttype IN (").append(sComplainttype).append(") ");
}
*/
queryBuilder.append("ORDER BY user_name, a.complaintdate");
String sqlQuery = queryBuilder.toString();
System.out.println("sQry: " + sqlQuery);
return sqlQuery;
}
public List<Map<String, Object>> getReopenZoneWiseComplaints(String sFrDate,String sToDate ,Integer deptId, Integer pgrUserId) {
Connection con =DBConnection.getConnection();
Statement stmt3;
try {
stmt3 = con.createStatement();
System.out.println( "checkingreopenzonewisecomreports...");
ResultSet rs4 = stmt3.executeQuery(getReopenZoneComplaintQuery(sFrDate,sToDate,deptId, pgrUserId ));
List<Map<String, Object>> rows = new ArrayList<>();
while (rs4.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs4.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs4.getObject(i);
//System.out.println(columnName+" :"+columnValue);
if (columnValue instanceof String) {
columnValue = HtmlEntityDecoder.convertHtmlEntitiesToUtf8((String) columnValue);
}
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
}
catch (Exception e){
e.printStackTrace();
}
return null;
}
}

128
service/ReopenZonewiseReports.java

@ -0,0 +1,128 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class ReopenZonewiseReports {
@Autowired
DBConnection dbcon;
public String getreopenzoneQuery(String sFrDate,String sToDate,String DEPT_NAME) {
String sQry= "Select c.dept_name,a.iduser,a.user_name,nvl(b.extrafield2,' ') MOBILENO,a.nos,a.deptid from (SELECT cd.deptid,u.user_name, COUNT (cd.complaintid) nos,max(u.id_user) iduser"
+" FROM eggr_complaintdetails@erp cd,"
+" eggr_redressaldetails@erp rd,"
+" eggr_complaintstatus@erp st,"
+" eg_user@erp u"
+" WHERE cd.complaintid = rd.complaintid "
+" AND rd.complaintstatusid = st.complaintstatusid"
+" AND rd.redressalofficerid = u.id_user and complaintdate >= '25-oct-2010'";
int iPenReOpen = 1;
if ( iPenReOpen == 0 )
sQry += " AND st.statusname IN ('REGISTERED', 'PROCESSING', 'FORWARDED','REOPENED') and rd.COMPLAINTSTATUSID IN(2,3,4,9) ";
else if ( iPenReOpen == 1 ) // Pending
sQry += " AND st.statusname IN ('REGISTERED', 'PROCESSING', 'FORWARDED') and rd.COMPLAINTSTATUSID IN(2,3,4) ";
// else if ( iPenReOpen == 2 ) // ReOpen
// sQry += " AND st.statusname IN ('REOPENED') and rd.COMPLAINTSTATUSID IN(9) ";
int iRptID = 0;
if ( iRptID == 1 ) sQry += " and nvl(RECEIVINGCENTERID,0)=1 ";
else if ( iRptID == 2 ) sQry += " and nvl(RECEIVINGCENTERID,0) !=1 ";
//Object sComplainttype = "";
// if ( sComplainttype .equals("52,1,22,32,57,59,70,18,69,7,71,19,58,75,43") ) sQry += " and complainttype not in("+ sComplainttype +") ";
// else if ( !sComplainttype.equals("0") ) sQry += " and complainttype in("+ sComplainttype +") ";
//if ( !sFrDate.equals("") ) sQry += " and trunc(complaintdate)=to_date('"+ sFrDate +"','dd/mm/yyyy') ";
if ( !sFrDate.equals("") )
{
if (sToDate == null || sToDate.equals("") ) sToDate = sFrDate;
//sQry += " trunc(complaintdate)=to_date('"+ sFrDate +"','dd/mm/yyyy') and ";
sQry += " and trunc(complaintdate) between to_date('"+ sFrDate +"','yyyy/mm/dd') and to_date('"+ sToDate +"','yyyy/mm/dd') ";
}
int iDaysID = 0;
if ( iDaysID == 1 ) sQry += " and (sysdate-complaintdate)>90 ";
else if ( iDaysID == 2 ) sQry += " and sysdate-complaintdate>60 and sysdate-complaintdate<=90 ";
else if ( iDaysID == 3 ) sQry += " and sysdate-complaintdate>30 and sysdate-complaintdate<=60 ";
else if ( iDaysID == 4 ) sQry += " and sysdate-complaintdate>15 and sysdate-complaintdate<=30 ";
else if ( iDaysID == 5 ) sQry += " and sysdate-complaintdate>0 and sysdate-complaintdate<=15 ";
sQry += " GROUP BY cd.deptid,u.user_name ORDER BY cd.deptid,u.user_name) a , eg_user@erp b,eg_department@erp c where a.deptid=c.id_dept(+) and ";
sQry += " a.user_name=b.user_name AND (NVL(DEPT_NAME,0) NOT LIKE 'F%' AND DEPT_NAME IS NOT NULL)";
int iDeptID = 0;
if ( (iDeptID == 48 || iDeptID == 49 || iDeptID == 50) && iPenReOpen == 2) // ReOpen & Region
{
if ( iDeptID == 48 )
sQry += " and nvl(a.deptid,0) in (32,33,34,35,36,48)";
else if ( iDeptID == 49 )
sQry += " and nvl(a.deptid,0) in (42,43,44,45,46,49)";
else if ( iDeptID == 50 )
sQry += " and nvl(a.deptid,0) in (37,38,39,40,41,50)";
}
else if ( iDeptID != 0 ) sQry += " and nvl(a.deptid,0)= "+ iDeptID;
if (DEPT_NAME != null && !DEPT_NAME.equals("0")) {
sQry += " AND UPPER(NVL(DEPT_NAME, '')) = UPPER('" + DEPT_NAME + "')";
}
//if ( sComplainttype.equals("52,1,22,32,57,59,70,18,69,7,71") ) sQry += " and a.complainttype not in("+ sComplainttype +") ";
//else if ( !sComplainttype.equals("") ) sQry += " and complainttype in("+ sComplainttype +") ";
sQry += " order by c.dept_name,a.user_name";
System.out.println("Gen Query:" + sQry);
return sQry;
}
public List<Map<String, Object>> getReopenZonewise(String sFrDate,String sToDate,String DEPT_NAME) {
Connection con =DBConnection.getConnection();
Statement stmt3;
try {
stmt3 = con.createStatement();
System.out.println( "checkingreopenzonewise...");
ResultSet rs3 = stmt3.executeQuery(getreopenzoneQuery(sFrDate,sToDate,DEPT_NAME));
List<Map<String, Object>> rows = new ArrayList<>();
while (rs3.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs3.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs3.getObject(i);
//System.out.println(columnName+" :"+columnValue);
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
}
catch (Exception e){
e.printStackTrace();
}
return null;
}
}

155
service/ZoneWiseDaskboards.java

@ -0,0 +1,155 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class ZoneWiseDaskboards {
@Autowired
DBConnection dbcon;
public String sFrDate ="";
public String sToDate ="";
public String getzonedaskboardQuery(String DEPTID) {
String sQry= "select * from (SELECT deptid , "
+"nvl(sum( case when complainttype in (52,146) then 1 end),0) as \"NonBURSTLT\" , "
+"nvl(sum( case when complainttype in (1,97) then 1 end),0) as \"REOFGAR\" , "
+"nvl(sum( case when complainttype in (22,32,57,59,70,113,114,130,145) then 1 end),0) as \"ROAD\" , "
+"nvl(sum( case when complainttype in (18,118) then 1 end),0) as \"MOSQUITE\" , "
+"nvl(sum( case when complainttype in (69,138) then 1 end),0) as \"WATER\" , "
+"nvl(sum( case when complainttype in (7,99) then 1 end),0) as \"REOFDEB\" , "
+"nvl(sum( case when complainttype in (71,152) then 1 end),0) as \"TREE\" , "
+"nvl(sum( case when complainttype in (19,119) then 1 end),0) as \"DOGS\" , "
+"nvl(sum( case when complainttype in (75,181) then 1 end),0) as \"ENCMTN\" , "
+"nvl(sum( case when complainttype in (58,112) then 1 end),0) as \"POT\" , "
+"nvl(sum( case when complainttype in (43,166) then 1 end),0) as \"PTAX\" , "
+"nvl(sum( case when complainttype not in (52,1,22,32,57,59,70,18,69,7,71,19,75,58,43,146,97,113,114,130,145,118,138,99,152,119,181,112,166) then 1 end),0) as \"OTHERS\" , "
+"COUNT(*) Total FROM eggr_complaintdetails@erp a, eggr_redressaldetails@erp b WHERE ";
int iRptID = 0;
if ( iRptID == 1 ) {
sQry += " nvl(RECEIVINGCENTERID,0)=1 and ";
} else if ( iRptID == 2 ) {
sQry += " nvl(RECEIVINGCENTERID,0) !=1 and ";
}
//else sQry += " nvl(RECEIVINGCENTERID,0) !=3 and ";
if ( !sFrDate.equals("") )
{
if (sToDate == null || sToDate.equals("") ) {
sToDate = sFrDate;
}
//sQry += " trunc(complaintdate)=to_date('"+ sFrDate +"','dd/mm/yyyy') and ";
sQry += " trunc(complaintdate) between to_date('"+ sFrDate +"','dd/mm/yyyy') and to_date('"+ sToDate +"','dd/mm/yyyy') and ";
}
sQry += " a.complaintid=b.complaintid and b.COMPLAINTSTATUSID IN(2,3,4,9) and TRUNC(COMPLAINTDATE) >= trunc(sysdate-730)"
+"AND a.deptid = " + DEPTID
+"group by a.deptid ) a inner join EG_DEPARTMENT@ERP c on a.deptid=c.id_dept ";
sQry+= " left outer join ( SELECT deptid , "
+"nvl(sum( case when sysdate-complaintdate>90 and b.COMPLAINTSTATUSID IN(2,3,4,9) then 1 end),'0') as days_90_pen , "
+"nvl(sum( case when sysdate-complaintdate>60 and sysdate-complaintdate<=90 and b.COMPLAINTSTATUSID IN(2,3,4,9) then 1 end),'0') as days_61_90_pen , "
+"nvl(sum( case when sysdate-complaintdate>30 and sysdate-complaintdate<=60 and b.COMPLAINTSTATUSID IN(2,3,4,9) then 1 end),'0') as days_31_60_pen , "
+"nvl(sum( case when sysdate-complaintdate>15 and sysdate-complaintdate<=30 and b.COMPLAINTSTATUSID IN(2,3,4,9) then 1 end),'0') as days_16_30_pen , "
+"nvl(sum( case when sysdate-complaintdate<=15 and b.COMPLAINTSTATUSID IN(2,3,4,9) then 1 end),'0') as days_0_15_pen , "
+"nvl(count(case when b.COMPLAINTSTATUSID IN(2,3,4,9) then 1 end),'0') as Total_pen "
+"FROM eggr_complaintdetails@erp a, eggr_redressaldetails@erp b "
+"WHERE a.complaintid=b.complaintid and TRUNC(COMPLAINTDATE) >= trunc(sysdate-730) ";
if ( iRptID == 1 ) {
sQry += "and nvl(RECEIVINGCENTERID,0)=1 ";
} else if ( iRptID == 2 ) {
sQry += "and nvl(RECEIVINGCENTERID,0) !=1 ";
}
//else sQry += "and nvl(RECEIVINGCENTERID,0) !=3 ";
if ( !sFrDate.equals("") ) {
if (sToDate == null || sToDate.equals("") ) {
sToDate = sFrDate;
}
//sQry += " trunc(complaintdate)=to_date('"+ sFrDate +"','dd/mm/yyyy') and ";
sQry += "and trunc(complaintdate) between to_date('"+ sFrDate +"','dd/mm/yyyy') and to_date('"+ sToDate +"','dd/mm/yyyy') ";
}
if (DEPTID != null && !DEPTID.equals("0")) {
sQry += "AND EXISTS (SELECT 1 FROM EG_DEPARTMENT@ERP c WHERE a.deptid = c.id_dept " +
"AND (NVL(c.id_dept, 0) NOT LIKE 'F%' AND c.id_dept IS NOT NULL) " +
"AND c.id_dept = " + DEPTID + ") ";
}
sQry +="group by a.deptid ) d on d.deptid=c.id_dept ";
sQry +=" where (NVL(DEPT_NAME,0) NOT LIKE 'F%' AND DEPT_NAME IS NOT NULL) AND a.deptid>=32 "
+"order by a.deptid";
System.out.println("Gen Query:" + sQry);
return sQry;
}
public List<Map<String, Object>> getzonewisedaskboardQuery(String DEPTID) {
Connection con =DBConnection.getConnection();
// Statement stmt3;
try {
// stmt3 = con.createStatement();
String query = getzonedaskboardQuery(DEPTID);
PreparedStatement pstmt = con.prepareStatement(query);
if (query.contains(":deptID") && DEPTID != null && !DEPTID.equals("0")) {
pstmt.setString(1, DEPTID);
}
System.out.println( "checkingzonewise...");
ResultSet rs3 = pstmt.executeQuery();
List<Map<String, Object>> rows = new ArrayList<>();
while (rs3.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs3.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs3.getObject(i);
//System.out.println(columnName+" :"+columnValue);
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
}
catch (Exception e){
e.printStackTrace();
}
return null;
}
}

98
service/ZonewiseComplaintDetails.java

@ -0,0 +1,98 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class ZonewiseComplaintDetails {
@Autowired
DBConnection dbcon;
public String getzonecomdetailsQuery(String lCmpID) {
Connection connection = DBConnection.getConnection();; // Initialize your database connection
System.out.println("ICmpID.............:"+lCmpID);
String query = "select a.*,nvl(to_char(a.complaintdate,'dd-mm-rrrr'),' ') compdate,c.DEPT_NAME from eggr_complaintdetails@erp a,EG_DEPARTMENT@ERP c where a.deptid=c.id_dept and a.complaintid="+ lCmpID;
System.out.println(query);
try {
PreparedStatement preparedStatement = connection.prepareStatement(query);
preparedStatement.setString(1, lCmpID); // Bind the parameter
ResultSet resultSet = preparedStatement.executeQuery();
// Process the result set and return the result
resultSet.close();
preparedStatement.close();
} catch (SQLException e) {
// Handle any SQL errors
e.printStackTrace();
} finally {
// Close the database connection
}
return query;
}
public List<Map<String, Object>> check(String lCmpID) {
Connection con =DBConnection.getConnection();
Statement stmt3;
try {
stmt3 = con.createStatement();
System.out.println( "checkingzonewisecomplaintdetails...");
ResultSet rs3 = stmt3.executeQuery(getzonecomdetailsQuery(lCmpID));
List<Map<String, Object>> rows = new ArrayList<>();
while (rs3.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs3.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs3.getObject(i);;
System.out.println(columnName+" :"+columnValue);
if(columnValue instanceof String) {
columnValue = HtmlEntityDecoder.convertHtmlEntitiesToUtf8((String) columnValue);
}
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
}
catch (Exception e){
e.printStackTrace();
}
return null;
}
}

123
service/ZonewiseComplaintReports.java

@ -0,0 +1,123 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class ZonewiseComplaintReports {
@Autowired
DBConnection dbcon;
public String getZoneComplaintQuery(String sFrDate,String sToDate,Integer iDeptID, Integer iPgrUserID) {
Integer iPenReOpen = 0;
StringBuilder queryBuilder = new StringBuilder();
queryBuilder.append("SELECT a.*, NVL(TO_CHAR(a.complaintdate, 'dd-mm-rrrr'), ' ') compdate, c.DEPT_NAME, u.user_name FROM ");
queryBuilder.append("eggr_complaintdetails@erp a, EG_DEPARTMENT@ERP c, eggr_redressaldetails@erp b, eg_user@erp u ");
queryBuilder.append("WHERE a.deptid = c.id_dept AND (NVL(DEPT_NAME, '0') NOT LIKE 'F%' AND DEPT_NAME IS NOT NULL) ");
queryBuilder.append("AND a.complaintid = b.complaintid AND complaintdate >= TO_DATE('25-Oct-2010', 'DD-Mon-YYYY') ");
queryBuilder.append("AND u.id_user = b.redressalofficerid ");
if (iPenReOpen == 0) {
queryBuilder.append("AND b.COMPLAINTSTATUSID IN (2, 3, 4, 9) ");
} else if (iPenReOpen == 1) {
queryBuilder.append("AND b.COMPLAINTSTATUSID IN (2, 3, 4) ");
} else if (iPenReOpen == 2) {
queryBuilder.append("AND b.COMPLAINTSTATUSID IN (9) ");
}
/*
if (iRptID == 1) {
queryBuilder.append("AND NVL(a.RECEIVINGCENTERID, 0) = 1 ");
} else if (iRptID == 2) {
queryBuilder.append("AND NVL(a.RECEIVINGCENTERID, 0) != 1 ");
}
*/
if (iDeptID != 0) {
queryBuilder.append("AND NVL(a.deptid, 0) = ").append(iDeptID).append(" ");
}
/*
if (iDaysID == 1) {
queryBuilder.append("AND (SYSDATE - complaintdate) > 90 ");
} else if (iDaysID == 2) {
queryBuilder.append("AND SYSDATE - complaintdate > 60 AND SYSDATE - complaintdate <= 90 ");
} else if (iDaysID == 3) {
queryBuilder.append("AND SYSDATE - complaintdate > 30 AND SYSDATE - complaintdate <= 60 ");
} else if (iDaysID == 4) {
queryBuilder.append("AND SYSDATE - complaintdate > 15 AND SYSDATE - complaintdate <= 30 ");
} else if (iDaysID == 5) {
queryBuilder.append("AND SYSDATE - complaintdate > 0 AND SYSDATE - complaintdate <= 15 ");
}
*/
if (iPgrUserID != 0 && iDeptID != 37) {
queryBuilder.append("AND NVL(b.redressalofficerid, 0) = ").append(iPgrUserID).append(" ");
}
if (!sFrDate.isEmpty() && !sToDate.isEmpty()) {
queryBuilder.append("AND TRUNC(complaintdate) BETWEEN TO_DATE('").append(sFrDate).append("', 'yyyy/MM/dd') ");
queryBuilder.append("AND TO_DATE('").append(sToDate).append("', 'yyyy/MM/dd') ");
}
/*
if ("52,1,22,32,57,59,70,18,69,7,71,19,58,75,43".equals(sComplainttype)) {
queryBuilder.append("AND a.complainttype NOT IN ('52,1,22,32,57,59,70,18,69,7,71,19,75,58,43,146,97,113,114,130,145,118,138,99,152,119,181,112,166') ");
} else if (!"0".equals(sComplainttype)) {
queryBuilder.append("AND complainttype IN (").append(sComplainttype).append(") ");
}
*/
queryBuilder.append("ORDER BY user_name, a.complaintdate");
String sqlQuery = queryBuilder.toString();
System.out.println("sQry: " + sqlQuery);
return sqlQuery;
}
public List<Map<String, Object>> getZoneWiseComplaints( String sFrDate,String sToDate,Integer deptId, Integer pgrUserId) {
Connection con = DBConnection.getConnection();
Statement stmt3;
try {
stmt3 = con.createStatement();
ResultSet rs4 = stmt3.executeQuery(getZoneComplaintQuery(sFrDate,sToDate,deptId, pgrUserId));
List<Map<String, Object>> rows = new ArrayList<>();
while (rs4.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs4.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs4.getObject(i);
// System.out.println(columnName + " : " + columnValue);
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}

132
service/ZonewiseReports.java

@ -0,0 +1,132 @@
package in.gov.chennaicorporation.gccoffice.pgr.service;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
@Service
public class ZonewiseReports {
@Autowired
DBConnection dbcon;
public String getzoneQuery(String sFrDate,String sToDate,String DEPT_NAME) {
String sQry= "Select c.dept_name,a.iduser,a.user_name,nvl(b.extrafield2,' ') MOBILENO,a.nos,a.deptid from (SELECT cd.deptid,u.user_name, COUNT (cd.complaintid) nos,max(u.id_user) iduser"
+" FROM eggr_complaintdetails@erp cd,"
+" eggr_redressaldetails@erp rd,"
+" eggr_complaintstatus@erp st,"
+" eg_user@erp u"
+" WHERE cd.complaintid = rd.complaintid "
+" AND rd.complaintstatusid = st.complaintstatusid"
+" AND rd.redressalofficerid = u.id_user and complaintdate >= '25-oct-2010'";
int iPenReOpen=0;
if ( iPenReOpen == 0 )
sQry += " AND st.statusname IN ('REGISTERED', 'PROCESSING', 'FORWARDED','REOPENED') and rd.COMPLAINTSTATUSID IN(2,3,4,9) ";
else if ( iPenReOpen == 1 ) // Pending
sQry += " AND st.statusname IN ('REGISTERED', 'PROCESSING', 'FORWARDED') and rd.COMPLAINTSTATUSID IN(2,3,4) ";
else if ( iPenReOpen == 2 ) // ReOpen
sQry += " AND st.statusname IN ('REOPENED') and rd.COMPLAINTSTATUSID IN(9) ";
int iRptID=0;
if ( iRptID == 1 ) sQry += " and nvl(RECEIVINGCENTERID,0)=1 ";
else if ( iRptID == 2 ) sQry += " and nvl(RECEIVINGCENTERID,0) !=1 ";
//Object sComplainttype = "";
// if ( sComplainttype .equals("52,1,22,32,57,59,70,18,69,7,71,19,58,75,43") ) sQry += " and complainttype not in("+ sComplainttype +") ";
// else if ( !sComplainttype.equals("0") ) sQry += " and complainttype in("+ sComplainttype +") ";
//if ( !sFrDate.equals("") ) sQry += " and trunc(complaintdate)=to_date('"+ sFrDate +"','dd/mm/yyyy') ";
if ( !sFrDate.equals("") )
{
if (sToDate == null || sToDate.equals("") ) sToDate = sFrDate;
//sQry += " trunc(complaintdate)=to_date('"+ sFrDate +"','dd/mm/yyyy') and ";
sQry += " and trunc(complaintdate) between to_date('"+ sFrDate +"','yyyy/mm/dd') and to_date('"+ sToDate +"','yyyy/mm/dd') ";
}
int iDaysID=0;
if ( iDaysID == 1 ) sQry += " and (sysdate-complaintdate)>90 ";
else if ( iDaysID == 2 ) sQry += " and sysdate-complaintdate>60 and sysdate-complaintdate<=90 ";
else if ( iDaysID == 3 ) sQry += " and sysdate-complaintdate>30 and sysdate-complaintdate<=60 ";
else if ( iDaysID == 4 ) sQry += " and sysdate-complaintdate>15 and sysdate-complaintdate<=30 ";
else if ( iDaysID == 5 ) sQry += " and sysdate-complaintdate>0 and sysdate-complaintdate<=15 ";
sQry += " GROUP BY cd.deptid,u.user_name ORDER BY cd.deptid,u.user_name) a , eg_user@erp b,eg_department@erp c where a.deptid=c.id_dept(+) and ";
sQry += " a.user_name=b.user_name AND (NVL(DEPT_NAME,0) NOT LIKE 'F%' AND DEPT_NAME IS NOT NULL)";
int iDeptID = 0 ;
if ( (iDeptID == 48 || iDeptID == 49 || iDeptID == 50) && iPenReOpen == 2) // ReOpen & Region
{
if ( iDeptID == 48 )
sQry += " and nvl(a.deptid,0) in (32,33,34,35,36,48)";
else if ( iDeptID == 49 )
sQry += " and nvl(a.deptid,0) in (42,43,44,45,46,49)";
else if ( iDeptID == 50 )
sQry += " and nvl(a.deptid,0) in (37,38,39,40,41,50)";
}
else if ( iDeptID != 0 ) sQry += " and nvl(a.deptid,0)= "+ iDeptID;
if (DEPT_NAME != null && !DEPT_NAME.equals("0")) {
sQry += " AND UPPER(NVL(DEPT_NAME, '')) = UPPER('" + DEPT_NAME + "')";
}
//if ( sComplainttype.equals("52,1,22,32,57,59,70,18,69,7,71") ) sQry += " and a.complainttype not in("+ sComplainttype +") ";
//else if ( !sComplainttype.equals("") ) sQry += " and complainttype in("+ sComplainttype +") ";
sQry += " order by c.dept_name,a.user_name";
System.out.println("Gen Query:" + sQry);
return sQry;
}
public List<Map<String, Object>> getZonewise(String sFrDate,String sToDate,String DEPT_NAME) {
Connection con =DBConnection.getConnection();
Statement stmt3;
try {
stmt3 = con.createStatement();
System.out.println( "checkingzonewise...");
//String sComplainttype = "52,1,22,32,57,59,70,18,69,7,71,19,75,58,43,146,97,113,114,130,145,118,138,99,152,119,181,112,166";
ResultSet rs3 = stmt3.executeQuery(getzoneQuery(sFrDate,sToDate,DEPT_NAME));
List<Map<String, Object>> rows = new ArrayList<>();
while (rs3.next()) {
Map<String, Object> row = new HashMap<>();
ResultSetMetaData metaData = rs3.getMetaData();
int columnCount = metaData.getColumnCount();
for (int i = 1; i <= columnCount; i++) {
String columnName = metaData.getColumnName(i);
Object columnValue = rs3.getObject(i);
//System.out.println(columnName+" :"+columnValue);
row.put(columnName, columnValue);
}
rows.add(row);
}
return rows;
}
catch (Exception e){
e.printStackTrace();
}
return null;
}
}
Loading…
Cancel
Save