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.

60 lines
1.9 KiB

2 years ago
​
​
2 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. package in.gov.chennaicorporation.gccoffice.pensioner.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 in.gov.chennaicorporation.gccoffice.pensioner.service.NewEntryService;
  8. import in.gov.chennaicorporation.gccoffice.service.LoginUserInfo;
  9. @RequestMapping("/gcc/departmentfileclosing")
  10. @Controller("gccpensionerfileclosing")
  11. public class FileClosingMainController {
  12. @Autowired
  13. private NewEntryService newEntryService;
  14. @GetMapping("/fileclosing")
  15. public String searchEmployee(Model model) {
  16. String LoginUserId = LoginUserInfo.getLoginUserId();
  17. int userId = Integer.parseInt(LoginUserId);
  18. Integer deptId = newEntryService.getloginuserDeptId(userId);
  19. String deptname=newEntryService.getDeptNameById(deptId);
  20. model.addAttribute("LoginUserId",LoginUserId);
  21. String UserRole = LoginUserInfo.getUserRole();
  22. System.out.println("deptId:"+ deptId);
  23. model.addAttribute("deptId", deptId);
  24. model.addAttribute("deptname", deptname);
  25. model.addAttribute("userId", userId);
  26. return "modules/pensioner/department/fileclosing";
  27. }
  28. @GetMapping("/closedlist")
  29. public String closedEmployeeList(Model model) {
  30. String LoginUserId = LoginUserInfo.getLoginUserId();
  31. int userId = Integer.parseInt(LoginUserId);
  32. Integer deptId = newEntryService.getloginuserDeptId(userId);
  33. String deptname=newEntryService.getDeptNameById(deptId);
  34. model.addAttribute("LoginUserId",LoginUserId);
  35. String UserRole = LoginUserInfo.getUserRole();
  36. System.out.println("deptId:"+ deptId);
  37. model.addAttribute("deptId", deptId);
  38. model.addAttribute("deptname", deptname);
  39. model.addAttribute("userId", userId);
  40. return "modules/pensioner/department/closedList";
  41. }
  42. }