• Y
  • List All
  • Feedback
    • This Project
    • This Group
    • All Projects
Profile Account settings Log out
  • Favorite
  • Project
  • All
Loading...
  • Log in
  • Sign up
2025_PROJECT / mjgo_admin star
  • Project homeH
  • CodeC
  • IssueI
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB
  • Files
  • Commit
  • Branches
mjgo_adminsrcmainjavaitncomcmmwebEgovFileMngController.java
Download as .zip file
File name
Commit message
Commit date
DATABASE
first commit
04-21
src/main
Merge remote-tracking branch 'origin/master'
04-24
.codetogether.ignore
first commit
04-21
.gitignore
first commit
04-21
pom.xml
mjon -> mjgo 수정
04-22
File name
Commit message
Commit date
java
5733 메인배너 이미지관리 좌표 추가
04-24
resources
5733 메인배너 이미지관리 좌표 추가
04-24
webapp
Merge remote-tracking branch 'origin/master'
04-24
File name
Commit message
Commit date
egovframework/com/idgen
first commit
04-21
itn
5733 메인배너 이미지관리 좌표 추가
04-24
snippet
Snippet java 주석
04-22
File name
Commit message
Commit date
com
5733 메인배너 이미지관리 좌표 추가
04-24
let
5733 메인배너 이미지관리 좌표 추가
04-24
web
first commit
04-21
File name
Commit message
Commit date
api/web
first commit
04-21
cmm
first commit
04-21
sym/log/ulg
first commit
04-21
uss
5733 메인배너 이미지관리 좌표 추가
04-24
utl
first commit
04-21
File name
Commit message
Commit date
aspect
first commit
04-21
filter
first commit
04-21
interceptor
first commit
04-21
service
first commit
04-21
taglibs
first commit
04-21
util
first commit
04-21
web
first commit
04-21
ComDefaultCodeVO.java
first commit
04-21
ComDefaultVO.java
first commit
04-21
EgovComCrossSiteHndlr.java
first commit
04-21
EgovComExcepHndlr.java
first commit
04-21
EgovComOthersExcepHndlr.java
first commit
04-21
EgovComTraceHandler.java
first commit
04-21
EgovMessageSource.java
first commit
04-21
EgovMultiPartEmail.java
first commit
04-21
EgovWebUtil.java
first commit
04-21
ImagePaginationRenderer.java
first commit
04-21
ImagePaginationRendererWeb.java
first commit
04-21
JsonResult.java
first commit
04-21
LoginVO.java
first commit
04-21
MjonMsgSendVO.java
first commit
04-21
OptimalMsgResultDTO.java
first commit
04-21
ReadVO.java
first commit
04-21
RestResponse.java
first commit
04-21
SessionVO.java
first commit
04-21
UserVO.java
first commit
04-21
File name
Commit message
Commit date
EgovComUtlController.java
first commit
04-21
EgovFileDownloadController.java
first commit
04-21
EgovFileMngController.java
first commit
04-21
EgovImageProcessController.java
first commit
04-21
EgovMultipartResolver.java
first commit
04-21
hehihoho3@gmail.com 04-21 27fb232 first commit UNIX
Raw Open in browser Change history
package itn.com.cmm.web; import java.io.File; import java.util.List; import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; import itn.com.cmm.service.EgovFileMngService; import itn.com.cmm.service.FileVO; /** * 파일 조회, 삭제, 다운로드 처리를 위한 컨트롤러 클래스 * @author 공통서비스개발팀 이삼섭 * @since 2009.06.01 * @version 1.0 * @see * * <pre> * << 개정이력(Modification Information) >> * * 수정일 수정자 수정내용 * ------- -------- --------------------------- * 2009.03.25 이삼섭 최초 생성 * 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성 * * </pre> */ @Controller public class EgovFileMngController { @Resource(name = "EgovFileMngService") private EgovFileMngService fileService; /** * 첨부파일에 대한 목록을 조회한다. * * @param fileVO * @param atchFileId * @param sessionVO * @param model * @return * @throws Exception */ @RequestMapping("/cmm/fms/selectFileInfs.do") public String selectFileInfs(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception { String atchFileId = (String) commandMap.get("param_atchFileId"); fileVO.setAtchFileId(atchFileId); List<FileVO> result = fileService.selectFileInfs(fileVO); model.addAttribute("fileList", result); model.addAttribute("updateFlag", "N"); model.addAttribute("fileListCnt", result.size()); model.addAttribute("atchFileId", atchFileId); return "cmm/fms/EgovFileList"; } /** * 첨부파일 변경을 위한 수정페이지로 이동한다. * * @param fileVO * @param atchFileId * @param sessionVO * @param model * @return * @throws Exception */ @RequestMapping("/cmm/fms/selectFileInfsForUpdate.do") public String selectFileInfsForUpdate(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception { String atchFileId = (String) commandMap.get("param_atchFileId"); fileVO.setAtchFileId(atchFileId); List<FileVO> result = fileService.selectFileInfs(fileVO); model.addAttribute("fileList", result); model.addAttribute("updateFlag", "Y"); model.addAttribute("fileListCnt", result.size()); model.addAttribute("atchFileId", atchFileId); if(commandMap.get("img_view") !=null){ model.addAttribute("img_view", (String)commandMap.get("img_view")); } if(commandMap.get("img_view_w") !=null){ model.addAttribute("img_view_w", (String)commandMap.get("img_view_w")); } if(commandMap.get("img_view_h") !=null){ model.addAttribute("img_view_h", (String)commandMap.get("img_view_h")); } model.addAttribute("commandMap", commandMap); return "cmm/fms/EgovFileList"; } /** * 첨부파일에 대한 삭제를 처리한다. * * @param fileVO * @param returnUrl * @param sessionVO * @param model * @return * @throws Exception */ @RequestMapping("/cmm/fms/deleteFileInfs1.do") public String deleteFileInf1(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam("returnUrl") String returnUrl, HttpServletRequest request, ModelMap model) throws Exception { Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); if (isAuthenticated) { fileService.deleteFileInf(fileVO); } return "blank"; //-------------------------------------------- // contextRoot가 있는 경우 제외 시켜야 함 //-------------------------------------------- ////return "forward:/cmm/fms/selectFileInfs.do"; //return "forward:" + returnUrl; /*if ("".equals(request.getContextPath()) || "/".equals(request.getContextPath())) { return "forward:" + returnUrl; } if (returnUrl.startsWith(request.getContextPath())) { return "forward:" + returnUrl.substring(returnUrl.indexOf("/", 1)); } else { return "forward:" + returnUrl; }*/ ////------------------------------------------ } @RequestMapping("/cmm/fms/deleteFileInfs.do") public String deleteFileInf(@ModelAttribute("searchVO") FileVO fileVO , HttpServletRequest request, ModelMap model ) throws Exception { Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); // 휴대폰 인증 유무 확인 필요 boolean authYn = true; boolean delete = false; if (isAuthenticated || authYn) { FileVO delFileVO =fileService.selectFileInf(fileVO) ; //실제파일삭제 if(delFileVO !=null){ String fileStreCours = delFileVO.getFileStreCours(); String streFileNm = delFileVO.getStreFileNm(); File delFile = new File(fileStreCours+streFileNm); delete = delFile.delete(); } fileService.deleteFileInf(fileVO); } return "blank"; } /** * 게시판 첨부파일에 대한 목록을 조회한다. * * @param fileVO * @param commandMap * @param model * @return * @throws Exception */ @RequestMapping("/cmm/fms/selectBBSFileInfs.do") public String selectBBSFileInfs(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception { String atchFileId = (String) commandMap.get("param_atchFileId"); String pdfView = (String) commandMap.get("pdf_view"); //'Y' 이면 pdf 직접 보여주기 fileVO.setAtchFileId(atchFileId); List<FileVO> result = fileService.selectFileInfs(fileVO); model.addAttribute("fileList", result); model.addAttribute("updateFlag", "N"); model.addAttribute("fileListCnt", result.size()); model.addAttribute("atchFileId", atchFileId); if("Y".equals(pdfView)){ model.addAttribute("pdfView", pdfView); } return "cmm/fms/EgovBBSFileList"; } /** * 게시판 첨부파일에 대한 목록을 조회한다. * * @param fileVO * @param commandMap * @param model * @return * @throws Exception */ @RequestMapping("/cmm/fms/selectAddrAgencyFileInfs.do") public String selectAddrAgencyFileInfs(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception { String atchFileId = (String) commandMap.get("param_atchFileId"); String pdfView = (String) commandMap.get("pdf_view"); //'Y' 이면 pdf 직접 보여주기 fileVO.setAtchFileId(atchFileId); List<FileVO> result = fileService.selectFileInfs(fileVO); model.addAttribute("fileList", result); model.addAttribute("updateFlag", "N"); model.addAttribute("fileListCnt", result.size()); model.addAttribute("atchFileId", atchFileId); if("Y".equals(pdfView)){ model.addAttribute("pdfView", pdfView); } return "cmm/fms/EgovAddrAgencyFileList"; } /** * 게시판 첨부파일에 대한 목록을 조회한다. * * @param fileVO * @param commandMap * @param model * @return * @throws Exception */ @RequestMapping("/cmm/fms/selectMberFileInfs.do") public String selectMberFileInfs(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception { String atchFileId = (String) commandMap.get("param_atchFileId"); String pdfView = (String) commandMap.get("pdf_view"); //'Y' 이면 pdf 직접 보여주기 fileVO.setAtchFileId(atchFileId); List<FileVO> result = fileService.selectFileInfs(fileVO); model.addAttribute("fileList", result); model.addAttribute("updateFlag", "N"); model.addAttribute("fileListCnt", result.size()); model.addAttribute("atchFileId", atchFileId); if("Y".equals(pdfView)){ model.addAttribute("pdfView", pdfView); } return "cmm/fms/EgovMberFileList"; } /** * 게시판 첨부파일에 대한 목록을 조회한다. * * @param fileVO * @param commandMap * @param model * @return * @throws Exception */ @RequestMapping("/cmm/fms/selectBBSFileInfsMjon.do") public String selectBBSFileInfsMjon(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception { String atchFileId = (String) commandMap.get("param_atchFileId"); String pdfView = (String) commandMap.get("pdf_view"); //'Y' 이면 pdf 직접 보여주기 fileVO.setAtchFileId(atchFileId); List<FileVO> result = fileService.selectFileInfs(fileVO); model.addAttribute("fileList", result); model.addAttribute("updateFlag", "N"); model.addAttribute("fileListCnt", result.size()); model.addAttribute("atchFileId", atchFileId); if("Y".equals(pdfView)){ model.addAttribute("pdfView", pdfView); } return "cmm/fms/EgovBBSFileListMjonBbsDetail"; } /** * 게시판 첨부파일 변경을 위한 수정페이지로 이동한다. * * @param fileVO * @param commandMap * @param model * @return * @throws Exception */ @RequestMapping("/cmm/fms/selectBBSFileInfsForUpdate.do") public String selectBBSFileInfsForUpdate(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception { String atchFileId = (String) commandMap.get("param_atchFileId"); boolean isImgView = (boolean) (commandMap.get("isImgView") != null ? Boolean.parseBoolean((String)commandMap.get("isImgView")) : false); fileVO.setAtchFileId(atchFileId); List<FileVO> result = fileService.selectFileInfs(fileVO); model.addAttribute("fileList", result); model.addAttribute("updateFlag", "Y"); model.addAttribute("isImgView", isImgView); model.addAttribute("fileListCnt", result.size()); model.addAttribute("atchFileId", atchFileId); return "cmm/fms/EgovBBSFileList"; } /** * 게시판 첨부파일에 대한 삭제를 처리한다. * * @param fileVO * @param returnUrl * @param request * @param model * @return * @throws Exception */ @RequestMapping("/cmm/fms/deleteBBSFileInfs.do") public String deleteBBSFileInfs(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam("returnUrl") String returnUrl, HttpServletRequest request, ModelMap model) throws Exception { Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); if (isAuthenticated) { fileService.deleteFileInf(fileVO); } return "blank"; } /** * 이미지 첨부파일에 대한 목록을 조회한다. * * @param fileVO * @param atchFileId * @param sessionVO * @param model * @return * @throws Exception */ @RequestMapping("/cmm/fms/selectImageFileInfs.do") public String selectImageFileInfs(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception { String atchFileId = (String) commandMap.get("atchFileId"); fileVO.setAtchFileId(atchFileId); List<FileVO> result = fileService.selectImageFileList(fileVO); model.addAttribute("fileList", result); return "cmm/fms/EgovImgFileList"; } /** * (사용자)이미지 첨부파일에 대한 목록을 조회한다. * * @param fileVO * @param atchFileId * @param sessionVO * @param model * @return * @throws Exception */ @RequestMapping("/cmm/fms/selectImageFileInfsWeb.do") public String selectImageFileInfsWeb(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception { String atchFileId = (String) commandMap.get("atchFileId"); fileVO.setAtchFileId(atchFileId); List<FileVO> result = fileService.selectImageFileList(fileVO); model.addAttribute("fileList", result); return "cmm/fms/EgovImgFileListWeb"; } }

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
Sign in with github login with Google Sign in with Google
Reset password | Sign up