示例#1
0
  /**
   * Head메뉴를 조회한다.
   *
   * @param menuManageVO MenuManageVO
   * @return 출력페이지정보 "main_headG", "main_head"
   * @exception Exception
   */
  @RequestMapping(value = "/sym/mms/EgovMainMenuHead.do")
  public String selectMainMenuHead(
      // @ModelAttribute("menuManageVO") MenuManageVO menuManageVO,
      @RequestParam(value = "flag", required = false) String flag, ModelMap model)
      throws Exception {

    MenuManageVO menuManageVO = new MenuManageVO();

    LoginVO user =
        EgovUserDetailsHelper.isAuthenticated()
            ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser()
            : null;
    if (EgovUserDetailsHelper.isAuthenticated() && user != null) {
      menuManageVO.setTmp_Id(user.getId());
      menuManageVO.setTmp_Password(user.getPassword());
      menuManageVO.setTmp_UserSe(user.getUserSe());
      menuManageVO.setTmp_Name(user.getName());
      menuManageVO.setTmp_Email(user.getEmail());
      menuManageVO.setTmp_OrgnztId(user.getOrgnztId());
      menuManageVO.setTmp_UniqId(user.getUniqId());
      model.addAttribute("list_headmenu", menuManageService.selectMainMenuHead(menuManageVO));
      model.addAttribute("list_menulist", menuManageService.selectMainMenuLeft(menuManageVO));
    } else {
      menuManageVO.setAuthorCode("ROLE_ANONYMOUS");
      model.addAttribute(
          "list_headmenu", menuManageService.selectMainMenuHeadByAuthor(menuManageVO));
      model.addAttribute(
          "list_menulist", menuManageService.selectMainMenuLeftByAuthor(menuManageVO));
    }

    if (flag == null) {
      return "main/inc/EgovIncSubHeader"; // 업무화면의 상단메뉴 화면
    } else if (flag.equals("MAIN")) {
      return "main/inc/EgovIncHeader"; // 메인화면의 상단메뉴 화면
    } else {
      return "main/inc/EgovIncSubHeader"; // 업무화면의 상단메뉴 화면
    }
  }
  /**
   * 부서업무 정보에 대한 목록을 조회한다.
   *
   * @param DeptJobVO
   * @return String
   * @param deptJobVO
   */
  @IncludedInfo(name = "부서업무정보", order = 401, gid = 40)
  @RequestMapping("/cop/smt/djm/selectDeptJobList.do")
  public String selectDeptJobList(@ModelAttribute("searchVO") DeptJobVO deptJobVO, ModelMap model)
      throws Exception {
    // LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();

    // 로그인 객체 선언
    LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();

    deptJobVO.setPageUnit(propertyService.getInt("pageUnit"));
    deptJobVO.setPageSize(propertyService.getInt("pageSize"));

    PaginationInfo paginationInfo = new PaginationInfo();
    paginationInfo.setCurrentPageNo(deptJobVO.getPageIndex());
    paginationInfo.setRecordCountPerPage(deptJobVO.getPageUnit());
    paginationInfo.setPageSize(deptJobVO.getPageSize());

    deptJobVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
    deptJobVO.setLastIndex(paginationInfo.getLastRecordIndex());
    deptJobVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());

    if (deptJobVO.getSearchDeptId() == null || deptJobVO.getSearchDeptId().equals("")) {
      deptJobVO.setSearchDeptId(loginVO.getOrgnztId());
    }

    Map<String, Object> map = deptJobService.selectDeptJobList(deptJobVO);
    int totCnt = Integer.parseInt((String) map.get("resultCnt"));
    paginationInfo.setTotalRecordCount(totCnt);

    model.addAttribute("resultBxList", deptJobService.selectDeptJobBxListAll());
    // model.addAttribute("deptId", loginVO.getOrgnztId());
    model.addAttribute("resultList", map.get("resultList"));
    model.addAttribute("resultCnt", map.get("resultCnt"));
    model.addAttribute("paginationInfo", paginationInfo);

    return "egovframework/com/cop/smt/djm/EgovDeptJobList";
  }