feat: 코드관리 반영

main
minuk926 2 years ago
parent 686f811b7b
commit 6d5e5fc35f

@ -5,6 +5,7 @@ import java.util.Map;
import egovframework.rte.psl.dataaccess.mapper.Mapper;
@SuppressWarnings("MybatisXMapperMethodInspection")
@Mapper
public interface ICacheCodeMapper {
List<Map<String, Object>> selectCodes(final String codeId);

@ -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) {
}
// ---------------------------------------------------------------------------------------------------------

@ -29,7 +29,7 @@ public interface ICacheService {
/**
* Evict
*/
void evictCodeCache(final String codeId);
void evictCodeCache(final String codeId, final String type);

@ -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;
}

@ -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<XitClCodeMngVO> selectCmmnDtlCodes(Map<String, Object> paraMap, RowBounds rowBounds);
List<XitDetailCodeMngVO> selectCmmnDtlCodes(Map<String, Object> paraMap, RowBounds rowBounds);
<T> List<XitDetailCodeMngVO> selectCmmnDtlCodes(T t);
<T> XitDetailCodeMngVO selectCmmnDtlCode(T t);
int insertCmmnDtlCode(final XitDetailCodeMngVO vo);
int updateCmmnDtlCode(final XitDetailCodeMngVO vo);
int deleteCmmnDtlCode(final XitDetailCodeMngVO vo);
}

@ -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<XitClCodeMngVO> selectCmmnGrpCodes(Map<String, Object> paraMap, RowBounds rowBounds);
List<XitCmmnCodeMngVO> selectCmmnGrpCodes(Map<String, Object> paraMap, RowBounds rowBounds);
<T> List<XitCmmnCodeMngVO> selectCmmnGrpCodes(T t);
<T> XitCmmnCodeMngVO selectCmmnGrpCode(T t);
int insertCmmnGrpCode(final XitCmmnCodeMngVO vo);
int updateCmmnGrpCode(final XitCmmnCodeMngVO vo);
int deleteCmmnGrpCode(final XitCmmnCodeMngVO vo);
}

@ -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 {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitClCodeMngVO>
* @author:
* @date: 2020. 4. 16.
*/
public List<XitClCodeMngVO> findList(XitClCodeMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 4. 16.
*/
public int findListTotCnt(XitClCodeMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param vo
* @return XitClCodeMngVO
* @author:
* @date: 2020. 4. 16.
*/
public XitClCodeMngVO findView(XitClCodeMngVO vo) throws SQLException;
}

@ -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 {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitCmmnCodeMngVO>
* @author:
* @date: 2020. 4. 16.
*/
public List<XitCmmnCodeMngVO> findList(XitCmmnCodeMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 4. 16.
*/
public int findListTotCnt(XitCmmnCodeMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param vo
* @return XitCmmnCodeMngVO
* @author:
* @date: 2020. 4. 16.
*/
public XitCmmnCodeMngVO findView(XitCmmnCodeMngVO vo) throws SQLException;
}

@ -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 {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitDetailCodeMngVO>
* @author:
* @date: 2020. 4. 16.
*/
public List<XitDetailCodeMngVO> findList(XitDetailCodeMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 4. 16.
*/
public int findListTotCnt(XitDetailCodeMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param vo
* @return XitDetailCodeMngVO
* @author:
* @date: 2020. 4. 16.
*/
public XitDetailCodeMngVO findView(XitDetailCodeMngVO vo) throws SQLException;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -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<XitClCodeMngVO> findCodeCfns(final Map<String, Object> 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");
}
}

@ -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<XitDetailCodeMngVO> findCodeDtls(final Map<String, Object> 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);
}
}

@ -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<XitCmmnCodeMngVO> findCodeGrps(final Map<String, Object> 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");
}
}

@ -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<XitDetailCodeMngVO> findCodeDtls(final Map<String, Object> 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();
}
}

@ -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<XitCmmnCodeMngVO> findCodeGrps(final Map<String, Object> 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();
}
}

@ -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 {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitClCodeMngVO>
* @author:
* @date: 2020. 4. 16.
*/
public List<XitClCodeMngVO> findList(XitClCodeMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 4. 16.
*/
public int findListTotCnt(XitClCodeMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param vo
* @return XitClCodeMngVO
* @author:
* @date: 2020. 4. 16.
*/
public XitClCodeMngVO findView(XitClCodeMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 16.
*/
public void addProc(XitClCodeMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 16.
*/
public void modifyProc(XitClCodeMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 16.
*/
public void removeProc(XitClCodeMngVO vo);
/**
* <pre> : </pre>
* @param ids void
* @author:
* @date: 2020. 4. 16.
*/
public void removesProc(String ids, String userId);
}

@ -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 {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitCmmnCodeMngVO>
* @author:
* @date: 2020. 4. 16.
*/
public List<XitCmmnCodeMngVO> findList(XitCmmnCodeMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 4. 16.
*/
public int findListTotCnt(XitCmmnCodeMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param vo
* @return XitCmmnCodeMngVO
* @author:
* @date: 2020. 4. 16.
*/
public XitCmmnCodeMngVO findView(XitCmmnCodeMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 16.
*/
public void addProc(XitCmmnCodeMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 16.
*/
public void modifyProc(XitCmmnCodeMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 16.
*/
public void removeProc(XitCmmnCodeMngVO vo);
/**
* <pre> : </pre>
* @param ids void
* @author:
* @date: 2020. 4. 16.
*/
public void removesProc(String ids, String userId);
}

@ -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 {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitDetailCodeMngVO>
* @author:
* @date: 2020. 4. 16.
*/
public List<XitDetailCodeMngVO> findList(XitDetailCodeMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 4. 16.
*/
public int findListTotCnt(XitDetailCodeMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param vo
* @return XitDetailCodeMngVO
* @author:
* @date: 2020. 4. 16.
*/
public XitDetailCodeMngVO findView(XitDetailCodeMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 16.
*/
public void addProc(XitDetailCodeMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 16.
*/
public void modifyProc(XitDetailCodeMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 16.
*/
public void removeProc(XitDetailCodeMngVO vo);
/**
* <pre> : </pre>
* @param codeIds
* @param codes
* @param userId
* @return void
* @author:
* @date: 2020. 4. 16.
*/
public void removesProc(String codeIds, String codes, String userId);
}

@ -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<XitClCodeMngVO> findList(XitClCodeMngSearchVO searchVO) {
List<XitClCodeMngVO> 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<clCodes.length;i++) {
XitClCodeMngVO vo = new XitClCodeMngVO();
vo.setClCode(clCodes[i]);
vo.setLastUpdusrId(userId);
this.removeProc(vo);
}
}
/**
* <pre>
* : VO CRUD Service VO .
* </pre>
*
* @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;
}
}

@ -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<XitCmmnCodeMngVO> findList(XitCmmnCodeMngSearchVO searchVO) {
List<XitCmmnCodeMngVO> 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<codeIds.length;i++) {
XitCmmnCodeMngVO vo = new XitCmmnCodeMngVO();
vo.setCodeId(codeIds[i]);
vo.setLastUpdusrId(userId);
this.removeProc(vo);
}
}
/**
* <pre>
* : VO CRUD Service VO .
* </pre>
*
* @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;
}
}

@ -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<XitDetailCodeMngVO> findList(XitDetailCodeMngSearchVO searchVO) {
List<XitDetailCodeMngVO> 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<arrCodeId.length;i++) {
XitDetailCodeMngVO vo = new XitDetailCodeMngVO();
vo.setCodeId(arrCodeId[i]);
vo.setCode(arrCode[i]);
vo.setLastUpdusrId(userId);
this.removeProc(vo);
}
}
/**
* <pre>
* : VO CRUD Service VO .
* </pre>
*
* @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;
}
}

@ -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<String, Object> 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;
}
}

@ -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<String, Object> 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;
}
}

@ -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;
/**
* <pre> : </pre>
* @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";
}
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 7. 31.
*/
@RequestMapping(value = "ClCodeMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public Map<String, Object> 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<String, Object> resultMap = new HashMap<String, Object>();
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<String, Object> data = new HashMap<String, Object>();
data.put("contents", xitClCodeMngService.findList(searchVO)); //[tui Grid] data-contents
Map<String, Integer> pagination = new HashMap<String, Integer>();
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;
}
/**
* <pre> : .</pre>
* @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;
}
/**
* <pre> : .</pre>
* @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();
}
/**
* <pre> : CUD </pre>
* @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<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
}else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
}
}

@ -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;
/**
* <pre> : </pre>
* @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";
}
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 7. 31.
*/
@RequestMapping(value = "CmmnCodeMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public Map<String, Object> 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<String, Object> resultMap = new HashMap<String, Object>();
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<String, Object> data = new HashMap<String, Object>();
data.put("contents", xitCmmnCodeMngService.findList(searchVO)); //[tui Grid] data-contents
Map<String, Integer> pagination = new HashMap<String, Integer>();
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;
}
/**
* <pre> : .</pre>
* @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;
}
/**
* <pre> : .</pre>
* @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();
}
/**
* <pre> : CUD </pre>
* @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<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
}else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
}
}

@ -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;
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 4. 16.
*/
@GetMapping(value = "DetailCodeMng_list")
public void DetailCodeMng_list() {
}
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 7. 31.
*/
@RequestMapping(value = "DetailCodeMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public Map<String, Object> 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<String, Object> resultMap = new HashMap<String, Object>();
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<String, Object> data = new HashMap<String, Object>();
data.put("contents", xitDetailCodeMngService.findList(searchVO)); //[tui Grid] data-contents
Map<String, Integer> pagination = new HashMap<String, Integer>();
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;
}
/**
* <pre> : .</pre>
* @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<XitCodeVO> cmmnClCodeList = xitFrameCodeService.findClCodes(null);
model.addAttribute("cmmnClCodeList", cmmnClCodeList);
if(XitCmmnUtil.isEmpty(cmmnCodeMngVO.getClCode())) {
if(XitCmmnUtil.isEmpty(cmmnClCodeList))
model.addAttribute("cmmnCodeList", new ArrayList<XitCodeVO>());
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;
}
/**
* <pre> : .</pre>
* @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();
}
/**
* <pre> : CUD </pre>
* @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<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
}else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
}
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 8. 12.
*/
@RequestMapping(value = "DetailCodeMng_getCodeList.ajax", method={RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public Map<String, Object> DetailCodeMng_getCodeListAjax(
@ModelAttribute("cmmnCode") XitCmmnCodeMngVO cmmnCodeMngVO
,Model model){
Map<String, Object> resultMap = new HashMap<String, Object>();
System.out.println("test====================");
List<XitCodeVO> cmmnClCodeList = xitFrameCodeService.findClCodes(null);
model.addAttribute("cmmnClCodeList", cmmnClCodeList);
if(XitCmmnUtil.isEmpty(cmmnCodeMngVO.getClCode())) {
if(XitCmmnUtil.isEmpty(cmmnClCodeList))
resultMap.put("cmmnCodeList", new ArrayList<XitCodeVO>());
else
resultMap.put("cmmnCodeList", xitFrameCodeService.findCmmnCodes(cmmnClCodeList.get(0).getClCode()));
} else {
resultMap.put("cmmnCodeList", xitFrameCodeService.findCmmnCodes(cmmnCodeMngVO.getClCode()));
}
return resultMap;
}
}

@ -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

@ -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

@ -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.

@ -51,6 +51,22 @@
FROM xit_author_group_info
</when>
<when test='type != null and type == "CMM_CFN"'>
/* 분류코드 */
SELECT cl_code AS code
, cl_code_nm AS code_nm
FROM xit_cmmn_cl_code
WHERE use_at = 'Y'
</when>
<when test='type != null and type == "CMM_GRP"'>
/* 공통 코드 그룹 */
SELECT code_id AS code
, code_id_nm AS code_nm
FROM xit_cmmn_code
WHERE cl_code = #{codeId}
AND use_at = 'Y'
</when>
<otherwise>
/* 공통 코드 */

@ -1,77 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.code.mapper.XitClCodeMngMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(
</sql>
<sql id="pageAfter">
) LIST LIMIT #{firstIndex}, #{recordCountPerPage}
</sql>
<sql id="findList_SELECT">
SELECT A.CL_CODE AS "clCode"
, A.CL_CODE_NM AS "clCodeNm"
, A.CL_CODE_DC AS "clCodeDc"
, A.USE_AT AS "useAt"
</sql>
<sql id="findList_FROM">
FROM XIT_CMMN_CL_CODE A
</sql>
<sql id="findList_WHERE">
<if test="'1'.toString() == searchCondition">
AND A.CL_CODE = #{searchKeyword}
</if>
<if test="'2'.toString() == searchCondition">
AND A.CL_CODE_NM LIKE CONCAT('%',#{searchKeyword},'%')
</if>
<if test="'CodeList' == searchCondition">
AND A.USE_AT = 'Y'
</if>
</sql>
<select id="findList" resultType="kr.xit.framework.biz.mng.code.model.XitClCodeMngVO">
/** XitClCodeMngMapper.findList */
/** 분류코드관리 목록 조회 */
<if test="searchGubun == 'list'">
<include refid="pageBefore" />
</if>
<include refid="findList_SELECT"/>
<include refid="findList_FROM"/>
WHERE 1=1
<include refid="findList_WHERE"/>
<if test="searchGubun == 'list'">
<include refid="pageAfter" />
</if>
</select>
<select id="findListTotCnt" resultType="int">
/** XitClCodeMngMapper.findListTotCnt */
/** 분류코드관리 목록 총건수 조회 */
SELECT COUNT(1) AS "CNT"
<include refid="findList_FROM"/>
WHERE 1=1
<include refid="findList_WHERE"/>
</select>
<select id="findView" resultType="kr.xit.framework.biz.mng.code.model.XitClCodeMngVO">
/** XitClCodeMngMapper.findView */
/** 분류코드관리 상세정보 조회 */
<include refid="findList_SELECT"/>
<include refid="findList_FROM"/>
WHERE A.CL_CODE = #{clCode}
</select>
</mapper>

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.code.mapper.XitCmmnCodeMngMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(
</sql>
<sql id="pageAfter">
) LIST LIMIT #{firstIndex}, #{recordCountPerPage}
</sql>
<sql id="findList_SELECT">
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"
</sql>
<sql id="findList_FROM">
FROM XIT_CMMN_CODE A
INNER JOIN XIT_CMMN_CL_CODE B ON A.CL_CODE = B.CL_CODE
</sql>
<sql id="findList_WHERE">
<if test="'1'.toString() == searchCondition">
AND A.CODE_ID = #{searchKeyword}
</if>
<if test="'2'.toString() == searchCondition">
AND A.CODE_ID_NM LIKE CONCAT('%',#{searchKeyword},'%')
</if>
<if test="'clCode' == searchCondition">
AND A.CL_CODE = #{searchKeyword}
AND A.USE_AT = 'Y'
</if>
</sql>
<select id="findList" resultType="kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO">
/** XitCmmnCodeMngMapper.findList */
/** 공통코드관리 목록 조회 */
<if test="searchGubun == 'list'">
<include refid="pageBefore" />
</if>
<include refid="findList_SELECT"/>
<include refid="findList_FROM"/>
WHERE 1=1
<include refid="findList_WHERE"/>
<if test="searchGubun == 'list'">
<include refid="pageAfter" />
</if>
</select>
<select id="findListTotCnt" resultType="int">
/** XitCmmnCodeMngMapper.findListTotCnt */
/** 공통코드관리 목록 총건수 조회 */
SELECT COUNT(1) AS "CNT"
<include refid="findList_FROM"/>
WHERE 1=1
<include refid="findList_WHERE"/>
</select>
<select id="findView" resultType="kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO">
/** XitCmmnCodeMngMapper.findView */
/** 공통코드관리 상세정보 조회 */
<include refid="findList_SELECT"/>
<include refid="findList_FROM"/>
WHERE A.CODE_ID = #{codeId}
</select>
</mapper>

@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.code.mapper.XitDetailCodeMngMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(
</sql>
<sql id="pageAfter">
) LIST LIMIT #{firstIndex}, #{recordCountPerPage}
</sql>
<sql id="findList_SELECT">
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"
</sql>
<sql id="findList_FROM">
FROM XIT_CMMN_DETAIL_CODE A
INNER JOIN XIT_CMMN_CODE B ON A.CODE_ID = B.CODE_ID
</sql>
<sql id="findList_WHERE">
AND B.USE_AT = 'Y'
<if test="'1'.toString() == searchCondition">
AND A.CODE_ID = #{searchKeyword}
</if>
<if test="'2'.toString() == searchCondition">
AND A.CODE = #{searchKeyword}
</if>
<if test="'3'.toString() == searchCondition">
AND A.CODE_NM LIKE CONCAT('%',#{searchKeyword},'%')
</if>
</sql>
<select id="findList" resultType="kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO">
/** XitDetailCodeMngMapper.findList */
/** 상세코드관리 목록 조회 */
<if test="searchGubun == 'list'">
<include refid="pageBefore" />
</if>
<include refid="findList_SELECT"/>
<include refid="findList_FROM"/>
WHERE 1=1
<include refid="findList_WHERE"/>
<if test="searchGubun == 'list'">
<include refid="pageAfter" />
</if>
</select>
<select id="findListTotCnt" resultType="int">
/** XitDetailCodeMngMapper.findListTotCnt */
/** 상세코드관리 목록 총건수 조회 */
SELECT COUNT(1) AS "CNT"
<include refid="findList_FROM"/>
WHERE 1=1
<include refid="findList_WHERE"/>
</select>
<select id="findView" resultType="kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO">
/** XitDetailCodeMngMapper.findView */
/** 상세코드관리 상세정보 조회 */
<include refid="findList_SELECT"/>
<include refid="findList_FROM"/>
WHERE 1=1
AND B.USE_AT = 'Y'
AND A.CODE_ID = #{codeId}
AND A.CODE = #{code}
</select>
</mapper>

@ -17,14 +17,13 @@
, last_updusr_id
FROM xit_cmmn_cl_code
<where>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(clCode)">
AND cl_code = #{clCode}
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(searchKeyword)">
<if test="searchCondition eq 'clCode'">
AND INSTR(cl_code, #{searchKeyword}) > 0
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(clCodeNm)">
AND cl_code_nm = #{clCodeNm}
<if test="searchCondition eq 'clCodeNm'">
AND INSTR(cl_code_nm, #{searchKeyword}) > 0
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(useAt)">
AND use_at = #{useAt}
</if>
</where>
</sql>
@ -53,7 +52,7 @@
#{clCode}
, #{clCodeNm}
, #{clCodeDc}
, 'Y'
, #{useAt}
, NOW()
, #{frstRegisterId}
)

@ -7,42 +7,50 @@
* xit_cmmn_detail_code : 공통 코드
************************************************************************************************************** -->
<sql id="sqlCmmnDtlCode">
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
<where>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(codeId)">
AND code_id = #{codeId}
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(searchKeyword)">
<if test="searchCondition eq 'codeId'">
AND INSTR(cdc.code_id, #{searchKeyword}) > 0
</if>
<if test="searchCondition eq 'code'">
AND INSTR(cdc.code, #{searchKeyword}) > 0
</if>
<if test="searchCondition eq 'codeNm'">
AND INSTR(cdc.code_nm, #{searchKeyword}) > 0
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(code)">
AND code = #{code}
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(codeNm)">
AND code_nm = #{codeNm}
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(clCode)">
AND xcc.cl_code = #{clCode}
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(useAt)">
AND use_at = #{useAt}
AND cdc.use_at = #{useAt}
</if>
</where>
</sql>
<select id="selectCmmnDtlCodes">
<select id="selectCmmnDtlCodes" resultType="kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO">
/* code-dtl-mysql-mapper|selectCmmnDtlCodes-코드 목록 조회|julim */
<include refid="sqlCmmnDtlCode"/>
</select>
<select id="selectCmmnDtlCode">
<select id="selectCmmnDtlCode" resultType="kr.xit.framework.biz.mng.code.model.XitDetailCodeMngVO">
/* /* code-dtl-mysql-mapper|selectCmmnDtlCode-코드 정보 조회|julim */
<include refid="sqlCmmnDtlCode"/>
</select>
@ -71,7 +79,7 @@
, #{etc2}
, #{etc3}
, #{ordr}
, 'Y'
, #{useAt}
, NOW()
, #{frstRegisterId}
)

@ -7,44 +7,50 @@
* xit_cmmn_code : 그룹 코드
************************************************************************************************************** -->
<sql id="sqlCmmnCode">
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
<where>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(clCode)">
AND cl_code = #{clCode}
AND xcc.cl_code = #{clCode}
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(codeId)">
AND code_id = #{codeId}
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(searchKeyword)">
<if test="searchCondition eq 'codeId'">
AND INSTR(xcc.code_id, #{searchKeyword}) > 0
</if>
<if test="searchCondition eq 'clCodeNm'">
AND INSTR(xcc.code_id_nm, #{searchKeyword}) > 0
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(codeIdNm)">
AND code_id_nm = #{codeIdNm}
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(useAt)">
AND use_at = #{useAt}
AND xcc.use_at = #{useAt}
</if>
</where>
</sql>
<select id="selectCmmnCodes">
/* code-grp-mysql-mapper|selectCmmnCodes-코드그룹 목록 조회|julim */
<select id="selectCmmnGrpCodes" resultType="kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO">
/* code-grp-mysql-mapper|selectCmmnGrpCodes-코드그룹 목록 조회|julim */
<include refid="sqlCmmnCode"/>
ORDER BY xcc.cl_code, xcc.code_id
</select>
<select id="selectCmmnCode">
/* code-grp-mysql-mapper|selectCmmnCode-코드그룹 정보 조회|julim */
<select id="selectCmmnGrpCode" resultType="kr.xit.framework.biz.mng.code.model.XitCmmnCodeMngVO">
/* code-grp-mysql-mapper|selectCmmnGrpCode-코드그룹 정보 조회|julim */
<include refid="sqlCmmnCode"/>
</select>
<insert id="insertCmmnCode">
/* code-grp-mysql-mapper|insertCmmnCode-코드그룹 정보 등록|julim */
<insert id="insertCmmnGrpCode">
/* code-grp-mysql-mapper|insertCmmnGrpCode-코드그룹 정보 등록|julim */
INSERT
INTO xit_cmmn_code (
cl_code
@ -59,14 +65,14 @@
, #{codeId}
, #{codeIdNm}
, #{codeIdDc}
, 'Y'
, #{useAt}
, NOW()
, #{frstRegisterId}
)
</insert>
<update id="updateCmmnCode">
/* code-grp-mysql-mapper|updateCmmnCode-코드그룹 정보 변경|julim */
<update id="updateCmmnGrpCode">
/* 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}
</update>
<delete id="deleteCmmnCode">
/* code-grp-mysql-mapper|deleteCmmnCode-코드그룹 정보 삭제|julim */
<delete id="deleteCmmnGrpCode">
/* code-grp-mysql-mapper|deleteCmmnGrpCode-코드그룹 정보 삭제|julim */
DELETE
FROM xit_cmmn_code
WHERE cl_code = #{clCode}

@ -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 정의 필요
<c:set var="isUpdate" value="${!empty authorInfoVO.authorCode}"/>
--%>
<!-- popup button -->
<div class="popup_btn">
<span class="flr p_flr">
<c:choose>
<c:when test="${isUpdate}">
<a href="#" class="btn blue" id="btnModify">변경</a>
<a href="#" class="btn red" id="btnRemove">미사용</a>
</c:when>
<c:otherwise>
<a href="#" class="btn blue" id="btnRegist">등록</a>
</c:otherwise>
</c:choose>
<a href="#" class="btn lightgray" onclick="window.close()">닫기</a>
</span>
</div>

@ -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" %>
<c:url var="ImgUrl" value="/resources/"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnClCode" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="cmmnClCode" name="cmmnClCode" method="post">
<form:hidden path="clCode"/>
<div class="popup" style="min-width: 600px;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통분류코드 등록</p>
<table class="tbl03">
<caption>공통분류코드 등록</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="clCode">분류코드</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap colspan="3">
<c:out value="${cmmnClCode.clCode}"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="clCodeNm">분류코드명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="clCodeNm" size="60" maxlength="60" id="clCodeNm"/>
<form:errors path="clCodeNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="clCodeDc">분류코드설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td colspan="3">
<form:textarea path="clCodeDc" cols="100" rows="5" id="clCodeDc"/>
<form:errors path="clCodeDc"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="useAt">사용여부</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="30%" nowrap class="title_left" colspan="3">
<form:select path="useAt">
<form:option value="Y" label="Yes"/>
<form:option value="N" label="No"/>
</form:select>
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="update_btn">변경</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitClCodeMng_edit.init();
});
/* *******************************
* 분류코드관리 Functions
******************************* */
var XitClCodeMng_edit = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitClCodeMng_edit.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnClCode(document.cmmnClCode)){
return;
}else{
XitClCodeMng_edit.addData();
}
}
}
});
//저장 버튼 Event 설정
$('#update_btn').on({
click: function(){
if (confirm('수정하시겠습니까?')) {
if(!validateCmmnClCode(document.cmmnClCode)){
return;
}else{
XitClCodeMng_edit.modifyData();
}
}
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnClCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cl/ClCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitClCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
var param = $("#cmmnClCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cl/ClCodeMng_update_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitClCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
}
</script>

@ -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" %>
<c:url var="ImgUrl" value="/resources/"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnClCode" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="cmmnClCode" name="cmmnClCode" method="post">
<input name="cmd" type="hidden" value="<c:out value='save'/>"/>
<div class="popup" style="min-width: 600px;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통분류코드 등록</p>
<table class="tbl03">
<caption>공통분류코드 등록</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="clCode">분류코드</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap colspan="3">
<form:input path="clCode" size="3" maxlength="3" id="clCode"/>
<form:errors path="clCode"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="clCodeNm">분류코드명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="clCodeNm" size="60" maxlength="60" id="clCodeNm"/>
<form:errors path="clCodeNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="clCodeDc">분류코드설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td colspan="3">
<form:textarea path="clCodeDc" cols="100" rows="5" id="clCodeDc"/>
<form:errors path="clCodeDc"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="useAt">사용여부</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="30%" nowrap class="title_left" colspan="3">
<form:select path="useAt">
<form:option value="Y" label="Yes"/>
<form:option value="N" label="No"/>
</form:select>
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="btnSave">저장</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitClCodeMng_input.init();
});
/* *******************************
* 분류코드관리 Functions
******************************* */
var XitClCodeMng_input = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitClCodeMng_input.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnClCode(document.cmmnClCode)){
return;
}else{
XitClCodeMng_input.addData();
}
}
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnClCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cl/ClCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitClCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
}
</script>

@ -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" %>
<c:url var="ImgUrl" value="/resources/"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnCode" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="cmmnCode" name="cmmnCode" method="post">
<input name="cmd" type="hidden" value="<c:out value='save'/>"/>
<form:hidden path="clCode"/>
<form:hidden path="codeId"/>
<div class="popup" style="min-width: 600px;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통코드 관리 상세</p>
<table class="tbl03">
<caption>공통코드 관리 상세</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" >분류코드명<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td colspan="3">
${cmmnCode.clCodeNm}
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" >코드ID<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
${cmmnCode.codeId}
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" ><label for="codeIdNm">코드ID명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="codeIdNm" size="60" maxlength="60" id="codeIdNm"/>
<form:errors path="codeIdNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="codeIdDc">코드ID설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td colspan="3">
<form:textarea path="codeIdDc" cols="100" rows="5" id="codeIdDc"/>
<!--
<textarea id="codeIdDc" name="codeIdDc" cols="100" rows="5"><c:out value="${cmmnCode.codeIdDc}" escapeXml="false" /></textarea>
-->
<form:errors path="codeIdDc"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" ><label for="useAt">사용여부</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="30%" nowrap="nowrap" class="title_left" colspan="3">
<form:select path="useAt" id="useAt">
<form:option value="Y" label="Yes"/>
<form:option value="N" label="No"/>
</form:select>
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="update_btn">변경</a>
<a href="#" class="btn red" id="btnRemove">삭제</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitCmmnCodeMng_edit.init();
});
/* *******************************
* 공통코드관리 수정화면 Functions
******************************* */
var XitCmmnCodeMng_edit = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitCmmnCodeMng_edit.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_edit.addData();
}
}
}
});
$('#update_btn').on({
click: function(){
if (confirm('수정하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_edit.modifyData();
}
}
}
});
$('#btnRemove').on({
click: function(){
if (confirm('삭제하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_edit.removeData();
}
}
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_update_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_delete_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
}
</script>

@ -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" %>
<c:url var="ImgUrl" value="/resources/"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnCode" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="cmmnCode" name="cmmnCode" method="post">
<input name="cmd" type="hidden" value="<c:out value='save'/>"/>
<div class="popup" style="min-width: 100%;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통코드 관리 등록</p>
<table class="tbl03">
<caption>공통코드 관리 등록</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" >분류코드명<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td colspan="3">
<select name="clCode" class="select" id="clCode">
<c:forEach var="result" items="${cmmnClCode}" varStatus="status">
<option value='<c:out value="${result.clCode}"/>'><c:out value="${result.clCodeNm}"/></option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" >코드ID<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="codeId" size="6" maxlength="6" id="codeId"/>
<form:errors path="codeId"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" ><label for="codeIdNm">코드ID명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="codeIdNm" size="60" maxlength="60" id="codeIdNm"/>
<form:errors path="codeIdNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="codeIdDc">코드ID설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td colspan="3">
<form:textarea path="codeIdDc" cols="100" rows="5" id="codeIdDc"/>
<!--
<textarea id="codeIdDc" name="codeIdDc" cols="100" rows="5"><c:out value="${cmmnCode.codeIdDc}" escapeXml="false" /></textarea>
-->
<form:errors path="codeIdDc"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" ><label for="useAt">사용여부</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="30%" nowrap="nowrap" class="title_left" colspan="3">
<form:select path="useAt" id="useAt">
<form:option value="Y" label="Yes"/>
<form:option value="N" label="No"/>
</form:select>
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="btnSave">저장</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitCmmnCodeMng_input.init();
});
/* *******************************
* 공통코드관리 등록화면 Functions
******************************* */
var XitCmmnCodeMng_input = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitCmmnCodeMng_input.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_input.addData();
}
}
}
});
$('#update_btn').on({
click: function(){
if (confirm('수정하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_input.modifyData();
}
}
}
});
$('#btnRemove').on({
click: function(){
if (confirm('삭제하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_input.removeData();
}
}
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_update_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_delete_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
}
</script>

@ -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" %>
<c:url var="ImgUrl" value="/resources/"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnDetailCode" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="cmmnDetailCode" name="cmmnDetailCode" method="post">
<input name="cmd" type="hidden" value="<c:out value='Regist'/>"/>
<form:hidden path="codeId"/>
<form:hidden path="code"/>
<div class="popup" style="min-width: 100%;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통상세코드 등록</p>
<table class="tbl03">
<caption>공통상세코드 등록</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap >코드ID<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap colspan="3">
${cmmnDetailCode.codeIdNm}
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap >코드<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<c:out value='${cmmnDetailCode.code}'/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="codeNm">코드명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="codeNm" size="60" maxlength="60" id="codeNm"/>
<form:errors path="codeNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="codeDc">코드설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td colspan="3">
<form:textarea path="codeDc" rows="3" cols="60" id="codeDc"/>
<form:errors path="codeDc"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="useAt">사용여부</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="30%" nowrap class="title_left" colspan="3">
<form:select path="useAt" id="useAt">
<form:option value="Y" label="Yes"/>
<form:option value="N" label="No"/>
</form:select>
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="update_btn">변경</a>
<c:if test="${cmmnDetailCode.useAt == 'Y'}">
<a href="#" class="btn red" id="btnRemove">삭제</a>
</c:if>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitDetailCodeMng_edit.init();
});
/* *******************************
* 상세코드 관리 수정화면 Functions
******************************* */
var XitDetailCodeMng_edit = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitDetailCodeMng_edit.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_edit.addData();
}
}
}
});
$('#update_btn').on({
click: function(){
if (confirm('수정하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_edit.modifyData();
}
}
}
});
$('#btnRemove').on({
click: function(){
if (confirm('삭제하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_edit.removeData();
}
}
}
});
$('#clCode').on({
change : function(){
XitDetailCodeMng_edit.fnChangeSelectBox();
}
})
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_update_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_delete_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
,fnChangeSelectBox : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_getCodeList.ajax'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
$('#codeId').children('option').remove();
$(data.cmmnCodeList).each(function(index, item){
var option = $('<option value="'+item.codeId+'">'+item.codeIdNm+'</option>');
$('#codeId').append(option);
});
},
error: function(){
}
});
}
}
</script>

@ -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" %>
<c:url var="ImgUrl" value="/resources/"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnDetailCode" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="cmmnDetailCode" name="cmmnDetailCode" method="post">
<input name="cmd" type="hidden" value="<c:out value='Regist'/>"/>
<div class="popup" style="min-width: 100%;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통상세코드 등록</p>
<table class="tbl03">
<caption>공통상세코드 등록</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="codeId">코드ID</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap colspan="3">
<select style="width: 40%" name="clCode" id="clCode" class="select" title="clCode">
<c:forEach var="result" items="${cmmnClCodeList}" varStatus="status">
<option value='<c:out value="${result.clCode}"/>' ><c:out value="${result.clCodeNm}"/></option>
</c:forEach>
</select>
<select style="width: 40%" name="codeId" class="select" id="codeId">
<c:forEach var="result" items="${cmmnDetailCodeList}" varStatus="status">
<option value='<c:out value="${result.codeId}"/>' ><c:out value="${result.codeIdNm}"/></option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="code">코드</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="code" size="15" maxlength="15" id="code" />
<form:errors path="code"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="codeNm">코드명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="codeNm" size="60" maxlength="60" id="codeNm"/>
<form:errors path="codeNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="codeDc">코드설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td colspan="3">
<form:textarea path="codeDc" rows="3" cols="60" id="codeDc"/>
<form:errors path="codeDc"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="useAt">사용여부</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="30%" nowrap class="title_left" colspan="3">
<form:select path="useAt" id="useAt">
<form:option value="Y" label="Yes"/>
<form:option value="N" label="No"/>
</form:select>
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="btnSave">저장</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitDetailCodeMng_input.init();
XitDetailCodeMng_input.fnChangeSelectBox();
});
/* *******************************
* 상세코드 관리 등록화면 Functions
******************************* */
var XitDetailCodeMng_input = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitDetailCodeMng_input.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_input.addData();
}
}
}
});
$('#update_btn').on({
click: function(){
if (confirm('수정하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_input.modifyData();
}
}
}
});
$('#btnRemove').on({
click: function(){
if (confirm('삭제하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_input.removeData();
}
}
}
});
$('#clCode').on({
change : function(){
XitDetailCodeMng_input.fnChangeSelectBox();
}
})
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_update_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_delete_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
,fnChangeSelectBox : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_getCodeList.ajax'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
$('#codeId').children('option').remove();
$(data.cmmnCodeList).each(function(index, item){
var option = $('<option value="'+item.codeId+'">'+item.codeIdNm+'</option>');
$('#codeId').append(option);
});
},
error: function(){
}
});
}
}
</script>

@ -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" %>
<c:url var="ImgUrl" value="/resources/"/>
<c:url var="ImgUrl" value="/resources"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnClCode" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javaScript">
/* ********************************************************
* 목록 으로 가기
******************************************************** */
function fn_egov_list_CmmnClCode(){
location.href = "<c:url value='/_mng_/code/cl/ClCodeMng_list.do'/>";
}
/* ********************************************************
* 저장처리화면
******************************************************** */
function fn_egov_modify_CmmnClCode(form){
if(confirm("<spring:message code="common.save.msg" />")){
if(!validateCmmnClCode(form)){
return;
}else{
form.action = "<c:url value='/_mng_/code/cl/ClCodeMng_update_proc.do'/>";
form.submit();
}
}
}
/* ********************************************************
* 삭제 처리 함수
******************************************************** */
function fn_egov_remove_CmmnClCode(form){
if (confirm("<spring:message code="common.delete.msg" />")) {
form.action = "<c:url value='/_mng_/code/cl/ClCodeMng_delete_proc.do'/>";
form.submit();
}
}
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>
<!-- 검색 필드 박스 시작 -->
<div id="search_field">
<div id="search_field_loc"><h2><strong>공통분류코드 수정</strong></h2></div>
</div>
<form:form commandName="cmmnClCode" name="cmmnClCode" method="post">
<input name="cmd" type="hidden" value="Modify">
<form:hidden path="clCode"/>
<div class="modify_user" >
<table summary="분류코드명, 분류코드설명, 사용여부를 수정하는 공통분류코드 수정 테이블이다.">
<div class="popup" style="min-width: 600px;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통분류코드 등록</p>
<table class="tbl03">
<caption>공통분류코드 등록</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap >분류코드<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="clCode">분류코드</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap colspan="3">
${cmmnClCode.clCode}
<c:out value="${cmmnClCode.clCode}"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="clCodeNm">분류코드명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap">
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="clCodeNm" size="60" maxlength="60" id="clCodeNm"/>
<form:errors path="clCodeNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="clCodeDc">분류코드설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td>
<td colspan="3">
<form:textarea path="clCodeDc" cols="100" rows="5" id="clCodeDc"/>
<form:errors path="clCodeDc"/>
</td>
@ -87,38 +53,178 @@ function fn_egov_remove_CmmnClCode(form){
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="useAt">사용여부</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="30%" nowrap class="title_left" colspan="3">
<form:select path="useAt" id="useAt">
<form:select path="useAt">
<form:option value="Y" label="Yes"/>
<form:option value="N" label="No"/>
</form:select>
</td>
</tr>
</tbody>
</table>
</div>
<!-- 버튼 시작(상세지정 style로 div에 지정) -->
<div class="buttons" style="padding-top:10px;padding-bottom:10px;">
<!-- 목록/저장버튼 -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<a href="#noscript" onclick="fn_egov_list_CmmnClCode(); return false;">목록</a>
</td>
<td width="10"></td>
<td>
<a href="#LINK" onclick="javascript:fn_egov_modify_CmmnClCode(document.cmmnClCode); return false;"><spring:message code="button.save" /></a>
</td>
<c:if test="${cmmnClCode.useAt == 'Y'}">
<td width="10"></td>
<td>
<a href="#LINK" onclick="javascript:fn_egov_remove_CmmnClCode(document.cmmnClCode); return false;"><spring:message code="button.delete" /></a>
</td>
</c:if>
</tr>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="update_btn">변경</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- 버튼 끝 -->
<!-- 검색조건 유지 -->
<!-- 검색조건 유지 -->
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitClCodeMng_edit.init();
});
/* *******************************
* 분류코드관리 Functions
******************************* */
var XitClCodeMng_edit = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitClCodeMng_edit.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnClCode(document.cmmnClCode)){
return;
}else{
XitClCodeMng_edit.addData();
}
}
}
});
//저장 버튼 Event 설정
$('#update_btn').on({
click: function(){
if (confirm('수정하시겠습니까?')) {
if(!validateCmmnClCode(document.cmmnClCode)){
return;
}else{
XitClCodeMng_edit.modifyData();
}
}
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnClCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cl/ClCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitClCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
var param = $("#cmmnClCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cl/ClCodeMng_update_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitClCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
}
</script>

@ -1,55 +1,33 @@
<%@ 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" %>
<c:url var="ImgUrl" value="/resources/"/>
<c:url var="ImgUrl" value="/resources"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnClCode" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javaScript">
/* ********************************************************
* 목록 으로 가기
******************************************************** */
function fn_egov_list_CmmnClCode(){
location.href = "<c:url value='/_mng_/code/cl/ClCodeMng_list.do'/>";
}
/* ********************************************************
* 저장처리화면
******************************************************** */
function fn_egov_regist_CmmnClCode(form){
if(confirm("<spring:message code="common.save.msg" />")){
if(!validateCmmnClCode(form)){
return;
}else{
form.action = "<c:url value='/_mng_/code/cl/ClCodeMng_insert_proc.do'/>";
form.submit();
}
}
}
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>
<!-- 검색 필드 박스 시작 -->
<div id="search_field">
<div id="search_field_loc"><h2><strong>공통분류코드 등록</strong></h2></div>
</div>
<form:form commandName="cmmnClCode" name="cmmnClCode" method="post">
<input name="cmd" type="hidden" value="<c:out value='save'/>"/>
<div class="popup" style="min-width: 600px;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통분류코드 등록</p>
<div class="modify_user" >
<table summary="분류코드, 분류코드명, 분류코드설명, 사용여부를 입력하는 공통분류코드 등록 테이블이다.">
<table class="tbl03">
<caption>공통분류코드 등록</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="clCode">분류코드</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap colspan="3">
@ -59,14 +37,14 @@ function fn_egov_list_CmmnClCode(){
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="clCodeNm">분류코드명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap">
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="clCodeNm" size="60" maxlength="60" id="clCodeNm"/>
<form:errors path="clCodeNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="clCodeDc">분류코드설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td>
<td colspan="3">
<form:textarea path="clCodeDc" cols="100" rows="5" id="clCodeDc"/>
<form:errors path="clCodeDc"/>
</td>
@ -80,27 +58,146 @@ function fn_egov_list_CmmnClCode(){
</form:select>
</td>
</tr>
</tbody>
</table>
</div>
<!-- 버튼 시작(상세지정 style로 div에 지정) -->
<div class="buttons" style="padding-top:10px;padding-bottom:10px;">
<!-- 목록/저장버튼 -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<a href="#noscript" onclick="fn_egov_list_CmmnClCode(); return false;">목록</a>
</td>
<td width="10"></td>
<td>
<a href="#LINK" onclick="javascript:fn_egov_regist_CmmnClCode(document.cmmnClCode); return false;"><spring:message code="button.save" /></a>
</td>
</tr>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="btnSave">저장</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- 버튼 끝 -->
<!-- 검색조건 유지 -->
<input name="cmd" type="hidden" value="<c:out value='save'/>"/>
<!-- 검색조건 유지 -->
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitClCodeMng_input.init();
});
/* *******************************
* 분류코드관리 Functions
******************************* */
var XitClCodeMng_input = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitClCodeMng_input.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnClCode(document.cmmnClCode)){
return;
}else{
XitClCodeMng_input.addData();
}
}
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnClCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cl/ClCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitClCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
}
</script>

@ -1,73 +1,40 @@
<%@ 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" %>
<c:url var="ImgUrl" value="/resources/"/>
<c:url var="ImgUrl" value="/resources"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnCode" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javaScript">
/* ********************************************************
* 목록 으로 가기
******************************************************** */
function fn_egov_list_CmmnCode(){
location.href = "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_list.do'/>";
}
/* ********************************************************
* 저장처리화면
******************************************************** */
function fn_egov_modify_CmmnCode(form){
if(confirm("<spring:message code='common.save.msg'/>")){
if(!validateCmmnCode(form)){
return;
}else{
form.action = "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_update_proc.do'/>";
form.submit();
}
}
}
/* ********************************************************
* 삭제 처리 함수
******************************************************** */
function fn_egov_remove_CmmnCode(form){
if (confirm("<spring:message code='common.delete.msg'/>")) {
form.action = "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_delete_proc.do'/>";
form.submit();
}
}
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>
<!-- 검색 필드 박스 시작 -->
<div id="search_field">
<div id="search_field_loc"><h2><strong>공통코드 수정</strong></h2></div>
</div>
<form:form commandName="cmmnCode" name="cmmnCode" method="post" >
<input name="cmd" type="hidden" value="Modify">
<form:form commandName="cmmnCode" name="cmmnCode" method="post">
<input name="cmd" type="hidden" value="<c:out value='save'/>"/>
<form:hidden path="clCode"/>
<form:hidden path="codeId"/>
<div class="popup" style="min-width: 600px;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통코드 관리 상세</p>
<div class="modify_user" >
<table summary="코드ID명, 코드ID설명, 사용여부를 수정하는 공통코드 수정 테이블이다.">
<table class="tbl03">
<caption>공통코드 관리 상세</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" >분류코드명<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td>${cmmnCode.clCodeNm}</td>
<td colspan="3">
${cmmnCode.clCodeNm}
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" >코드ID<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
@ -77,14 +44,14 @@ function fn_egov_list_CmmnCode(){
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" ><label for="codeIdNm">코드ID명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap">
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="codeIdNm" size="60" maxlength="60" id="codeIdNm"/>
<form:errors path="codeIdNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="codeIdDc">코드ID설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td>
<td colspan="3">
<form:textarea path="codeIdDc" cols="100" rows="5" id="codeIdDc"/>
<!--
<textarea id="codeIdDc" name="codeIdDc" cols="100" rows="5"><c:out value="${cmmnCode.codeIdDc}" escapeXml="false" /></textarea>
@ -101,34 +68,200 @@ function fn_egov_list_CmmnCode(){
</form:select>
</td>
</tr>
</tbody>
</table>
</div>
<!-- 버튼 시작(상세지정 style로 div에 지정) -->
<div class="buttons" style="padding-top:10px;padding-bottom:10px;">
<!-- 목록/저장버튼 -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<a href="#noscript" onclick="fn_egov_list_CmmnCode(); return false;">목록</a>
</td>
<td width="10"></td>
<td>
<a href="#noscript" onclick="fn_egov_modify_CmmnCode(document.cmmnCode); return false;">저장</a>
</td>
<c:if test="${cmmnCode.useAt == 'Y'}">
<td width="10"></td>
<td>
<a href="#LINK" onclick="javascript:fn_egov_remove_CmmnCode(document.cmmnCode); return false;"><spring:message code="button.delete" /></a>
</td>
</c:if>
</tr>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="update_btn">변경</a>
<a href="#" class="btn red" id="btnRemove">삭제</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- 버튼 끝 -->
<!-- 검색조건 유지 -->
<!-- 검색조건 유지 -->
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitCmmnCodeMng_edit.init();
});
/* *******************************
* 공통코드관리 수정화면 Functions
******************************* */
var XitCmmnCodeMng_edit = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitCmmnCodeMng_edit.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_edit.addData();
}
}
}
});
$('#update_btn').on({
click: function(){
if (confirm('수정하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_edit.modifyData();
}
}
}
});
$('#btnRemove').on({
click: function(){
if (confirm('삭제하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_edit.removeData();
}
}
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_update_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_delete_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
}
</script>

@ -1,63 +1,36 @@
<%@ 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" %>
<c:url var="ImgUrl" value="/resources/"/>
<c:url var="ImgUrl" value="/resources"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnCode" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javaScript">
/* ********************************************************
* 목록 으로 가기
******************************************************** */
function fn_egov_list_CmmnCode(){
location.href = "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_list.do'/>";
}
/* ********************************************************
* 저장처리화면
******************************************************** */
function fn_egov_regist_CmmnCode(form){
if(confirm("<spring:message code='common.save.msg'/>")){
if(!validateCmmnCode(form)){
return;
}else{
form.action = "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_insert_proc.do'/>";
form.submit();
}
}
}
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>
<!-- 검색 필드 박스 시작 -->
<div id="search_field">
<div id="search_field_loc"><h2><strong>공통코드 등록</strong></h2></div>
</div>
<form:form commandName="cmmnCode" name="cmmnCode" method="post">
<input name="cmd" type="hidden" value="<c:out value='save'/>"/>
<div class="popup" style="min-width: 100%;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통코드 관리 등록</p>
<div class="modify_user" >
<table summary="분류코드, 코드ID, 코드ID명, 코드ID설명, 사용여부를 입력하는 공통코드 등록 테이블이다.">
<table class="tbl03">
<caption>공통코드 관리 등록</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="clCode">분류코드</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap colspan="3">
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" >분류코드명<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td colspan="3">
<select name="clCode" class="select" id="clCode">
<c:forEach var="result" items="${cmmnClCode}" varStatus="status">
<option value='<c:out value="${result.clCode}"/>'><c:out value="${result.clCodeNm}"/></option>
@ -66,58 +39,229 @@ function fn_egov_list_CmmnCode(){
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="codeId">코드ID</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap colspan="3">
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" >코드ID<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="codeId" size="6" maxlength="6" id="codeId"/>
<form:errors path="codeId"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="codeIdNm">코드ID명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap">
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" ><label for="codeIdNm">코드ID명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="codeIdNm" size="60" maxlength="60" id="codeIdNm"/>
<form:errors path="codeIdNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="codeIdDc">코드ID설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td>
<td colspan="3">
<form:textarea path="codeIdDc" cols="100" rows="5" id="codeIdDc"/>
<!--
<textarea id="codeIdDc" name="codeIdDc" cols="100" rows="5"><c:out value="${cmmnCode.codeIdDc}" escapeXml="false" /></textarea>
-->
<form:errors path="codeIdDc"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="useAt">사용여부</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="30%" nowrap class="title_left" colspan="3">
<th width="20%" height="23" class="required" scope="row" nowrap="nowrap" ><label for="useAt">사용여부</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="30%" nowrap="nowrap" class="title_left" colspan="3">
<form:select path="useAt" id="useAt">
<form:option value="Y" label="Yes"/>
<form:option value="N" label="No"/>
</form:select>
</td>
</tr>
</tbody>
</table>
</div>
<!-- 버튼 시작(상세지정 style로 div에 지정) -->
<div class="buttons" style="padding-top:10px;padding-bottom:10px;">
<!-- 목록/저장버튼 -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<a href="#noscript" onclick="fn_egov_list_CmmnCode(); return false;">목록</a>
</td>
<td width="10"></td>
<td>
<a href="#noscript" onclick="fn_egov_regist_CmmnCode(document.cmmnCode); return false;">저장</a>
</td>
</tr>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="btnSave">저장</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- 버튼 끝 -->
<!-- 검색조건 유지 -->
<input name="cmd" type="hidden" value="<c:out value='save'/>"/>
<!-- 검색조건 유지 -->
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitCmmnCodeMng_input.init();
});
/* *******************************
* 공통코드관리 등록화면 Functions
******************************* */
var XitCmmnCodeMng_input = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitCmmnCodeMng_input.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_input.addData();
}
}
}
});
$('#update_btn').on({
click: function(){
if (confirm('수정하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_input.modifyData();
}
}
}
});
$('#btnRemove').on({
click: function(){
if (confirm('삭제하시겠습니까?')) {
if(!validateCmmnCode(document.cmmnCode)){
return;
}else{
XitCmmnCodeMng_input.removeData();
}
}
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_update_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var param = $("#cmmnCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cmmn/CmmnCodeMng_delete_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitCmmnCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
}
</script>

@ -1,70 +1,36 @@
<%@ 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" %>
<c:url var="ImgUrl" value="/resources/"/>
<c:url var="ImgUrl" value="/resources"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnDetailCode" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javaScript">
/* ********************************************************
* 목록 으로 가기
******************************************************** */
function fn_egov_list_CmmnDetailCode(){
location.href = "<c:url value='/framework/biz/mng/code/DetailCodeMng_list.do'/>";
}
/* ********************************************************
* 저장처리화면
******************************************************** */
function fn_egov_modify_CmmnDetailCode(form){
if(confirm("<spring:message code='common.save.msg'/>")){
if(!validateCmmnDetailCode(form)){
return;
}else{
form.action = "<c:url value='/framework/biz/mng/code/DetailCodeMng_update_proc.do'/>";;
form.submit();
}
}
}
/* ********************************************************
* 삭제 처리 함수
******************************************************** */
function fn_egov_remove_CmmnDetailCode(form){
if (confirm("<spring:message code='common.delete.msg'/>")) {
form.action = "<c:url value='/framework/biz/mng/code/DetailCodeMng_delete_proc.do'/>";
form.submit();
}
}
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>
<!-- 검색 필드 박스 시작 -->
<div id="search_field">
<div id="search_field_loc"><h2><strong>공통상세코드 수정</strong></h2></div>
</div>
<form:form commandName="cmmnDetailCode" name="cmmnDetailCode" method="post">
<input name="cmd" type="hidden" value="Modify">
<input name="cmd" type="hidden" value="<c:out value='Regist'/>"/>
<form:hidden path="codeId"/>
<form:hidden path="code"/>
<div class="modify_user" >
<table summary="코드명, 코드설명, 사용여부를 수정할 수 있는 공통상세코드 수정 테이블이다.">
<div class="popup" style="min-width: 100%;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통상세코드 등록</p>
<table class="tbl03">
<caption>공통상세코드 등록</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap >코드ID<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap colspan="3">
@ -73,18 +39,20 @@ function fn_egov_remove_CmmnDetailCode(form){
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap >코드<img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap"><c:out value='${cmmnDetailCode.code}'/></td>
<td width="80%" nowrap="nowrap" colspan="3">
<c:out value='${cmmnDetailCode.code}'/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="codeNm">코드명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap">
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="codeNm" size="60" maxlength="60" id="codeNm"/>
<form:errors path="codeNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="codeDc">코드설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td>
<td colspan="3">
<form:textarea path="codeDc" rows="3" cols="60" id="codeDc"/>
<form:errors path="codeDc"/>
</td>
@ -98,33 +66,224 @@ function fn_egov_remove_CmmnDetailCode(form){
</form:select>
</td>
</tr>
</tbody>
</table>
</div>
<!-- 버튼 시작(상세지정 style로 div에 지정) -->
<div class="buttons" style="padding-top:10px;padding-bottom:10px;">
<!-- 목록/저장버튼 -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<a href="#noscript" onclick="fn_egov_list_CmmnDetailCode(); return false;">목록</a>
</td>
<td width="10"></td>
<td>
<a href="#noscript" onclick="fn_egov_modify_CmmnDetailCode(document.cmmnDetailCode); return false;">저장</a>
</td>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="update_btn">변경</a>
<c:if test="${cmmnDetailCode.useAt == 'Y'}">
<td width="10"></td>
<td>
<a href="#noscript" onclick="fn_egov_remove_CmmnDetailCode(document.cmmnDetailCode); return false;">삭제</a>
</td>
<a href="#" class="btn red" id="btnRemove">삭제</a>
</c:if>
</tr>
</table>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- 버튼 끝 -->
<!-- 검색조건 유지 -->
<!-- 검색조건 유지 -->
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitDetailCodeMng_edit.init();
});
/* *******************************
* 상세코드 관리 수정화면 Functions
******************************* */
var XitDetailCodeMng_edit = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitDetailCodeMng_edit.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_edit.addData();
}
}
}
});
$('#update_btn').on({
click: function(){
if (confirm('수정하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_edit.modifyData();
}
}
}
});
$('#btnRemove').on({
click: function(){
if (confirm('삭제하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_edit.removeData();
}
}
}
});
$('#clCode').on({
change : function(){
XitDetailCodeMng_edit.fnChangeSelectBox();
}
})
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_update_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_delete_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
,fnChangeSelectBox : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_getCodeList.ajax'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
$('#codeId').children('option').remove();
$(data.cmmnCodeList).each(function(index, item){
var option = $('<option value="'+item.codeId+'">'+item.codeIdNm+'</option>');
$('#codeId').append(option);
});
},
error: function(){
}
});
}
}
</script>

@ -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" %>
<c:url var="ImgUrl" value="/resources/"/>
<c:url var="ImgUrl" value="/resources"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnDetailCode" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javaScript">
/* ********************************************************
* 목록 으로 가기
******************************************************** */
function fn_egov_list_CmmnDetailCode(){
location.href = "<c:url value='/framework/biz/mng/code/DetailCodeMng_list.do'/>";
}
/* ********************************************************
* 저장처리화면
******************************************************** */
function fn_egov_regist_CmmnDetailCode(form){
if(confirm("<spring:message code='common.save.msg'/>")){
if(!validateCmmnDetailCode(form)){
return;
}else{
form.action = "<c:url value='/framework/biz/mng/code/DetailCodeMng_insert_proc.do'/>";
form.submit();
}
}
}
/* ********************************************************
* CodeId 가져오기
******************************************************** */
function fn_egov_get_CodeId(form){
form.action = "<c:url value='/framework/biz/mng/code/DetailCodeMng_input.do'/>";
form.submit();
}
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>
<!-- 검색 필드 박스 시작 -->
<div id="search_field">
<div id="search_field_loc"><h2><strong>공통상세코드 등록</strong></h2></div>
</div>
<form:form commandName="cmmnDetailCode" name="cmmnDetailCode" method="post">
<input name="cmd" type="hidden" value="<c:out value='Regist'/>"/>
<div class="modify_user" >
<table summary="코드ID, 코드, 코드명, 코드설명, 사용여부를 입력하는 공통상세코드 등록 테이블이다.">
<div class="popup" style="min-width: 100%;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통상세코드 등록</p>
<table class="tbl03">
<caption>공통상세코드 등록</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="codeId">코드ID</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap colspan="3">
<select name="clCode" class="select" onChange="javascript:fn_egov_get_CodeId(document.cmmnDetailCode);" title="clCode">
<select style="width: 40%" name="clCode" id="clCode" class="select" title="clCode">
<c:forEach var="result" items="${cmmnClCodeList}" varStatus="status">
<option value='<c:out value="${result.clCode}"/>' <c:if test="${result.clCode == cmmnCode.clCode}">selected="selected"</c:if>><c:out value="${result.clCodeNm}"/></option>
<option value='<c:out value="${result.clCode}"/>' ><c:out value="${result.clCodeNm}"/></option>
</c:forEach>
</select>
<select name="codeId" class="select" id="codeId">
<c:forEach var="result" items="${cmmnCodeList}" varStatus="status">
<select style="width: 40%" name="codeId" class="select" id="codeId">
<c:forEach var="result" items="${cmmnDetailCodeList}" varStatus="status">
<option value='<c:out value="${result.codeId}"/>' ><c:out value="${result.codeIdNm}"/></option>
</c:forEach>
</select>
@ -82,21 +47,21 @@ function fn_egov_get_CodeId(form){
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="code">코드</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap">
<form:input path="code" size="15" maxlength="15" id="code"/>
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="code" size="15" maxlength="15" id="code" />
<form:errors path="code"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="codeNm">코드명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap">
<td width="80%" nowrap="nowrap" colspan="3">
<form:input path="codeNm" size="60" maxlength="60" id="codeNm"/>
<form:errors path="codeNm"/>
</td>
</tr>
</tr> hi
<tr>
<th height="23" class="required" scope="row" ><label for="codeDc">코드설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td>
<td colspan="3">
<form:textarea path="codeDc" rows="3" cols="60" id="codeDc"/>
<form:errors path="codeDc"/>
</td>
@ -110,26 +75,222 @@ function fn_egov_get_CodeId(form){
</form:select>
</td>
</tr>
</tbody>
</table>
</div>
<!-- 버튼 시작(상세지정 style로 div에 지정) -->
<div class="buttons" style="padding-top:10px;padding-bottom:10px;">
<!-- 목록/저장버튼 -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<a href="#noscript" onclick="fn_egov_list_CmmnDetailCode(); return false;">목록</a>
</td>
<td width="10"></td>
<td>
<a href="#noscript" onclick="fn_egov_regist_CmmnDetailCode(document.cmmnDetailCode); return false;">저장</a>
</td>
</tr>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="btnSave">저장</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- 버튼 끝 -->
<!-- 검색조건 유지 -->
<!-- 검색조건 유지 -->
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitDetailCodeMng_input.init();
XitDetailCodeMng_input.fnChangeSelectBox();
});
/* *******************************
* 상세코드 관리 등록화면 Functions
******************************* */
var XitDetailCodeMng_input = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitDetailCodeMng_input.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_input.addData();
}
}
}
});
$('#update_btn').on({
click: function(){
if (confirm('수정하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_input.modifyData();
}
}
}
});
$('#btnRemove').on({
click: function(){
if (confirm('삭제하시겠습니까?')) {
if(!validateCmmnDetailCode(document.cmmnDetailCode)){
return;
}else{
XitDetailCodeMng_input.removeData();
}
}
}
});
$('#clCode').on({
change : function(){
XitDetailCodeMng_input.fnChangeSelectBox();
}
})
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_update_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_delete_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitDetailCodeMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
,fnChangeSelectBox : function(){
var param = $("#cmmnDetailCode").serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/code/DetailCodeMng_getCodeList.ajax'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
$('#codeId').children('option').remove();
$(data.cmmnCodeList).each(function(index, item){
var option = $('<option value="'+item.codeId+'">'+item.codeIdNm+'</option>');
$('#codeId').append(option);
});
},
error: function(){
}
});
}
}
</script>

@ -1,8 +1,8 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %>
<form name="frmSearch">
<div class="search r2">
<div class="search r2">
<form name="frmSearch" id="frmSearch">
<table>
<caption>검색조건</caption>
<colgroup>
@ -18,9 +18,8 @@
<tr>
<td>
<select name="searchCondition" title="검색조건" class="select" >
<option selected value=''>--선택--</option>
<option value='clCode'>분류코드</option>
<option value='clcodeNm'>분류코드명</option>
<option value='clCodeNm'>분류코드명</option>
</select>
</td>
<td>
@ -32,22 +31,23 @@
</tr>
</tbody>
</table>
</div>
</form>
</div>
<!-- //검색 -->
<div class="page_btn">
<div class="page_btn">
<span class="fll">
<div class="list clearfix" id="totCnt">전체 ㅣ <span>0</span></div>
</span>
<span class="flr">
<a href="#" class="btn darkgray" id="btnRegist" title="등록">등록</a>
</span>
</div>
<!-- //버튼 및 페이지정보 -->
</div>
<!-- //버튼 및 페이지정보 -->
<!-- 데이터 출력 -->
<div id="grid" style="margin-top: 10px;"></div>
<!-- 데이터 출력 -->
<div id="grid" style="margin-top: 10px;"></div>
</form>
<script type="text/javaScript">
/**************************************************************************
@ -67,13 +67,13 @@
,pagePopup: function(flag, params){
let url = '<c:url value="/framework/biz/mng/code/mngCodeCfnMgtPopup.do"/>';
let popTitle;
let popOption = {width: 700, height:660}
let popOption = {width: 700, height:500}
switch (flag) {
case "add": //등록
popTitle = "프로그램 등록";
popTitle = "분류 코드 등록";
break;
case "detail": //상세
popTitle = "프로그램 상세";
popTitle = "분류 코드 상세";
break;
default:
break;
@ -119,13 +119,12 @@
renderer: {
type: CustomButtonRenderer,
options: {
formatter : function(props){
var rowData = props.grid.getRow(props.rowKey);
var obj = {
formatter : rowData.clCode
,element : "text"
formatter : (props) => {
const rowData = props.grid.getRow(props.rowKey);
return {
formatter: rowData.clCode
,element: "text"
}
return obj;
}
,eventFunction: fnBiz.onClickGrid
,eventType : "click"

@ -1,19 +1,19 @@
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ 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" %>
<c:url var="ImgUrl" value="/resources/"/>
<c:set var="isUpdate" value="${!empty cmmnClCode.clCode}"/>
<c:set var="bizName" value="공통 분류 코드"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnClCode" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="cmmnClCode" name="cmmnClCode" method="post">
<input name="cmd" type="hidden" value="<c:out value='save'/>"/>
<div class="popup" style="min-width: 600px;">
<div class="popup_inner" style="max-width: 600px;">
<p class="pop_title">공통분류코드 등록</p>
<%--@elvariable id="cmmnClCode" type="validator"--%>
<div class="popup" style="min-width: 100%;">
<div class="popup_inner" style="max-width: 700px;">
<%@include file="/WEB-INF/jsp/framework/biz-popup-title.jsp" %>
<form:form commandName="cmmnClCode" name="cmmnClCode">
<table class="tbl03">
<caption>공통분류코드 등록</caption>
<caption><c:out value="${bizName}"/> 등록 / 변경</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
@ -22,175 +22,120 @@
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="clCode">분류코드</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap colspan="3">
<form:input path="clCode" size="3" maxlength="3" id="clCode"/>
<th class="required" scope="row" nowrap>
<label for="clCode">분류코드</label>
</th>
<td nowrap colspan="3">
<form:input path="clCode" size="3" maxlength="3" id="clCode" readonly="${isUpdate}"/>
<form:errors path="clCode"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="clCodeNm">분류코드명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="80%" nowrap="nowrap" colspan="3">
<th class="required" scope="row" nowrap>
<label for="clCodeNm">분류코드명</label>
</th>
<td nowrap="nowrap" colspan="3">
<form:input path="clCodeNm" size="60" maxlength="60" id="clCodeNm"/>
<form:errors path="clCodeNm"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row" ><label for="clCodeDc">분류코드설명</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td colspan="3">
<form:textarea path="clCodeDc" cols="100" rows="5" id="clCodeDc"/>
<form:errors path="clCodeDc"/>
<th class="required" scope="row" nowrap>
<label for="useAt">사용여부</label>
</th>
<td nowrap class="title_left" colspan="3">
<form:select path="useAt">
<form:option value="Y" label="사용"/>
<form:option value="N" label="미사용"/>
</form:select>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row" nowrap ><label for="useAt">사용여부</label><img src="${ImgUrl}/required.gif" alt="필수" width="15" height="15"></th>
<td width="30%" nowrap class="title_left" colspan="3">
<form:select path="useAt">
<form:option value="Y" label="Yes"/>
<form:option value="N" label="No"/>
</form:select>
<th class="required" scope="row">
<label for="clCodeDc">분류코드설명</label>
</th>
<td colspan="3">
<form:textarea path="clCodeDc" cols="100" rows="3" id="clCodeDc"/>
<form:errors path="clCodeDc"/>
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="btnSave">저장</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
</form:form>
<%@include file="/WEB-INF/jsp/framework/biz-popup-use-btn.jsp" %>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
</div>
<!-- //popup -->
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitClCodeMng_input.init();
});
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
let orgData;
/* *******************************
* 분류코드관리 Functions
/* *******************************
* Biz function
******************************* */
var XitClCodeMng_input = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitClCodeMng_input.fn_setInputLimit();
const fnBiz = {
add: () => {
if (!fnBiz.validate()) return;
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(!validateCmmnClCode(document.cmmnClCode)){
return;
}else{
XitClCodeMng_input.addData();
}
}
cmmBizAjax('add', {
url: '<c:url value="/framework/biz/mng/code/addCodeCfn.do"/>'
, data: $("#cmmnClCode").serialize()
})
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#cmmnClCode").serialize();
$.ajax({
url : "<c:url value='/_mng_/code/cl/ClCodeMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitClCodeMng_list.findData();
window.close();
},
error: function(){
,modify: () => {
if (!fnBiz.validate()) return;
cmmBizAjax('modify', {
url: '<c:url value="/framework/biz/mng/code/modifyCodeCfn.do"/>'
,data: $("#cmmnClCode").serialize()
});
}
,remove: () => {
$("#useAt").val('N');
cmmBizAjax('remove', {
//url: '<c:url value="/framework/biz/mng/code/removeCodeCfn.do"/>'
//,data: {clCode: $('#clCode').val()}
url: '<c:url value="/framework/biz/mng/code/modifyCodeCfn.do"/>'
,data: $("#cmmnClCode").serialize()
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
,validate: () => {
if(orgData == $('form').serialize()){
alert('변경된 내용이 없습니다.');
return false;
}
if(!validateCmmnClCode(document.getElementById("cmmnClCode"))) return false;
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$('#btnRegist').on('click', () => {
fnBiz.add();
});
$('#btnModify').on('click', () => {
fnBiz.modify();
});
$('#btnRemove').on('click', () => {
fnBiz.remove();
});
});
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function () {
orgData = $('form').serialize();
});
</script>

@ -0,0 +1,201 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %>
<div class="search r2">
<form name="frmSearch" id="frmSearch">
<table>
<caption>검색조건</caption>
<colgroup>
<col style="width: 110px;"/>
<col style="width: 225px;"/>
<col style="width: 100px;"/>
<col/>
<col/>
<col>
<col/>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
<td>
<code:select type="CMM_CFN" id="clCode" name="clCode" emptyMessageKey="table.select.clCode" title="분류코드" alt="selectBox tag" cls="selectBox"/>
</td>
<td>
<select name="searchCondition" title="검색조건" class="selectBox">
<option value=''>-- 검색조건 --</option>
<option value='codeId'>코드그룹</option>
<option value='code'>코드</option>
<option value='codeNm'>코드명</option>
</select>
<input name="searchKeyword" title="검색어" type="text" size="35" maxlength="35" id="searchKeyword" style="display: inline; width:120px;">
</td>
<td>
<select name="useAt" title="사용여부" class="selectBox">
<option value=''>-- 사용여부 --</option>
<option value='Y'>사용</option>
<option value='N'>미사용</option>
</select>
</td>
<td colspan="6">
<input type="button" id="btnSearch" class="btn_search" title="검색" value="검색" />
</td>
</tr>
</tbody>
</table>
</form>
</div>
<!-- //검색 -->
<div class="page_btn">
<span class="fll">
<div class="list clearfix" id="totCnt">전체 ㅣ <span>0</span></div>
</span>
<span class="flr">
<a href="#" class="btn darkgray" id="btnRegist" title="등록">등록</a>
</span>
</div>
<!-- //버튼 및 페이지정보 -->
<!-- 데이터 출력 -->
<div id="grid" style="margin-top: 10px;"></div>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
var callbackSearch = () => fnBiz.search(); // 데이터 조회 : popup에서 사용
let GRID = null;
/* *******************************
* Biz function
******************************* */
const fnBiz = {
search: () => {
GRID.reloadData();
}
,pagePopup: function(flag, params){
let url = '<c:url value="/framework/biz/mng/code/mngCodeDtlMgtPopup.do"/>';
let popTitle;
let popOption = {width: 700, height:500}
switch (flag) {
case "add": //등록
popTitle = "공통 코드 등록";
break;
case "detail": //상세
popTitle = "공통 코드 상세";
break;
default:
break;
}
CmmPopup.open(url, params, popOption, popTitle);
}
,onClickGrid: function(props){
const rowData = props.grid.getRow(props.rowKey);
fnBiz.pagePopup('detail', rowData);
}
}
/**************************************************************************
* event
**************************************************************************/
$(() => {
$('#btnSearch').on('click', () => {
fnBiz.search();
});
$('#btnRegist').on('click', () => {
fnBiz.pagePopup('add', null);
});
});
/* *******************************
* Grid
******************************* */
const initGrid = () => {
/* ******************************
* Grid start
****************************** */
const gridColumns = [ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
header: '코드그룹ID',
name: 'codeId',
width: 100,
sortable: true,
sortingType: 'desc',
align: 'center'
},
{
header: '코드그룹명',
name: 'codeIdNm',
width: 150,
sortable: true,
sortingType: 'desc',
//align: 'center',
renderer: {
type: CustomButtonRenderer,
options: {
formatter : (props)=>{
const rowData = props.grid.getRow(props.rowKey);
return {
formatter: rowData.codeIdNm
,element: "text"
}
}
,eventFunction: fnBiz.onClickGrid
,eventType : "click"
}
}
},
{
header: '공통코드',
name: 'code',
width: 100,
sortable: false,
align: 'center'
},
{
header: '공통코드명',
name: 'codeNm',
minWidth: 150,
sortable: false,
//align: 'center'
},
{
header: '사용여부',
name: 'useAt',
width: 60,
sortable: false,
align: 'center'
}
];
const gridDatasource = {
initialRequest: true,
api: {
readData: {
url: '<c:url value="/framework/biz/mng/code/findCodeDtls.do"/>'
,serializer: (params) => fnAddPageInfo(document.frmSearch, params)
}
}
}
const gridOptions = {
el: 'grid',
rowHeaders: ['rowNum'],
columns: gridColumns,
};
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
});
};
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function(){
initGrid();
});
</script>

@ -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" %>
<c:set var="isUpdate" value="${!empty cmmnDetailCode.codeId}"/>
<c:set var="bizName" value="공통 코드"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnDetailCode" staticJavascript="false" xhtml="true" cdata="false"/>
<%--@elvariable id="cmmnDetailCode" type="validator"--%>
<div class="popup" style="min-width: 100%;">
<div class="popup_inner" style="max-width: 700px;">
<%@include file="/WEB-INF/jsp/framework/biz-popup-title.jsp" %>
<form:form commandName="cmmnDetailCode" name="cmmnDetailCode">
<table class="tbl03">
<caption><c:out value="${bizName}"/> 등록 / 변경</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th class="required" scope="row" nowrap>
<label for="codeId">코드그룹</label>
</th>
<td nowrap colspan="3">
<c:if test="${!isUpdate}">
<select style="width: 40%" name="clCode" id="clCode" class="select" title="분류코드">
<c:forEach var="result" items="${cfnCodeList}" varStatus="status">
<option value='<c:out value="${result.code}"/>' ><c:out value="${result.code_nm}"/></option>
</c:forEach>
</select>
<select style="width: 40%" name="codeId" id="codeId" class="select" title="그룹코드">
</select>
</c:if>
<c:if test="${isUpdate}">
<form:input path="codeIdNm" size="3" maxlength="3" readonly="${isUpdate}"/>
<form:errors path="codeIdNm"/>
<input type="hidden" id="codeId" name="codeId" value="${cmmnDetailCode.codeId}">
</c:if>
</td>
</tr>
<tr>
<th class="required" scope="row" nowrap>
<label for="code">코드</label>
</th>
<td nowrap colspan="3">
<form:input path="code" size="15" maxlength="15" readonly="${isUpdate}"/>
<form:errors path="code"/>
</td>
</tr>
<tr>
<th class="required" scope="row" nowrap>
<label for="codeNm">코드명</label>
</th>
<td nowrap="nowrap" colspan="3">
<form:input path="codeNm" size="60" maxlength="60"/>
<form:errors path="codeNm"/>
</td>
</tr>
<tr>
<th class="required" scope="row" nowrap>
<label for="useAt">사용여부</label>
</th>
<td nowrap class="title_left" colspan="3">
<form:select path="useAt">
<form:option value="Y" label="사용"/>
<form:option value="N" label="미사용"/>
</form:select>
</td>
</tr>
<tr>
<th class="required" scope="row">
<label for="codeDc">코드설명</label>
</th>
<td colspan="3">
<form:textarea path="codeDc" cols="100" rows="3"/>
<form:errors path="codeDc"/>
</td>
</tr>
</tbody>
</table>
</form:form>
<%@include file="/WEB-INF/jsp/framework/biz-popup-use-btn.jsp" %>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
let orgData;
/* *******************************
* Biz function
******************************* */
const fnBiz = {
add: () => {
if (!fnBiz.validate()) return;
cmmBizAjax('add', {
url: '<c:url value="/framework/biz/mng/code/addCodeDtl.do"/>'
, data: $("#cmmnDetailCode").serialize()
})
}
,modify: () => {
if (!fnBiz.validate()) return;
cmmBizAjax('modify', {
url: '<c:url value="/framework/biz/mng/code/modifyCodeDtl.do"/>'
,data: $("#cmmnDetailCode").serialize()
});
}
,remove: () => {
$("#useAt").val('N');
cmmBizAjax('remove', {
<%--url: '<c:url value="/framework/biz/mng/code/removeCodeDtl.do"/>'--%>
<%--,data: {clCode: $('#clCode').val()}--%>
url: '<c:url value="/framework/biz/mng/code/modifyCodeDtl.do"/>'
,data: $("#cmmnDetailCode").serialize()
});
}
,onChangeSelect : ()=>{
const codeId = $('#clCode').val();
cmmAjax({
showSuccessMsg: false
,url: "<c:url value='/framework/biz/cmm/cache/getComboCodeTypeList.do'/>"
,data: {codeId: codeId , type: 'CMM_GRP'}
,type: "get"
,success: (data) => {
$('#codeId').children('option').remove();
$(data.comboList).each( (index, item) => {
//var option = $('<option value="'+item.codeId+'">'+item.codeIdNm+'</option>');
$('#codeId').append($('<option value="'+item.code+'">'+item.code_nm+'</option>'));
});
},
})
}
,validate: () => {
if(orgData == $('form').serialize()){
alert('변경된 내용이 없습니다.');
return false;
}
if(!validateCmmnDetailCode(document.getElementById("cmmnDetailCode"))) return false;
return true;
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$('#btnRegist').on('click', () => {
fnBiz.add();
});
$('#btnModify').on('click', () => {
fnBiz.modify();
});
$('#btnRemove').on('click', () => {
fnBiz.remove();
});
$('#clCode').on('change', () => fnBiz.onChangeSelect());
});
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function () {
fnBiz.onChangeSelect();
orgData = $('form').serialize();
});
</script>

@ -0,0 +1,192 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %>
<div class="search r2">
<form name="frmSearch" id="frmSearch">
<table>
<caption>검색조건</caption>
<colgroup>
<col style="width: 100px;"/>
<col style="width: 225px;"/>
<col style="width: 100px;"/>
<col/>
<col/>
<col>
<col/>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
<td>
<code:select type="CMM_CFN" id="clCode" name="clCode" emptyMessageKey="table.select.clCode" title="분류코드" alt="selectBox tag" cls="selectBox"/>
</td>
<td>
<select name="searchCondition" title="검색조건" class="selectBox">
<option value=''>-- 검색조건 --</option>
<option value='codeId'>코드그룹</option>
<option value='codeIdNm'>코드그룹명</option>
</select>
<input name="searchKeyword" title="검색어" type="text" size="35" maxlength="35" id="searchKeyword" style="display: inline; width:120px;">
</td>
<td>
<select name="useAt" title="사용여부" class="selectBox">
<option value=''>-- 사용여부 --</option>
<option value='Y'>사용</option>
<option value='N'>미사용</option>
</select>
</td>
<td colspan="6">
<input type="button" id="btnSearch" class="btn_search" title="검색" value="검색" />
</td>
</tr>
</tbody>
</table>
</form>
</div>
<!-- //검색 -->
<div class="page_btn">
<span class="fll">
<div class="list clearfix" id="totCnt">전체 ㅣ <span>0</span></div>
</span>
<span class="flr">
<a href="#" class="btn darkgray" id="btnRegist" title="등록">등록</a>
</span>
</div>
<!-- //버튼 및 페이지정보 -->
<!-- 데이터 출력 -->
<div id="grid" style="margin-top: 10px;"></div>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
var callbackSearch = () => fnBiz.search(); // 데이터 조회 : popup에서 사용
let GRID = null;
/* *******************************
* Biz function
******************************* */
const fnBiz = {
search: () => {
GRID.reloadData();
}
,pagePopup: function(flag, params){
let url = '<c:url value="/framework/biz/mng/code/mngCodeGrpMgtPopup.do"/>';
let popTitle;
let popOption = {width: 700, height:500}
switch (flag) {
case "add": //등록
popTitle = "그룹 코드 등록";
break;
case "detail": //상세
popTitle = "그룹 코드 상세";
break;
default:
break;
}
CmmPopup.open(url, params, popOption, popTitle);
}
,onClickGrid: function(props){
const rowData = props.grid.getRow(props.rowKey);
fnBiz.pagePopup('detail', rowData);
}
}
/**************************************************************************
* event
**************************************************************************/
$(() => {
$('#btnSearch').on('click', () => {
fnBiz.search();
});
$('#btnRegist').on('click', () => {
fnBiz.pagePopup('add', null);
});
});
/* *******************************
* Grid
******************************* */
const initGrid = () => {
/* ******************************
* Grid start
****************************** */
const gridColumns = [ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
header: '분류명',
name: 'clCodeNm',
minWidth: 200,
//width: 200,
sortable: true,
sortingType: 'desc',
//align: 'center',
renderer: {
type: CustomButtonRenderer,
options: {
formatter : (props)=>{
const rowData = props.grid.getRow(props.rowKey);
return {
formatter: rowData.clCodeNm
,element: "text"
}
}
,eventFunction: fnBiz.onClickGrid
,eventType : "click"
}
}
},
{
header: '그룹코드',
name: 'codeId',
width: 100,
sortable: false,
align: 'center'
},
{
header: '그룹코드명',
name: 'codeIdNm',
width: 100,
sortable: false,
align: 'center'
},
{
header: '사용여부',
name: 'useAt',
width: 60,
sortable: false,
align: 'center'
}
];
const gridDatasource = {
initialRequest: true,
api: {
readData: {
url: '<c:url value="/framework/biz/mng/code/findCodeGrps.do"/>'
,serializer: (params) => fnAddPageInfo(document.frmSearch, params)
}
}
}
const gridOptions = {
el: 'grid',
rowHeaders: ['rowNum'],
columns: gridColumns,
};
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
});
};
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function(){
initGrid();
});
</script>

@ -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" %>
<c:set var="isUpdate" value="${!empty cmmnCode.clCode}"/>
<c:set var="bizName" value="공통 코드 그룹"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="cmmnCode" staticJavascript="false" xhtml="true" cdata="false"/>
<%--@elvariable id="cmmnCode" type="validator"--%>
<div class="popup" style="min-width: 100%;">
<div class="popup_inner" style="max-width: 700px;">
<%@include file="/WEB-INF/jsp/framework/biz-popup-title.jsp"%>
<form:form commandName="cmmnCode" name="cmmnCode">
<table class="tbl03">
<caption><c:out value="${bizName}"/> 등록 / 변경</caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th class="required" scope="row" nowrap>
<label for="clCode">분류코드</label>
</th>
<td nowrap colspan="3">
<code:select type="CMM_CFN" id="clCode" name="clCode" defaultSelect="${cmmnCode.clCode}" title="분류코드" alt="selectBox tag" cls="selectBox" disabled="${isUpdate}"/>
</td>
</tr>
<tr>
<th class="required" scope="row" nowrap>
<label for="codeId">그룹코드</label>
</th>
<td nowrap="nowrap" colspan="3">
<form:input path="codeId" size="60" maxlength="60" readonly="${isUpdate}"/>
<form:errors path="codeId"/>
</td>
</tr>
<tr>
<th class="required" scope="row" nowrap>
<label for="codeIdNm">그룹코드명</label>
</th>
<td nowrap="nowrap" colspan="3">
<form:input path="codeIdNm" size="60" maxlength="60"/>
<form:errors path="codeIdNm"/>
</td>
</tr>
<tr>
<th class="required" scope="row" nowrap>
<label for="useAt">사용여부</label>
</th>
<td nowrap class="title_left" colspan="3">
<form:select path="useAt">
<form:option value="Y" label="사용"/>
<form:option value="N" label="미사용"/>
</form:select>
</td>
</tr>
<tr>
<th class="required" scope="row">
<label for="codeIdDc">그룹코드설명</label>
</th>
<td colspan="3">
<form:textarea path="codeIdDc" cols="100" rows="3"/>
<form:errors path="codeIdDc"/>
</td>
</tr>
</tbody>
</table>
</form:form>
<%@include file="/WEB-INF/jsp/framework/biz-popup-use-btn.jsp" %>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
let orgData;
/* *******************************
* Biz function
******************************* */
const fnBiz = {
add: () => {
if (!fnBiz.validate()) return;
cmmBizAjax('add', {
url: '<c:url value="/framework/biz/mng/code/addCodeGrp.do"/>'
, data: $("#cmmnCode").serialize()
})
}
,modify: () => {
if (!fnBiz.validate()) return;
cmmBizAjax('modify', {
url: '<c:url value="/framework/biz/mng/code/modifyCodeGrp.do"/>'
,data: $("#cmmnCode").serialize()
});
}
,remove: () => {
$("#clCode").removeAttr("disabled");
$("#useAt").val('N');
cmmBizAjax('remove', {
<%--url: '<c:url value="/framework/biz/mng/code/removeCodeGrp.do"/>'--%>
<%--,data: {clCode: $('#clCode').val()}--%>
url: '<c:url value="/framework/biz/mng/code/modifyCodeGrp.do"/>'
,data: $("#cmmnCode").serialize()
});
}
,validate: () => {
if(orgData == $('form').serialize()){
alert('변경된 내용이 없습니다.');
return false;
}
if(!validateCmmnCode(document.getElementById("cmmnCode"))){
return false;
}
// 저장시 값을 읽기 위행 disabled 속성 제거
$("#clCode").removeAttr("disabled");
return true;
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$('#btnRegist').on('click', () => {
fnBiz.add();
});
$('#btnModify').on('click', () => {
fnBiz.modify();
});
$('#btnRemove').on('click', () => {
fnBiz.remove();
});
});
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function () {
orgData = $('form').serialize();
});
</script>

@ -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;

@ -119,6 +119,7 @@
let popOption = '';
let params = {
selectedId: '${sessionScope.XitLoginSession.uniqId}'
//TODO : 개발완료후 이부분 제거
,tilesDef: 'popup'
};
if('GNR'=='${sessionScope.XitLoginSession.userSe}'){

@ -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;

@ -25,6 +25,7 @@
<script type="text/javascript">
// TODO : 개발 완료후 이부분 제거 필요
$(document).ready(function(){
/**
* 2020.09.14 박민규

@ -448,7 +448,7 @@ input[type=file] {
padding: 0 5px; }
.selectBox {
width: 120px;
width: 150px;
margin-bottom: 1px;
padding: 1px 0 1px 5px; }

@ -198,8 +198,8 @@ const cmmAjax = (param) => {
,dataType: nvl(param.dataType, "json")
,contentType: nvl(param.contentType, 'application/x-www-form-urlencoded')
,success: function (res) {
if (!param.showSuccessMsg || param.showSuccessMsg === true) {
alert(res.message);
if (param.showSuccessMsg === undefined || param.showSuccessMsg === true) {
if(res.message) alert(res.message);
}
if ($.type(param.success) === 'function') {
param.success(res)

Loading…
Cancel
Save