/**
   * 등록된 지식맵(지식유형) 정보를 조회 한다.
   *
   * @param mapMaterialVO- 지식맵(지식유형) VO
   * @return String - 리턴 Url
   * @param MapMaterialVO
   */
  @IncludedInfo(
      name = "지식맵관리(유형)",
      listUrl = "/dam/map/mat/EgovComDamMapMaterialList.do",
      order = 1260,
      gid = 80)
  @RequestMapping(value = "/dam/map/mat/EgovComDamMapMaterialList.do")
  public String selectMapMaterialList(
      @ModelAttribute("loginVO") LoginVO loginVO,
      @ModelAttribute("searchVO") MapMaterialVO searchVO,
      ModelMap model)
      throws Exception {

    /** EgovPropertyService.mapMaterial */
    searchVO.setPageUnit(propertiesService.getInt("pageUnit"));
    searchVO.setPageSize(propertiesService.getInt("pageSize"));

    /** paging */
    PaginationInfo paginationInfo = new PaginationInfo();
    paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
    paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
    paginationInfo.setPageSize(searchVO.getPageSize());

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

    List MapMaterialList = mapMaterialService.selectMapMaterialList(searchVO);
    model.addAttribute("resultList", MapMaterialList);

    int totCnt = mapMaterialService.selectMapMaterialTotCnt(searchVO);
    paginationInfo.setTotalRecordCount(totCnt);
    model.addAttribute("paginationInfo", paginationInfo);

    return "egovframework/com/dam/map/mat/EgovComDamMapMaterialList";
  }
 /**
  * 기 등록 된 지식맵(지식유형)링 정보를 수정 한다.
  *
  * @param konTypeNm - 지식맵(지식유형) model
  * @return String - 리턴 Url
  * @param MapMaterialVO
  */
 @RequestMapping(value = "/dam/map/mat/EgovComDamMapMaterialModify.do")
 public String updateMapMaterial(
     @ModelAttribute("loginVO") LoginVO loginVO,
     @ModelAttribute("knoTypeCd") MapMaterial mapMaterial,
     BindingResult bindingResult,
     Map commandMap,
     ModelMap model)
     throws Exception {
   String sCmd = commandMap.get("cmd") == null ? "" : (String) commandMap.get("cmd");
   if (sCmd.equals("")) {
     MapMaterial vo = mapMaterialService.selectMapMaterial(mapMaterial);
     model.addAttribute("mapMaterial", vo);
     return "egovframework/com/dam/map/mat/EgovComDamMapMaterialModify";
   } else if (sCmd.equals("Modify")) {
     beanValidator.validate(mapMaterial, bindingResult);
     if (bindingResult.hasErrors()) {
       MapMaterial vo = mapMaterialService.selectMapMaterial(mapMaterial);
       model.addAttribute("mapMaterial", vo);
       return "egovframework/com/dam/map/mat/EgovComDamMapMaterialModify";
     }
     mapMaterial.setFrstRegisterId(loginVO.getUniqId());
     mapMaterialService.updateMapMaterial(mapMaterial);
     return "forward:/dam/map/mat/EgovComDamMapMaterialList.do";
   } else {
     return "forward:/dam/map/mat/EgovComDamMapMaterialList.do";
   }
 }
 /**
  * 기 등록된 지식맵(지식유형) 정보를 삭제한다.
  *
  * @param konTypeNm - 지식맵(지식유형) model
  * @return String - 리턴 Url
  * @param MapMaterialVO
  */
 @RequestMapping(value = "/dam/map/mat/EgovComDamMapMaterialRemove.do")
 public String deleteMapMaterial(
     @ModelAttribute("loginVO") LoginVO loginVO, MapMaterial mapMaterial, ModelMap model)
     throws Exception {
   mapMaterialService.deleteMapMaterial(mapMaterial);
   return "forward:/dam/map/mat/EgovComDamMapMaterialList.do";
 }
 /**
  * 지식맵(지식유형)상세 정보를 조회 한다.
  *
  * @param MapMaterialVO - 지식맵(지식유형) VO
  * @return String - 리턴 Url
  * @param MapMaterialVO
  */
 @RequestMapping(value = "/dam/map/mat/EgovComDamMapMaterial.do")
 public String selectMapMaterial(
     @ModelAttribute("loginVO") LoginVO loginVO, MapMaterial mapMaterial, ModelMap model)
     throws Exception {
   MapMaterial vo = mapMaterialService.selectMapMaterial(mapMaterial);
   model.addAttribute("result", vo);
   return "egovframework/com/dam/map/mat/EgovComDamMapMaterialDetail";
 }
  /**
   * 지식맵(지식유형) 정보를 신규로 등록한다.
   *
   * @param konTypeNm - 지식맵(지식유형) model
   * @return String - 리턴 Url
   * @param MapMaterialVO
   */
  @RequestMapping(value = "/dam/map/mat/EgovComDamMapMaterialRegist.do")
  public String insertMapMaterial(
      @ModelAttribute("loginVO") LoginVO loginVO,
      @ModelAttribute("mapMaterial") MapMaterial mapMaterial,
      BindingResult bindingResult,
      ModelMap model)
      throws Exception {
    if (mapMaterial.getKnoTypeCd() == null || mapMaterial.getKnoTypeCd().equals("")) {

      MapTeamVO searchVO;
      searchVO = new MapTeamVO();
      searchVO.setRecordCountPerPage(999999);
      searchVO.setFirstIndex(0);
      searchVO.setSearchCondition("MapTeamList");
      List MapMaterialList = mapTeamService.selectMapTeamList(searchVO);
      model.addAttribute("mapTeam", MapMaterialList);

      return "egovframework/com/dam/map/mat/EgovComDamMapMaterialRegist";
    }

    beanValidator.validate(mapMaterial, bindingResult);
    if (bindingResult.hasErrors()) {

      MapTeamVO searchVO;
      searchVO = new MapTeamVO();
      searchVO.setRecordCountPerPage(999999);
      searchVO.setFirstIndex(0);
      searchVO.setSearchCondition("MapTeamList");
      List MapMaterialList = mapTeamService.selectMapTeamList(searchVO);
      model.addAttribute("mapTeam", MapMaterialList);

      return "egovframework/com/dam/map/mat/EgovComDamMapMaterialRegist";
    }

    mapMaterial.setFrstRegisterId(loginVO.getUniqId());
    mapMaterialService.insertMapMaterial(mapMaterial);
    return "forward:/dam/map/mat/EgovComDamMapMaterialList.do";
  }