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.

75 lines
2.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. package in.gov.chennaicorporation.gccoffice.cdwaste.controller;
  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.stereotype.Controller;
  4. import org.springframework.ui.Model;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.client.RestTemplate;
  8. import in.gov.chennaicorporation.gccoffice.configuration.AppConfig;
  9. import in.gov.chennaicorporation.gccoffice.service.LoginUserInfo;
  10. @RequestMapping("/gcc/dumpregistration")
  11. @Controller("dumpregistrationMainController")
  12. public class MainController {
  13. private final LoginUserInfo loginUserInfo;
  14. private final RestTemplate restTemplate;
  15. private final AppConfig appConfig;
  16. @Autowired
  17. public MainController(RestTemplate restTemplate,LoginUserInfo loginUserInfo,
  18. AppConfig appConfig) {
  19. this.restTemplate = restTemplate;
  20. this.appConfig = appConfig;
  21. this.loginUserInfo = loginUserInfo;
  22. }
  23. @GetMapping("/officer")
  24. public String viewOfficer(Model model)
  25. {
  26. String LoginUserId = LoginUserInfo.getLoginUserId();
  27. model.addAttribute("LoginUserId",LoginUserId);
  28. String UserRole = LoginUserInfo.getUserRole();
  29. model.addAttribute("UserRole", UserRole);
  30. return "modules/cdwastecollect/officer";
  31. }
  32. @GetMapping("/lessthanoneton")
  33. public String viewLessoneTonList(Model model)
  34. {
  35. String LoginUserId = LoginUserInfo.getLoginUserId();
  36. model.addAttribute("LoginUserId",LoginUserId);
  37. String UserRole = LoginUserInfo.getUserRole();
  38. model.addAttribute("UserRole", UserRole);
  39. return "modules/cdwastecollect/lessoneton";
  40. }
  41. @GetMapping("/overallreport")
  42. public String wasteCollectionReports(Model model)
  43. {
  44. String LoginUserId = LoginUserInfo.getLoginUserId();
  45. model.addAttribute("LoginUserId",LoginUserId);
  46. String UserRole = LoginUserInfo.getUserRole();
  47. model.addAttribute("UserRole", UserRole);
  48. return "modules/cdwastecollect/reports";
  49. }
  50. }