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.

468 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
​
​
​
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 sFrDate,
  110. @RequestParam(required = false) String sToDate,
  111. @RequestParam(required = false) String DEPT_NAME,
  112. @RequestParam(required = false) String DEPTID) {
  113. System.out.println("ageanalysislist");
  114. System.out.println("reopenzonewiselist");
  115. List<Dtoworeopen> complaintdept= reopenzonewiseDaskboards.getAlldtozwreopen();
  116. List<DtoAgeAnalysisDaskboard> complaintdept1 = ageanalysisDaskboards.getAlldtoageanalysisDaskboard();
  117. // DEPTID is provided, call the query method
  118. if( DEPT_NAME!=null && !DEPT_NAME.isEmpty() && DEPTID!=null && !DEPTID.isEmpty() ) {
  119. List<Map<String, Object>> reopenzonewisedashboardList = reopenzonewiseDaskboards.getReopenZonewisedashboardquery(sFrDate,sToDate,DEPTID);
  120. List<Map<String, Object>> zonewisedashboardList = zonewiseDaskboards.getzonewisedaskboardQuery(sFrDate,sToDate,DEPTID);
  121. model.addAttribute("reopenzonewisedashboardList", reopenzonewisedashboardList);
  122. model.addAttribute("zonewisedashboardList", zonewisedashboardList);
  123. List<Map<String, Object>> ageanalysisdashboardList = ageanalysisDaskboards.getdashboardquery(sFrDate,sToDate,DEPT_NAME);
  124. model.addAttribute("ageanalysisdashboardList", ageanalysisdashboardList);
  125. }
  126. model.addAttribute("complaintdept",complaintdept);
  127. model.addAttribute("complaintdept1",complaintdept1);
  128. model.addAttribute("DEPT_NAME", DEPT_NAME);
  129. model.addAttribute("DEPTID", DEPTID);
  130. model.addAttribute("sFrDate", sFrDate);
  131. model.addAttribute("sToDate", sToDate);
  132. return "modules/pgr/index";
  133. }
  134. //This mapping used for get all public complaints to view
  135. @GetMapping("/allreportlist")
  136. public String Allreport(Model model,
  137. @RequestParam(required = false) String sFrDate,
  138. @RequestParam(required = false) String sToDate,
  139. @RequestParam(required = false) String sRptGroup,
  140. @RequestParam(required = false) String sRptType,
  141. @RequestParam(required = false) String cbCompStatus,
  142. @RequestParam(required = false) String mode) {
  143. System.out.println("allreportlist...fromDate... " + sFrDate + "..toDate...." + sToDate);
  144. System.out.println("group : " + sRptGroup);
  145. System.out.println("type : " + sRptType);
  146. System.out.println("status : " + cbCompStatus);
  147. System.out.println("mode : " + mode);
  148. List<Map<String, Object>> pgrreportlist = new ArrayList<>();
  149. List<ComplaintType> complaintTypes = allReports.getAllComplaintTypes();
  150. List<ComplaintGroup> complaintGroups = allReports.getAllComplaintgroups();
  151. System.out.println("complaintypes:" + complaintTypes);
  152. // Pass the additional parameters to the check method
  153. if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() ) {
  154. pgrreportlist= allReports.check(sFrDate, sToDate, sRptGroup, sRptType, cbCompStatus,mode);
  155. complaintTypes = allReports.getAllComplaintTypes();
  156. complaintGroups = allReports.getAllComplaintgroups();
  157. }
  158. model.addAttribute("complaintTypes", complaintTypes);
  159. model.addAttribute("complaintGroups", complaintGroups);
  160. model.addAttribute("pgrreportlist", pgrreportlist);
  161. model.addAttribute("sFrDate",sFrDate);
  162. model.addAttribute("sToDate",sToDate);
  163. model.addAttribute("sRptGroup",sRptGroup);
  164. model.addAttribute("sRptType",sRptType);
  165. model.addAttribute("cbCompStatus",cbCompStatus);
  166. model.addAttribute("mode",mode);
  167. return "modules/pgr/allreportlist";
  168. }
  169. //This mapping used for get to view QAQC reports
  170. @GetMapping("/qaqc")
  171. public String Qaqc(Model model,
  172. @RequestParam(required = false) String sFrDate,
  173. @RequestParam(required = false) String sToDate) {
  174. System.out.println("qaqcreportlist... " + sFrDate + "..toDate...." + sToDate);
  175. List<Map<String, Object>> qaqclist = new ArrayList<>();
  176. // List<Map<String, Object>> qaqclist = qaqcReports.check1(sFrDate, sToDate);
  177. if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() ) {
  178. qaqclist= qaqcReports.check1(sFrDate, sToDate);
  179. }
  180. model.addAttribute("qaqclist", qaqclist);
  181. model.addAttribute("sFrDate", sFrDate);
  182. model.addAttribute("sToDate", sToDate);
  183. return "modules/pgr/qaqc";
  184. }
  185. //This mapping used for to see each zone uisng userIDwise withreopen reports for all public complaints
  186. @GetMapping("/useridwisereport/zonewise")
  187. public String Zonewise(
  188. Model model,
  189. @RequestParam(required = false) String sFrDate,
  190. @RequestParam( required = false) String sToDate,
  191. @RequestParam(required = false) String DEPT_NAME) {
  192. System.out.println("zonewisereportlist");
  193. System.out.println("fromdate : " +sFrDate);
  194. System.out.println("todate : " +sToDate);
  195. System.out.println("deptname : " + DEPT_NAME);
  196. List<Map<String, Object>> zonewiseList = new ArrayList<>();
  197. List<Department> complaintdept= zonewiseReports.getAlldeparments();
  198. if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
  199. zonewiseList= zonewiseReports.getZonewise(sFrDate, sToDate,DEPT_NAME);
  200. complaintdept = zonewiseReports.getAlldeparments();
  201. }
  202. //List<Map<String, Object>> zonewiseList = zonewiseReports.getZonewise(sFrDate, sToDate,DEPT_NAME);
  203. model.addAttribute("zonewiselist", zonewiseList);
  204. model.addAttribute("complaintdept", complaintdept);
  205. model.addAttribute("sFrDate", sFrDate);
  206. model.addAttribute("sToDate", sToDate);
  207. model.addAttribute("DEPT_NAME", DEPT_NAME);
  208. return "modules/pgr/useridwisereport/zonewise";
  209. }
  210. //This mapping used to see a complaints using in popup message with all details of public who complaint for that problem
  211. @GetMapping("/zonecomplaintlist")
  212. public String ZoneComplaintList(
  213. Model model,
  214. @RequestParam(required = false )String sFrDate,
  215. @RequestParam(required = false )String sToDate,
  216. @RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
  217. @RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId) {
  218. System.out.println("zonecomplaintlist");
  219. List<Map<String, Object>> zoneComplaintList = new ArrayList<>();
  220. // Pass the additional parameters to the check method
  221. // List<Map<String, Object>> qaqclist = qaqcReports.check1(sFrDate, sToDate);
  222. if(deptId!=null && pgrUserId!=null ) {
  223. zoneComplaintList= zonewisecomplaintReports.getZoneWiseComplaints(sFrDate,sToDate,deptId, pgrUserId);
  224. }
  225. //List<Map<String, Object>> zoneComplaintList = zonewisecomplaintReports.getZoneWiseComplaints(deptId,pgrUserId);
  226. model.addAttribute("zonecomplaintlist", zoneComplaintList);
  227. return "modules/pgr/useridwisereport/complaintreports/zonecomplaintlist";
  228. }
  229. //This mapping used to get zone wise with reopen complaint details to passing with complaint number
  230. @GetMapping("/zonecomplaintdetail")
  231. public ResponseEntity<?> ZoneComplaintDetail(Model model,@RequestParam("complaintno") String COMPLAINTNUMBER) {
  232. System.out.println("\nzonecomplaintdetails.........:"+COMPLAINTNUMBER);
  233. List<Map<String, Object>> pgrreportList = zonewisecomplaintDetails.check(COMPLAINTNUMBER);
  234. // model.addAttribute("zonecomplaintlist",zonewisecomplaintDetails.check(COMPLAINTID));
  235. if (pgrreportList != null) {
  236. return ResponseEntity.ok(pgrreportList);
  237. } else {
  238. return ResponseEntity.notFound().build();
  239. }
  240. }
  241. //This mapping used for to see each zone using userIDwise without reopen reports for all public complaints
  242. @GetMapping("/useridwisereport/reopenedzonewise")
  243. public String Reopenzone(Model model,
  244. @RequestParam(required = false) String sFrDate,
  245. @RequestParam( required = false) String sToDate,
  246. @RequestParam(required = false) String DEPT_NAME) {
  247. System.out.println("reopenzonewisereportlist");
  248. System.out.println("fromdate : " +sFrDate);
  249. System.out.println("todate : " +sToDate);
  250. System.out.println("deptname : " + DEPT_NAME);
  251. List<Map<String, Object>> reopenzonewiseList = new ArrayList<>();
  252. List<Dtoworeopen> complaintdept= reopenzonewiseReports.getAlldtoworeopen();
  253. if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
  254. reopenzonewiseList= reopenzonewiseReports.getReopenZonewise(sFrDate, sToDate,DEPT_NAME);
  255. complaintdept = reopenzonewiseReports.getAlldtoworeopen();
  256. }
  257. //List<Map<String, Object>> reopenzonewiseList = reopenzonewiseReports.getReopenZonewise();
  258. model.addAttribute("reopenzonewiselist", reopenzonewiseList);
  259. model.addAttribute("complaintdept",complaintdept);
  260. model.addAttribute("sFrDate", sFrDate);
  261. model.addAttribute("sToDate", sToDate);
  262. model.addAttribute("DEPT_NAME", DEPT_NAME);
  263. // model.addAttribute("reopenzonewiselist", reopenzonewiseReports.check());
  264. return "modules/pgr/useridwisereport/reopenedzonewise";
  265. }
  266. //This mapping used for to see each zone using userIDwise without reopen reports for all public complaints
  267. @GetMapping("/reopenzonecomplaintlist")
  268. public String ReopenZoneComplaintList(
  269. Model model,
  270. @RequestParam( required = false) String sFrDate,
  271. @RequestParam( required = false) String sToDate,
  272. @RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
  273. @RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId) {
  274. System.out.println("reopenzonecomplaintlist");
  275. List<Map<String, Object>> reopenzoneComplaintList = new ArrayList<>();
  276. if(deptId!=null && pgrUserId!=null ) {
  277. reopenzoneComplaintList= reopenzonewisecomplaintReports.getReopenZoneWiseComplaints(sFrDate, sToDate,deptId, pgrUserId);
  278. }
  279. model.addAttribute("reopenzonecomplaintlist", reopenzoneComplaintList);
  280. return "modules/pgr/useridwisereport/complaintreports/reopenzonecomplaintlist";
  281. }
  282. //This mapping used to get zone wise without reopen complaint details to passing with complaint number
  283. @GetMapping("/reopenzonecomplaintdetail")
  284. public ResponseEntity<?> ReopenZoneComplaintDetail(Model model,@RequestParam("complaintno") String COMPLAINTNUMBER) {
  285. System.out.println("\nreopenzonecomplaintdetails.........:"+COMPLAINTNUMBER);
  286. List<Map<String, Object>> pgrreportList = reopenzonewisecomplaintDetails.check(COMPLAINTNUMBER);
  287. // model.addAttribute("zonecomplaintlist",zonewisecomplaintDetails.check(COMPLAINTID));
  288. if (pgrreportList != null) {
  289. return ResponseEntity.ok(pgrreportList);
  290. } else {
  291. return ResponseEntity.notFound().build();
  292. }
  293. }
  294. //This mapping used for to see age analysis all zone wise reports
  295. @GetMapping("/useridwisereport/ageanalysis")
  296. public String Ageanalysis(Model model,
  297. @RequestParam(required = false) String sFrDate,
  298. @RequestParam( required = false) String sToDate,
  299. @RequestParam(required = false) String DEPT_NAME) {
  300. System.out.println("ageanalysisreportlist");
  301. System.out.println("fromdte : " +sFrDate);
  302. System.out.println("todte : " +sToDate);
  303. System.out.println("deptname : " + DEPT_NAME);
  304. List<Map<String, Object>> ageanalysisList = new ArrayList<>();
  305. List<DtoAgeAnalysis> complaintdept= ageanalysisReports.getAllDtoAgeAnalysis();
  306. if(sFrDate!=null && !sFrDate.isEmpty() && sToDate!=null && !sToDate.isEmpty() && DEPT_NAME!=null && !DEPT_NAME.isEmpty()) {
  307. ageanalysisList= ageanalysisReports.getAgeAnalysiswise(sFrDate, sToDate,DEPT_NAME);
  308. complaintdept=ageanalysisReports.getAllDtoAgeAnalysis();
  309. }
  310. // List<Map<String, Object>> ageanalysisList = ageanalysisReports.getAgeAnalysiswise();
  311. model.addAttribute("ageanalysislist", ageanalysisList);
  312. model.addAttribute("complaintdept",complaintdept);
  313. model.addAttribute("sFrDate", sFrDate);
  314. model.addAttribute("sToDate", sToDate);
  315. model.addAttribute("DEPT_NAME", DEPT_NAME);
  316. //model.addAttribute("ageanalysislist", ageanalysisReports.check());
  317. return "modules/pgr/useridwisereport/ageanalysis";
  318. }
  319. @GetMapping("/ageanalysiscomplaintslist")
  320. public String AgeAnalysisComplaintList(Model model,
  321. @RequestParam(required = false)String sFrDate,
  322. @RequestParam(required = false)String sToDate,
  323. @RequestParam(name = "Deptid", required = false, defaultValue = "0") Integer deptId,
  324. @RequestParam(name = "PgrUserID", required = false, defaultValue = "") Integer pgrUserId) {
  325. System.out.println("ageanalysiscomplaintlist");
  326. List<Map<String, Object>> ageanalysisComplaintList = new ArrayList<>();
  327. // List<Map<String, Object>> ageanalysisComplaintList = ageanalysiscomplaintReports.getAgeAnalysisComplaints(deptId,pgrUserId);
  328. if(deptId!=null && pgrUserId!=null ) {
  329. ageanalysisComplaintList= ageanalysiscomplaintReports.getAgeAnalysisComplaints(sFrDate,sToDate,deptId, pgrUserId);
  330. }
  331. model.addAttribute("ageanalysiscomplaintlist", ageanalysisComplaintList);
  332. //model.addAttribute("ageanalysiscomplaintlist",ageanalysiscomplaintReports.check());
  333. return "modules/pgr/useridwisereport/complaintreports/ageanalysiscomplaintslist";
  334. }
  335. //This mapping used to get zone wise age analysis complaint details to passing with complaint number
  336. @GetMapping("/ageanalysiscomplaintdetail")
  337. public ResponseEntity<?> AgeAnalysisComplaintDetail(Model model,@RequestParam("complaintno") String COMPLAINTNUMBER) {
  338. System.out.println("\nnageanalysiscomplaintdetails.........:"+COMPLAINTNUMBER);
  339. List<Map<String, Object>> pgrreportList = ageanalysisComplaintDetails.check(COMPLAINTNUMBER);
  340. // model.addAttribute("zonecomplaintlist",zonewisecomplaintDetails.check(COMPLAINTID));
  341. if (pgrreportList != null) {
  342. return ResponseEntity.ok(pgrreportList);
  343. } else {
  344. return ResponseEntity.notFound().build();
  345. }
  346. }
  347. }