diff --git a/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeCfnMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeCfnMgtMapper.java index 1f4657c1..18b44c68 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeCfnMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeCfnMgtMapper.java @@ -8,7 +8,6 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; - @Mapper public interface ICodeCfnMgtMapper { diff --git a/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeDtlMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeDtlMgtMapper.java index 144d4bf9..9d486d70 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeDtlMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeDtlMgtMapper.java @@ -8,7 +8,6 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO; -@SuppressWarnings("MybatisXMapperMethodInspection") @Mapper public interface ICodeDtlMgtMapper { diff --git a/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeGrpMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeGrpMgtMapper.java index 15a1e205..ac47555c 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeGrpMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeGrpMgtMapper.java @@ -8,7 +8,6 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO; -@SuppressWarnings("MybatisXMapperMethodInspection") @Mapper public interface ICodeGrpMgtMapper { diff --git a/src/main/java/kr/xit/framework/biz/mng/code/mapper/IZipCodeMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/code/mapper/IZipCodeMgtMapper.java index 37797b96..75119972 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/mapper/IZipCodeMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/mapper/IZipCodeMgtMapper.java @@ -18,7 +18,6 @@ import kr.xit.framework.biz.mng.code.model.XitZipCodeMngVO; * @since 2002. 2. 2. * @version 1.0 Copyright(c) XIT All rights reserved. */ -@SuppressWarnings("MybatisXMapperMethodInspection") @Mapper public interface IZipCodeMgtMapper { diff --git a/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitZipCodeMngMapper.java b/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitZipCodeMngMapper.java deleted file mode 100644 index 50d84d73..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitZipCodeMngMapper.java +++ /dev/null @@ -1,49 +0,0 @@ -package kr.xit.framework.biz.mng.code.mapper; - -import java.sql.SQLException; -import java.util.List; - -import egovframework.rte.psl.dataaccess.mapper.Mapper; -import kr.xit.framework.biz.mng.code.model.XitZipCodeMngSearchVO; -import kr.xit.framework.biz.mng.code.model.XitZipCodeMngVO; - -/** - * - * @업무그룹명: 우편번호관리 Mapper - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:38:07 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -@Mapper -public interface XitZipCodeMngMapper { - - /** - *
메소드 설명: 우편번호관리 목록 조회
- * @param searchVO - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public List findList(XitZipCodeMngSearchVO searchVO) throws SQLException; - - /** - *
메소드 설명: 우편번호관리 목록 총건수 조회
- * @param searchVO - * @return int 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public int findListTotCnt(XitZipCodeMngSearchVO searchVO) throws SQLException; - - /** - *
메소드 설명: 우편번호관리 상세정보 조회
- * @param vo - * @return XitZipCodeMngVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public XitZipCodeMngVO findView(XitZipCodeMngVO vo) throws SQLException; -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/model/XitZipCodeMngSearchVO.java b/src/main/java/kr/xit/framework/biz/mng/code/model/XitZipCodeMngSearchVO.java deleted file mode 100644 index 60bf9574..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/model/XitZipCodeMngSearchVO.java +++ /dev/null @@ -1,22 +0,0 @@ -package kr.xit.framework.biz.mng.code.model; - -import kr.xit.framework.core.model.XitBaseSearchVO; - -/** - * - * @업무그룹명: 우편번호관리 SearchVO - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:44:22 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public class XitZipCodeMngSearchVO extends XitBaseSearchVO{ - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 1L; - -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/IZipCodeMgtService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/IZipCodeMgtService.java index 3322d5a3..e5631d3e 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/IZipCodeMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/service/IZipCodeMgtService.java @@ -25,63 +25,4 @@ public interface IZipCodeMgtService { void addZipCode(final XitZipCodeMngVO vo); void modifyZipCode(final XitZipCodeMngVO vo); void removeZipcode(final XitZipCodeMngVO vo); - - - - - - - - - - - - - - - - - /** - *
메소드 설명: 우편번호관리 등록
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void addProc(XitZipCodeMngVO vo); - - /** - *
메소드 설명: 우편번호관리 일괄 등록
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void addsProc(InputStream fis) throws Exception; - - /** - *
메소드 설명: 우편번호관리 수정
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void modifyProc(XitZipCodeMngVO vo); - - /** - *
메소드 설명: 우편번호관리 삭제
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void removeProc(XitZipCodeMngVO vo); - - /** - *
메소드 설명: 우편번호관리 다건 삭제
- * @param zips - * @param sns - * @return void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void removesProc(String zips, String sns); - - } diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/XitZipCodeMngService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/XitZipCodeMngService.java deleted file mode 100644 index aa51177d..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/XitZipCodeMngService.java +++ /dev/null @@ -1,90 +0,0 @@ -package kr.xit.framework.biz.mng.code.service; - -import java.io.InputStream; -import java.util.List; - -import kr.xit.framework.biz.mng.code.model.XitZipCodeMngSearchVO; -import kr.xit.framework.biz.mng.code.model.XitZipCodeMngVO; - -/** - * - * @업무그룹명: 우편번호관리 Service - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:38:56 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface XitZipCodeMngService { - - - /** - *
메소드 설명: 우편번호관리 목록 조회
- * @param searchVO - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public List findList(XitZipCodeMngSearchVO searchVO); - - /** - *
메소드 설명: 우편번호관리 목록 총건수 조회
- * @param searchVO - * @return int 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public int findListTotCnt(XitZipCodeMngSearchVO searchVO); - - /** - *
메소드 설명: 우편번호관리 상세정보 조회
- * @param vo - * @return XitZipCodeMngVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public XitZipCodeMngVO findView(XitZipCodeMngVO vo); - - /** - *
메소드 설명: 우편번호관리 등록
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void addProc(XitZipCodeMngVO vo); - - /** - *
메소드 설명: 우편번호관리 일괄 등록
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void addsProc(InputStream fis) throws Exception; - - /** - *
메소드 설명: 우편번호관리 수정
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void modifyProc(XitZipCodeMngVO vo); - - /** - *
메소드 설명: 우편번호관리 삭제
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void removeProc(XitZipCodeMngVO vo); - - /** - *
메소드 설명: 우편번호관리 다건 삭제
- * @param zips - * @param sns - * @return void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void removesProc(String zips, String sns); -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/ZipCodeMgtService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/ZipCodeMgtService.java index 733d34e6..03ec0920 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/ZipCodeMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/service/ZipCodeMgtService.java @@ -16,20 +16,13 @@ import kr.xit.framework.biz.cmm.service.XitFrameCrudService; import kr.xit.framework.biz.mng.code.mapper.IZipCodeMgtMapper; import kr.xit.framework.biz.mng.code.model.XitZipCodeMngVO; import kr.xit.framework.core.message.XitMessageSource; +import lombok.RequiredArgsConstructor; +@RequiredArgsConstructor @Service public class ZipCodeMgtService implements IZipCodeMgtService { - @Resource - private IZipCodeMgtMapper mapper; - @Resource - private XitFrameCrudService xitFrameCrudService; - @Resource(name="groupIdGnrService") - private EgovIdGnrService idgenService; - @Resource - private XitMessageSource xitMessageSource; - @Resource(name = "egovExcelService") - private EgovExcelService excelZipService; + private final IZipCodeMgtMapper mapper; @Override public List findZipCodes(final Map paraMap, final RowBounds rowBounds) { @@ -55,97 +48,4 @@ public class ZipCodeMgtService implements IZipCodeMgtService { public void removeZipcode(final XitZipCodeMngVO vo) { mapper.deleteZip(vo); } - - - - @Override - public void addProc(XitZipCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitZipVO zipVO = convertToCrudVO(vo); - zipVO.setFrst_register_id(vo.getFrstRegisterId()); - - - /** - * 처리 - */ - xitFrameCrudService.addXitZip(zipVO); - - } - - @Override - public void addsProc(InputStream fis) throws Exception { - /** - * 처리 - */ - xitFrameCrudService.removesXitZip(new XitZipVO()); - excelZipService.uploadExcel("kr.xit.framework.biz.cmm.dao.XitFrameCrudMapper.addXitZip", fis, 2, 5000); - } - - @Override - public void modifyProc(XitZipCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitZipVO zipVO = convertToCrudVO(vo); - zipVO.setLast_updusr_id(vo.getLastUpdusrId()); - - - /** - * 처리 - */ - xitFrameCrudService.modifyXitZip(zipVO); - } - - @Override - public void removeProc(XitZipCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitZipVO zipVO = convertToCrudVO(vo); - - - /** - * 처리 - */ - xitFrameCrudService.removeXitZip(zipVO); - } - - @Override - public void removesProc(String zips, String sns) { - /** - * 처리 - */ - String [] arrZip = zips.split(";"); - String [] arrSn = sns.split(";"); - for(int i=0; i - * 메소드 설명: 메뉴VO를 CRUD Service의 VO로 변환 한다. - * - * - * @return XitZipVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - private XitZipVO convertToCrudVO(XitZipCodeMngVO vo) { - XitZipVO crudVO = new XitZipVO(); - crudVO.setZip (vo.getZip()); //우편번호 - crudVO.setSn (String.valueOf(vo.getSn())); //순번 - crudVO.setCtprvn_nm (vo.getCtprvnNm()); //시도 명 - crudVO.setSigngu_nm (vo.getSignguNm()); //시군구 명 - crudVO.setEmd_nm (vo.getEmdNm()); //읍면동 명 - crudVO.setLi_buld_nm (vo.getLiBuldNm()); //리 건물 명 - crudVO.setLnbr_dong_ho (vo.getLnbrDongHo()); //번지 동 호 - - return crudVO; - } } diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitZipCodeMngServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitZipCodeMngServiceImpl.java deleted file mode 100644 index 24010986..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitZipCodeMngServiceImpl.java +++ /dev/null @@ -1,158 +0,0 @@ -package kr.xit.framework.biz.mng.code.service.impl; - -import java.io.InputStream; -import java.sql.SQLException; -import java.util.List; - -import javax.annotation.Resource; - -import org.springframework.stereotype.Service; - -import egovframework.rte.fdl.excel.EgovExcelService; -import egovframework.rte.fdl.idgnr.EgovIdGnrService; -import kr.xit.framework.biz.cmm.model.XitZipVO; -import kr.xit.framework.biz.cmm.service.XitFrameCrudService; -import kr.xit.framework.biz.mng.code.model.XitZipCodeMngSearchVO; -import kr.xit.framework.biz.mng.code.model.XitZipCodeMngVO; -import kr.xit.framework.biz.mng.code.service.XitZipCodeMngService; -import kr.xit.framework.biz.mng.code.mapper.XitZipCodeMngMapper; -import kr.xit.framework.core.message.XitMessageSource; - -@Service -public class XitZipCodeMngServiceImpl implements XitZipCodeMngService { - - @Resource - private XitZipCodeMngMapper xitZipCodeMngMapper; - @Resource - private XitFrameCrudService xitFrameCrudService; - @Resource(name="groupIdGnrService") - private EgovIdGnrService idgenService; - @Resource - private XitMessageSource xitMessageSource; - @Resource(name = "egovExcelService") - private EgovExcelService excelZipService; - - @Override - public List findList(XitZipCodeMngSearchVO searchVO) { - List result = null; - try { - result = xitZipCodeMngMapper.findList(searchVO); - } catch (SQLException e) { - throw new RuntimeException("사용자그룹관리 목록 조회 FAIL::", e); - } - return result; - } - - @Override - public int findListTotCnt(XitZipCodeMngSearchVO searchVO) { - int result = 0; - try { - result = xitZipCodeMngMapper.findListTotCnt(searchVO); - } catch (SQLException e) { - throw new RuntimeException("사용자그룹관리 목록 총건수 조회 FAIL::", e); - } - return result; - } - - @Override - public XitZipCodeMngVO findView(XitZipCodeMngVO vo) { - XitZipCodeMngVO result = null; - try { - result = xitZipCodeMngMapper.findView(vo); - } catch (SQLException e) { - throw new RuntimeException("사용자그룹관리 상세정보 조회 FAIL::", e); - } - return result; - } - - @Override - public void addProc(XitZipCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitZipVO zipVO = convertToCrudVO(vo); - zipVO.setFrst_register_id(vo.getFrstRegisterId()); - - - /** - * 처리 - */ - xitFrameCrudService.addXitZip(zipVO); - - } - - @Override - public void addsProc(InputStream fis) throws Exception { - /** - * 처리 - */ - xitFrameCrudService.removesXitZip(new XitZipVO()); - excelZipService.uploadExcel("kr.xit.framework.biz.cmm.dao.XitFrameCrudMapper.addXitZip", fis, 2, 5000); - } - - @Override - public void modifyProc(XitZipCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitZipVO zipVO = convertToCrudVO(vo); - zipVO.setLast_updusr_id(vo.getLastUpdusrId()); - - - /** - * 처리 - */ - xitFrameCrudService.modifyXitZip(zipVO); - } - - @Override - public void removeProc(XitZipCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitZipVO zipVO = convertToCrudVO(vo); - - - /** - * 처리 - */ - xitFrameCrudService.removeXitZip(zipVO); - } - - @Override - public void removesProc(String zips, String sns) { - /** - * 처리 - */ - String [] arrZip = zips.split(";"); - String [] arrSn = sns.split(";"); - for(int i=0; i - * 메소드 설명: 메뉴VO를 CRUD Service의 VO로 변환 한다. - * - * - * @return XitZipVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - private XitZipVO convertToCrudVO(XitZipCodeMngVO vo) { - XitZipVO crudVO = new XitZipVO(); - crudVO.setZip (vo.getZip()); //우편번호 - crudVO.setSn (String.valueOf(vo.getSn())); //순번 - crudVO.setCtprvn_nm (vo.getCtprvnNm()); //시도 명 - crudVO.setSigngu_nm (vo.getSignguNm()); //시군구 명 - crudVO.setEmd_nm (vo.getEmdNm()); //읍면동 명 - crudVO.setLi_buld_nm (vo.getLiBuldNm()); //리 건물 명 - crudVO.setLnbr_dong_ho (vo.getLnbrDongHo()); //번지 동 호 - - return crudVO; - } -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/web/XitZipCodeMngController.java b/src/main/java/kr/xit/framework/biz/mng/code/web/XitZipCodeMngController.java deleted file mode 100644 index e2d2b733..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/web/XitZipCodeMngController.java +++ /dev/null @@ -1,380 +0,0 @@ -package kr.xit.framework.biz.mng.code.web; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.ui.ModelMap; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.support.SessionStatus; - -import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; -import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; -import kr.xit.framework.biz.cmm.model.XitLoginVO; -import kr.xit.framework.biz.mng.code.model.XitZipCodeMngSearchVO; -import kr.xit.framework.biz.mng.code.model.XitZipCodeMngVO; -import kr.xit.framework.biz.mng.code.service.XitZipCodeMngService; -import kr.xit.framework.core.constants.FrameworkConstants; -import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE; -import kr.xit.framework.core.message.XitMessageSource; -import kr.xit.framework.core.utils.XitCmmnUtil; -import kr.xit.framework.core.utils.attachfile.XitAttachFileUtil; -import kr.xit.framework.core.utils.attachfile.XitAttachFileVO; -import kr.xit.framework.core.validation.XitBeanValidator; -import kr.xit.framework.support.util.AjaxUtils; - -/** - * - * @업무그룹명: 우편번호관리 Controller - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:39:52 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -@Controller -@RequestMapping("/framework/biz/mng/ccode/") -public class XitZipCodeMngController { - - private static final Logger logger = LoggerFactory.getLogger(XitZipCodeMngController.class); - - @Resource - private XitZipCodeMngService xitZipCodeMngService; - @Autowired - private XitBeanValidator beanValidator; - @Resource(name = "xitMessageSource") - XitMessageSource xitMessageSource; - - - /** - *
메소드 설명: 우편번호관리 목록 페이지
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @GetMapping(value = "ZipCodeMng_list") - public void ZipCodeMng_list() { - } - /* -
메소드 설명: 우편번호 관리 목록 페이지 조회
- * @return String 요청처리 후 응답객체 - * @author: 최유수 - * @date: 2020. 8.04. - */ - @RequestMapping(value = "ZipCodeMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST}) - @ResponseBody - public Map ZipCodeMng_listAjax(@ModelAttribute("searchVO") XitZipCodeMngSearchVO searchVO, ModelMap model) { - - /** paging */ - PaginationInfo paginationInfo = new PaginationInfo(); - paginationInfo.setCurrentPageNo(searchVO.getPage()>-1?searchVO.getPage():searchVO.getPageIndex()); - paginationInfo.setRecordCountPerPage(searchVO.getPerPage()>-1?searchVO.getPerPage():searchVO.getPageUnit()); - paginationInfo.setPageSize(searchVO.getPageSize()); - searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); - searchVO.setLastIndex(paginationInfo.getLastRecordIndex()); - searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); - - Map resultMap = new HashMap(); - try { - /** - * 조회 - */ - int totCnt = xitZipCodeMngService.findListTotCnt(searchVO); - paginationInfo.setTotalRecordCount(totCnt); - /** - * 반환값 설정 - */ - /* *************************** - * tui Grid Response Set - *************************** */ - resultMap.put("result", true); //[tui Grid] result - resultMap.put("message", xitMessageSource.getMessage("success.common.select")); //[tui Grid] result message - Map data = new HashMap(); - data.put("contents", xitZipCodeMngService.findList(searchVO)); //[tui Grid] data-contents - Map pagination = new HashMap(); - pagination.put("page", searchVO.getPage()); - pagination.put("totalCount", totCnt); - data.put("pagination", pagination); //[tui Grid] data-paging - resultMap.put("data", data); //[tui Grid] data - /* *************************** - * //tui Grid Response Set - *************************** */ - } catch (Exception e) { - /** - * 반환값 설정 - */ - //tui Grid Response Set - resultMap.put("result", false); //[tui Grid] result - resultMap.put("message", xitMessageSource.getMessage("fail.common.select")); //[tui Grid] result message - } - - return resultMap; - } - - - /** - *
메소드 설명: 요청 페이지로 이동 한다.
- * @param page - * @param tilesDef 타일즈 적용 Type(none: tiles 미적용) - * @param model - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "ZipCodeMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST}) - public String ZipCodeMng_page(@PathVariable String cmd - , @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef - , @ModelAttribute("zip") XitZipCodeMngVO vo - , @ModelAttribute XitZipCodeMngSearchVO searchVO - , ModelMap model) { - switch (cmd) { - case "input": //등록 페이지 - case "inputs": //다건 등록 페이지 - break; - case "edit": //수정 페이지 - case "view": //상세 페이지 - model.addAttribute("zip", xitZipCodeMngService.findView(vo)); - model.addAttribute("message", xitMessageSource.getMessage("success.common.select")); - break; - default: - throw new RuntimeException("유효하지 않은 요청 입니다."); - } - - - if(!"".equals(tilesDef)) - tilesDef = "."+tilesDef; - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/code/XitZipCodeMng_"+cmd+tilesDef; - - } - - - /** - *
메소드 설명: 요청 팝업 페이지 이동 한다.
- * @param page - * @param model - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "ZipCodeMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST}) - public String ZipCodeMng_page_popup(@PathVariable String cmd - , @ModelAttribute("zip") XitZipCodeMngVO vo - , @ModelAttribute XitZipCodeMngSearchVO searchVO - , ModelMap model) { - switch (cmd) { - case "": // - break; - default: - throw new RuntimeException("유효하지 않은 요청 입니다."); - } - - - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/code/XitZipCodeMng_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal(); - } - - - - /** - *
메소드 설명: 우편번호관리 CUD 처리
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "ZipCodeMng_{cmd}_proc", method=RequestMethod.POST) - public void ZipCodeMng_cmd_proc(@PathVariable String cmd - ,@ModelAttribute("vo") XitZipCodeMngVO vo - ,@ModelAttribute("searchVO") XitZipCodeMngSearchVO searchVO - ,@RequestParam(value="zips", required=false, defaultValue="") String zips - ,@RequestParam(value="sns", required=false, defaultValue="") String sns - ,BindingResult bindingResult - ,SessionStatus status - ,Model model - ,HttpServletRequest request - ,HttpServletResponse response - ) throws ServletException, IOException { - - /** - * 처리 분기 - */ - XitLoginVO loginVO = (XitLoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); - String sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_list"; - String message = null; - switch (cmd) { - case "insert": //등록 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("zip", vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_input"; - break; - } - //처리 - try { - vo.setFrstRegisterId(loginVO.getUniqId()); - xitZipCodeMngService.addProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.insert"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_input"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_input"; - } - break; - - case "inserts": //다건 등록 - List listAttchFile = null; - try { - listAttchFile = XitAttachFileUtil.fileUpload(request, XitCmmnUtil.setOsPath("/home/tempUpload"), true, 5); - } catch (RuntimeException | IOException e1) { - message = xitMessageSource.getMessage("fail.common.msg"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_inputs"; - } - - if(XitCmmnUtil.isEmpty(listAttchFile)) { - message = xitMessageSource.getMessage("fail.common.msg"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_inputs"; - }else { - FileInputStream fis = null; - try { - XitAttachFileVO fileVO = listAttchFile.get(0); - File file = new File(fileVO.getFileFullPath()); - fis = new FileInputStream(file); - if (!"".equals(fileVO.getFileName())) { - // 2011.10.07 업로드 파일에 대한 확장자를 체크 - if (fileVO.getFileName().toLowerCase().endsWith(".xls") || fileVO.getFileName().toLowerCase().endsWith(".xlsx")) { - xitZipCodeMngService.addsProc(fis); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.insert"); - } else { - //log.info("xls, xlsx 파일 타입만 등록이 가능합니다."); - message = xitMessageSource.getMessage("fail.common.msg"); - model.addAttribute("message", message); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_inputs"; - } - - } else { - message = xitMessageSource.getMessage("fail.common.msg"); - } - } catch (Exception e) { - } finally { - try { - if (fis != null) { - fis.close(); - } - } catch (IOException ee) { - logger.debug("{}", ee); - } - } - } - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_inputs"; - break; - - case "update": //수정 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("zip", vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_edit"; - break; - } - //처리 - try { - vo.setLastUpdusrId(loginVO.getUniqId()); - xitZipCodeMngService.modifyProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.update"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_edit"; - } - break; - - case "delete": //삭제 - //처리 - try { - xitZipCodeMngService.removeProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.delete"); - break; - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.delete"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_edit"; - } - break; - - case "deletes": //다건 삭제 - //처리 - try { - xitZipCodeMngService.removesProc(zips, sns); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.delete"); - } catch (RuntimeException e) { - message = e.getMessage(); - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.delete"); - } - break; - - default: - new RuntimeException("유효하지 않은 요청 입니다."); - } - - - - /** - * 응답 설정 - */ - /* ============================ - * 2020.09.10 박민규 - * 서버 호출 방식에 관계 없이 응답처리가 가능하도록 개선 - * -기존 호출방식도 유지하며 ajax로 서버호출 시 json 으로 응답처리가 가능하도록 개선 - * [AS-IS] 반환타입 String, return url에 "forward"구문으로 처리 - * [TO-BE] 반환타입 void, DispatchServlet으로 forward 처리, ajax 호출인 경우 json응답처리 서비스로 forward - ============================ */ - //2020.09.10 주석처리 -// model.addAttribute("message", message); -// return sLocationUrl; - model.addAttribute("message", message); - if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시 - //반환 데이터 설정 - Map resultMap = new HashMap(); - resultMap.put("message", message); - XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap); - }else { //submit 요청 시 - XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap()); - } - } -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/web/ZipCodeMgtController.java b/src/main/java/kr/xit/framework/biz/mng/code/web/ZipCodeMgtController.java index 969a4c7c..25d0b63b 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/web/ZipCodeMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/web/ZipCodeMgtController.java @@ -1,63 +1,33 @@ package kr.xit.framework.biz.mng.code.web; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; import java.util.Map; -import javax.annotation.Resource; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.support.SessionStatus; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; -import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; -import kr.xit.framework.biz.cmm.model.XitLoginVO; -import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO; -import kr.xit.framework.biz.mng.code.model.XitZipCodeMngSearchVO; import kr.xit.framework.biz.mng.code.model.XitZipCodeMngVO; import kr.xit.framework.biz.mng.code.service.IZipCodeMgtService; import kr.xit.framework.core.constants.FrameworkConstants; -import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE; -import kr.xit.framework.core.message.XitMessageSource; import kr.xit.framework.core.model.ResultResponse; -import kr.xit.framework.core.utils.XitCmmnUtil; -import kr.xit.framework.core.utils.attachfile.XitAttachFileUtil; -import kr.xit.framework.core.utils.attachfile.XitAttachFileVO; -import kr.xit.framework.core.validation.XitBeanValidator; import kr.xit.framework.support.mybatis.MybatisUtils; import kr.xit.framework.support.util.AjaxMessageMapRenderer; -import kr.xit.framework.support.util.AjaxUtils; import kr.xit.framework.support.util.Checks; import kr.xit.framework.support.util.ValidationError; import kr.xit.framework.support.util.constants.MessageKey; +import lombok.RequiredArgsConstructor; +@RequiredArgsConstructor @Controller @RequestMapping("/framework/biz/mng/code") public class ZipCodeMgtController { - @Resource - private IZipCodeMgtService service; - @Autowired - private XitBeanValidator beanValidator; - @Resource(name = "xitMessageSource") - XitMessageSource xitMessageSource; - + private final IZipCodeMgtService service; @RequestMapping(value = "/mngZipCodeMgtForm") public void mngZipCodeMgtForm() { @@ -67,14 +37,23 @@ public class ZipCodeMgtController { public ModelAndView mngZipCodeMgtPopup(final XitZipCodeMngVO vo) { ModelAndView mav = new ModelAndView(); - mav.addObject("zip", Checks.isEmpty(vo.getZip())? new XitAuthRuleMngVO(): service.findZipCode(vo)); + mav.addObject("zipVO", Checks.isEmpty(vo.getZip())? new XitZipCodeMngVO(): service.findZipCode(vo)); mav.addObject("pageTitle", "우편번호 등록 / 변경"); mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/code/mngZipCodeMgtPopup.popup"); return mav; } + @RequestMapping(value = "/mngZipCodeByExcelPopup") + public ModelAndView mngZipCodeByExcelPopup() { + ModelAndView mav = new ModelAndView(); + + mav.addObject("pageTitle", "우편번호 Excel 파일 업로드"); + mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/code/mngZipCodeByExcelPopup.popup"); + return mav; + } + @GetMapping(value = "/findZipCodes") - public ModelAndView findZipCodes(final Map paraMap){ + public ModelAndView findZipCodes(@RequestParam final Map paraMap){ return ResultResponse.of(service.findZipCodes(paraMap, MybatisUtils.getPagingInfo(paraMap))); } @@ -87,7 +66,7 @@ public class ZipCodeMgtController { public ModelAndView addZipCode(final XitZipCodeMngVO vo, final BindingResult bindingResult){ ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); - ValidationError.of("zip", vo, bindingResult); + ValidationError.of("zipVO", vo, bindingResult); service.addZipCode(vo); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS); return mav; @@ -97,7 +76,7 @@ public class ZipCodeMgtController { public ModelAndView modifyZipCode(final XitZipCodeMngVO vo, final BindingResult bindingResult){ ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); - ValidationError.of("zip", vo, bindingResult); + ValidationError.of("zipVO", vo, bindingResult); service.modifyZipCode(vo); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); return mav; @@ -112,89 +91,19 @@ public class ZipCodeMgtController { return mav; } + @PostMapping(value = "/uploadZipCodeByExcel", consumes = {"multipart/form-data"}) + //public String uploadZipCodeByExcel(MultipartHttpServletRequest request) { + public ModelAndView uploadZipCodeByExcel(@RequestPart(value = "file", required = false) MultipartFile mf) { + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); - - - - - - - - - - - - - @RequestMapping(value = "ZipCodeMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST}) - public String ZipCodeMng_page_popup(@PathVariable String cmd - , @ModelAttribute("zip") XitZipCodeMngVO vo - , @ModelAttribute XitZipCodeMngSearchVO searchVO - , ModelMap model) { - switch (cmd) { - case "": // - break; - default: - throw new RuntimeException("유효하지 않은 요청 입니다."); - } - - - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/code/XitZipCodeMng_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal(); + //service.uploadZipCodeByExcel() + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS); + return mav; } - - - /** - *
메소드 설명: 우편번호관리 CUD 처리
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "ZipCodeMng_{cmd}_proc", method=RequestMethod.POST) - public void ZipCodeMng_cmd_proc(@PathVariable String cmd - ,@ModelAttribute("vo") XitZipCodeMngVO vo - ,@ModelAttribute("searchVO") XitZipCodeMngSearchVO searchVO - ,@RequestParam(value="zips", required=false, defaultValue="") String zips - ,@RequestParam(value="sns", required=false, defaultValue="") String sns - ,BindingResult bindingResult - ,SessionStatus status - ,Model model - ,HttpServletRequest request - ,HttpServletResponse response - ) throws ServletException, IOException { - - /** - * 처리 분기 - */ - XitLoginVO loginVO = (XitLoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); - String sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_list"; - String message = null; - switch (cmd) { - case "insert": //등록 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("zip", vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_input"; - break; - } - //처리 - try { - vo.setFrstRegisterId(loginVO.getUniqId()); - service.addProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.insert"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_input"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_input"; - } - break; - - case "inserts": //다건 등록 +} + +/* List listAttchFile = null; try { listAttchFile = XitAttachFileUtil.fileUpload(request, XitCmmnUtil.setOsPath("/home/tempUpload"), true, 5); @@ -202,7 +111,7 @@ public class ZipCodeMgtController { message = xitMessageSource.getMessage("fail.common.msg"); sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_inputs"; } - + if(XitCmmnUtil.isEmpty(listAttchFile)) { message = xitMessageSource.getMessage("fail.common.msg"); sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_inputs"; @@ -215,7 +124,7 @@ public class ZipCodeMgtController { if (!"".equals(fileVO.getFileName())) { // 2011.10.07 업로드 파일에 대한 확장자를 체크 if (fileVO.getFileName().toLowerCase().endsWith(".xls") || fileVO.getFileName().toLowerCase().endsWith(".xlsx")) { - service.addsProc(fis); + xitZipCodeMngService.addsProc(fis); status.setComplete(); message = xitMessageSource.getMessage("success.common.insert"); } else { @@ -235,93 +144,22 @@ public class ZipCodeMgtController { fis.close(); } } catch (IOException ee) { + logger.debug("{}", ee); } } } sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_inputs"; break; - - case "update": //수정 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("zip", vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_edit"; - break; - } - //처리 - try { - vo.setLastUpdusrId(loginVO.getUniqId()); - service.modifyProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.update"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_edit"; - } - break; - - case "delete": //삭제 - //처리 - try { - service.removeProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.delete"); - break; - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.delete"); - sLocationUrl = "forward:/framework/biz/mng/code/ZipCodeMng_edit"; - } - break; - - case "deletes": //다건 삭제 - //처리 - try { - service.removesProc(zips, sns); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.delete"); - } catch (RuntimeException e) { - message = e.getMessage(); - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.delete"); - } - break; - - default: - new RuntimeException("유효하지 않은 요청 입니다."); - } - - - - /** - * 응답 설정 - */ - /* ============================ - * 2020.09.10 박민규 - * 서버 호출 방식에 관계 없이 응답처리가 가능하도록 개선 - * -기존 호출방식도 유지하며 ajax로 서버호출 시 json 으로 응답처리가 가능하도록 개선 - * [AS-IS] 반환타입 String, return url에 "forward"구문으로 처리 - * [TO-BE] 반환타입 void, DispatchServlet으로 forward 처리, ajax 호출인 경우 json응답처리 서비스로 forward - ============================ */ - //2020.09.10 주석처리 -// model.addAttribute("message", message); -// return sLocationUrl; - model.addAttribute("message", message); - if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시 - //반환 데이터 설정 - Map resultMap = new HashMap(); - resultMap.put("message", message); - XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap); - }else { //submit 요청 시 - XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap()); - } + + + + @Resource(name = "egovExcelService") + private EgovExcelService egovExcelService; + + @Override + public void addsProc(InputStream fis) throws Exception { + + xitFrameCrudService.removesXitZip(new XitZipVO()); // 데이타 모두 삭제??? + egovExcelService.uploadExcel("kr.xit.framework.biz.cmm.dao.XitFrameCrudMapper.addXitZip", fis, 2, 5000); } -} + */ diff --git a/src/main/resources/sqlmapper/framework/mng/code/XitZipCodeMng-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/XitZipCodeMng-mysql-mapper.xml deleted file mode 100644 index c361a116..00000000 --- a/src/main/resources/sqlmapper/framework/mng/code/XitZipCodeMng-mysql-mapper.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - SELECT LIST.* FROM( - - - - ) LIST LIMIT #{firstIndex}, #{recordCountPerPage} - - - - - SELECT A.ZIP AS "zip" - ,A.SN AS "sn" - ,A.CTPRVN_NM AS "ctprvnNm" - ,A.SIGNGU_NM AS "signguNm" - ,A.EMD_NM AS "emdNm" - ,A.LI_BULD_NM AS "liBuldNm" - ,A.LNBR_DONG_HO AS "lnbrDongHo" - - - FROM XIT_ZIP A - - - - - AND A.ZIP = #{searchKeyword} - - - AND A.CTPRVN_NM LIKE CONCAT('%',#{searchKeyword},'%') - - - AND A.SIGNGU_NM LIKE CONCAT('%',#{searchKeyword},'%') - - - AND A.EMD_NM LIKE CONCAT('%',#{searchKeyword},'%') - - - AND A.LI_BULD_NM LIKE CONCAT('%',#{searchKeyword},'%') - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/code/zip-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/zip-mysql-mapper.xml index 55cd87b3..2897ecc0 100644 --- a/src/main/resources/sqlmapper/framework/mng/code/zip-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/code/zip-mysql-mapper.xml @@ -1,5 +1,6 @@ + - - - - - - - diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitZipCodeMng_input.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitZipCodeMng_input.jsp deleted file mode 100644 index 5c2b0ecd..00000000 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitZipCodeMng_input.jsp +++ /dev/null @@ -1,260 +0,0 @@ -<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="ufn" uri="/WEB-INF/tlds/egovfn.tld"%> -<%@ taglib prefix="orderby" uri="/WEB-INF/tlds/orderby.tld" %> -<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> - - - - - - - - - - - - diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitZipCodeMng_inputs.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitZipCodeMng_inputs.jsp deleted file mode 100644 index 64341711..00000000 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitZipCodeMng_inputs.jsp +++ /dev/null @@ -1,231 +0,0 @@ -<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<%@ taglib prefix="ufn" uri="/WEB-INF/tlds/egovfn.tld"%> -<%@ taglib prefix="orderby" uri="/WEB-INF/tlds/orderby.tld" %> -<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> - - - - - -
- - - -
- - diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitZipCodeMng_list.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitZipCodeMng_list.jsp deleted file mode 100644 index afc30c05..00000000 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitZipCodeMng_list.jsp +++ /dev/null @@ -1,300 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> - -
- - - - - -
- - 등록 - 엑셀등록 - -
- - - -
-
- - diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngZipCodeByExcelPopup.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngZipCodeByExcelPopup.jsp new file mode 100644 index 00000000..107743d3 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngZipCodeByExcelPopup.jsp @@ -0,0 +1,72 @@ +<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> + + + + + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngZipCodeMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngZipCodeMgtForm.jsp index e2eebaeb..c43f8c32 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngZipCodeMgtForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngZipCodeMgtForm.jsp @@ -28,7 +28,7 @@ - " /> + " /> @@ -41,9 +41,10 @@
- + 등록 - 엑셀등록 + +<%-- 엑셀등록--%>
@@ -77,6 +78,11 @@ case "detail": //상세 popTitle = "우편번호 상세"; break; + case "excel": + url = ''; + popOption = {width: 500, height:280} + popTitle = "excel upload"; + break; default: break; } @@ -103,6 +109,10 @@ $('#btnRegist').on('click', () => { fnBiz.pagePopup('add', null); }); + + $('#btnExcel').on('click', () => { + fnBiz.pagePopup('excel', null); + }); }); /* ******************************* @@ -164,7 +174,12 @@ api: { readData: { url: '' - ,serializer: (params) => fnAddPageInfo(document.frmSearch, params) + ,serializer: (params) => { + const schVal = $('#searchKeyword').val(); + const schKey = $('#searchCondition').val(); + if(schVal && schKey) return getPageParam({[schKey]: schVal}, params); + return getPageParam(null, params); + } } } } diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngZipCodeMgtPopup.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngZipCodeMgtPopup.jsp index 14f6ad9e..0b5a50b2 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngZipCodeMgtPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngZipCodeMgtPopup.jsp @@ -4,17 +4,17 @@ - + - +