You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

463 lines
20 KiB

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
3 years ago
​
​
​
3 years ago
3 years ago
​
​
3 years ago
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
3 years ago
​
​
​
3 years ago
​
​
​
3 years ago
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
3 years ago
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
3 years ago
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
3 years ago
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. package in.gov.chennaicorporation.gccoffice.pgr.contoller;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. import java.util.Map;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.http.ResponseEntity;
  7. import org.springframework.stereotype.Controller;
  8. import org.springframework.ui.Model;
  9. import org.springframework.web.bind.annotation.GetMapping;
  10. import org.springframework.web.bind.annotation.RequestMapping;
  11. import org.springframework.web.bind.annotation.RequestParam;
  12. import org.springframework.web.client.RestTemplate;
  13. import in.gov.chennaicorporation.gccoffice.configuration.AppConfig;
  14. import in.gov.chennaicorporation.gccoffice.pgr.dto.ComplaintGroup;
  15. import in.gov.chennaicorporation.gccoffice.pgr.dto.ComplaintType;
  16. import in.gov.chennaicorporation.gccoffice.pgr.dto.Department;
  17. import in.gov.chennaicorporation.gccoffice.pgr.dto.DtoAgeAnalysis;
  18. import in.gov.chennaicorporation.gccoffice.pgr.dto.DtoAgeAnalysisDaskboard;
  19. import in.gov.chennaicorporation.gccoffice.pgr.dto.Dtoworeopen;
  20. import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisComplaintDetails;
  21. import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisComplaintReports;
  22. import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisDaskboards;
  23. import in.gov.chennaicorporation.gccoffice.pgr.service.AgeAnalysisReports;
  24. import in.gov.chennaicorporation.gccoffice.pgr.service.AllReports;
  25. import in.gov.chennaicorporation.gccoffice.pgr.service.MobileAgeAnalysisComplaintDetails;
  26. //import in.gov.chennaicorporation.gccoffice.pgr.service.MobileAgeAnalysisComplaintReports;
  27. //import in.gov.chennaicorporation.gccoffice.pgr.service.MobileAgeAnalysisReports;
  28. import in.gov.chennaicorporation.gccoffice.pgr.service.QaQcReports;
  29. import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZoneWiseDaskboards;
  30. import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZonewiseComplaintDetails;
  31. import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZonewiseComplaintReports;
  32. import in.gov.chennaicorporation.gccoffice.pgr.service.ReopenZonewiseReports;
  33. import in.gov.chennaicorporation.gccoffice.pgr.service.ZoneWiseDaskboards;
  34. import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseComplaintDetails;
  35. import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseComplaintReports;
  36. import in.gov.chennaicorporation.gccoffice.pgr.service.ZonewiseReports;
  37. @RequestMapping("/pgr")
  38. @Controller("pgrController")
  39. public class Maincontroller {
  40. // private final AppConfig appConfig;
  41. @Autowired
  42. private RestTemplate restTemplate;
  43. private ZoneWiseDaskboards zonewiseDaskboards;
  44. private ReopenZoneWiseDaskboards reopenzonewiseDaskboards;
  45. private AgeAnalysisDaskboards ageanalysisDaskboards;
  46. private AllReports allReports;
  47. private QaQcReports qaqcReports;
  48. private ZonewiseReports zonewiseReports;
  49. private ReopenZonewiseReports reopenzonewiseReports;
  50. private AgeAnalysisReports ageanalysisReports;
  51. //private MobileAgeAnalysisReports mobileageanalysisReports;
  52. private ZonewiseComplaintReports zonewisecomplaintReports;
  53. private ReopenZonewiseComplaintReports reopenzonewisecomplaintReports;
  54. private AgeAnalysisComplaintReports ageanalysiscomplaintReports;
  55. //private MobileAgeAnalysisComplaintReports mobileageanalysiscomplaintReports;
  56. private ZonewiseComplaintDetails zonewisecomplaintDetails;
  57. private ReopenZonewiseComplaintDetails reopenzonewisecomplaintDetails;
  58. private AgeAnalysisComplaintDetails ageanalysisComplaintDetails;
  59. //private MobileAgeAnalysisComplaintDetails mobileageanalysisComplaintDetails;
  60. //private ComplaintTypeService complaintTypeService;
  61. @Autowired
  62. public Maincontroller( RestTemplate restTemplate, AppConfig appConfig,
  63. //ComplaintTypeService complaintTypeService,
  64. ZoneWiseDaskboards zonewiseDaskboards,
  65. ReopenZoneWiseDaskboards reopenzonewiseDaskboards,
  66. AgeAnalysisDaskboards ageanalysisDaskboards,
  67. AllReports allReports, QaQcReports qaqcReports,
  68. ZonewiseReports zonewiseReports, ReopenZonewiseReports reopenzonewiseReports,
  69. AgeAnalysisReports ageanalysisReports,
  70. //MobileAgeAnalysisReports mobileageanalysisReports,
  71. ZonewiseComplaintReports zonewisecomplaintReports,
  72. ReopenZonewiseComplaintReports reopenzonewisecomplaintReports,
  73. AgeAnalysisComplaintReports ageanalysiscomplaintReports,
  74. //MobileAgeAnalysisComplaintReports mobileageanalysiscomplaintReports,
  75. ZonewiseComplaintDetails zonewisecomplaintDetails,
  76. ReopenZonewiseComplaintDetails reopenzonewisecomplaintDetails,
  77. AgeAnalysisComplaintDetails ageanalysisComplaintDetails,
  78. MobileAgeAnalysisComplaintDetails mobileageanalysisComplaintDetails) {
  79. /*
  80. * this.restTemplate=restTemplate; this.appConfig=appConfig;
  81. */
  82. //this.complaintTypeService=complaintTypeService;
  83. this.zonewiseDaskboards=zonewiseDaskboards;
  84. this.reopenzonewiseDaskboards=reopenzonewiseDaskboards;
  85. this.ageanalysisDaskboards=ageanalysisDaskboards;
  86. this.allReports=allReports;
  87. this.qaqcReports=qaqcReports;
  88. this.zonewiseReports=zonewiseReports;
  89. this.reopenzonewiseReports=reopenzonewiseReports;
  90. this.ageanalysisReports=ageanalysisReports;
  91. //this.mobileageanalysisReports=mobileageanalysisReports;
  92. this.zonewisecomplaintReports=zonewisecomplaintReports;
  93. this.reopenzonewisecomplaintReports=reopenzonewisecomplaintReports;
  94. this.ageanalysiscomplaintReports=ageanalysiscomplaintReports;
  95. //this.mobileageanalysiscomplaintReports=mobileageanalysiscomplaintReports;
  96. this.zonewisecomplaintDetails=zonewisecomplaintDetails;
  97. this.reopenzonewisecomplaintDetails=reopenzonewisecomplaintDetails;
  98. this.ageanalysisComplaintDetails=ageanalysisComplaintDetails;
  99. //this.mobileageanalysisComplaintDetails=mobileageanalysisComplaintDetails;
  100. }
  101. @GetMapping({"", "/", "/index"})
  102. public String home(Model model)
  103. {
  104. return "modules/pgr/index";
  105. }
  106. //This mapping used for viewing bar and piechart
  107. @GetMapping("/dashboard")
  108. public String home(Model model,
  109. @RequestParam(required = false) String DEPT_NAME,
  110. @RequestParam(required = false) String DEPTID) {
  111. System.out.println("ageanalysislist");
  112. System.out.println("reopenzonewiselist");
  113. List<Dtoworeopen> complaintdept= reopenzonewiseDaskboards.getAlldtozwreopen();
  114. List<DtoAgeAnalysisDaskboard> complaintdept1 = ageanalysisDaskboards.getAlldtoageanalysisDaskboard();
  115. // DEPTID is provided, call the query method
  116. if( DEPT_NAME!=null && !DEPT_NAME.isEmpty() && DEPTID!=null && !DEPTID.isEmpty() ) {
  117. List<Map<String, Object>> reopenzonewisedashboardList = reopenzonewiseDaskboards.getReopenZonewisedashboardquery(DEPTID);
  118. List<Map<String, Object>> zonewisedashboardList = zonewiseDaskboards.getzonewisedaskboardQuery(DEPTID);
  119. model.addAttribute("reopenzonewisedashboardList", reopenzonewisedashboardList);
  120. model.addAttribute("zonewisedashboardList", zonewisedashboardList);
  121. List<Map<String, Object>> ageanalysisdashboardList = ageanalysisDaskboards.getdashboardquery(DEPT_NAME);
  122. model.addAttribute("ageanalysisdashboardList", ageanalysisdashboardList);
  123. }
  124. model.addAttribute("complaintdept",complaintdept);
  125. model.addAttribute("complaintdept1",complaintdept1);
  126. model.addAttribute("DEPT_NAME", DEPT_NAME);
  127. model.addAttribute("DEPTID", DEPTID);
  128. return "modules/pgr/index";
  129. }
  130. //This mapping used for get all public complaints to view
  131. @GetMapping("/allreportlist")
  132. public String Allreport(Model model,
  133. @RequestParam(required = false) String sFrDate,
  134. @RequestParam(required = false) String sToDate,
  135. @RequestParam(required = false) String sRptGroup,
  136. @RequestParam(required = false) String sRptType,
  137. @RequestParam(required = false) String cbCompStatus,
  138. @RequestParam(required = false) String mode) {
  139. System.out.println("allreportlist...fromDate... " + sFrDate + "..toDate...." + sToDate);
  140. System.out.println("group : " + sRptGroup);
  141. System.out.println("type : " + sRptType);
  142. System.out.println("status : " + cbCompStatus);
  143. System.out.println("mode : " + mode);
  144. List<Map<String, Object>> pgrreportlist = new ArrayList<>();
  145. List<ComplaintType> complaintTypes = allReports.getAllComplaintTypes();
  146. List<ComplaintGroup> complaintGroups = allReports.getAllComplaintgroups();
  147. System.out.println("complaintypes:" + complaintTypes);
  148. // Pass the additional parameters to the check method
  149. if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() ) {
  150. pgrreportlist= allReports.check(sFrDate, sToDate, sRptGroup, sRptType, cbCompStatus,mode);
  151. complaintTypes = allReports.getAllComplaintTypes();
  152. complaintGroups = allReports.getAllComplaintgroups();
  153. }
  154. model.addAttribute("complaintTypes", complaintTypes);
  155. model.addAttribute("complaintGroups", complaintGroups);
  156. model.addAttribute("pgrreportlist", pgrreportlist);
  157. model.addAttribute("sFrDate",sFrDate);
  158. model.addAttribute("sToDate",sToDate);
  159. model.addAttribute("sRptGroup",sRptGroup);
  160. model.addAttribute("sRptType",sRptType);
  161. model.addAttribute("cbCompStatus",cbCompStatus);
  162. model.addAttribute("mode",mode);
  163. return "modules/pgr/allreportlist";
  164. }
  165. //This mapping used for get to view QAQC reports
  166. @GetMapping("/qaqc")
  167. public String Qaqc(Model model,
  168. @RequestParam(required = false) String sFrDate,
  169. @RequestParam(required = false) String sToDate) {
  170. System.out.println("qaqcreportlist... " + sFrDate + "..toDate...." + sToDate);
  171. List<Map<String, Object>> qaqclist = new ArrayList<>();
  172. // List<Map<String, Object>> qaqclist = qaqcReports.check1(sFrDate, sToDate);
  173. if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() ) {
  174. qaqclist= qaqcReports.check1(sFrDate, sToDate);
  175. }
  176. model.addAttribute("qaqclist", qaqclist);
  177. model.addAttribute("sFrDate", sFrDate);
  178. model.addAttribute("sToDate", sToDate);
  179. return "modules/pgr/qaqc";
  180. }
  181. //This mapping used for to see each zone uisng userIDwise withreopen reports for all public complaints
  182. @GetMapping("/useridwisereport/zonewise")
  183. public String Zonewise(
  184. Model model,
  185. @RequestParam(required = false) String sFrDate,
  186. @RequestParam( required = false) String sToDate,
  187. @RequestParam(required = false) String DEPT_NAME) {
  188. System.out.println("zonewisereportlist");
  189. System.out.println("fromdate : " +sFrDate);
  190. System.out.println("todate : " +sToDate);
  191. System.out.println("deptname : " + DEPT_NAME);
  192. List<Map<String, Object>> zonewiseList = new ArrayList<>();
  193. List<Department> complaintdept= zonewiseReports.getAlldeparments();
  194. if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
  195. zonewiseList= zonewiseReports.getZonewise(sFrDate, sToDate,DEPT_NAME);
  196. complaintdept = zonewiseReports.getAlldeparments();
  197. }
  198. //List<Map<String, Object>> zonewiseList = zonewiseReports.getZonewise(sFrDate, sToDate,DEPT_NAME);
  199. model.addAttribute("zonewiselist", zonewiseList);
  200. model.addAttribute("complaintdept", complaintdept);
  201. model.addAttribute("sFrDate", sFrDate);
  202. model.addAttribute("sToDate", sToDate);
  203. model.addAttribute("DEPT_NAME", DEPT_NAME);
  204. return "modules/pgr/useridwisereport/zonewise";
  205. }
  206. //This mapping used to see a complaints using in popup message with all details of public who complaint for that problem
  207. @GetMapping("/zonecomplaintlist")
  208. public String ZoneComplaintList(
  209. Model model,
  210. @RequestParam(required = false )String sFrDate,
  211. @RequestParam(required = false )String sToDate,
  212. @RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
  213. @RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId) {
  214. System.out.println("zonecomplaintlist");
  215. List<Map<String, Object>> zoneComplaintList = new ArrayList<>();
  216. // Pass the additional parameters to the check method
  217. // List<Map<String, Object>> qaqclist = qaqcReports.check1(sFrDate, sToDate);
  218. if(deptId!=null && pgrUserId!=null ) {
  219. zoneComplaintList= zonewisecomplaintReports.getZoneWiseComplaints(sFrDate,sToDate,deptId, pgrUserId);
  220. }
  221. //List<Map<String, Object>> zoneComplaintList = zonewisecomplaintReports.getZoneWiseComplaints(deptId,pgrUserId);
  222. model.addAttribute("zonecomplaintlist", zoneComplaintList);
  223. return "modules/pgr/useridwisereport/complaintreports/zonecomplaintlist";
  224. }
  225. //This mapping used to get zone wise with reopen complaint details to passing with complaint number
  226. @GetMapping("/zonecomplaintdetail")
  227. public ResponseEntity<?> ZoneComplaintDetail(Model model,@RequestParam("complaintno") String COMPLAINTNUMBER) {
  228. System.out.println("\nzonecomplaintdetails.........:"+COMPLAINTNUMBER);
  229. List<Map<String, Object>> pgrreportList = zonewisecomplaintDetails.check(COMPLAINTNUMBER);
  230. // model.addAttribute("zonecomplaintlist",zonewisecomplaintDetails.check(COMPLAINTID));
  231. if (pgrreportList != null) {
  232. return ResponseEntity.ok(pgrreportList);
  233. } else {
  234. return ResponseEntity.notFound().build();
  235. }
  236. }
  237. //This mapping used for to see each zone using userIDwise without reopen reports for all public complaints
  238. @GetMapping("/useridwisereport/reopenedzonewise")
  239. public String Reopenzone(Model model,
  240. @RequestParam(required = false) String sFrDate,
  241. @RequestParam( required = false) String sToDate,
  242. @RequestParam(required = false) String DEPT_NAME) {
  243. System.out.println("reopenzonewisereportlist");
  244. System.out.println("fromdate : " +sFrDate);
  245. System.out.println("todate : " +sToDate);
  246. System.out.println("deptname : " + DEPT_NAME);
  247. List<Map<String, Object>> reopenzonewiseList = new ArrayList<>();
  248. List<Dtoworeopen> complaintdept= reopenzonewiseReports.getAlldtoworeopen();
  249. if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
  250. reopenzonewiseList= reopenzonewiseReports.getReopenZonewise(sFrDate, sToDate,DEPT_NAME);
  251. complaintdept = reopenzonewiseReports.getAlldtoworeopen();
  252. }
  253. //List<Map<String, Object>> reopenzonewiseList = reopenzonewiseReports.getReopenZonewise();
  254. model.addAttribute("reopenzonewiselist", reopenzonewiseList);
  255. model.addAttribute("complaintdept",complaintdept);
  256. model.addAttribute("sFrDate", sFrDate);
  257. model.addAttribute("sToDate", sToDate);
  258. model.addAttribute("DEPT_NAME", DEPT_NAME);
  259. // model.addAttribute("reopenzonewiselist", reopenzonewiseReports.check());
  260. return "modules/pgr/useridwisereport/reopenedzonewise";
  261. }
  262. //This mapping used for to see each zone using userIDwise without reopen reports for all public complaints
  263. @GetMapping("/reopenzonecomplaintlist")
  264. public String ReopenZoneComplaintList(
  265. Model model,
  266. @RequestParam( required = false) String sFrDate,
  267. @RequestParam( required = false) String sToDate,
  268. @RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
  269. @RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId) {
  270. System.out.println("reopenzonecomplaintlist");
  271. List<Map<String, Object>> reopenzoneComplaintList = new ArrayList<>();
  272. if(deptId!=null && pgrUserId!=null ) {
  273. reopenzoneComplaintList= reopenzonewisecomplaintReports.getReopenZoneWiseComplaints(sFrDate, sToDate,deptId, pgrUserId);
  274. }
  275. model.addAttribute("reopenzonecomplaintlist", reopenzoneComplaintList);
  276. return "modules/pgr/useridwisereport/complaintreports/reopenzonecomplaintlist";
  277. }
  278. //This mapping used to get zone wise without reopen complaint details to passing with complaint number
  279. @GetMapping("/reopenzonecomplaintdetail")
  280. public ResponseEntity<?> ReopenZoneComplaintDetail(Model model,@RequestParam("complaintno") String COMPLAINTNUMBER) {
  281. System.out.println("\nreopenzonecomplaintdetails.........:"+COMPLAINTNUMBER);
  282. List<Map<String, Object>> pgrreportList = reopenzonewisecomplaintDetails.check(COMPLAINTNUMBER);
  283. // model.addAttribute("zonecomplaintlist",zonewisecomplaintDetails.check(COMPLAINTID));
  284. if (pgrreportList != null) {
  285. return ResponseEntity.ok(pgrreportList);
  286. } else {
  287. return ResponseEntity.notFound().build();
  288. }
  289. }
  290. //This mapping used for to see age analysis all zone wise reports
  291. @GetMapping("/useridwisereport/ageanalysis")
  292. public String Ageanalysis(Model model,
  293. @RequestParam(required = false) String sFrDate,
  294. @RequestParam( required = false) String sToDate,
  295. @RequestParam(required = false) String DEPT_NAME) {
  296. System.out.println("ageanalysisreportlist");
  297. System.out.println("fromdte : " +sFrDate);
  298. System.out.println("todte : " +sToDate);
  299. System.out.println("deptname : " + DEPT_NAME);
  300. List<Map<String, Object>> ageanalysisList = new ArrayList<>();
  301. List<DtoAgeAnalysis> complaintdept= ageanalysisReports.getAllDtoAgeAnalysis();
  302. if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
  303. ageanalysisList= ageanalysisReports.getAgeAnalysiswise(sFrDate, sToDate,DEPT_NAME);
  304. complaintdept=ageanalysisReports.getAllDtoAgeAnalysis();
  305. }
  306. // List<Map<String, Object>> ageanalysisList = ageanalysisReports.getAgeAnalysiswise();
  307. model.addAttribute("ageanalysislist", ageanalysisList);
  308. model.addAttribute("complaintdept",complaintdept);
  309. model.addAttribute("sFrDate", sFrDate);
  310. model.addAttribute("sToDate", sToDate);
  311. model.addAttribute("DEPT_NAME", DEPT_NAME);
  312. //model.addAttribute("ageanalysislist", ageanalysisReports.check());
  313. return "modules/pgr/useridwisereport/ageanalysis";
  314. }
  315. @GetMapping("/ageanalysiscomplaintslist")
  316. public String AgeAnalysisComplaintList(Model model,
  317. @RequestParam(required = false)String sFrDate,
  318. @RequestParam(required = false)String sToDate,
  319. @RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
  320. @RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId) {
  321. System.out.println("ageanalysiscomplaintlist");
  322. List<Map<String, Object>> ageanalysisComplaintList = new ArrayList<>();
  323. // List<Map<String, Object>> ageanalysisComplaintList = ageanalysiscomplaintReports.getAgeAnalysisComplaints(deptId,pgrUserId);
  324. if(deptId!=null && pgrUserId!=null ) {
  325. ageanalysisComplaintList= ageanalysiscomplaintReports.getAgeAnalysisComplaints(sFrDate,sToDate,deptId, pgrUserId);
  326. }
  327. model.addAttribute("ageanalysiscomplaintlist", ageanalysisComplaintList);
  328. //model.addAttribute("ageanalysiscomplaintlist",ageanalysiscomplaintReports.check());
  329. return "modules/pgr/useridwisereport/complaintreports/ageanalysiscomplaintslist";
  330. }
  331. //This mapping used to get zone wise age analysis complaint details to passing with complaint number
  332. @GetMapping("/ageanalysiscomplaintdetail")
  333. public ResponseEntity<?> AgeAnalysisComplaintDetail(Model model,@RequestParam("complaintno") String COMPLAINTNUMBER) {
  334. System.out.println("\nnageanalysiscomplaintdetails.........:"+COMPLAINTNUMBER);
  335. List<Map<String, Object>> pgrreportList = ageanalysisComplaintDetails.check(COMPLAINTNUMBER);
  336. // model.addAttribute("zonecomplaintlist",zonewisecomplaintDetails.check(COMPLAINTID));
  337. if (pgrreportList != null) {
  338. return ResponseEntity.ok(pgrreportList);
  339. } else {
  340. return ResponseEntity.notFound().build();
  341. }
  342. }
  343. }