diff --git a/src/main/java/kr/xit/framework/biz/cache/mapper/ICacheCodeMapper.java b/src/main/java/kr/xit/framework/biz/cache/mapper/ICacheCodeMapper.java index cb43e7ad..5cacc1f1 100644 --- a/src/main/java/kr/xit/framework/biz/cache/mapper/ICacheCodeMapper.java +++ b/src/main/java/kr/xit/framework/biz/cache/mapper/ICacheCodeMapper.java @@ -5,6 +5,7 @@ import java.util.Map; import egovframework.rte.psl.dataaccess.mapper.Mapper; +@SuppressWarnings("MybatisXMapperMethodInspection") @Mapper public interface ICacheCodeMapper { List> selectCodes(final String codeId); diff --git a/src/main/java/kr/xit/framework/biz/cache/service/CacheService.java b/src/main/java/kr/xit/framework/biz/cache/service/CacheService.java index 44c77fb4..a8b3a9e3 100644 --- a/src/main/java/kr/xit/framework/biz/cache/service/CacheService.java +++ b/src/main/java/kr/xit/framework/biz/cache/service/CacheService.java @@ -12,7 +12,6 @@ import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import kr.xit.framework.biz.cache.mapper.ICacheBbsMapper; -import kr.xit.framework.biz.cache.service.ICacheService; import kr.xit.framework.biz.cache.mapper.ICacheCodeMapper; import kr.xit.framework.biz.cache.mapper.ICacheMenuMapper; import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO; @@ -61,8 +60,8 @@ public class CacheService implements ICacheService { } @Override - @CacheEvict(cacheNames="codeCache", key = "#codeId") - public void evictCodeCache(final String codeId) { + @CacheEvict(cacheNames="codeCache", key = "#codeId + #type") + public void evictCodeCache(final String codeId, final String type) { } // --------------------------------------------------------------------------------------------------------- diff --git a/src/main/java/kr/xit/framework/biz/cache/service/ICacheService.java b/src/main/java/kr/xit/framework/biz/cache/service/ICacheService.java index 7eaf23f3..cd4d9299 100644 --- a/src/main/java/kr/xit/framework/biz/cache/service/ICacheService.java +++ b/src/main/java/kr/xit/framework/biz/cache/service/ICacheService.java @@ -29,7 +29,7 @@ public interface ICacheService { /** * 코드 캐시 Evict */ - void evictCodeCache(final String codeId); + void evictCodeCache(final String codeId, final String type); diff --git a/src/main/java/kr/xit/framework/biz/cache/web/CacheController.java b/src/main/java/kr/xit/framework/biz/cache/web/CacheController.java index 9d758a57..50076135 100644 --- a/src/main/java/kr/xit/framework/biz/cache/web/CacheController.java +++ b/src/main/java/kr/xit/framework/biz/cache/web/CacheController.java @@ -25,7 +25,7 @@ CacheController { @GetMapping(value="/getCodeList") public ModelAndView getCodeList(final String codeId) { ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); - mav.addObject(codeId, CacheServiceUtils.getCodes(codeId)); + mav.addObject("comboList", CacheServiceUtils.getCodes(codeId)); return mav; } @@ -37,7 +37,14 @@ CacheController { @GetMapping(value="/getComboCodeList") public ModelAndView getComboCodeList(final String codeId) { ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); - mav.addObject(codeId, CacheServiceUtils.getComboCodes(codeId)); + mav.addObject("comboList", CacheServiceUtils.getComboCodes(codeId)); + return mav; + } + + @GetMapping(value="/getComboCodeTypeList") + public ModelAndView getComboCodeTypeList(final String codeId, final String type) { + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + mav.addObject("comboList", CacheServiceUtils.getComboCodes(codeId, type)); return mav; } 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 e2eb2706..144d4bf9 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 @@ -6,11 +6,17 @@ import java.util.Map; import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; -import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; +import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO; @SuppressWarnings("MybatisXMapperMethodInspection") @Mapper public interface ICodeDtlMgtMapper { - List selectCmmnDtlCodes(Map paraMap, RowBounds rowBounds); + List selectCmmnDtlCodes(Map paraMap, RowBounds rowBounds); + List selectCmmnDtlCodes(T t); + XitDetailCodeMngVO selectCmmnDtlCode(T t); + + int insertCmmnDtlCode(final XitDetailCodeMngVO vo); + int updateCmmnDtlCode(final XitDetailCodeMngVO vo); + int deleteCmmnDtlCode(final XitDetailCodeMngVO vo); } 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 0246da61..15a1e205 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 @@ -6,11 +6,18 @@ import java.util.Map; import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; -import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; +import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO; @SuppressWarnings("MybatisXMapperMethodInspection") @Mapper public interface ICodeGrpMgtMapper { - List selectCmmnGrpCodes(Map paraMap, RowBounds rowBounds); + List selectCmmnGrpCodes(Map paraMap, RowBounds rowBounds); + List selectCmmnGrpCodes(T t); + + XitCmmnCodeMngVO selectCmmnGrpCode(T t); + + int insertCmmnGrpCode(final XitCmmnCodeMngVO vo); + int updateCmmnGrpCode(final XitCmmnCodeMngVO vo); + int deleteCmmnGrpCode(final XitCmmnCodeMngVO vo); } diff --git a/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitClCodeMngMapper.java b/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitClCodeMngMapper.java deleted file mode 100644 index 3a50f643..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitClCodeMngMapper.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.XitClCodeMngSearchVO; -import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; - -/** - * - * @업무그룹명: 분류코드관리 Mapper - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:38:07 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -@Mapper -public interface XitClCodeMngMapper { - - /** - *
메소드 설명: 분류코드관리 목록 조회
- * @param searchVO - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public List findList(XitClCodeMngSearchVO searchVO) throws SQLException; - - /** - *
메소드 설명: 분류코드관리 목록 총건수 조회
- * @param searchVO - * @return int 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public int findListTotCnt(XitClCodeMngSearchVO searchVO) throws SQLException; - - /** - *
메소드 설명: 분류코드관리 상세정보 조회
- * @param vo - * @return XitClCodeMngVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public XitClCodeMngVO findView(XitClCodeMngVO vo) throws SQLException; -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitCmmnCodeMngMapper.java b/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitCmmnCodeMngMapper.java deleted file mode 100644 index bfb66cdf..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitCmmnCodeMngMapper.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.XitCmmnCodeMngSearchVO; -import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO; - -/** - * - * @업무그룹명: 공통코드관리 Mapper - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:38:07 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -@Mapper -public interface XitCmmnCodeMngMapper { - - /** - *
메소드 설명: 공통코드관리 목록 조회
- * @param searchVO - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public List findList(XitCmmnCodeMngSearchVO searchVO) throws SQLException; - - /** - *
메소드 설명: 공통코드관리 목록 총건수 조회
- * @param searchVO - * @return int 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public int findListTotCnt(XitCmmnCodeMngSearchVO searchVO) throws SQLException; - - /** - *
메소드 설명: 공통코드관리 상세정보 조회
- * @param vo - * @return XitCmmnCodeMngVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public XitCmmnCodeMngVO findView(XitCmmnCodeMngVO vo) throws SQLException; -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitDetailCodeMngMapper.java b/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitDetailCodeMngMapper.java deleted file mode 100644 index 8a21231c..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/mapper/XitDetailCodeMngMapper.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.XitDetailCodeMngVO; -import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngSearchVO; - -/** - * - * @업무그룹명: 상세코드관리 Mapper - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:38:07 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -@Mapper -public interface XitDetailCodeMngMapper { - - /** - *
메소드 설명: 상세코드관리 목록 조회
- * @param searchVO - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public List findList(XitDetailCodeMngSearchVO searchVO) throws SQLException; - - /** - *
메소드 설명: 상세코드관리 목록 총건수 조회
- * @param searchVO - * @return int 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public int findListTotCnt(XitDetailCodeMngSearchVO searchVO) throws SQLException; - - /** - *
메소드 설명: 상세코드관리 상세정보 조회
- * @param vo - * @return XitDetailCodeMngVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public XitDetailCodeMngVO findView(XitDetailCodeMngVO vo) throws SQLException; -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/model/XitClCodeMngSearchVO.java b/src/main/java/kr/xit/framework/biz/mng/code/model/XitClCodeMngSearchVO.java deleted file mode 100644 index 7a40da7b..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/model/XitClCodeMngSearchVO.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 XitClCodeMngSearchVO extends XitBaseSearchVO{ - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 1L; - -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/model/XitCmmnCodeMngSearchVO.java b/src/main/java/kr/xit/framework/biz/mng/code/model/XitCmmnCodeMngSearchVO.java deleted file mode 100644 index eb5c7b81..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/model/XitCmmnCodeMngSearchVO.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 XitCmmnCodeMngSearchVO extends XitBaseSearchVO{ - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 1L; - -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/model/XitDetailCodeMngSearchVO.java b/src/main/java/kr/xit/framework/biz/mng/code/model/XitDetailCodeMngSearchVO.java deleted file mode 100644 index 36ba4cfa..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/model/XitDetailCodeMngSearchVO.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 XitDetailCodeMngSearchVO extends XitBaseSearchVO{ - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 1L; - -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/CodeCfnMgtService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/CodeCfnMgtService.java index 004b1cb6..e2099931 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/CodeCfnMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/service/CodeCfnMgtService.java @@ -3,23 +3,25 @@ package kr.xit.framework.biz.mng.code.service; import java.util.List; import java.util.Map; -import javax.annotation.Resource; - import org.apache.ibatis.session.RowBounds; import org.springframework.stereotype.Service; -import egovframework.rte.fdl.idgnr.EgovIdGnrService; -import kr.xit.framework.biz.cmm.service.XitFrameCrudService; +import kr.xit.framework.biz.cache.service.ICacheService; import kr.xit.framework.biz.mng.code.mapper.ICodeCfnMgtMapper; +import kr.xit.framework.biz.mng.code.mapper.ICodeGrpMgtMapper; import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; -import kr.xit.framework.core.message.XitMessageSource; +import kr.xit.framework.support.exception.BizRuntimeException; +import kr.xit.framework.support.util.constants.MessageKey; import lombok.RequiredArgsConstructor; +//TODO : 캐쉬 반영 @RequiredArgsConstructor @Service public class CodeCfnMgtService implements ICodeCfnMgtService { private final ICodeCfnMgtMapper mapper; + private final ICodeGrpMgtMapper codeGrpMgtMapper; + private final ICacheService cacheService; @Override public List findCodeCfns(final Map paraMap, final RowBounds rowBounds) { @@ -30,16 +32,21 @@ public class CodeCfnMgtService implements ICodeCfnMgtService { public void addCodeCfn(final XitClCodeMngVO vo) { vo.setFrstRegisterId(getUserUniqId()); mapper.insertCmmnClCode(vo); + cacheService.evictCodeCache(null,"CMM_CFN"); } @Override public void modifyCodeCfn(final XitClCodeMngVO vo) { vo.setLastUpdusrId(getUserUniqId()); mapper.updateCmmnClCode(vo); + cacheService.evictCodeCache(null,"CMM_CFN"); } @Override public void removeCodeCfn(final String clCode) { + if(codeGrpMgtMapper.selectCmmnGrpCodes(clCode).size() > 0) + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, String.format("[%s]%s", clCode, "에 등록된 그룹코드가 존재합니다")); mapper.deleteCmmnClCode(clCode); + cacheService.evictCodeCache(null,"CMM_CFN"); } } diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/CodeDtlMgtService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/CodeDtlMgtService.java new file mode 100644 index 00000000..66ab471f --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/service/CodeDtlMgtService.java @@ -0,0 +1,46 @@ +package kr.xit.framework.biz.mng.code.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; + +import kr.xit.framework.biz.cache.service.ICacheService; +import kr.xit.framework.biz.mng.code.mapper.ICodeDtlMgtMapper; +import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO; +import lombok.RequiredArgsConstructor; + +//TODO : 캐쉬 반영 +@RequiredArgsConstructor +@Service +public class CodeDtlMgtService implements ICodeDtlMgtService { + + private final ICodeDtlMgtMapper mapper; + private final ICacheService cacheService; + + @Override + public List findCodeDtls(final Map paraMap, final RowBounds rowBounds) { + return mapper.selectCmmnDtlCodes(paraMap, rowBounds); + } + + @Override + public void addCodeDtl(final XitDetailCodeMngVO vo) { + vo.setFrstRegisterId(getUserUniqId()); + mapper.insertCmmnDtlCode(vo); + cacheService.evictCodeCache(vo.getCodeId(), null); + } + + @Override + public void modifyCodeDtl(final XitDetailCodeMngVO vo) { + vo.setLastUpdusrId(getUserUniqId()); + mapper.updateCmmnDtlCode(vo); + cacheService.evictCodeCache(vo.getCodeId(), null); + } + + @Override + public void removeCodeDtl(final XitDetailCodeMngVO vo) { + mapper.deleteCmmnDtlCode(vo); + cacheService.evictCodeCache(vo.getCodeId(), null); + } +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/CodeGrpMgtService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/CodeGrpMgtService.java new file mode 100644 index 00000000..3374de82 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/service/CodeGrpMgtService.java @@ -0,0 +1,52 @@ +package kr.xit.framework.biz.mng.code.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; +import org.springframework.stereotype.Service; + +import kr.xit.framework.biz.cache.service.ICacheService; +import kr.xit.framework.biz.mng.code.mapper.ICodeDtlMgtMapper; +import kr.xit.framework.biz.mng.code.mapper.ICodeGrpMgtMapper; +import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO; +import kr.xit.framework.support.exception.BizRuntimeException; +import kr.xit.framework.support.util.constants.MessageKey; +import lombok.RequiredArgsConstructor; + +//TODO : 캐쉬 반영 +@RequiredArgsConstructor +@Service +public class CodeGrpMgtService implements ICodeGrpMgtService { + + private final ICodeGrpMgtMapper mapper; + private final ICodeDtlMgtMapper codeDtlMgtMapper; + private final ICacheService cacheService; + + @Override + public List findCodeGrps(final Map paraMap, final RowBounds rowBounds) { + return mapper.selectCmmnGrpCodes(paraMap, rowBounds); + } + + @Override + public void addCodeGrp(final XitCmmnCodeMngVO vo) { + vo.setFrstRegisterId(getUserUniqId()); + mapper.insertCmmnGrpCode(vo); + cacheService.evictCodeCache(null, "CMM_GRP"); + } + + @Override + public void modifyCodeGrp(final XitCmmnCodeMngVO vo) { + vo.setLastUpdusrId(getUserUniqId()); + mapper.updateCmmnGrpCode(vo); + cacheService.evictCodeCache(null, "CMM_GRP"); + } + + @Override + public void removeCodeGrp(final XitCmmnCodeMngVO vo) { + if(codeDtlMgtMapper.selectCmmnDtlCodes(vo.getCodeId()).size() > 0) + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, String.format("[%s]%s", vo.getCodeId(), "에 등록된 그룹코드가 존재합니다")); + mapper.deleteCmmnGrpCode(vo); + cacheService.evictCodeCache(null, "CMM_GRP"); + } +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeDtlMgtService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeDtlMgtService.java new file mode 100644 index 00000000..df6e2572 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeDtlMgtService.java @@ -0,0 +1,35 @@ +package kr.xit.framework.biz.mng.code.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO; +import kr.xit.framework.core.utils.XitCmmnUtil; + +/** + * + * @업무그룹명: 공통코드관리 Service + * @설명: + * @최초작성일: 2020. 4. 16. 오전 9:38:56 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface ICodeDtlMgtService { + + + List findCodeDtls(final Map paraMap, final RowBounds rowBounds); + + void addCodeDtl(final XitDetailCodeMngVO vo); + + void modifyCodeDtl(final XitDetailCodeMngVO vo); + + void removeCodeDtl(final XitDetailCodeMngVO vo); + + default String getUserUniqId(){ + return XitCmmnUtil.getUserUniqId(); + } +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeGrpMgtService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeGrpMgtService.java new file mode 100644 index 00000000..02a87e07 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeGrpMgtService.java @@ -0,0 +1,35 @@ +package kr.xit.framework.biz.mng.code.service; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; + +import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO; +import kr.xit.framework.core.utils.XitCmmnUtil; + +/** + * + * @업무그룹명: 공통코드그룹관리 Service + * @설명: + * @최초작성일: 2020. 4. 16. 오전 9:38:56 + * @최초작성자: 박민규 + * @author (주)엑스아이티 개발팀 + * @since 2002. 2. 2. + * @version 1.0 Copyright(c) XIT All rights reserved. + */ +public interface ICodeGrpMgtService { + + + List findCodeGrps(final Map paraMap, final RowBounds rowBounds); + + void addCodeGrp(final XitCmmnCodeMngVO vo); + + void modifyCodeGrp(final XitCmmnCodeMngVO vo); + + void removeCodeGrp(final XitCmmnCodeMngVO vo); + + default String getUserUniqId(){ + return XitCmmnUtil.getUserUniqId(); + } +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/XitClCodeMngService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/XitClCodeMngService.java deleted file mode 100644 index eb05d03a..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/XitClCodeMngService.java +++ /dev/null @@ -1,79 +0,0 @@ -package kr.xit.framework.biz.mng.code.service; - -import java.util.List; - -import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; -import kr.xit.framework.biz.mng.code.model.XitClCodeMngSearchVO; - -/** - * - * @업무그룹명: 분류코드관리 Service - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:38:56 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface XitClCodeMngService { - - - /** - *
메소드 설명: 분류코드관리 목록 조회
- * @param searchVO - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public List findList(XitClCodeMngSearchVO searchVO); - - /** - *
메소드 설명: 분류코드관리 목록 총건수 조회
- * @param searchVO - * @return int 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public int findListTotCnt(XitClCodeMngSearchVO searchVO); - - /** - *
메소드 설명: 분류코드관리 상세정보 조회
- * @param vo - * @return XitClCodeMngVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public XitClCodeMngVO findView(XitClCodeMngVO vo); - - /** - *
메소드 설명: 분류코드관리 등록
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void addProc(XitClCodeMngVO vo); - - /** - *
메소드 설명: 분류코드관리 수정
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void modifyProc(XitClCodeMngVO vo); - - /** - *
메소드 설명: 분류코드관리 삭제
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void removeProc(XitClCodeMngVO vo); - - /** - *
메소드 설명: 분류코드관리 다건 삭제
- * @param ids void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void removesProc(String ids, String userId); -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/XitCmmnCodeMngService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/XitCmmnCodeMngService.java deleted file mode 100644 index ec801b10..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/XitCmmnCodeMngService.java +++ /dev/null @@ -1,79 +0,0 @@ -package kr.xit.framework.biz.mng.code.service; - -import java.util.List; - -import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngSearchVO; -import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO; - -/** - * - * @업무그룹명: 공통코드관리 Service - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:38:56 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface XitCmmnCodeMngService { - - - /** - *
메소드 설명: 공통코드관리 목록 조회
- * @param searchVO - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public List findList(XitCmmnCodeMngSearchVO searchVO); - - /** - *
메소드 설명: 공통코드관리 목록 총건수 조회
- * @param searchVO - * @return int 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public int findListTotCnt(XitCmmnCodeMngSearchVO searchVO); - - /** - *
메소드 설명: 공통코드관리 상세정보 조회
- * @param vo - * @return XitCmmnCodeMngVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public XitCmmnCodeMngVO findView(XitCmmnCodeMngVO vo); - - /** - *
메소드 설명: 공통코드관리 등록
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void addProc(XitCmmnCodeMngVO vo); - - /** - *
메소드 설명: 공통코드관리 수정
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void modifyProc(XitCmmnCodeMngVO vo); - - /** - *
메소드 설명: 공통코드관리 삭제
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void removeProc(XitCmmnCodeMngVO vo); - - /** - *
메소드 설명: 공통코드관리 다건 삭제
- * @param ids void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void removesProc(String ids, String userId); -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/XitDetailCodeMngService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/XitDetailCodeMngService.java deleted file mode 100644 index 9eb6e438..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/XitDetailCodeMngService.java +++ /dev/null @@ -1,82 +0,0 @@ -package kr.xit.framework.biz.mng.code.service; - -import java.util.List; - -import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO; -import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngSearchVO; - -/** - * - * @업무그룹명: 상세코드관리 Service - * @설명: - * @최초작성일: 2020. 4. 16. 오전 9:38:56 - * @최초작성자: 박민규 - * @author (주)엑스아이티 개발팀 - * @since 2002. 2. 2. - * @version 1.0 Copyright(c) XIT All rights reserved. - */ -public interface XitDetailCodeMngService { - - - /** - *
메소드 설명: 상세코드관리 목록 조회
- * @param searchVO - * @return List 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public List findList(XitDetailCodeMngSearchVO searchVO); - - /** - *
메소드 설명: 상세코드관리 목록 총건수 조회
- * @param searchVO - * @return int 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public int findListTotCnt(XitDetailCodeMngSearchVO searchVO); - - /** - *
메소드 설명: 상세코드관리 상세정보 조회
- * @param vo - * @return XitDetailCodeMngVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public XitDetailCodeMngVO findView(XitDetailCodeMngVO vo); - - /** - *
메소드 설명: 상세코드관리 등록
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void addProc(XitDetailCodeMngVO vo); - - /** - *
메소드 설명: 상세코드관리 수정
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void modifyProc(XitDetailCodeMngVO vo); - - /** - *
메소드 설명: 상세코드관리 삭제
- * @param vo void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void removeProc(XitDetailCodeMngVO vo); - - /** - *
메소드 설명: 상세코드관리 다건 삭제
- * @param codeIds - * @param codes - * @param userId - * @return void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void removesProc(String codeIds, String codes, String userId); -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitClCodeMngServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitClCodeMngServiceImpl.java deleted file mode 100644 index daecf3f5..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitClCodeMngServiceImpl.java +++ /dev/null @@ -1,141 +0,0 @@ -package kr.xit.framework.biz.mng.code.service.impl; - -import java.sql.SQLException; -import java.util.List; - -import javax.annotation.Resource; - -import org.springframework.stereotype.Service; - -import egovframework.rte.fdl.idgnr.EgovIdGnrService; -import kr.xit.framework.biz.cmm.model.XitCmmnClCodeVO; -import kr.xit.framework.biz.cmm.service.XitFrameCrudService; -import kr.xit.framework.biz.mng.code.model.XitClCodeMngSearchVO; -import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; -import kr.xit.framework.biz.mng.code.service.XitClCodeMngService; -import kr.xit.framework.biz.mng.code.mapper.XitClCodeMngMapper; -import kr.xit.framework.core.message.XitMessageSource; - -@Service -public class XitClCodeMngServiceImpl implements XitClCodeMngService { - - @Resource - private XitClCodeMngMapper xitClCodeMngMapper; - @Resource - private XitFrameCrudService xitFrameCrudService; - @Resource(name="groupIdGnrService") - private EgovIdGnrService idgenService; - @Resource - private XitMessageSource xitMessageSource; - - @Override - public List findList(XitClCodeMngSearchVO searchVO) { - List result = null; - try { - result = xitClCodeMngMapper.findList(searchVO); - } catch (SQLException e) { - throw new RuntimeException("분류코드관리 목록 조회 FAIL::", e); - } - return result; - } - - @Override - public int findListTotCnt(XitClCodeMngSearchVO searchVO) { - int result = 0; - try { - result = xitClCodeMngMapper.findListTotCnt(searchVO); - } catch (SQLException e) { - throw new RuntimeException("분류코드관리 목록 총건수 조회 FAIL::", e); - } - return result; - } - - @Override - public XitClCodeMngVO findView(XitClCodeMngVO vo) { - XitClCodeMngVO result = null; - try { - result = xitClCodeMngMapper.findView(vo); - } catch (SQLException e) { - throw new RuntimeException("분류코드관리 상세정보 조회 FAIL::", e); - } - return result; - } - - @Override - public void addProc(XitClCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitCmmnClCodeVO cmmnClCodeVO = convertToCrudVO(vo); - cmmnClCodeVO.setFrst_register_id(vo.getFrstRegisterId()); - - /** - * 처리 - */ - xitFrameCrudService.addXitCmmnClCode(cmmnClCodeVO); - - } - - @Override - public void modifyProc(XitClCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitCmmnClCodeVO cmmnClCodeVO = convertToCrudVO(vo); - cmmnClCodeVO.setLast_updusr_id(vo.getLastUpdusrId()); - - /** - * 처리 - */ - xitFrameCrudService.modifyXitCmmnClCode(cmmnClCodeVO); - } - - @Override - public void removeProc(XitClCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitCmmnClCodeVO cmmnClCodeVO = new XitCmmnClCodeVO(); - cmmnClCodeVO.setCl_code(vo.getClCode()); - cmmnClCodeVO.setLast_updusr_id(vo.getLastUpdusrId()); - cmmnClCodeVO.setUse_at("N"); - - /** - * 처리 - */ - xitFrameCrudService.modifyXitCmmnClCode(cmmnClCodeVO); - } - - @Override - public void removesProc(String ids, String userId) { - /** - * 처리 - */ - String [] clCodes = ids.split(";"); - for(int i=0; i - * 메소드 설명: 메뉴VO를 CRUD Service의 VO로 변환 한다. - * - * - * @return XitCmmnClCodeVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - private XitCmmnClCodeVO convertToCrudVO(XitClCodeMngVO vo) { - XitCmmnClCodeVO crudVO = new XitCmmnClCodeVO(); - crudVO.setCl_code (vo.getClCode()); //분류 코드 - crudVO.setCl_code_nm (vo.getClCodeNm()); //분류 코드 명 - crudVO.setCl_code_dc (vo.getClCodeDc()); //분류 코드 설명 - crudVO.setUse_at (vo.getUseAt()); //사용 여부 - - return crudVO; - } -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitCmmnCodeMngServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitCmmnCodeMngServiceImpl.java deleted file mode 100644 index 38f20903..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitCmmnCodeMngServiceImpl.java +++ /dev/null @@ -1,142 +0,0 @@ -package kr.xit.framework.biz.mng.code.service.impl; - -import java.sql.SQLException; -import java.util.List; - -import javax.annotation.Resource; - -import org.springframework.stereotype.Service; - -import kr.xit.framework.biz.cmm.model.XitCmmnCodeVO; -import kr.xit.framework.biz.cmm.service.XitFrameCrudService; -import kr.xit.framework.biz.mng.code.service.XitCmmnCodeMngService; -import kr.xit.framework.biz.mng.code.mapper.XitCmmnCodeMngMapper; -import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngSearchVO; -import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO; -import kr.xit.framework.core.message.XitMessageSource; - -@Service -public class XitCmmnCodeMngServiceImpl implements XitCmmnCodeMngService { - - @Resource - private XitCmmnCodeMngMapper xitCmmnCodeMngMapper; - @Resource - private XitFrameCrudService xitFrameCrudService; - @Resource - private XitMessageSource xitMessageSource; - - @Override - public List findList(XitCmmnCodeMngSearchVO searchVO) { - List result = null; - try { - result = xitCmmnCodeMngMapper.findList(searchVO); - } catch (SQLException e) { - throw new RuntimeException("공통코드관리 목록 조회 FAIL::", e); - } - return result; - } - - @Override - public int findListTotCnt(XitCmmnCodeMngSearchVO searchVO) { - int result = 0; - try { - result = xitCmmnCodeMngMapper.findListTotCnt(searchVO); - } catch (SQLException e) { - throw new RuntimeException("공통코드관리 목록 총건수 조회 FAIL::", e); - } - return result; - } - - @Override - public XitCmmnCodeMngVO findView(XitCmmnCodeMngVO vo) { - XitCmmnCodeMngVO result = null; - try { - result = xitCmmnCodeMngMapper.findView(vo); - } catch (SQLException e) { - throw new RuntimeException("공통코드관리 상세정보 조회 FAIL::", e); - } - return result; - } - - @Override - public void addProc(XitCmmnCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitCmmnCodeVO cmmnCodeVO = convertToCrudVO(vo); - cmmnCodeVO.setFrst_register_id(vo.getFrstRegisterId()); - - - /** - * 처리 - */ - xitFrameCrudService.addXitCmmnCode(cmmnCodeVO); - - } - - @Override - public void modifyProc(XitCmmnCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitCmmnCodeVO cmmnCodeVO = convertToCrudVO(vo); - cmmnCodeVO.setLast_updusr_id(vo.getLastUpdusrId()); - - - /** - * 처리 - */ - xitFrameCrudService.modifyXitCmmnCode(cmmnCodeVO); - } - - @Override - public void removeProc(XitCmmnCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitCmmnCodeVO cmmnCodeVO = new XitCmmnCodeVO(); - cmmnCodeVO.setCode_id(vo.getCodeId()); - cmmnCodeVO.setLast_updusr_id(vo.getLastUpdusrId()); - cmmnCodeVO.setUse_at("N"); - - - /** - * 처리 - */ - xitFrameCrudService.modifyXitCmmnCode(cmmnCodeVO); - } - - @Override - public void removesProc(String ids, String userId) { - /** - * 처리 - */ - String [] codeIds = ids.split(";"); - for(int i=0; i - * 메소드 설명: 메뉴VO를 CRUD Service의 VO로 변환 한다. - * - * - * @return XitCmmnCodeVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - private XitCmmnCodeVO convertToCrudVO(XitCmmnCodeMngVO vo) { - XitCmmnCodeVO crudVO = new XitCmmnCodeVO(); - crudVO.setCode_id (vo.getCodeId()); //코드 id - crudVO.setCode_id_nm (vo.getCodeIdNm()); //코드 id 명 - crudVO.setCode_id_dc (vo.getCodeIdDc()); //코드 id 설명 - crudVO.setUse_at (vo.getUseAt()); //사용 여부 - crudVO.setCl_code (vo.getClCode()); //분류 코드 - - return crudVO; - } -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitDetailCodeMngServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitDetailCodeMngServiceImpl.java deleted file mode 100644 index edc93444..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/impl/XitDetailCodeMngServiceImpl.java +++ /dev/null @@ -1,145 +0,0 @@ -package kr.xit.framework.biz.mng.code.service.impl; - -import java.sql.SQLException; -import java.util.List; - -import javax.annotation.Resource; - -import org.springframework.stereotype.Service; - -import kr.xit.framework.biz.cmm.model.XitCmmnDetailCodeVO; -import kr.xit.framework.biz.cmm.service.XitFrameCrudService; -import kr.xit.framework.biz.mng.code.mapper.XitDetailCodeMngMapper; -import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO; -import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngSearchVO; -import kr.xit.framework.biz.mng.code.service.XitDetailCodeMngService; -import kr.xit.framework.core.message.XitMessageSource; - -@Service -public class XitDetailCodeMngServiceImpl implements XitDetailCodeMngService{ - - @Resource - private XitDetailCodeMngMapper xitDetailCodeMngMapper; - @Resource - private XitFrameCrudService xitFrameCrudService; - @Resource - private XitMessageSource xitMessageSource; - - @Override - public List findList(XitDetailCodeMngSearchVO searchVO) { - List result = null; - try { - result = xitDetailCodeMngMapper.findList(searchVO); - } catch (SQLException e) { - throw new RuntimeException("상세코드관리 목록 조회 FAIL::", e); - } - return result; - } - - @Override - public int findListTotCnt(XitDetailCodeMngSearchVO searchVO) { - int result = 0; - try { - result = xitDetailCodeMngMapper.findListTotCnt(searchVO); - } catch (SQLException e) { - throw new RuntimeException("상세코드관리 목록 총건수 조회 FAIL::", e); - } - return result; - } - - @Override - public XitDetailCodeMngVO findView(XitDetailCodeMngVO vo) { - XitDetailCodeMngVO result = null; - try { - result = xitDetailCodeMngMapper.findView(vo); - } catch (SQLException e) { - throw new RuntimeException("상세코드관리 상세정보 조회 FAIL::", e); - } - return result; - } - - @Override - public void addProc(XitDetailCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitCmmnDetailCodeVO cmmnDetailCodeVO = convertToCrudVO(vo); - cmmnDetailCodeVO.setFrst_register_id(vo.getFrstRegisterId()); - - - /** - * 처리 - */ - xitFrameCrudService.addXitCmmnDetailCode(cmmnDetailCodeVO); - - } - - @Override - public void modifyProc(XitDetailCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitCmmnDetailCodeVO cmmnDetailCodeVO = convertToCrudVO(vo); - cmmnDetailCodeVO.setLast_updusr_id(vo.getLastUpdusrId()); - - - /** - * 처리 - */ - xitFrameCrudService.modifyXitCmmnDetailCode(cmmnDetailCodeVO); - } - - @Override - public void removeProc(XitDetailCodeMngVO vo) { - /** - * 필수값 설정 - */ - XitCmmnDetailCodeVO cmmnDetailCodeVO = new XitCmmnDetailCodeVO(); - cmmnDetailCodeVO.setCode_id(vo.getCodeId()); - cmmnDetailCodeVO.setCode(vo.getCode()); - cmmnDetailCodeVO.setLast_updusr_id(vo.getLastUpdusrId()); - cmmnDetailCodeVO.setUse_at("N"); - - - /** - * 처리 - */ - xitFrameCrudService.modifyXitCmmnDetailCode(cmmnDetailCodeVO); - } - - @Override - public void removesProc(String codeIds, String codes, String userId) { - /** - * 처리 - */ - String [] arrCodeId = codeIds.split(";"); - String [] arrCode = codes.split(";"); - for(int i=0; i - * 메소드 설명: 메뉴VO를 CRUD Service의 VO로 변환 한다. - * - * - * @return XitCmmnDetailCodeVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - private XitCmmnDetailCodeVO convertToCrudVO(XitDetailCodeMngVO vo) { - XitCmmnDetailCodeVO crudVO = new XitCmmnDetailCodeVO(); - crudVO.setCode_id (vo.getCodeId()); //코드 id - crudVO.setCode (vo.getCode()); //코드 - crudVO.setCode_nm (vo.getCodeNm()); //코드 명 - crudVO.setCode_dc (vo.getCodeDc()); //코드 설명 - crudVO.setUse_at (vo.getUseAt()); //사용 여부 - - return crudVO; - } -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/web/CodeDtlMgtController.java b/src/main/java/kr/xit/framework/biz/mng/code/web/CodeDtlMgtController.java new file mode 100644 index 00000000..0bb19214 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/web/CodeDtlMgtController.java @@ -0,0 +1,79 @@ +package kr.xit.framework.biz.mng.code.web; + +import java.util.Map; + +import org.springframework.stereotype.Controller; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.servlet.ModelAndView; + +import kr.xit.framework.biz.cache.util.CacheServiceUtils; +import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO; +import kr.xit.framework.biz.mng.code.service.ICodeDtlMgtService; +import kr.xit.framework.core.constants.FrameworkConstants; +import kr.xit.framework.core.model.ResultResponse; +import kr.xit.framework.support.mybatis.MybatisUtils; +import kr.xit.framework.support.util.AjaxMessageMapRenderer; +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 CodeDtlMgtController { + + private final ICodeDtlMgtService service; + + @RequestMapping(value = "/mngCodeDtlMgtForm") + public void mngCodeDtlMgtForm() { + } + + @RequestMapping(value = "/mngCodeDtlMgtPopup") + public ModelAndView mngCodeDtlMgtPopup(final XitDetailCodeMngVO vo) { + ModelAndView mav = new ModelAndView(); + + mav.addObject("cfnCodeList", CacheServiceUtils.getComboCodes(null, "CMM_CFN")); + mav.addObject("cmmnDetailCode", vo); + mav.addObject("pageTitle", "공통 코드 등록 / 변경"); + mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/code/mngCodeDtlMgtPopup.popup"); + return mav; + } + + @GetMapping(value = "/findCodeDtls") + public ModelAndView findCodeDtls(@RequestParam final Map paraMap){ + return ResultResponse.of(service.findCodeDtls(paraMap, MybatisUtils.getPagingInfo(paraMap))); + } + + @PostMapping(value = "/addCodeDtl") + public ModelAndView addCodeDtl(final XitDetailCodeMngVO vo, final BindingResult bindingResult){ + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + ValidationError.of("cmmnDetailCode", vo, bindingResult); + service.addCodeDtl(vo); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS); + return mav; + } + + @PostMapping(value = "/modifyCodeDtl") + public ModelAndView modifyCodeDtl(final XitDetailCodeMngVO vo, final BindingResult bindingResult){ + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + ValidationError.of("cmmnDetailCode", vo, bindingResult); + service.modifyCodeDtl(vo); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); + return mav; + } + + @PostMapping(value = "/removeCodeDtl") + public ModelAndView removeCodeDtl(final XitDetailCodeMngVO vo){ + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + service.removeCodeDtl(vo); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); + return mav; + } +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/web/CodeGrpMgtController.java b/src/main/java/kr/xit/framework/biz/mng/code/web/CodeGrpMgtController.java new file mode 100644 index 00000000..4412292b --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/web/CodeGrpMgtController.java @@ -0,0 +1,77 @@ +package kr.xit.framework.biz.mng.code.web; + +import java.util.Map; + +import org.springframework.stereotype.Controller; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.servlet.ModelAndView; + +import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO; +import kr.xit.framework.biz.mng.code.service.ICodeGrpMgtService; +import kr.xit.framework.core.constants.FrameworkConstants; +import kr.xit.framework.core.model.ResultResponse; +import kr.xit.framework.support.mybatis.MybatisUtils; +import kr.xit.framework.support.util.AjaxMessageMapRenderer; +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 CodeGrpMgtController { + + private final ICodeGrpMgtService service; + + @RequestMapping(value = "/mngCodeGrpMgtForm") + public void mngCodeGrpMgtForm() { + } + + @RequestMapping(value = "/mngCodeGrpMgtPopup") + public ModelAndView mngCodeGrpMgtPopup(final XitCmmnCodeMngVO vo) { + ModelAndView mav = new ModelAndView(); + + mav.addObject("cmmnCode", vo); + mav.addObject("pageTitle", "공통 코드 그룹 등록 / 변경"); + mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/code/mngCodeGrpMgtPopup.popup"); + return mav; + } + + @GetMapping(value = "/findCodeGrps") + public ModelAndView findCodeGrps(@RequestParam final Map paraMap){ + return ResultResponse.of(service.findCodeGrps(paraMap, MybatisUtils.getPagingInfo(paraMap))); + } + + @PostMapping(value = "/addCodeGrp") + public ModelAndView addCodeGrp(final XitCmmnCodeMngVO vo, final BindingResult bindingResult){ + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + ValidationError.of("cmmnCode", vo, bindingResult); + service.addCodeGrp(vo); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS); + return mav; + } + + @PostMapping(value = "/modifyCodeGrp") + public ModelAndView modifyCodeGrp(final XitCmmnCodeMngVO vo, final BindingResult bindingResult){ + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + ValidationError.of("cmmnCode", vo, bindingResult); + service.modifyCodeGrp(vo); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); + return mav; + } + + @PostMapping(value = "/removeCodeGrp") + public ModelAndView removeCodeGrp(final XitCmmnCodeMngVO vo){ + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + service.removeCodeGrp(vo); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); + return mav; + } +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/web/XitClCodeMngController.java b/src/main/java/kr/xit/framework/biz/mng/code/web/XitClCodeMngController.java deleted file mode 100644 index 172804fb..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/web/XitClCodeMngController.java +++ /dev/null @@ -1,344 +0,0 @@ -package kr.xit.framework.biz.mng.code.web; - -import java.io.IOException; -import java.util.HashMap; -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.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.XitClCodeMngVO; -import kr.xit.framework.biz.mng.code.service.XitClCodeMngService; -import kr.xit.framework.biz.mng.code.model.XitClCodeMngSearchVO; -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.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 XitClCodeMngController { - - @Resource - private XitClCodeMngService xitClCodeMngService; - @Autowired - private XitBeanValidator beanValidator; - @Resource(name = "xitMessageSource") - XitMessageSource xitMessageSource; - - - /** - *
메소드 설명: 분류코드관리 목록 페이지
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "ClCodeMng_list", method={RequestMethod.GET, RequestMethod.POST}) - public String ClCodeMng_list(@ModelAttribute("searchVO") XitClCodeMngSearchVO searchVO, ModelMap model) { - - /** pageing */ - //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()); - - //model.addAttribute("resultList", xitClCodeMngService.findList(searchVO)); - - //int totCnt = xitClCodeMngService.findListTotCnt(searchVO); - //paginationInfo.setTotalRecordCount(totCnt); - //model.addAttribute("paginationInfo", paginationInfo); - - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/code/XitClCodeMng_list"; - } - - /** - *
메소드 설명: 분류코드 관리 페이지 조회
- * @return String 요청처리 후 응답객체 - * @author: 김동규 - * @date: 2020. 7. 31. - */ - @RequestMapping(value = "ClCodeMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST}) - @ResponseBody - public Map ClCodeMng_listAjax(@ModelAttribute("searchVO") XitClCodeMngSearchVO 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 = xitClCodeMngService.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", xitClCodeMngService.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 = "ClCodeMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST}) - public String ClCodeMng_page(@PathVariable String cmd - , @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef - , @ModelAttribute("cmmnClCode") XitClCodeMngVO vo - , @ModelAttribute XitClCodeMngSearchVO searchVO - , ModelMap model) { - switch (cmd) { - case "input": //등록 페이지 - break; - case "edit": //수정 페이지 - case "view": //상세 페이지 - model.addAttribute("cmmnClCode", xitClCodeMngService.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/XitClCodeMng_"+cmd+tilesDef; - - } - - - /** - *
메소드 설명: 요청 팝업 페이지 이동 한다.
- * @param page - * @param model - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "ClCodeMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST}) - public String ClCodeMng_page_popup(@PathVariable String cmd - , @ModelAttribute("cmmnClCode") XitClCodeMngVO vo - , @ModelAttribute XitClCodeMngSearchVO searchVO - , ModelMap model) { - switch (cmd) { - case "": // - break; - default: - throw new RuntimeException("유효하지 않은 요청 입니다."); - } - - - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/code/XitClCodeMng_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal(); - } - - - - /** - *
메소드 설명: 분류코드관리 CUD 처리
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @throws IOException - * @throws ServletException - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "ClCodeMng_{cmd}_proc", method=RequestMethod.POST) - public void ClCodeMng_cmd_proc(@PathVariable String cmd - ,@ModelAttribute("vo") XitClCodeMngVO vo - ,@ModelAttribute("searchVO") XitClCodeMngSearchVO searchVO - ,@RequestParam(value="clCodes", required=false, defaultValue="") String clCodes - ,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/ClCodeMng_list"; - String message = null; - switch (cmd) { - case "insert": //등록 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("cmmnClCode", vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_input"; - break; - } - //처리 - try { - vo.setFrstRegisterId(loginVO.getUniqId()); - xitClCodeMngService.addProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.insert"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_input"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_input"; - } - break; - -// case "inserts": //다건 등록 -// break; - - case "update": //수정 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("cmmnClCode", vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_edit"; - break; - } - //처리 - try { - vo.setLastUpdusrId(loginVO.getUniqId()); - xitClCodeMngService.modifyProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.update"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_edit"; - } - break; - - case "delete": //삭제 - //처리 - try { - vo.setLastUpdusrId(loginVO.getUniqId()); - xitClCodeMngService.removeProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.delete"); - break; - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.delete"); - sLocationUrl = "forward:/framework/biz/mng/code/ClCodeMng_edit"; - } - break; - - case "deletes": //다건 삭제 - //처리 - try { - xitClCodeMngService.removesProc(clCodes, loginVO.getUniqId()); - 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/XitCmmnCodeMngController.java b/src/main/java/kr/xit/framework/biz/mng/code/web/XitCmmnCodeMngController.java deleted file mode 100644 index 1c1a6876..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/web/XitCmmnCodeMngController.java +++ /dev/null @@ -1,349 +0,0 @@ -package kr.xit.framework.biz.mng.code.web; - -import java.io.IOException; -import java.util.HashMap; -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.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.service.XitFrameCodeService; -import kr.xit.framework.biz.cmm.model.XitLoginVO; -import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngSearchVO; -import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO; -import kr.xit.framework.biz.mng.code.service.XitCmmnCodeMngService; -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.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/code/") -public class XitCmmnCodeMngController { - - @Resource - private XitCmmnCodeMngService xitCmmnCodeMngService; - @Resource - private XitFrameCodeService xitFrameCodeService; - @Autowired - private XitBeanValidator beanValidator; - @Resource(name = "xitMessageSource") - XitMessageSource xitMessageSource; - - - /** - *
메소드 설명: 공통코드관리 목록 페이지
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "CmmnCodeMng_list", method={RequestMethod.GET, RequestMethod.POST}) - public String CmmnCodeMng_list(@ModelAttribute("searchVO") XitCmmnCodeMngSearchVO searchVO, ModelMap model) { - - - /** pageing */ - //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()); - - //model.addAttribute("resultList", xitCmmnCodeMngService.findList(searchVO)); - - //int totCnt =xitCmmnCodeMngService.findListTotCnt(searchVO); - //paginationInfo.setTotalRecordCount(totCnt); - //model.addAttribute("paginationInfo", paginationInfo); - - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/code/XitCmmnCodeMng_list"; - } - - /** - *
메소드 설명: 공통코드 관리 페이지 조회
- * @return String 요청처리 후 응답객체 - * @author: 김동규 - * @date: 2020. 7. 31. - */ - @RequestMapping(value = "CmmnCodeMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST}) - @ResponseBody - public Map CmmnCodeMng_listAjax(@ModelAttribute("searchVO") XitCmmnCodeMngSearchVO 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 = xitCmmnCodeMngService.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", xitCmmnCodeMngService.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 = "CmmnCodeMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST}) - public String CmmnCodeMng_page(@PathVariable String cmd - , @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef - , @ModelAttribute("cmmnCode") XitCmmnCodeMngVO vo - , @ModelAttribute XitCmmnCodeMngSearchVO searchVO - , ModelMap model) { - switch (cmd) { - case "input": //등록 페이지 - model.addAttribute("cmmnClCode", xitFrameCodeService.findClCodes(null)); - break; - case "edit": //수정 페이지 - case "view": //상세 페이지 - model.addAttribute("cmmnCode", xitCmmnCodeMngService.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/XitCmmnCodeMng_"+cmd+tilesDef; - - } - - - /** - *
메소드 설명: 요청 팝업 페이지 이동 한다.
- * @param page - * @param model - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "CmmnCodeMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST}) - public String CmmnCodeMng_page_popup(@PathVariable String cmd - , @ModelAttribute("cmmnCode") XitCmmnCodeMngVO vo - , @ModelAttribute XitCmmnCodeMngSearchVO searchVO - , ModelMap model) { - switch (cmd) { - case "": // - break; - default: - throw new RuntimeException("유효하지 않은 요청 입니다."); - } - - - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/code/XitCmmnCodeMng_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal(); - } - - - - /** - *
메소드 설명: 공통코드관리 CUD 처리
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @throws IOException - * @throws ServletException - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "CmmnCodeMng_{cmd}_proc", method=RequestMethod.POST) - public void CmmnCodeMng_cmd_proc(@PathVariable String cmd - ,@ModelAttribute("vo") XitCmmnCodeMngVO vo - ,@ModelAttribute("searchVO") XitCmmnCodeMngSearchVO searchVO - ,@RequestParam(value="codeIds", required=false, defaultValue="") String codeIds - ,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/CmmnCodeMng_list"; - String message = null; - switch (cmd) { - case "insert": //등록 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("cmmnCode", vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/code/CmmnCodeMng_input"; - break; - } - //처리 - try { - vo.setFrstRegisterId(loginVO.getUniqId()); - xitCmmnCodeMngService.addProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.insert"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/CmmnCodeMng_input"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/code/CmmnCodeMng_input"; - } - break; - -// case "inserts": //다건 등록 -// break; - - case "update": //수정 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("cmmnCode", vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/code/CmmnCodeMng_edit"; - break; - } - //처리 - try { - vo.setLastUpdusrId(loginVO.getUniqId()); - xitCmmnCodeMngService.modifyProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.update"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/CmmnCodeMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/code/CmmnCodeMng_edit"; - } - break; - - case "delete": //삭제 - //처리 - try { - vo.setLastUpdusrId(loginVO.getUniqId()); - xitCmmnCodeMngService.removeProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.delete"); - break; - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/CmmnCodeMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.delete"); - sLocationUrl = "forward:/framework/biz/mng/code/CmmnCodeMng_edit"; - } - break; - - case "deletes": //다건 삭제 - //처리 - try { - xitCmmnCodeMngService.removesProc(codeIds, loginVO.getUniqId()); - 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/XitDetailCodeMngController.java b/src/main/java/kr/xit/framework/biz/mng/code/web/XitDetailCodeMngController.java deleted file mode 100644 index a4924749..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/web/XitDetailCodeMngController.java +++ /dev/null @@ -1,374 +0,0 @@ -package kr.xit.framework.biz.mng.code.web; - -import java.io.IOException; -import java.util.ArrayList; -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.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.service.XitFrameCodeService; -import kr.xit.framework.biz.cmm.model.XitLoginVO; -import kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO; -import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO; -import kr.xit.framework.biz.mng.code.service.XitDetailCodeMngService; -import kr.xit.framework.biz.mng.code.model.XitDetailCodeMngSearchVO; -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.XitCodeVO; -import kr.xit.framework.core.utils.XitCmmnUtil; -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/code/") -public class XitDetailCodeMngController { - - @Resource - private XitDetailCodeMngService xitDetailCodeMngService; - @Resource - private XitFrameCodeService xitFrameCodeService; - @Autowired - private XitBeanValidator beanValidator; - @Resource(name = "xitMessageSource") - XitMessageSource xitMessageSource; - - - /** - *
메소드 설명: 상세코드관리 목록 페이지
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @GetMapping(value = "DetailCodeMng_list") - public void DetailCodeMng_list() { - } - - /** - *
메소드 설명: 상세코드 관리 페이지 조회
- * @return String 요청처리 후 응답객체 - * @author: 김동규 - * @date: 2020. 7. 31. - */ - @RequestMapping(value = "DetailCodeMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST}) - @ResponseBody - public Map DetailCodeMng_listAjax(@ModelAttribute("searchVO") XitDetailCodeMngSearchVO 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 = xitDetailCodeMngService.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", xitDetailCodeMngService.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 = "DetailCodeMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST}) - public String DetailCodeMng_page(@PathVariable String cmd - , @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef - , @ModelAttribute("cmmnDetailCode") XitDetailCodeMngVO vo - , @ModelAttribute("cmmnCode") XitCmmnCodeMngVO cmmnCodeMngVO - , @ModelAttribute XitDetailCodeMngSearchVO searchVO - , ModelMap model) { - switch (cmd) { - case "input": //등록 페이지 - List cmmnClCodeList = xitFrameCodeService.findClCodes(null); - model.addAttribute("cmmnClCodeList", cmmnClCodeList); - if(XitCmmnUtil.isEmpty(cmmnCodeMngVO.getClCode())) { - if(XitCmmnUtil.isEmpty(cmmnClCodeList)) - model.addAttribute("cmmnCodeList", new ArrayList()); - else - model.addAttribute("cmmnCodeList", xitFrameCodeService.findCmmnCodes(cmmnClCodeList.get(0).getClCode())); - } else { - model.addAttribute("cmmnCodeList", xitFrameCodeService.findCmmnCodes(cmmnCodeMngVO.getClCode())); - } - break; - case "edit": //수정 페이지 - case "view": //상세 페이지 - model.addAttribute("cmmnDetailCode", xitDetailCodeMngService.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/XitDetailCodeMng_"+cmd+tilesDef; - - } - - - /** - *
메소드 설명: 요청 팝업 페이지 이동 한다.
- * @param page - * @param model - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "DetailCodeMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST}) - public String DetailCodeMng_page_popup(@PathVariable String cmd - , @ModelAttribute("cmmnDetailCode") XitDetailCodeMngVO vo - , @ModelAttribute("cmmnCode") XitCmmnCodeMngVO cmmnCodeMngVO - , @ModelAttribute XitDetailCodeMngSearchVO searchVO - , ModelMap model) { - switch (cmd) { - case "": // - break; - default: - throw new RuntimeException("유효하지 않은 요청 입니다."); - } - - - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/code/XitDetailCodeMng_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal(); - } - - - - /** - *
메소드 설명: 상세코드관리 CUD 처리
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @throws IOException - * @throws ServletException - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "DetailCodeMng_{cmd}_proc", method=RequestMethod.POST) - public void DetailCodeMng_cmd_proc(@PathVariable String cmd - ,@ModelAttribute("vo") XitDetailCodeMngVO vo - ,@ModelAttribute("searchVO") XitDetailCodeMngSearchVO searchVO - ,@ModelAttribute("cmmnCode") XitCmmnCodeMngVO cmmnCodeMngVO - ,@RequestParam(value="codeIds", required=false, defaultValue="") String codeIds - ,@RequestParam(value="codes", required=false, defaultValue="") String codes - ,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/DetailCodeMng_list"; - String message = null; - switch (cmd) { - case "insert": //등록 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("cmmnDetailCode", vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/code/DetailCodeMng_input"; - break; - } - //처리 - try { - vo.setFrstRegisterId(loginVO.getUniqId()); - xitDetailCodeMngService.addProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.insert"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/DetailCodeMng_input"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/code/DetailCodeMng_input"; - } - break; - -// case "inserts": //다건 등록 -// break; - - case "update": //수정 - //유효성 확인 - //2020.11.24. 주석처리 - beanValidator.validate(vo, bindingResult); -// beanValidator.validate("cmmnDetailCode", vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/code/DetailCodeMng_edit"; - break; - } - //처리 - try { - vo.setLastUpdusrId(loginVO.getUniqId()); - xitDetailCodeMngService.modifyProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.update"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/DetailCodeMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/code/DetailCodeMng_edit"; - } - break; - - case "delete": //삭제 - //처리 - try { - vo.setLastUpdusrId(loginVO.getUniqId()); - xitDetailCodeMngService.removeProc(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.delete"); - break; - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/code/DetailCodeMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.delete"); - sLocationUrl = "forward:/framework/biz/mng/code/DetailCodeMng_edit"; - } - break; - - case "deletes": //다건 삭제 - //처리 - try { - xitDetailCodeMngService.removesProc(codeIds, codes, loginVO.getUniqId()); - 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()); - } - } - - /** - *
메소드 설명: 코드조회
- * @return String 요청처리 후 응답객체 - * @author: 최유수 - * @date: 2020. 8. 12. - */ - @RequestMapping(value = "DetailCodeMng_getCodeList.ajax", method={RequestMethod.GET, RequestMethod.POST}) - @ResponseBody - public Map DetailCodeMng_getCodeListAjax( - @ModelAttribute("cmmnCode") XitCmmnCodeMngVO cmmnCodeMngVO - ,Model model){ - Map resultMap = new HashMap(); - System.out.println("test===================="); - List cmmnClCodeList = xitFrameCodeService.findClCodes(null); - model.addAttribute("cmmnClCodeList", cmmnClCodeList); - if(XitCmmnUtil.isEmpty(cmmnCodeMngVO.getClCode())) { - if(XitCmmnUtil.isEmpty(cmmnClCodeList)) - resultMap.put("cmmnCodeList", new ArrayList()); - else - resultMap.put("cmmnCodeList", xitFrameCodeService.findCmmnCodes(cmmnClCodeList.get(0).getClCode())); - } else { - resultMap.put("cmmnCodeList", xitFrameCodeService.findCmmnCodes(cmmnCodeMngVO.getClCode())); - } - return resultMap; - } -} diff --git a/src/main/resources/message/com/message-common.properties b/src/main/resources/message/com/message-common.properties index f361995f..d843569b 100644 --- a/src/main/resources/message/com/message-common.properties +++ b/src/main/resources/message/com/message-common.properties @@ -9,6 +9,7 @@ table.num=\uBC88\uD638 table.regdate=\uB4F1\uB85D\uC77C table.reger=\uB4F1\uB85D\uC790 table.select=\uC120\uD0DD +table.select.clCode=- \uBD84\uB958\uCF54\uB4DC - title.html=egovframe common component title.detail=\uC0C1\uC138\uC870\uD68C title.inquire=\uC870\uD68C diff --git a/src/main/resources/message/com/message-common_en.properties b/src/main/resources/message/com/message-common_en.properties index 1cc3adc6..588fc2f9 100644 --- a/src/main/resources/message/com/message-common_en.properties +++ b/src/main/resources/message/com/message-common_en.properties @@ -9,6 +9,7 @@ table.num=num. table.regdate=reg.date table.reger=registrant table.select=select +table.select.clCode=classification title.html=egovframe common component title.detail=Detail Inquiry title.inquire=Inquire diff --git a/src/main/resources/message/com/message-common_ko.properties b/src/main/resources/message/com/message-common_ko.properties index 1758b1ac..8e12076c 100644 --- a/src/main/resources/message/com/message-common_ko.properties +++ b/src/main/resources/message/com/message-common_ko.properties @@ -9,6 +9,7 @@ table.num=\uBC88\uD638 table.regdate=\uB4F1\uB85D\uC77C table.reger=\uB4F1\uB85D\uC790 table.select=\uC120\uD0DD +table.select.clCode=- \uBD84\uB958\uCF54\uB4DC - title.html=egovframe common component title.detail=\uC0C1\uC138\uC870\uD68C title.inquire=\uC870\uD68C @@ -377,3 +378,5 @@ custom.fail.accessDenied=\uC694\uCCAD\uC5D0 \uB300\uD55C \uAD8C\uD55C\uC774 \uC5 custom.isNotExist.msg=\uCC98\uB9AC\uC5D0 \uD544\uC694\uD55C \uC790\uB8CC\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. warn.session.end=\uC138\uC158\uC774 \uC885\uB8CC \uB418\uC5C8\uC2B5\uB2C8\uB2E4. + + diff --git a/src/main/resources/sqlmapper/framework/cache/cachecode-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/cache/cachecode-mysql-mapper.xml index 1398b61c..7afdf435 100644 --- a/src/main/resources/sqlmapper/framework/cache/cachecode-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/cache/cachecode-mysql-mapper.xml @@ -51,6 +51,22 @@ FROM xit_author_group_info + + /* 분류코드 */ + SELECT cl_code AS code + , cl_code_nm AS code_nm + FROM xit_cmmn_cl_code + WHERE use_at = 'Y' + + + + /* 공통 코드 그룹 */ + SELECT code_id AS code + , code_id_nm AS code_nm + FROM xit_cmmn_code + WHERE cl_code = #{codeId} + AND use_at = 'Y' + /* 공통 코드 */ diff --git a/src/main/resources/sqlmapper/framework/mng/code/XitClCodeMng-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/XitClCodeMng-mysql-mapper.xml deleted file mode 100644 index 18cc2253..00000000 --- a/src/main/resources/sqlmapper/framework/mng/code/XitClCodeMng-mysql-mapper.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - SELECT LIST.* FROM( - - - - ) LIST LIMIT #{firstIndex}, #{recordCountPerPage} - - - - - SELECT A.CL_CODE AS "clCode" - , A.CL_CODE_NM AS "clCodeNm" - , A.CL_CODE_DC AS "clCodeDc" - , A.USE_AT AS "useAt" - - - FROM XIT_CMMN_CL_CODE A - - - - AND A.CL_CODE = #{searchKeyword} - - - AND A.CL_CODE_NM LIKE CONCAT('%',#{searchKeyword},'%') - - - AND A.USE_AT = 'Y' - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/code/XitCmmnCodeMng-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/XitCmmnCodeMng-mysql-mapper.xml deleted file mode 100644 index 33bb48ba..00000000 --- a/src/main/resources/sqlmapper/framework/mng/code/XitCmmnCodeMng-mysql-mapper.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - SELECT LIST.* FROM( - - - - ) LIST LIMIT #{firstIndex}, #{recordCountPerPage} - - - - - SELECT B.CL_CODE_NM AS "clCodeNm" - , A.CL_CODE AS "clCode" - , A.CODE_ID AS "codeId" - , A.CODE_ID_NM AS "codeIdNm" - , A.CODE_ID_DC AS "codeIdDc" - , A.USE_AT AS "useAt" - - - FROM XIT_CMMN_CODE A - INNER JOIN XIT_CMMN_CL_CODE B ON A.CL_CODE = B.CL_CODE - - - - AND A.CODE_ID = #{searchKeyword} - - - AND A.CODE_ID_NM LIKE CONCAT('%',#{searchKeyword},'%') - - - AND A.CL_CODE = #{searchKeyword} - AND A.USE_AT = 'Y' - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/code/XitDetailCodeMng-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/XitDetailCodeMng-mysql-mapper.xml deleted file mode 100644 index f8a0b667..00000000 --- a/src/main/resources/sqlmapper/framework/mng/code/XitDetailCodeMng-mysql-mapper.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - SELECT LIST.* FROM( - - - - ) LIST LIMIT #{firstIndex}, #{recordCountPerPage} - - - - - SELECT A.CODE_ID AS "codeId" - , B.CODE_ID_NM AS "codeIdNm" - , A.CODE AS "code" - , A.CODE_NM AS "codeNm" - , A.CODE_DC AS "codeDc" - , A.USE_AT AS "useAt" - - - FROM XIT_CMMN_DETAIL_CODE A - INNER JOIN XIT_CMMN_CODE B ON A.CODE_ID = B.CODE_ID - - - AND B.USE_AT = 'Y' - - AND A.CODE_ID = #{searchKeyword} - - - AND A.CODE = #{searchKeyword} - - - AND A.CODE_NM LIKE CONCAT('%',#{searchKeyword},'%') - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/sqlmapper/framework/mng/code/code-cfn-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/code-cfn-mysql-mapper.xml index babf1380..b393da69 100644 --- a/src/main/resources/sqlmapper/framework/mng/code/code-cfn-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/code/code-cfn-mysql-mapper.xml @@ -17,15 +17,14 @@ , last_updusr_id FROM xit_cmmn_cl_code - - AND cl_code = #{clCode} - - - AND cl_code_nm = #{clCodeNm} - - - AND use_at = #{useAt} - + + + AND INSTR(cl_code, #{searchKeyword}) > 0 + + + AND INSTR(cl_code_nm, #{searchKeyword}) > 0 + + @@ -53,7 +52,7 @@ #{clCode} , #{clCodeNm} , #{clCodeDc} - , 'Y' + , #{useAt} , NOW() , #{frstRegisterId} ) diff --git a/src/main/resources/sqlmapper/framework/mng/code/code-dtl-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/code-dtl-mysql-mapper.xml index 64de2ca1..05be7129 100644 --- a/src/main/resources/sqlmapper/framework/mng/code/code-dtl-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/code/code-dtl-mysql-mapper.xml @@ -7,42 +7,50 @@ * xit_cmmn_detail_code : 공통 코드 ************************************************************************************************************** --> - SELECT code_id - , code - , code_nm - , code_dc - , etc_1 - , etc_2 - , etc_3 - , ordr - , use_at - , frst_regist_pnttm - , frst_register_id - , last_updt_pnttm - , last_updusr_id - FROM xit_cmmn_detail_code + SELECT cdc.code_id + , xcc.code_id_nm + , cdc.code + , cdc.code_nm + , cdc.code_dc + , cdc.etc_1 + , cdc.etc_2 + , cdc.etc_3 + , cdc.ordr + , cdc.use_at + , cdc.frst_regist_pnttm + , cdc.frst_register_id + , cdc.last_updt_pnttm + , cdc.last_updusr_id + FROM xit_cmmn_detail_code cdc + JOIN xit_cmmn_code xcc + ON cdc.code_id = xcc.code_id - - AND code_id = #{codeId} + + + AND INSTR(cdc.code_id, #{searchKeyword}) > 0 + + + AND INSTR(cdc.code, #{searchKeyword}) > 0 + + + AND INSTR(cdc.code_nm, #{searchKeyword}) > 0 + - - AND code = #{code} - - - AND code_nm = #{codeNm} + + AND xcc.cl_code = #{clCode} - AND use_at = #{useAt} + AND cdc.use_at = #{useAt} - /* code-dtl-mysql-mapper|selectCmmnDtlCodes-코드 목록 조회|julim */ - /* /* code-dtl-mysql-mapper|selectCmmnDtlCode-코드 정보 조회|julim */ @@ -71,7 +79,7 @@ , #{etc2} , #{etc3} , #{ordr} - , 'Y' + , #{useAt} , NOW() , #{frstRegisterId} ) diff --git a/src/main/resources/sqlmapper/framework/mng/code/code-grp-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/code-grp-mysql-mapper.xml index 42190def..0a9effad 100644 --- a/src/main/resources/sqlmapper/framework/mng/code/code-grp-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/code/code-grp-mysql-mapper.xml @@ -7,44 +7,50 @@ * xit_cmmn_code : 그룹 코드 ************************************************************************************************************** --> - SELECT cl_code - , code_id - , code_id_nm - , code_id_dc - , use_at - , frst_regist_pnttm - , frst_register_id - , last_updt_pnttm - , last_updusr_id - FROM xit_cmmn_code + SELECT xcc.cl_code + , xccc.cl_code_nm + , xcc.code_id + , xcc.code_id_nm + , xcc.code_id_dc + , xcc.use_at + , xcc.frst_regist_pnttm + , xcc.frst_register_id + , xcc.last_updt_pnttm + , xcc.last_updusr_id + FROM xit_cmmn_code xcc + JOIN xit_cmmn_cl_code xccc + ON xcc.cl_code = xccc.cl_code - AND cl_code = #{clCode} - - - AND code_id = #{codeId} + AND xcc.cl_code = #{clCode} + + + + AND INSTR(xcc.code_id, #{searchKeyword}) > 0 + + + AND INSTR(xcc.code_id_nm, #{searchKeyword}) > 0 + - - AND code_id_nm = #{codeIdNm} - - AND use_at = #{useAt} - + AND xcc.use_at = #{useAt} + - + /* code-grp-mysql-mapper|selectCmmnGrpCodes-코드그룹 목록 조회|julim */ + ORDER BY xcc.cl_code, xcc.code_id - + /* code-grp-mysql-mapper|selectCmmnGrpCode-코드그룹 정보 조회|julim */ - - /* code-grp-mysql-mapper|insertCmmnCode-코드그룹 정보 등록|julim */ + + /* code-grp-mysql-mapper|insertCmmnGrpCode-코드그룹 정보 등록|julim */ INSERT INTO xit_cmmn_code ( cl_code @@ -59,14 +65,14 @@ , #{codeId} , #{codeIdNm} , #{codeIdDc} - , 'Y' + , #{useAt} , NOW() , #{frstRegisterId} ) - - /* code-grp-mysql-mapper|updateCmmnCode-코드그룹 정보 변경|julim */ + + /* code-grp-mysql-mapper|updateCmmnGrpCode-코드그룹 정보 변경|julim */ UPDATE xit_cmmn_code SET code_id_nm = IF(code_id_nm = #{codeIdNm}, code_id_nm, #{codeIdNm}) , code_id_dc = IF(code_id_dc = #{codeIdDc}, code_id_dc, #{codeIdDc}) @@ -77,8 +83,8 @@ AND code_id = #{codeId} - - /* code-grp-mysql-mapper|deleteCmmnCode-코드그룹 정보 삭제|julim */ + + /* code-grp-mysql-mapper|deleteCmmnGrpCode-코드그룹 정보 삭제|julim */ DELETE FROM xit_cmmn_code WHERE cl_code = #{clCode} diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz-popup-use-btn.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz-popup-use-btn.jsp new file mode 100644 index 00000000..5065e633 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/framework/biz-popup-use-btn.jsp @@ -0,0 +1,21 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%-- TODO: 완료후 comment 삭제 +아래와 같이 isUpdate 정의 필요 + +--%> + + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitClCodeMng_edit.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitClCodeMng_edit.jsp deleted file mode 100644 index ce80ddab..00000000 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitClCodeMng_edit.jsp +++ /dev/null @@ -1,230 +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/XitClCodeMng_input.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitClCodeMng_input.jsp deleted file mode 100644 index ce6c99f9..00000000 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitClCodeMng_input.jsp +++ /dev/null @@ -1,203 +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/XitCmmnCodeMng_edit.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitCmmnCodeMng_edit.jsp deleted file mode 100644 index 19f56e75..00000000 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitCmmnCodeMng_edit.jsp +++ /dev/null @@ -1,267 +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/XitCmmnCodeMng_input.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitCmmnCodeMng_input.jsp deleted file mode 100644 index 983680e9..00000000 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitCmmnCodeMng_input.jsp +++ /dev/null @@ -1,267 +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/XitDetailCodeMng_edit.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitDetailCodeMng_edit.jsp deleted file mode 100644 index 749575ce..00000000 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitDetailCodeMng_edit.jsp +++ /dev/null @@ -1,289 +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/XitDetailCodeMng_input.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitDetailCodeMng_input.jsp deleted file mode 100644 index 0871424f..00000000 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitDetailCodeMng_input.jsp +++ /dev/null @@ -1,296 +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/backup/XitClCodeMng_edit.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitClCodeMng_edit.jsp index a24f144c..e742cec8 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitClCodeMng_edit.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitClCodeMng_edit.jsp @@ -1,85 +1,51 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ 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 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" %> +<%@ 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" %> - + - - - - - - - - - -
-

공통분류코드 수정

-
- - -
- - - + + +
분류코드필수
+ + + + + + + + + + - - @@ -87,38 +53,178 @@ function fn_egov_remove_CmmnClCode(form){ - -
공통분류코드 등록
필수 - ${cmmnClCode.clCode} +
필수 + -
필수 +
필수 - +
-
+ + + + + + + + + +
- -
- - - - - - - - - - - -
- 목록 - - - - -
-
- + + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitClCodeMng_input.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitClCodeMng_input.jsp index 3095e2ec..2e79d41c 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitClCodeMng_input.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitClCodeMng_input.jsp @@ -1,56 +1,34 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ 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 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" %> +<%@ 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" %> - - + - - - - - - -
-

공통분류코드 등록

-
- -
- - + +
+ + + + + + + + + - - @@ -79,28 +57,147 @@ function fn_egov_list_CmmnClCode(){ - -
공통분류코드 등록
필수 @@ -59,14 +37,14 @@ function fn_egov_list_CmmnClCode(){
필수 +
필수 +
-
+ + + + + + + + + +
- -
- - - - - - - -
- 목록 - - -
-
- + + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitClCodeMng_list.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitClCodeMng_list.jsp similarity index 100% rename from src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitClCodeMng_list.jsp rename to src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitClCodeMng_list.jsp diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitCmmnCodeMng_edit.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitCmmnCodeMng_edit.jsp index 0d3f5ec4..ba374a34 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitCmmnCodeMng_edit.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitCmmnCodeMng_edit.jsp @@ -1,90 +1,57 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ 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 uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ 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" %> - - - + - - - - - - -
-

공통코드 수정

-
- - - - + + + - -
- - +
+ + + + + + + + + - + - - + +
공통코드 관리 상세
분류코드명필수${cmmnCode.clCodeNm} + ${cmmnCode.clCodeNm} +
코드ID필수 - ${cmmnCode.codeId} + ${cmmnCode.codeId}
필수 +
필수 + + + + + - -
- - - - - - - - - - - -
- 목록 - - 저장 - - -
-
- - - - + + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitCmmnCodeMng_input.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitCmmnCodeMng_input.jsp index c5247b2f..d368a9f7 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitCmmnCodeMng_input.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitCmmnCodeMng_input.jsp @@ -1,123 +1,267 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ 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 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" %> +<%@ 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" %> - - - + - - - - - - - - - -
-

공통코드 등록

-
- - -
- - - - + + + + + + + + + + + + + + + + + + +
필수 - +
코드ID필수 + + +
필수 + + +
필수 + + + +
필수 + + + + +
+ + + +
+ +
+ diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitCmmnCodeMng_list.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitCmmnCodeMng_list.jsp similarity index 100% rename from src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitCmmnCodeMng_list.jsp rename to src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitCmmnCodeMng_list.jsp diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitDetailCodeMng_edit.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitDetailCodeMng_edit.jsp index 040ec6a4..1b4f2d8d 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitDetailCodeMng_edit.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitDetailCodeMng_edit.jsp @@ -1,71 +1,37 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ 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 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" %> +<%@ 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" %> - - - + - - - - - - - -
-

공통상세코드 수정

-
- - + - -
- - + +
+ + + + + + + + + - + - - @@ -97,34 +65,225 @@ function fn_egov_remove_CmmnDetailCode(form){ - -
공통상세코드 등록
코드ID필수 ${cmmnDetailCode.codeIdNm} @@ -73,18 +39,20 @@ function fn_egov_remove_CmmnDetailCode(form){
코드필수 + +
필수 +
필수 +
-
+
+ + + +
+ + +
- -
- - - - - - - - - - - -
- 목록 - - 저장 - - 삭제 -
-
- + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitDetailCodeMng_input.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitDetailCodeMng_input.jsp index ce126385..1d7271ba 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitDetailCodeMng_input.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitDetailCodeMng_input.jsp @@ -1,80 +1,45 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ 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 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" %> +<%@ 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" %> - - + - - - - - - - - - - - - -
-

공통상세코드 등록

-
- -
- - + +
+ + + + + + + + + - - - + hi - @@ -109,27 +74,223 @@ function fn_egov_get_CodeId(form){ - -
공통상세코드 등록
필수 - - + - + @@ -82,21 +47,21 @@ function fn_egov_get_CodeId(form){
필수 - + +
필수 +
필수 +
-
+ + + + + + + + + +
- -
- - - - - - - -
- 목록 - - 저장 -
-
- + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitDetailCodeMng_list.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitDetailCodeMng_list.jsp similarity index 100% rename from src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/XitDetailCodeMng_list.jsp rename to src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/backup/XitDetailCodeMng_list.jsp diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeCfnMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeCfnMgtForm.jsp index 83bff7b1..e8b23aed 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeCfnMgtForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeCfnMgtForm.jsp @@ -1,8 +1,8 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> -
-
-
- -
전체 ㅣ 0
-
- - 등록 - -
- - - -
- +
+ +
전체 ㅣ 0
+
+ + 등록 + +
+ + + +
+ - - - - - +<%--@elvariable id="cmmnClCode" type="validator"--%> + + - - diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeDtlMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeDtlMgtForm.jsp new file mode 100644 index 00000000..ef704975 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeDtlMgtForm.jsp @@ -0,0 +1,201 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> + + + + +
+ +
전체 ㅣ 0
+
+ + 등록 + +
+ + + +
+ + + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeDtlMgtPopup.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeDtlMgtPopup.jsp new file mode 100644 index 00000000..f172abc0 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeDtlMgtPopup.jsp @@ -0,0 +1,185 @@ +<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> +<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> + + + + + + +<%--@elvariable id="cmmnDetailCode" type="validator"--%> + + + + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeGrpMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeGrpMgtForm.jsp new file mode 100644 index 00000000..ddaed6fd --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeGrpMgtForm.jsp @@ -0,0 +1,192 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> + + + + +
+ +
전체 ㅣ 0
+
+ + 등록 + +
+ + + +
+ + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeGrpMgtPopup.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeGrpMgtPopup.jsp new file mode 100644 index 00000000..42e32e1e --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeGrpMgtPopup.jsp @@ -0,0 +1,155 @@ +<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> +<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> + + + + + + +<%--@elvariable id="cmmnCode" type="validator"--%> + + + + diff --git a/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/base/header.jsp b/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/base/header.jsp index 71427b33..7a64d040 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/base/header.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/base/header.jsp @@ -118,6 +118,7 @@ $(function() { window.open('',target,popOption); var param = new Object(); param.selectedId = '${sessionScope.XitLoginSession.uniqId}'; + //TODO : 개발완료후 이부분 제거 param.tilesDef = 'popup'; var form = XitCmmnUtil.createForm(param); form.action = popUrl; diff --git a/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/biz/header.jsp b/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/biz/header.jsp index 4e08166d..140808a9 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/biz/header.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/biz/header.jsp @@ -119,6 +119,7 @@ let popOption = ''; let params = { selectedId: '${sessionScope.XitLoginSession.uniqId}' + //TODO : 개발완료후 이부분 제거 ,tilesDef: 'popup' }; if('GNR'=='${sessionScope.XitLoginSession.userSe}'){ diff --git a/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/main/header.jsp b/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/main/header.jsp index 5f2e07ae..9485460c 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/main/header.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/main/header.jsp @@ -70,6 +70,7 @@ window.open('',target,popOption); var param = new Object(); param.selectedId = '${sessionScope.XitLoginSession.uniqId}'; + //TODO : 개발완료후 이부분 제거 param.tilesDef = 'popup'; var form = XitCmmnUtil.createForm(param); form.action = popUrl; diff --git a/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/popup/layout-tiles-popup.jsp b/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/popup/layout-tiles-popup.jsp index 35efcb44..1b3f086e 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/popup/layout-tiles-popup.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/layouts/tiles/popup/layout-tiles-popup.jsp @@ -23,8 +23,9 @@ - +