From 686f811b7b2b0f16b547b5c655cb593b4f9ef352 Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Wed, 16 Nov 2022 03:10:37 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=BD=94=EB=93=9C=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EC=A7=84=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mng/code/mapper/ICodeCfnMgtMapper.java | 21 +++ ...nMgtMapper.java => ICodeDtlMgtMapper.java} | 5 +- .../mng/code/mapper/ICodeGrpMgtMapper.java | 16 ++ .../biz/mng/code/model/XitClCodeMngVO.java | 12 +- .../biz/mng/code/model/XitCmmnCodeMngVO.java | 167 +++--------------- .../mng/code/model/XitDetailCodeMngVO.java | 166 +++-------------- .../mng/code/service/CodeCfnMgtService.java | 45 +++++ .../service/CodeClassificationMgtService.java | 33 ---- ...gtService.java => ICodeCfnMgtService.java} | 15 +- .../mng/code/web/CodeCfnMgtController.java | 83 +++++++++ .../web/CodeClassificationMgtController.java | 50 ------ .../mng/code/code-cfn-mysql-mapper.xml | 80 +++++++++ .../code/code-classification-mysql-mapper.xml | 130 -------------- .../mng/code/code-code-mysql-mapper.xml | 136 -------------- .../mng/code/code-detail-mysql-mapper.xml | 164 ----------------- .../mng/code/code-dtl-mysql-mapper.xml | 104 +++++++++++ .../mng/code/code-grp-mysql-mapper.xml | 88 +++++++++ ...ationMgtForm.jsp => mngCodeCfnMgtForm.jsp} | 6 +- ...ionMgtPopup.jsp => mngCodeCfnMgtPopup.jsp} | 9 +- .../biz/mng/menu/mngMenuMgtPopup.jsp | 3 +- 20 files changed, 515 insertions(+), 818 deletions(-) create mode 100644 src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeCfnMgtMapper.java rename src/main/java/kr/xit/framework/biz/mng/code/mapper/{ICodeClassificationMgtMapper.java => ICodeDtlMgtMapper.java} (69%) create mode 100644 src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeGrpMgtMapper.java create mode 100644 src/main/java/kr/xit/framework/biz/mng/code/service/CodeCfnMgtService.java delete mode 100644 src/main/java/kr/xit/framework/biz/mng/code/service/CodeClassificationMgtService.java rename src/main/java/kr/xit/framework/biz/mng/code/service/{ICodeClassificationMgtService.java => ICodeCfnMgtService.java} (54%) create mode 100644 src/main/java/kr/xit/framework/biz/mng/code/web/CodeCfnMgtController.java delete mode 100644 src/main/java/kr/xit/framework/biz/mng/code/web/CodeClassificationMgtController.java create mode 100644 src/main/resources/sqlmapper/framework/mng/code/code-cfn-mysql-mapper.xml delete mode 100644 src/main/resources/sqlmapper/framework/mng/code/code-classification-mysql-mapper.xml delete mode 100644 src/main/resources/sqlmapper/framework/mng/code/code-code-mysql-mapper.xml delete mode 100644 src/main/resources/sqlmapper/framework/mng/code/code-detail-mysql-mapper.xml create mode 100644 src/main/resources/sqlmapper/framework/mng/code/code-dtl-mysql-mapper.xml create mode 100644 src/main/resources/sqlmapper/framework/mng/code/code-grp-mysql-mapper.xml rename src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/{mngCodeClassificationMgtForm.jsp => mngCodeCfnMgtForm.jsp} (93%) rename src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/{mngCodeclassificationMgtPopup.jsp => mngCodeCfnMgtPopup.jsp} (91%) diff --git a/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeCfnMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeCfnMgtMapper.java new file mode 100644 index 00000000..1f4657c1 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeCfnMgtMapper.java @@ -0,0 +1,21 @@ +package kr.xit.framework.biz.mng.code.mapper; + +import java.util.List; +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; + + +@Mapper +public interface ICodeCfnMgtMapper { + + List selectCmmnClCodes(final Map paraMap, final RowBounds rowBounds); + XitClCodeMngVO selectCmmnClCode(final String clCode); + + int insertCmmnClCode(final XitClCodeMngVO vo); + int updateCmmnClCode(final XitClCodeMngVO vo); + int deleteCmmnClCode(final String clCode); +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeClassificationMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeDtlMgtMapper.java similarity index 69% rename from src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeClassificationMgtMapper.java rename to src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeDtlMgtMapper.java index 2a1218d5..e2eb2706 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeClassificationMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeDtlMgtMapper.java @@ -8,10 +8,9 @@ import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; - @SuppressWarnings("MybatisXMapperMethodInspection") @Mapper -public interface ICodeClassificationMgtMapper { +public interface ICodeDtlMgtMapper { - List selectCmmnClCodes(Map paraMap, RowBounds rowBounds); + List selectCmmnDtlCodes(Map paraMap, RowBounds rowBounds); } 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 new file mode 100644 index 00000000..0246da61 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/mapper/ICodeGrpMgtMapper.java @@ -0,0 +1,16 @@ +package kr.xit.framework.biz.mng.code.mapper; + +import java.util.List; +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; + +@SuppressWarnings("MybatisXMapperMethodInspection") +@Mapper +public interface ICodeGrpMgtMapper { + + List selectCmmnGrpCodes(Map paraMap, RowBounds rowBounds); +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/model/XitClCodeMngVO.java b/src/main/java/kr/xit/framework/biz/mng/code/model/XitClCodeMngVO.java index d3922a1b..6a23fdaf 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/model/XitClCodeMngVO.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/model/XitClCodeMngVO.java @@ -35,30 +35,30 @@ public class XitClCodeMngVO { /* * 분류코드 */ - private String clCode = ""; + private String clCode; /* * 분류코드명 */ - private String clCodeNm = ""; + private String clCodeNm; /* * 분류코드설명 */ - private String clCodeDc = ""; + private String clCodeDc; /* * 사용여부 */ - private String useAt = ""; + private String useAt; /* * 최초등록자ID */ - private String frstRegisterId = ""; + private String frstRegisterId; /* * 최종수정자ID */ - private String lastUpdusrId = ""; + private String lastUpdusrId; } diff --git a/src/main/java/kr/xit/framework/biz/mng/code/model/XitCmmnCodeMngVO.java b/src/main/java/kr/xit/framework/biz/mng/code/model/XitCmmnCodeMngVO.java index da67cd9e..5ae82226 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/model/XitCmmnCodeMngVO.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/model/XitCmmnCodeMngVO.java @@ -3,6 +3,13 @@ package kr.xit.framework.biz.mng.code.model; import org.apache.commons.lang3.builder.ToStringBuilder; import kr.xit.framework.core.model.BaseVO; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; /** * @@ -14,7 +21,14 @@ import kr.xit.framework.core.model.BaseVO; * @since 2002. 2. 2. * @version 1.0 Copyright(c) XIT All rights reserved. */ -public class XitCmmnCodeMngVO extends BaseVO { +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode +@Builder +@ToString +public class XitCmmnCodeMngVO { /** * serialVersionUID @@ -24,176 +38,41 @@ public class XitCmmnCodeMngVO extends BaseVO { /* * 코드ID */ - private String codeId = ""; + private String codeId; /* * 코드ID명 */ - private String codeIdNm = ""; + private String codeIdNm; /* * 코드ID설명 */ - private String codeIdDc = ""; + private String codeIdDc; /* * 분류코드 */ - private String clCode = ""; + private String clCode; /* * 분류코드명 */ - private String clCodeNm = ""; + private String clCodeNm; /* * 사용여부 */ - private String useAt = ""; + private String useAt; /* * 최초등록자ID */ - private String frstRegisterId = ""; + private String frstRegisterId; /* * 최종수정자ID */ - private String lastUpdusrId = ""; - - /** - * codeId attribute 를 리턴한다. - * @return String - */ - public String getCodeId() { - return codeId; - } - - /** - * codeId attribute 값을 설정한다. - * @param codeId String - */ - public void setCodeId(String codeId) { - this.codeId = codeId; - } - - /** - * codeIdNm attribute 를 리턴한다. - * @return String - */ - public String getCodeIdNm() { - return codeIdNm; - } - - /** - * codeIdNm attribute 값을 설정한다. - * @param codeIdNm String - */ - public void setCodeIdNm(String codeIdNm) { - this.codeIdNm = codeIdNm; - } - - /** - * codeIdDc attribute 를 리턴한다. - * @return String - */ - public String getCodeIdDc() { - return codeIdDc; - } - - /** - * codeIdDc attribute 값을 설정한다. - * @param codeIdDc String - */ - public void setCodeIdDc(String codeIdDc) { - this.codeIdDc = codeIdDc; - } - - /** - * clCode attribute 를 리턴한다. - * @return String - */ - public String getClCode() { - return clCode; - } - - /** - * clCode attribute 값을 설정한다. - * @param clCode String - */ - public void setClCode(String clCode) { - this.clCode = clCode; - } - - /** - * clCodeNm attribute 를 리턴한다. - * @return String - */ - public String getClCodeNm() { - return clCodeNm; - } - - /** - * clCodeNm attribute 값을 설정한다. - * @param clCodeNm String - */ - public void setClCodeNm(String clCodeNm) { - this.clCodeNm = clCodeNm; - } - - /** - * useAt attribute 를 리턴한다. - * @return String - */ - public String getUseAt() { - return useAt; - } - - /** - * useAt attribute 값을 설정한다. - * @param useAt String - */ - public void setUseAt(String useAt) { - this.useAt = useAt; - } - - /** - * frstRegisterId attribute 를 리턴한다. - * @return String - */ - public String getFrstRegisterId() { - return frstRegisterId; - } - - /** - * frstRegisterId attribute 값을 설정한다. - * @param frstRegisterId String - */ - public void setFrstRegisterId(String frstRegisterId) { - this.frstRegisterId = frstRegisterId; - } - - /** - * lastUpdusrId attribute 를 리턴한다. - * @return String - */ - public String getLastUpdusrId() { - return lastUpdusrId; - } - - /** - * lastUpdusrId attribute 값을 설정한다. - * @param lastUpdusrId String - */ - public void setLastUpdusrId(String lastUpdusrId) { - this.lastUpdusrId = lastUpdusrId; - } - - /** - * toString 메소드를 대치한다. - */ - public String toString() { - return ToStringBuilder.reflectionToString(this); - } + private String lastUpdusrId; } diff --git a/src/main/java/kr/xit/framework/biz/mng/code/model/XitDetailCodeMngVO.java b/src/main/java/kr/xit/framework/biz/mng/code/model/XitDetailCodeMngVO.java index 57c4320c..8fe5f82e 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/model/XitDetailCodeMngVO.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/model/XitDetailCodeMngVO.java @@ -1,6 +1,13 @@ package kr.xit.framework.biz.mng.code.model; import kr.xit.framework.core.model.BaseVO; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; /** * @@ -12,7 +19,14 @@ import kr.xit.framework.core.model.BaseVO; * @since 2002. 2. 2. * @version 1.0 Copyright(c) XIT All rights reserved. */ -public class XitDetailCodeMngVO extends BaseVO { +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode +@Builder +@ToString +public class XitDetailCodeMngVO { /** * serialVersionUID @@ -22,169 +36,47 @@ public class XitDetailCodeMngVO extends BaseVO { /* * 코드ID */ - private String codeId = ""; + private String codeId; /* * 코드ID명 */ - private String codeIdNm = ""; + private String codeIdNm; /* * 코드 */ - private String code = ""; + private String code; /* * 코드명 */ - private String codeNm = ""; + private String codeNm; /* * 코드설명 */ - private String codeDc = ""; + private String codeDc; + + private String etc1; + private String etc2; + private String etc3; + + private String ordr; /* * 사용여부 */ - private String useAt = ""; + private String useAt; /* * 최초등록자ID */ - private String frstRegisterId = ""; + private String frstRegisterId; /* * 최종수정자ID */ - private String lastUpdusrId = ""; - - /** - * codeId attribute 를 리턴한다. - * @return String - */ - public String getCodeId() { - return codeId; - } - - /** - * codeId attribute 값을 설정한다. - * @param codeId String - */ - public void setCodeId(String codeId) { - this.codeId = codeId; - } - - /** - * codeIdNm attribute 를 리턴한다. - * @return String - */ - public String getCodeIdNm() { - return codeIdNm; - } - - /** - * codeIdNm attribute 값을 설정한다. - * @param codeIdNm String - */ - public void setCodeIdNm(String codeIdNm) { - this.codeIdNm = codeIdNm; - } - - /** - * code attribute 를 리턴한다. - * @return String - */ - public String getCode() { - return code; - } - - /** - * code attribute 값을 설정한다. - * @param code String - */ - public void setCode(String code) { - this.code = code; - } - - /** - * codeNm attribute 를 리턴한다. - * @return String - */ - public String getCodeNm() { - return codeNm; - } - - /** - * codeNm attribute 값을 설정한다. - * @param codeNm String - */ - public void setCodeNm(String codeNm) { - this.codeNm = codeNm; - } - - /** - * codeDc attribute 를 리턴한다. - * @return String - */ - public String getCodeDc() { - return codeDc; - } - - /** - * codeDc attribute 값을 설정한다. - * @param codeDc String - */ - public void setCodeDc(String codeDc) { - this.codeDc = codeDc; - } - - /** - * useAt attribute 를 리턴한다. - * @return String - */ - public String getUseAt() { - return useAt; - } - - /** - * useAt attribute 값을 설정한다. - * @param useAt String - */ - public void setUseAt(String useAt) { - this.useAt = useAt; - } - - /** - * frstRegisterId attribute 를 리턴한다. - * @return String - */ - public String getFrstRegisterId() { - return frstRegisterId; - } - - /** - * frstRegisterId attribute 값을 설정한다. - * @param frstRegisterId String - */ - public void setFrstRegisterId(String frstRegisterId) { - this.frstRegisterId = frstRegisterId; - } - - /** - * lastUpdusrId attribute 를 리턴한다. - * @return String - */ - public String getLastUpdusrId() { - return lastUpdusrId; - } - - /** - * lastUpdusrId attribute 값을 설정한다. - * @param lastUpdusrId String - */ - public void setLastUpdusrId(String lastUpdusrId) { - this.lastUpdusrId = lastUpdusrId; - } + private String lastUpdusrId; } 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 new file mode 100644 index 00000000..004b1cb6 --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/service/CodeCfnMgtService.java @@ -0,0 +1,45 @@ +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.mng.code.mapper.ICodeCfnMgtMapper; +import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; +import kr.xit.framework.core.message.XitMessageSource; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Service +public class CodeCfnMgtService implements ICodeCfnMgtService { + + private final ICodeCfnMgtMapper mapper; + + @Override + public List findCodeCfns(final Map paraMap, final RowBounds rowBounds) { + return mapper.selectCmmnClCodes(paraMap, rowBounds); + } + + @Override + public void addCodeCfn(final XitClCodeMngVO vo) { + vo.setFrstRegisterId(getUserUniqId()); + mapper.insertCmmnClCode(vo); + } + + @Override + public void modifyCodeCfn(final XitClCodeMngVO vo) { + vo.setLastUpdusrId(getUserUniqId()); + mapper.updateCmmnClCode(vo); + } + + @Override + public void removeCodeCfn(final String clCode) { + mapper.deleteCmmnClCode(clCode); + } +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/CodeClassificationMgtService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/CodeClassificationMgtService.java deleted file mode 100644 index f5b9e6c0..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/CodeClassificationMgtService.java +++ /dev/null @@ -1,33 +0,0 @@ -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.mng.code.mapper.ICodeClassificationMgtMapper; -import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; -import kr.xit.framework.core.message.XitMessageSource; - -@Service -public class CodeClassificationMgtService implements ICodeClassificationMgtService { - - @Resource - private ICodeClassificationMgtMapper mapper; - @Resource - private XitFrameCrudService xitFrameCrudService; - @Resource(name="groupIdGnrService") - private EgovIdGnrService idgenService; - @Resource - private XitMessageSource xitMessageSource; - - @Override - public List findCodeClassifications(Map paraMap, RowBounds rowBounds) { - return mapper.selectCmmnClCodes(paraMap, rowBounds); - } -} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeClassificationMgtService.java b/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeCfnMgtService.java similarity index 54% rename from src/main/java/kr/xit/framework/biz/mng/code/service/ICodeClassificationMgtService.java rename to src/main/java/kr/xit/framework/biz/mng/code/service/ICodeCfnMgtService.java index c22729de..8e04fb7d 100644 --- a/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeClassificationMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/code/service/ICodeCfnMgtService.java @@ -6,6 +6,7 @@ import java.util.Map; import org.apache.ibatis.session.RowBounds; import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; +import kr.xit.framework.core.utils.XitCmmnUtil; /** * @@ -17,8 +18,18 @@ import kr.xit.framework.biz.mng.code.model.XitClCodeMngVO; * @since 2002. 2. 2. * @version 1.0 Copyright(c) XIT All rights reserved. */ -public interface ICodeClassificationMgtService { +public interface ICodeCfnMgtService { - List findCodeClassifications(Map paraMap, RowBounds pagingInfo); + List findCodeCfns(final Map paraMap, final RowBounds rowBounds); + + void addCodeCfn(final XitClCodeMngVO vo); + + void modifyCodeCfn(final XitClCodeMngVO vo); + + void removeCodeCfn(final String clCode); + + default String getUserUniqId(){ + return XitCmmnUtil.getUserUniqId(); + } } diff --git a/src/main/java/kr/xit/framework/biz/mng/code/web/CodeCfnMgtController.java b/src/main/java/kr/xit/framework/biz/mng/code/web/CodeCfnMgtController.java new file mode 100644 index 00000000..94b2d26f --- /dev/null +++ b/src/main/java/kr/xit/framework/biz/mng/code/web/CodeCfnMgtController.java @@ -0,0 +1,83 @@ +package kr.xit.framework.biz.mng.code.web; + +import java.util.Map; + +import javax.annotation.Resource; + +import org.springframework.beans.factory.annotation.Autowired; +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.XitClCodeMngVO; +import kr.xit.framework.biz.mng.code.service.ICodeCfnMgtService; +import kr.xit.framework.biz.mng.menu.model.XitMenuInfoVO; +import kr.xit.framework.core.constants.FrameworkConstants; +import kr.xit.framework.core.message.XitMessageSource; +import kr.xit.framework.core.model.ResultResponse; +import kr.xit.framework.core.validation.XitBeanValidator; +import kr.xit.framework.support.mybatis.MybatisUtils; +import kr.xit.framework.support.util.AjaxMessageMapRenderer; +import kr.xit.framework.support.util.ValidationError; +import kr.xit.framework.support.util.constants.MessageKey; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +@Controller +@RequestMapping("/framework/biz/mng/code") +public class CodeCfnMgtController { + + private final ICodeCfnMgtService service; + + @RequestMapping(value = "/mngCodeCfnMgtForm") + public void mngCodeCfnMgtForm() { + } + + @RequestMapping(value = "/mngCodeCfnMgtPopup") + public ModelAndView mngCodeCfnMgtPopup(final XitClCodeMngVO vo) { + ModelAndView mav = new ModelAndView(); + + mav.addObject("cmmnClCode", vo); + mav.addObject("pageTitle", "분류 코드 등록 / 변경"); + mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/code/mngCodeCfnMgtPopup.popup"); + return mav; + } + + @GetMapping(value = "/findCodeCfns") + public ModelAndView findCodeCfns(@RequestParam final Map paraMap){ + return ResultResponse.of(service.findCodeCfns(paraMap, MybatisUtils.getPagingInfo(paraMap))); + } + + @PostMapping(value = "/addCodeCfn") + public ModelAndView addCodeCfn(final XitClCodeMngVO vo, final BindingResult bindingResult){ + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + ValidationError.of("cmmnClCode", vo, bindingResult); + service.addCodeCfn(vo); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS); + return mav; + } + + @PostMapping(value = "/modifyCodeCfn") + public ModelAndView modifyCodeCfn(final XitClCodeMngVO vo, final BindingResult bindingResult){ + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + ValidationError.of("cmmnClCode", vo, bindingResult); + service.modifyCodeCfn(vo); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); + return mav; + } + + @PostMapping(value = "/removeCodeCfn") + public ModelAndView removeCodeCfn(final String clCode){ + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + service.removeCodeCfn(clCode); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); + return mav; + } +} diff --git a/src/main/java/kr/xit/framework/biz/mng/code/web/CodeClassificationMgtController.java b/src/main/java/kr/xit/framework/biz/mng/code/web/CodeClassificationMgtController.java deleted file mode 100644 index 383ba95f..00000000 --- a/src/main/java/kr/xit/framework/biz/mng/code/web/CodeClassificationMgtController.java +++ /dev/null @@ -1,50 +0,0 @@ -package kr.xit.framework.biz.mng.code.web; - -import java.util.Map; - -import javax.annotation.Resource; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -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.service.ICodeClassificationMgtService; -import kr.xit.framework.core.message.XitMessageSource; -import kr.xit.framework.core.model.ResultResponse; -import kr.xit.framework.core.validation.XitBeanValidator; -import kr.xit.framework.support.mybatis.MybatisUtils; - -/** - * - * @업무그룹명: 분류코드관리 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 CodeClassificationMgtController { - - @Resource - private ICodeClassificationMgtService service; - @Autowired - private XitBeanValidator beanValidator; - @Resource(name = "xitMessageSource") - XitMessageSource xitMessageSource; - - @RequestMapping(value = "/mngCodeClassificationMgtForm") - public void mngCodeClassificationMgtForm() { - } - - @GetMapping(value = "/findCodeClassifications") - public ModelAndView findCodeClassifications(@RequestParam final Map paraMap){ - return ResultResponse.of(service.findCodeClassifications(paraMap, MybatisUtils.getPagingInfo(paraMap))); - } - -} 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 new file mode 100644 index 00000000..babf1380 --- /dev/null +++ b/src/main/resources/sqlmapper/framework/mng/code/code-cfn-mysql-mapper.xml @@ -0,0 +1,80 @@ + + + + + + + + SELECT cl_code + , cl_code_nm + , cl_code_dc + , use_at + , frst_regist_pnttm + , frst_register_id + , last_updt_pnttm + , last_updusr_id + FROM xit_cmmn_cl_code + + + AND cl_code = #{clCode} + + + AND cl_code_nm = #{clCodeNm} + + + AND use_at = #{useAt} + + + + + + + + + + /* code-cfn-mysql-mapper|insertCmmnClCode-분류코드 정보 등록|julim */ + INSERT + INTO xit_cmmn_cl_code ( + cl_code + , cl_code_nm + , cl_code_dc + , use_at + , frst_regist_pnttm + , frst_register_id + ) VALUE ( + #{clCode} + , #{clCodeNm} + , #{clCodeDc} + , 'Y' + , NOW() + , #{frstRegisterId} + ) + + + + /* code-cfn-mysql-mapper|updateCmmnClCode-분류코드 정보 변경|julim */ + UPDATE xit_cmmn_cl_code + SET cl_code_nm = IF(cl_code_nm = #{clCodeNm}, cl_code_nm, #{clCodeNm}) + , cl_code_dc = IF(cl_code_dc = #{clCodeDc}, cl_code_dc, #{clCodeDc}) + , use_at = #{useAt} + , last_updt_pnttm = NOW() + , last_updusr_id = #{lastUpdusrId} + WHERE cl_code = #{clCode} + + + + /* code-cfn-mysql-mapper|deleteCmmnClCode-분류코드 정보 삭제|julim */ + DELETE + FROM xit_cmmn_cl_code + WHERE cl_code = #{clCode} + + + diff --git a/src/main/resources/sqlmapper/framework/mng/code/code-classification-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/code-classification-mysql-mapper.xml deleted file mode 100644 index c8e51e62..00000000 --- a/src/main/resources/sqlmapper/framework/mng/code/code-classification-mysql-mapper.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** addXitCmmnClCode */ - /** 공통분류코드 등록 */ - INSERT INTO XIT_CMMN_CL_CODE( - CL_CODE - ,CL_CODE_NM - ,CL_CODE_DC - ,USE_AT - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{cl_code } - ,#{cl_code_nm } - ,#{cl_code_dc } - ,#{use_at } - ,NOW() - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitCmmnClCode */ - /** 공통분류코드 수정 */ - UPDATE XIT_CMMN_CL_CODE - SET - LAST_UPDT_PNTTM = NOW() - ,CL_CODE_NM = #{cl_code_nm } - ,CL_CODE_DC = #{cl_code_dc } - ,USE_AT = #{use_at } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND CL_CODE = #{cl_code} - - - /** removeXitCmmnClCode */ - /** 공통분류코드 삭제 */ - DELETE FROM XIT_CMMN_CL_CODE - WHERE 1=1 - AND CL_CODE = #{cl_code} - - - diff --git a/src/main/resources/sqlmapper/framework/mng/code/code-code-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/code-code-mysql-mapper.xml deleted file mode 100644 index e5b7dcd0..00000000 --- a/src/main/resources/sqlmapper/framework/mng/code/code-code-mysql-mapper.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** addXitCmmnCode */ - /** 공통코드 등록 */ - INSERT INTO XIT_CMMN_CODE( - CODE_ID - ,CODE_ID_NM - ,CODE_ID_DC - ,USE_AT - ,CL_CODE - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{code_id } - ,#{code_id_nm } - ,#{code_id_dc } - ,#{use_at } - ,#{cl_code } - ,NOW() - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitCmmnCode */ - /** 공통코드 수정 */ - UPDATE XIT_CMMN_CODE - SET - LAST_UPDT_PNTTM = NOW() - ,CODE_ID_NM = #{code_id_nm } - ,CODE_ID_DC = #{code_id_dc } - ,USE_AT = #{use_at } - ,CL_CODE = #{cl_code } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND CODE_ID = #{code_id} - - - /** removeXitCmmnCode */ - /** 공통코드 삭제 */ - DELETE FROM XIT_CMMN_CODE - WHERE 1=1 - AND CODE_ID = #{code_id} - - - diff --git a/src/main/resources/sqlmapper/framework/mng/code/code-detail-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/code/code-detail-mysql-mapper.xml deleted file mode 100644 index a51dd9bb..00000000 --- a/src/main/resources/sqlmapper/framework/mng/code/code-detail-mysql-mapper.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /** addXitCmmnDetailCode */ - /** 공통상세코드 등록 */ - INSERT INTO XIT_CMMN_DETAIL_CODE( - CODE_ID - ,CODE - ,CODE_NM - ,CODE_DC - ,USE_AT - ,ETC_1 - ,ETC_2 - ,ETC_3 - ,ORDR - ,FRST_REGIST_PNTTM - ,FRST_REGISTER_ID - ,LAST_UPDT_PNTTM - ,LAST_UPDUSR_ID - )VALUES( - #{code_id } - ,#{code } - ,#{code_nm } - ,#{code_dc } - ,#{use_at } - ,#{etc_1 } - ,#{etc_2 } - ,#{etc_3 } - ,#{ordr } - ,NOW() - ,#{frst_register_id } - ,#{last_updt_pnttm } - ,#{last_updusr_id } - ) - - - /** modifyXitCmmnDetailCode */ - /** 공통상세코드 수정 */ - UPDATE XIT_CMMN_DETAIL_CODE - SET - LAST_UPDT_PNTTM = NOW() - ,CODE_NM = #{code_nm } - ,CODE_DC = #{code_dc } - ,USE_AT = #{use_at } - ,ETC_1 = #{etc_1 } - ,ETC_2 = #{etc_2 } - ,ETC_3 = #{etc_3 } - ,ORDR = #{ordr } - ,FRST_REGIST_PNTTM = #{frst_regist_pnttm} - ,FRST_REGISTER_ID = #{frst_register_id } - ,LAST_UPDUSR_ID = #{last_updusr_id } - WHERE 1=1 - AND CODE_ID = #{code_id} - AND CODE = #{code } - - - /** removeXitCmmnDetailCode */ - /** 공통상세코드 삭제 */ - DELETE - FROM XIT_CMMN_DETAIL_CODE - WHERE 1=1 - AND CODE_ID = #{code_id} - AND CODE = #{code } - - - - 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 new file mode 100644 index 00000000..64de2ca1 --- /dev/null +++ b/src/main/resources/sqlmapper/framework/mng/code/code-dtl-mysql-mapper.xml @@ -0,0 +1,104 @@ + + + + + + + + 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 + + + AND code_id = #{codeId} + + + AND code = #{code} + + + AND code_nm = #{codeNm} + + + AND use_at = #{useAt} + + + + + + + + + + /* code-dtl-mysql-mapper|insertCmmnDtlCode-코드 정보 등록|julim */ + INSERT + INTO xit_cmmn_detail_code ( + code_id + , code + , code_nm + , code_dc + , etc_1 + , etc_2 + , etc_3 + , ordr + , use_at + , frst_regist_pnttm + , frst_register_id + ) VALUE ( + #{codeId} + , #{code} + , #{codeNm} + , #{codeDc} + , #{etc1} + , #{etc2} + , #{etc3} + , #{ordr} + , 'Y' + , NOW() + , #{frstRegisterId} + ) + + + + /* code-dtl-mysql-mapper|updateCmmnDtlCode-코드 정보 변경|julim */ + UPDATE xit_cmmn_detail_code + SET code_nm = IF(code_nm = #{codeIdNm}, code_nm, #{codeNm}) + , code_dc = IF(code_dc = #{codeDc}, code_dc, #{codeDc}) + , etc_1 = IF(etc_1 = #{etc1}, etc_1, #{etc1}) + , etc_2 = IF(etc_2 = #{etc2}, etc_2, #{etc2}) + , etc_3 = IF(etc_3 = #{etc3}, etc_3, #{etc3}) + , ordr = IF(ordr = #{ordr}, ordr, #{ordr}) + , use_at = IF(use_at = #{useAt}, use_at, #{useAt}) + , last_updt_pnttm = NOW() + , last_updusr_id = #{lastUpdusrId} + WHERE code_id = #{codeId} + AND code = #{code} + + + + /* code-dtl-mysql-mapper|deleteCmmnDtlCode-코드 정보 삭제|julim */ + DELETE + FROM xit_cmmn_detail_code + WHERE code_id = #{codeId} + AND code = #{code} + + + 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 new file mode 100644 index 00000000..42190def --- /dev/null +++ b/src/main/resources/sqlmapper/framework/mng/code/code-grp-mysql-mapper.xml @@ -0,0 +1,88 @@ + + + + + + + + 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 + + + AND cl_code = #{clCode} + + + AND code_id = #{codeId} + + + AND code_id_nm = #{codeIdNm} + + + AND use_at = #{useAt} + + + + + + + + + + /* code-grp-mysql-mapper|insertCmmnCode-코드그룹 정보 등록|julim */ + INSERT + INTO xit_cmmn_code ( + cl_code + , code_id + , code_id_nm + , code_id_dc + , use_at + , frst_regist_pnttm + , frst_register_id + ) VALUE ( + #{clCode} + , #{codeId} + , #{codeIdNm} + , #{codeIdDc} + , 'Y' + , NOW() + , #{frstRegisterId} + ) + + + + /* code-grp-mysql-mapper|updateCmmnCode-코드그룹 정보 변경|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}) + , use_at = #{useAt} + , last_updt_pnttm = NOW() + , last_updusr_id = #{lastUpdusrId} + WHERE cl_code = #{clCode} + AND code_id = #{codeId} + + + + /* code-grp-mysql-mapper|deleteCmmnCode-코드그룹 정보 삭제|julim */ + DELETE + FROM xit_cmmn_code + WHERE cl_code = #{clCode} + AND code_id = #{codeId} + + + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeClassificationMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeCfnMgtForm.jsp similarity index 93% rename from src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeClassificationMgtForm.jsp rename to src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeCfnMgtForm.jsp index 721ff9a1..83bff7b1 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeClassificationMgtForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeCfnMgtForm.jsp @@ -65,7 +65,7 @@ } ,pagePopup: function(flag, params){ - let url = ''; + let url = ''; let popTitle; let popOption = {width: 700, height:660} switch (flag) { @@ -127,7 +127,7 @@ } return obj; } - ,eventFunction: XitClCodeMng_list.fnClickClBtn//function(props){XitClCodeMng_list.fnClickDetail(props)} //function(){alert("1234")} + ,eventFunction: fnBiz.onClickGrid ,eventType : "click" } } @@ -151,7 +151,7 @@ initialRequest: true, api: { readData: { - url: '' + url: '' ,serializer: (params) => fnAddPageInfo(document.frmSearch, params) } } diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeclassificationMgtPopup.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeCfnMgtPopup.jsp similarity index 91% rename from src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeclassificationMgtPopup.jsp rename to src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeCfnMgtPopup.jsp index ce6c99f9..d309dfe9 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeclassificationMgtPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/code/mngCodeCfnMgtPopup.jsp @@ -1,12 +1,5 @@ <%@ 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" %> +<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtPopup.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtPopup.jsp index 374d6c39..c2e510ad 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtPopup.jsp @@ -2,8 +2,7 @@ <%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> - - +