feat: 업무사용자관리 반영

popup 오픈시 post 방식으로 변경 적용
main
minuk926 2 years ago
parent 9a16cc365f
commit db36005bbc

@ -45,7 +45,7 @@ public class FimsTotalPopupController {
* @author: * @author:
* @date: 2022. 9. 20. * @date: 2022. 9. 20.
*/ */
@GetMapping(value = "/fimsTotalPopup") @RequestMapping(value = "/fimsTotalPopup")
public String popup(@RequestParam String selectedId, FimsTotalPopupVO vo, Model model){ public String popup(@RequestParam String selectedId, FimsTotalPopupVO vo, Model model){
vo.setRegltId(selectedId); vo.setRegltId(selectedId);

@ -31,7 +31,7 @@ public class Ec0100Controler {
} }
@GetMapping(value = "/ec0100Popup") @RequestMapping(value = "/ec0100Popup")
public ModelAndView ec0100Popup(@RequestParam(required = false) String keyField) { public ModelAndView ec0100Popup(@RequestParam(required = false) String keyField) {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();

@ -61,7 +61,7 @@ public class ProgramMgtController {
* @param progrmFileNm : * @param progrmFileNm :
* @return ModelAndView * @return ModelAndView
*/ */
@GetMapping(value = "/mngProgramMgtPopup") @RequestMapping(value = "/mngProgramMgtPopup")
public ModelAndView mngProgramMgtPopup(final String progrmFileNm) { public ModelAndView mngProgramMgtPopup(final String progrmFileNm) {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();

@ -35,6 +35,9 @@ public interface UserMgtMapper {
Map<String,Object> selectCheckUserInfo(final String userId); Map<String,Object> selectCheckUserInfo(final String userId);
int insertUserInfo(final XitUserInfoVO vo); int insertUserInfo(final XitUserInfoVO vo);
int updateUserInfo(final XitUserInfoVO vo); int updateUserInfo(final XitUserInfoVO vo);
int deleteUserInfo(final String userId);
int deleteGnrlMber(String userId);
int deleteEntrprsMber(String userId);
@ -47,12 +50,18 @@ public interface UserMgtMapper {
XitUserScrtySetupVO selectUserScrtySetup(final String scrtySetupTrgetId); XitUserScrtySetupVO selectUserScrtySetup(final String scrtySetupTrgetId);
int insertUserScrtySetup(final XitUserScrtySetupVO vo); int insertUserScrtySetup(final XitUserScrtySetupVO vo);
int updateUserScrtySetup(final XitUserScrtySetupVO vo); int updateUserScrtySetup(final XitUserScrtySetupVO vo);
int deleteUserScrtySetup(String scrtySetupTrgetId);
int insertUserEtcOption(final XitUserEtcOptionVO vo); int insertUserEtcOption(final XitUserEtcOptionVO vo);
int insertUserInfoChangeDtls(final String userId); int insertUserInfoChangeDtls(final String userId);
int deleteUserInfoChangeDtlsList(final String userId);
} }

@ -32,17 +32,17 @@ public interface UserMgtService {
List<XitUserInfoVO> findUsers(final Map<String, Object> paraMap, final RowBounds rowBounds); List<XitUserInfoVO> findUsers(final Map<String, Object> paraMap, final RowBounds rowBounds);
XitUserInfoVO findUser(final String uniqId); XitUserInfoVO findUser(final String uniqId);
int addUser(final XitUserInfoVO userInfoVO); void addUser(final XitUserInfoVO userInfoVO);
int modifyUser(final XitUserInfoVO userInfoVO); void modifyUser(final XitUserInfoVO userInfoVO);
int removeUser(final String uniqId); void removeUser(final String userTy, final String uniqId);
String getDefaultAuthorCode(final String groupId); String getDefaultAuthorCode(final String groupId);
Map<String, Object> findAuthorGroupInfo(final String groupId); Map<String, Object> findAuthorGroupInfo(final String groupId);
int addUserScrtySetup(XitUserScrtySetupVO vo); int addUserScrtySetup(final XitUserScrtySetupVO vo);
int addXitUserEtcOption(XitUserEtcOptionVO vo); int addXitUserEtcOption(final XitUserEtcOptionVO vo);

@ -63,7 +63,7 @@ public class UserMgtServiceImpl implements UserMgtService {
@Override @Override
public int addUser(final XitUserInfoVO vo) { public void addUser(final XitUserInfoVO vo) {
try { try {
vo.setUniqId(idgenService.getNextStringId()); vo.setUniqId(idgenService.getNextStringId());
} catch (FdlException e) { } catch (FdlException e) {
@ -91,11 +91,11 @@ public class UserMgtServiceImpl implements UserMgtService {
userEtcOptionVO.setUserId(vo.getUserId()); userEtcOptionVO.setUserId(vo.getUserId());
userEtcOptionVO.setJobDataAuthor("ONESELF"); //업무 데이터 권한 userEtcOptionVO.setJobDataAuthor("ONESELF"); //업무 데이터 권한
userEtcOptionVO.setUserManageAuthor("ONESELF"); //사용자 관리 권한 userEtcOptionVO.setUserManageAuthor("ONESELF"); //사용자 관리 권한
return mapper.insertUserEtcOption(userEtcOptionVO); mapper.insertUserEtcOption(userEtcOptionVO);
} }
@Override @Override
public int modifyUser(final XitUserInfoVO vo) { public void modifyUser(final XitUserInfoVO vo) {
// TODO : 적용 체크 // TODO : 적용 체크
//if(!this.isUserModifyAuth(vo.getUniqId())) //if(!this.isUserModifyAuth(vo.getUniqId()))
@ -126,82 +126,32 @@ public class UserMgtServiceImpl implements UserMgtService {
mapper.updateUserScrtySetup(userScrtySetupVO); mapper.updateUserScrtySetup(userScrtySetupVO);
} }
} }
return 1; //mapper.updateUser(userManageVO);
} }
@Override @Override
public int removeUser(String uniqId) { public void removeUser(final String userTy, final String userId) {
/*
String [] delId = userIds.split(",");
if (delId == null || (delId.length == 0)) {
throw new RuntimeException(xitMessageSource.getMessage("fail.common.delete"));
}
String [] arrUserId = userIds.split(",");
for (int i=0; i<arrUserId.length ; i++){
this.removeProc(arrUserId[i]);
}
String [] items = id.split(":");
//업무사용자 삭제
if(items.length<2) if (userTy.equals("USR03")){
throw new RuntimeException(String.format("%s %s" Map<String,Object> userInfoCheckMap = mapper.selectCheckUserInfo(userId);
, xitMessageSource.getMessage("fail.common.delete") String scrtySetupTrgetId = String.valueOf(userInfoCheckMap.get("esntl_id"));
, "식별값이 유효하지 않습니다.")
);
*/
/*
String userTy = items[0];
String userId = items[1];
if (userTy.equals("USR03")){ //업무사용자 삭제
//필수값 설정
XitUserInfoVO xitUserInfoVO = new XitUserInfoVO();
xitUserInfoVO.setUserId(userId);
//사용자보안설정 삭제 //사용자보안설정 삭제
try { if(Checks.isNotEmpty(mapper.selectUserScrtySetup(scrtySetupTrgetId))) {
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO(); mapper.deleteUserScrtySetup(scrtySetupTrgetId);
userScrtySetupVO.setScrtySetupTrgetId(xitFrameCrudService.findXitUserInfo(xitUserInfoVO).getEsntlId());
if(XitCmmnUtil.notEmpty(xitFrameCrudService.findXitUserScrtySetup(userScrtySetupVO)))
xitFrameCrudService.removeXitUserScrtySetup(userScrtySetupVO);
} catch (Exception e) {
} }
//사용자정보변경내역 전체 삭제 //사용자정보변경내역 전체 삭제
XitUserInfoChangeDtlsVO xitUserInfoChangeDtlsVO = new XitUserInfoChangeDtlsVO(); mapper.deleteUserInfoChangeDtlsList(userId);
xitUserInfoChangeDtlsVO.setUser_id(userId);
xitFrameCrudService.removeXitUserInfoChangeDtlss(xitUserInfoChangeDtlsVO);
//업무사용자(직원)삭제 //업무사용자(직원)삭제
xitFrameCrudService.removeXitUserInfo(xitUserInfoVO); mapper.deleteUserInfo(userId);
}else if(userTy.equals("USR01")){ //일반회원 삭제
//필수값 설정
XitGnrlMberVO gnrlMberVO = new XitGnrlMberVO();
gnrlMberVO.setMberId(userId);
//일반회원 삭제 //일반회원 삭제
xitFrameCrudService.removeXitGnrlMber(gnrlMberVO); }else if(userTy.equals("USR01")){
mapper.deleteGnrlMber(userId);
}else if(userTy.equals("USR02")){ //기업회원 삭제
//필수값 설정
XitEntrprsMberVO entrprsMberVO = new XitEntrprsMberVO();
entrprsMberVO.setEntrprsMberId(userId);
//기업회원 삭제 //기업회원 삭제
xitFrameCrudService.removeXitEntrprsMber(entrprsMberVO); }else if(userTy.equals("USR02")){ //기업회원 삭제
mapper.deleteEntrprsMber(userId);
} }
*/
return 0; //mapper.deleteUser(uniqId);
} }
/** /**
@ -244,12 +194,12 @@ public class UserMgtServiceImpl implements UserMgtService {
@Override @Override
public int addUserScrtySetup(XitUserScrtySetupVO vo) { public int addUserScrtySetup(final XitUserScrtySetupVO vo) {
return mapper.insertUserScrtySetup(vo); return mapper.insertUserScrtySetup(vo);
} }
@Override @Override
public int addXitUserEtcOption(XitUserEtcOptionVO vo) { public int addXitUserEtcOption(final XitUserEtcOptionVO vo) {
return mapper.insertUserEtcOption(vo); return mapper.insertUserEtcOption(vo);
} }

@ -74,18 +74,34 @@ public class UserMgtController {
public void mngUserMgtForm() { public void mngUserMgtForm() {
} }
@GetMapping(value = "/mngUserMgtPopup") /**
public ModelAndView mngUserMgtPopup(final String uniqId) { * url
* @return
*/
@RequestMapping(value = "/addUserPopup")
public ModelAndView addUserPopup() {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/usr/mngUserMgtPopup.popup"); mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/usr/mngUserMgtPopup.popup");
if (Checks.isEmpty(uniqId)) {
mav.addObject("userInfoVO", new XitUserInfoVO()); mav.addObject("userInfoVO", new XitUserInfoVO());
mav.addObject("pageTitle", "사용자 정보 등록"); mav.addObject("pageTitle", "사용자 정보 등록");
} else {
return mav;
}
/**
* url
* @param uniqId
* @return
*/
@RequestMapping(value = "/modifyUserPopup")
public ModelAndView modifyUserPopup(final String uniqId) {
ModelAndView mav = new ModelAndView();
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/usr/mngUserMgtPopup.popup");
mav.addObject("userInfoVO", service.findUser(uniqId)); mav.addObject("userInfoVO", service.findUser(uniqId));
mav.addObject("pageTitle", "사용자 정보 변정"); mav.addObject("pageTitle", "사용자 정보 변정");
}
return mav; return mav;
} }
@ -120,18 +136,19 @@ public class UserMgtController {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
ValidationError.of("userInfoVO", vo, bindingResult); ValidationError.of("userInfoVO", vo, bindingResult);
service.modifyUser(vo); service.modifyUser(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav; return mav;
} }
@PostMapping(value = "/removeUser") @PostMapping(value = "/removeUser")
public ModelAndView removeUser(final String uniqId){ public ModelAndView removeUser(@RequestParam final String userTy, @RequestParam final String userId){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeUser(uniqId); service.removeUser(userTy, userId);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav; return mav;
} }

@ -19,7 +19,7 @@
<security:http pattern="/resource" security="none"/> <security:http pattern="/resource" security="none"/>
<security:http pattern="/framework/biz/cmm/cache/**" security="none"/> <security:http pattern="/framework/biz/cmm/cache/**" security="none"/>
<security:http pattern="/framework/biz/mng/usr/addUser.do" security="none"/> <security:http pattern="/framework/biz/mng/usr/addUser.do" security="none"/>
<security:http pattern="/framework/biz/mng/usr/mngUserMgtPopup.do" security="none"/> <security:http pattern="/framework/biz/mng/usr/addUserPopup.do" security="none"/>
<security:http pattern="\A/WEB-INF/jsp/.*\Z" request-matcher="regex" security="none"/> <security:http pattern="\A/WEB-INF/jsp/.*\Z" request-matcher="regex" security="none"/>
<!-- 전자정부 프레임워크 사용 시 --> <!-- 전자정부 프레임워크 사용 시 -->

@ -3,6 +3,9 @@
<mapper namespace="kr.xit.fims.biz.rt.mapper.Rt0200Mapper"> <mapper namespace="kr.xit.fims.biz.rt.mapper.Rt0200Mapper">
<!-- *************************************************************************************************************
* tb_reglt : 단속자료
************************************************************************************************************** -->
<select id="selectRt0200List" parameterType="map" resultType="caseMap"> <select id="selectRt0200List" parameterType="map" resultType="caseMap">
/* rt0200-mysql-mapper|selectRt0200List-단속자료현황 조회|julim */ /* rt0200-mysql-mapper|selectRt0200List-단속자료현황 조회|julim */
SELECT tr.vhcle_no SELECT tr.vhcle_no

@ -3,6 +3,9 @@
<mapper namespace="kr.xit.framework.biz.mng.menu.mapper.ProgramMgtMapper"> <mapper namespace="kr.xit.framework.biz.mng.menu.mapper.ProgramMgtMapper">
<!-- *************************************************************************************************************
* xit_progrm_list : 프로그램 정보
************************************************************************************************************** -->
<select id="selectPrograms" resultType="kr.xit.framework.biz.mng.menu.model.ProgramMngVO"> <select id="selectPrograms" resultType="kr.xit.framework.biz.mng.menu.model.ProgramMngVO">
/* program-mysql-mapper|selectPrograms-프로그램 목록 조회|julim */ /* program-mysql-mapper|selectPrograms-프로그램 목록 조회|julim */
SELECT progrm_file_nm SELECT progrm_file_nm
@ -33,8 +36,6 @@
WHERE progrm_file_nm = #{progrmFileNm} WHERE progrm_file_nm = #{progrmFileNm}
</select> </select>
<insert id="insertProgram" parameterType="kr.xit.framework.biz.mng.menu.model.ProgramMngVO"> <insert id="insertProgram" parameterType="kr.xit.framework.biz.mng.menu.model.ProgramMngVO">
/* program-mysql-mapper|insertProgram-프로그램 등록|julim */ /* program-mysql-mapper|insertProgram-프로그램 등록|julim */
INSERT INSERT

@ -2,6 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!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.user.mapper.UserMgtMapper"> <mapper namespace="kr.xit.framework.biz.mng.user.mapper.UserMgtMapper">
<!-- *************************************************************************************************************
* xit_user_info : 업무사용자 정보
************************************************************************************************************** -->
<select id="selectUsers" resultType="kr.xit.framework.biz.cmm.model.XitUserInfoVO"> <select id="selectUsers" resultType="kr.xit.framework.biz.cmm.model.XitUserInfoVO">
/* user-mysql-mapper|selectUsers-사용자 목록 조회|julim */ /* user-mysql-mapper|selectUsers-사용자 목록 조회|julim */
SELECT xui.esntl_id AS uniqId SELECT xui.esntl_id AS uniqId
@ -23,12 +26,12 @@
AND xui.user_sttus_code = cdc.code AND xui.user_sttus_code = cdc.code
<where> <where>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(sbscrbSttus)"> <if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(sbscrbSttus)">
AND xui.user_sttus_code LIKE #{sbscrbSttus}||'%' AND xui.user_sttus_code = #{sbscrbSttus}
</if> </if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(searchKeyword)"> <if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(searchKeyword)">
<choose> <choose>
<when test="searchCondition eq 'userId'"> <when test="searchCondition eq 'userId'">
AND xui.user_id LIKE #{searchKeyword} AND INSTR(xui.user_id, #{searchKeyword}) > 0
</when> </when>
<when test="searchCondition eq 'userNm'"> <when test="searchCondition eq 'userNm'">
AND INSTR(xui.user_nm, #{searchKeyword}) > 0 AND INSTR(xui.user_nm, #{searchKeyword}) > 0
@ -39,7 +42,6 @@
ORDER BY sbscrb_de DESC ORDER BY sbscrb_de DESC
</select> </select>
<select id="selectUser" parameterType="string" resultType="kr.xit.framework.biz.cmm.model.XitUserInfoVO"> <select id="selectUser" parameterType="string" resultType="kr.xit.framework.biz.cmm.model.XitUserInfoVO">
/* user-mysql-mapper|selectUser-사용자 정보 조회|julim */ /* user-mysql-mapper|selectUser-사용자 정보 조회|julim */
SELECT esntl_id AS uniqId SELECT esntl_id AS uniqId
@ -165,12 +167,11 @@
WHERE user_id = #{userId} WHERE user_id = #{userId}
</update> </update>
<delete id="removeXitUserInfo"> <delete id="deleteUserInfo" parameterType="string">
/** removeXitUserInfo */ /* user-mysql-mapper|deleteUserInfo-사용자정보 삭제|julim */
/** 사용자정보 삭제 */ DELETE
DELETE FROM XIT_USER_INFO FROM xit_user_info
WHERE 1=1 WHERE user_id = #{userId}
AND USER_ID = #{user_id}
</delete> </delete>
<select id="selectCheckUserInfo" parameterType="string" resultType="caseMap"> <select id="selectCheckUserInfo" parameterType="string" resultType="caseMap">
@ -183,6 +184,33 @@
WHERE xui.user_id = #{userId} WHERE xui.user_id = #{userId}
</select> </select>
<!-- *************************************************************************************************************
* xit_gnrl_mber : 일반사용자 정보
************************************************************************************************************** -->
<delete id="deleteGnrlMber" parameterType="string">
/* user-mysql-mapper|deleteGnrlMber-일반사용자정보 삭제|julim */
DELETE
FROM xit_gnrl_mber
WHERE mber_id = #{userId}
</delete>
<!-- *************************************************************************************************************
* xit_entrprs_mber : 기업사용자 정보
************************************************************************************************************** -->
<delete id="delectEntrprsMber" parameterType="string">
/* user-mysql-mapper|delectEntrprsMber-기업사용자정보 삭제|julim */
DELETE
FROM xit_entrprs_mber
WHERE entrprs_mber_id = #{userId}
</delete>
<!-- *************************************************************************************************************
* xit_author_group_info : 권한그룹 정보
************************************************************************************************************** -->
<select id="selectAuthorGroupInfo" parameterType="map" resultType="caseMap"> <select id="selectAuthorGroupInfo" parameterType="map" resultType="caseMap">
/* user-mysql-mapper|selectAuthorGroupInfo-권한그룹정보 조회|julim */ /* user-mysql-mapper|selectAuthorGroupInfo-권한그룹정보 조회|julim */
SELECT group_id SELECT group_id
@ -212,9 +240,9 @@
<!-- *************************************************************************************************************
* xit_user_scrty_setup : 사용자 보안 설정
************************************************************************************************************** -->
<select id="selectUserScrtySetups" parameterType="kr.xit.framework.biz.cmm.model.XitUserScrtySetupVO" resultType="kr.xit.framework.biz.cmm.model.XitUserScrtySetupVO"> <select id="selectUserScrtySetups" parameterType="kr.xit.framework.biz.cmm.model.XitUserScrtySetupVO" resultType="kr.xit.framework.biz.cmm.model.XitUserScrtySetupVO">
/* user-mysql-mapper|selectUserScrtySetups-사용자보안설정 목록 조회|julim */ /* user-mysql-mapper|selectUserScrtySetups-사용자보안설정 목록 조회|julim */
SELECT scrty_setup_trget_id SELECT scrty_setup_trget_id
@ -274,6 +302,9 @@
<!-- *************************************************************************************************************
* xit_user_etc_option : 사용자 기타 옵션
************************************************************************************************************** -->
<select id="selectUserEtcOptions" parameterType="kr.xit.framework.biz.cmm.model.XitUserEtcOptionVO" resultType="kr.xit.framework.biz.cmm.model.XitUserEtcOptionVO"> <select id="selectUserEtcOptions" parameterType="kr.xit.framework.biz.cmm.model.XitUserEtcOptionVO" resultType="kr.xit.framework.biz.cmm.model.XitUserEtcOptionVO">
/* user-mysql-mapper|selectUserEtcOptions-사용자기타옵션 목록 조회|julim */ /* user-mysql-mapper|selectUserEtcOptions-사용자기타옵션 목록 조회|julim */
SELECT user_id SELECT user_id
@ -304,7 +335,6 @@
<select id="selectUserEtcOption" parameterType="string" resultType="kr.xit.framework.biz.cmm.model.XitUserEtcOptionVO"> <select id="selectUserEtcOption" parameterType="string" resultType="kr.xit.framework.biz.cmm.model.XitUserEtcOptionVO">
/* user-mysql-mapper|selectUserEtcOption-사용자기타옵션 조회|julim */ /* user-mysql-mapper|selectUserEtcOption-사용자기타옵션 조회|julim */
/** 사용자기타옵션 조회 */
SELECT user_id SELECT user_id
, job_data_author , job_data_author
, user_manage_author , user_manage_author
@ -349,8 +379,13 @@
WHERE user_id = #{userId} WHERE user_id = #{userId}
</delete> </delete>
<!-- *************************************************************************************************************
* xit_user_info_change_dtls : 사용자 정보 변경 이력
************************************************************************************************************** -->
<insert id="insertUserInfoChangeDtls" parameterType="string"> <insert id="insertUserInfoChangeDtls" parameterType="string">
/* user-mysql-mapper|insertUserInfoChangeDtls-사용자정보변경내역 등록|julim */ /* user-mysql-mapper|insertUserInfoChangeDtls-사용자정보변경이력내역 등록|julim */
INSERT INSERT
INTO xit_user_info_change_dtls ( INTO xit_user_info_change_dtls (
user_id user_id
@ -397,6 +432,12 @@
WHERE user_id = #{userId} WHERE user_id = #{userId}
</insert> </insert>
<delete id="deleteUserInfoChangeDtlsList">
/* user-mysql-mapper|deleteUserInfoChangeDtlsList-사용자정보변경이력 내역 목록 삭제|julim */
DELETE
FROM xit_user_info_change_dtls
WHERE user_id = #{userId}
</delete>
@ -533,11 +574,5 @@
AND USER_ID = #{user_id } AND USER_ID = #{user_id }
AND CHANGE_DE = #{change_de} AND CHANGE_DE = #{change_de}
</delete> </delete>
<delete id="removeXitUserInfoChangeDtlss">
/** removeXitUserInfoChangeDtls */
/** 사용자정보변경내역 목록 삭제 */
DELETE FROM XIT_USER_INFO_CHANGE_DTLS
WHERE 1=1
AND USER_ID = #{user_id }
</delete>
</mapper> </mapper>

@ -402,19 +402,12 @@
* initialize * initialize
**************************************************************************/ **************************************************************************/
$(document).ready(function() { $(document).ready(function() {
//$('#sch_date_from').datepicker('setDate', DateUtil.getDateDay(-365).date); $('#sch_date_from').datepicker('setDate', DateUtil.getDateDay(-364).date);
$('#sch_date_to').datepicker('setDate', new Date()); $('#sch_date_to').datepicker('setDate', new Date());
$('#totCnt span').text(ARR_TOTCNT[CUR_TAB_SEQ]); $('#totCnt span').text(ARR_TOTCNT[CUR_TAB_SEQ]);
$("#tabs").tabs({active : CUR_TAB_SEQ}); $("#tabs").tabs({active : CUR_TAB_SEQ});
initGrid(); initGrid();
$.datepicker._gotoToday("#sch_date_from");
$.datepicker._gotoToday = function(id) {
$(id).datepicker('setDate', new Date());
$(".ui-datepicker").hide().blur();
};
}); });
</script> </script>

@ -165,7 +165,7 @@
* 회원가입 팝업 * 회원가입 팝업
*/ */
function fnReg(){ function fnReg(){
CmmPopup.open("<c:url value='/framework/biz/mng/usr/mngUserMgtPopup.do'/>", {}, {width: 1100, height:570}, '사용자 등록'); CmmPopup.open("<c:url value='/framework/biz/mng/usr/addUserPopup.do'/>", {}, {width: 1100, height:570}, '사용자 등록');
} }
/** /**

@ -2,11 +2,6 @@
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%> <%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
<form name="frmSearch" id="frmSearch" method="post"> <form name="frmSearch" id="frmSearch" method="post">
<input type="hidden" id="searchAt" name="searchAt" value="Y">
<input name="selectedId" type="hidden" />
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
<input name="pageIndex" type="hidden" value="<c:out value='${userSearchVO.pageIndex}'/>"/>
<input type="hidden" name="checkedIdForDel" id="checkedIdForDel">
<div class="search"> <div class="search">
<table> <table>
@ -40,9 +35,8 @@
<!-- //검색 --> <!-- //검색 -->
<div class="page_btn"> <div class="page_btn">
<span class="fll"> <span class="flr">
<a href="#" class="btn darkgray" id="btnRegist" title="등록">등록</a> <a href="#" class="btn darkgray" id="btnRegist" title="등록">등록</a>
<a href="#" class="btn red" id="btnRemove" title="삭제">삭제</a>
</span> </span>
</div> </div>
<!-- //버튼 및 페이지정보 --> <!-- //버튼 및 페이지정보 -->
@ -119,15 +113,18 @@
align: 'center' align: 'center'
}, },
{ {
header: '등록일', header: '등록일',
name: 'sbscrbDe', name: 'sbscrbDe',
width: 150, width: 150,
sortable: false, sortable: false,
align: 'center' align: 'center',
formatter({value}) {
return setDateTimeFmt(value); //
}
}, },
{ {
header: '가입상태', header: '가입상태',
name: 'userSttusCode', name: 'userSttusCodeNm',
width: 110, width: 110,
sortable: false, sortable: false,
align: 'center' align: 'center'
@ -169,33 +166,9 @@
******************************* */ ******************************* */
const fnUserMgt = { const fnUserMgt = {
search: () => { search: () => {
console.log($('#frmSearch').serialize())
GRID.reloadData(); GRID.reloadData();
} }
,validate : function(flag){
switch(flag){
case 'delete' :
/* 필수값 설정 */
var dataSet = instance.getData(); //Grid에 출력된 DataSet
var arrCheckedRowKey = instance.getCheckedRowKeys(); //선택한 row의 key값( 선택된 row 정보가 필요 시 "getCheckedRows()" )
// var arrCheckedRow = instance.getCheckedRows(); //선택한 row
/* 유효성 확인 */
if(dataSet.length==0){
alert("조회된 결과가 없습니다.");
return false;
}
if(arrCheckedRowKey.length==0) {
alert("선택된 자료가 없습니다.");
return false;
}
break;
}
return true;
}
,pageLink: function(flag, url, params){ ,pageLink: function(flag, url, params){
switch (flag) { switch (flag) {
case "move": //페이지 이동 case "move": //페이지 이동
@ -212,17 +185,20 @@
} }
,pagePopup: function(flag, params){ ,pagePopup: function(flag, params){
const url = '<c:url value="/framework/biz/mng/usr/mngUserMgtPopup.do"/>'; let url;
let popTitle; let popTitle;
let popOption; let popOption;
switch (flag) { switch (flag) {
case "add": //등록 case "add": //등록
url = '<c:url value="/framework/biz/mng/usr/addUserPopup.do"/>'
popTitle = "사용자 등록"; popTitle = "사용자 등록";
popOption = {width: 1100, height:700} popOption = {width: 1100, height:630}
break; break;
case "detail": //상세 case "detail": //상세
url = '<c:url value="/framework/biz/mng/usr/modifyUserPopup.do"/>'
popTitle = "사용자 상세"; popTitle = "사용자 상세";
popOption = {width: 1100, height:700} popOption = {width: 1100, height:550}
method = 'post';
break; break;
default: default:
break; break;

@ -6,11 +6,6 @@
<validator:javascript formName="userInfoVO" staticJavascript="false" xhtml="true" cdata="false"/> <validator:javascript formName="userInfoVO" staticJavascript="false" xhtml="true" cdata="false"/>
<%--@elvariable id="userInfoVO" type=""--%> <%--@elvariable id="userInfoVO" type=""--%>
<form:form commandName="userInfoVO" name="userInfoVO"> <form:form commandName="userInfoVO" name="userInfoVO">
<%-- <input type="hidden" name="zip_url" value="<c:url value='/framework/biz/cmm/popup/ZipSearchList.do'/>" />--%>
<!-- 상세정보 사용자 삭제시 prameter 전달용 input -->
<input type="hidden" name="checkedIdForDel" id="checkedIdForDel" value="<c:out value='${userInfoVO.userTy}'/>:<c:out value='${userInfoVO.emplyrId}'/>">
<!-- 사용자유형정보 : password 수정화면으로 이동시 타겟 유형정보 확인용, 만약검색조건으로 유형이 포함될경우 혼란을 피하기위해 userTy명칭을 쓰지 않음-->
<input type="hidden" name="userTyForPassword" value="<c:out value='${userInfoVO.userTy}'/>" />
<c:set var="isUpdate" value="${!empty userInfoVO.uniqId}"/> <c:set var="isUpdate" value="${!empty userInfoVO.uniqId}"/>
<div class="popup" style="min-width: 1100px;"> <div class="popup" style="min-width: 1100px;">
@ -210,7 +205,7 @@
<label>사용자 상태</label> <label>사용자 상태</label>
</th> </th>
<td> <td>
<code:select id="userSttusCode" name="userSttusCode" codeId="XIT013" defaultSelect="${!isUpdate? 'A': userInfoVO.userSttusCode}" title="사용자상태" cls="selectBox" alt="사용자상태"/> <code:select id="userSttusCode" name="userSttusCode" codeId="XIT013" defaultSelect="${!isUpdate? 'A': userInfoVO.userSttusCode}" disabled="${!isUpdate}" title="사용자상태" cls="selectBox" alt="사용자상태"/>
<%-- <%--
<form:select path="userSttusCode" id="userSttusCode" title="사용자상태코드"> <form:select path="userSttusCode" id="userSttusCode" title="사용자상태코드">
<form:option value="" label="--선택하세요--" /> <form:option value="" label="--선택하세요--" />
@ -242,7 +237,6 @@
<c:when test="${!empty userInfoVO.uniqId}"> <c:when test="${!empty userInfoVO.uniqId}">
<a href="#" class="btn blue" id="btnModify">변경</a> <a href="#" class="btn blue" id="btnModify">변경</a>
<a href="#" class="btn red" id="btnRemove">삭제</a> <a href="#" class="btn red" id="btnRemove">삭제</a>
<a href="#" class="btn blue" id="btnPwdChg">비밀번호변경</a>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<a href="#" class="btn blue" id="btnRegist">등록</a> <a href="#" class="btn blue" id="btnRegist">등록</a>
@ -287,7 +281,7 @@
} }
,modify: () => { ,modify: () => {
//if(!validateUserInfoVO(document.getElementById('userInfoVO'))) return; if(!validateUserInfoVO(document.getElementById('userInfoVO'))) return;
if(confirm("변경 하시겠습니까?")){ if(confirm("변경 하시겠습니까?")){
cmmAjax({ cmmAjax({
@ -301,11 +295,14 @@
} }
} }
, removeData: () => { , remove: () => {
if(confirm("삭제 하시겠습니까?")){ if(confirm("삭제 하시겠습니까?")){
cmmAjax({ cmmAjax({
url: '<c:url value="/framework/biz/mng/usr/removeUser.do"/>' url: '<c:url value="/framework/biz/mng/usr/removeUser.do"/>'
,data: $("#userInfoVO").serialize() ,data: {
userTy: '<c:out value="${userInfoVO.userTy}"/>'
,userId: '<c:out value="${userInfoVO.emplyrId}"/>'
}
,success: () => { ,success: () => {
window.opener.callBackSearch(); window.opener.callBackSearch();
window.close(); window.close();
@ -313,17 +310,6 @@
}) })
} }
} }
,validate: function (flag) {
switch (flag) {
case 'update' : //수정
break;
default :
break;
}
return true;
}
}; };
/************************************************************************** /**************************************************************************
@ -339,22 +325,6 @@
$('#btnModify').on('click', () => fnUserMgtPopup.modify()); $('#btnModify').on('click', () => fnUserMgtPopup.modify());
$('#btnRemove').on('click', () => fnUserMgtPopup.remove()); $('#btnRemove').on('click', () => fnUserMgtPopup.remove());
$('#btnPwdChg').on('click', () => {
var params = "";
var form = $('#userInfoVO');
var array = $(form).serializeArray();
var result = {};
if(array){
$(array).each(function(index, item){
if(this.value){
params += (this.name+"=" + this.value);
if(index < (array.length -1)) params += "&"
}
})
}
fnUserMgtPopup.pagePopup('pwd', '<c:url value="/framework/biz/mng/usr/UserRegMng_editPwd_popup.do"/>', params);
});
}); });
/************************************************************************** /**************************************************************************

@ -117,6 +117,10 @@
// var popOption = "width=1100px, height=600px, resizable=no, scrollbars=no, location=no, top=100px, left=100px"; // var popOption = "width=1100px, height=600px, resizable=no, scrollbars=no, location=no, top=100px, left=100px";
let popUrl =''; let popUrl ='';
let popOption = ''; let popOption = '';
let params = {
selectedId: '${sessionScope.XitLoginSession.uniqId}'
,tilesDef: 'popup'
};
if('GNR'=='${sessionScope.XitLoginSession.userSe}'){ if('GNR'=='${sessionScope.XitLoginSession.userSe}'){
popUrl ='<c:url value="/framework/biz/mng/usr/GnrUserRegMng_view.do"/>'; popUrl ='<c:url value="/framework/biz/mng/usr/GnrUserRegMng_view.do"/>';
popOption = {width: 738, height: 630}; popOption = {width: 738, height: 630};
@ -126,21 +130,12 @@
popOption = {width: 738, height: 777}; popOption = {width: 738, height: 777};
} }
else{ else{
popUrl ='<c:url value="/framework/biz/mng/usr/UserRegMng_view.do"/>'; popUrl ='<c:url value="/framework/biz/mng/usr/modifyUserPopup.do"/>';
popOption = {width: 1100, height: 600}; popOption = {width: 1100, height: 600};
params = {uniqId: '${sessionScope.XitLoginSession.uniqId}'}
} }
const target = '정보수정'; const target = '정보수정';
CmmPopup.open(popUrl, {}, popOption, target); CmmPopup.open(popUrl, params, popOption, target);
const param = new Object();
param.selectedId = '${sessionScope.XitLoginSession.uniqId}';
param.tilesDef = 'popup';
const form = XitCmmnUtil.createForm(param);
form.action = popUrl;
form.method = 'post';
form.target = target;
form.id = 'frmPost';
document.body.appendChild(form);
form.submit();
} }
</script> </script>

@ -133,273 +133,6 @@ var XitCmmnUtil = {
} }
var DateUtil = {
/*============================
* 현재날짜로부터 단위로 계산된 날짜(yyyymmdd) 반환
* -addMonth가 0 이면 현재월
* -음의 숫자면 전월 (ex: -1 전월, -2 전전월, -3 ...)
* -양의 숫자면 차월 (ex: 1 차월, 2 차차월, 3 ...)
============================*/
getDate : function(){
var result = new Object();
switch (arguments.length) {
case 1:
result = calcDate(arguments[0]);
break;
case 2:
result = calcDate(arguments[0], arguments[1]);
break;
default:
result = calcDate();
break;
}
return result;
//날짜 계산
function calcDate(addMonth, stdDay){
if(addMonth!=undefined)
addMonth = addMonth + 1;
addMonth = addMonth==undefined?1:addMonth;
/*
* 필수값 설정
* -날짜 설정
* -ago OR after 여부 설정
*/
var date = new Date();
var yyyy = date.getFullYear();
var mm = ( date.getMonth() + (addMonth) );
var dd = date.getDate();
if(stdDay!=undefined){
stdDay = stdDay.replace(/[^0-9]/gi,'');
yyyy = stdDay.substring(0,4);
mm = stdDay.substring(4,6);
dd = stdDay.substring(6,8);
if(addMonth==13)
yyyy = Number(yyyy)+1;
}
var isAfter = false;
if((addMonth*1)>0)
isAfter = true;
/*
* 유효성 처리
* -(year) 넘김 처리
* -말일(last day) 처리
*/
var newYear = DateUtil.getNewYear(isAfter, yyyy, mm);
yyyy = newYear.yyyy;
mm = newYear.mm;
var ago_last_dd = DateUtil.getEndOfMonthDay(yyyy, mm);
dd = dd>ago_last_dd?ago_last_dd:dd;
/*
* format 설정
*/
if( (''+dd).length == 1 )
dd = "0"+ dd;
/*
* 결과 반환
*/
var obj = new Object();
obj.date = ""+yyyy+mm+dd;
obj.yyyy = ""+yyyy;
obj.mm = ""+mm;
obj.dd = ""+dd;
return obj;
}
},
//+ 한달 후 말일 계산
getAddMonth : function(stdDay){
//날짜 계산
var rtnVal = calcDate(0,stdDay);
return rtnVal;
function calcDate(addMonth, stdDay){
if(addMonth!=undefined)
addMonth = addMonth + 1;
addMonth = addMonth==undefined?1:addMonth;
/*
* 필수값 설정
* -날짜 설정
* -ago OR after 여부 설정
*/
stdDay = stdDay.replace(/[^0-9]/gi,'');
var yyyy = stdDay.substring(0,4);
var mm = stdDay.substring(4,6);
var dd = stdDay.substring(6,8);
mm = Number(mm)+addMonth;
if(addMonth==13)
yyyy = Number(yyyy)+1;
var isAfter = false;
if((addMonth*1)>0)
isAfter = true;
/*
* 유효성 처리
* -(year) 넘김 처리
* -말일(last day) 처리
*/
var newYear = DateUtil.getNewYear(isAfter, yyyy, mm);
yyyy = newYear.yyyy;
mm = newYear.mm;
var ago_last_dd = DateUtil.getEndOfMonthDay(yyyy, mm);
dd = ago_last_dd;
/*
* format 설정
*/
if( (''+dd).length == 1 )
dd = "0"+ dd;
/*
* 결과 반환
*/
var obj = new Object();
obj.date = ""+yyyy+mm+dd;
obj.yyyy = ""+yyyy;
obj.mm = ""+mm;
obj.dd = ""+dd;
return obj;
}
},
/*============================
* 현재날짜(or 기준일)로부터 단위로 계산된 날짜(yyyymmdd) 반환
* -addDay가 0 이면 금일
* -음의 숫자면 전일 (ex: -1 작일, -2 재작일, -3 ...)
* -양의 숫자면 차일 (ex: 1 명일, 2 재명일, 3 ...)
============================*/
getDateDay: function(addDay){
var result = new Object();
switch (arguments.length) {
case 1:
result = calcDate(arguments[0], DateUtil.getDate().date);
break;
default:
result = calcDate(0, DateUtil.getDate().date);
break;
}
return result;
//날짜 계산
function calcDate(addDay, stdDay){
addDay = addDay==undefined||addDay==null?0:addDay*1;
/*
* 필수값 설정
* -날짜 설정
* -ago OR after 여부 설정
*/
var yyyy = stdDay.substring(0,4);
var mm = stdDay.substring(4,6);
var dd = stdDay.substring(6,8);
var date = new Date(yyyy, (mm-1)*1, dd*1);
date.setDate(date.getDate()+(addDay));
yyyy = date.getFullYear();
mm = date.getMonth()+1;
dd = date.getDate();
if( (''+mm).length == 1 )
mm = "0"+ mm;
if( (''+dd).length == 1 )
dd = "0"+ dd;
/*
* 결과 반환
*/
var obj = new Object();
obj.date = ""+yyyy+"."+mm+"."+dd;
obj.yyyy = yyyy;
obj.mm = mm;
obj.dd = dd;
return obj;
}
},
/*============================
* 달의 마지막 날짜(dd) 반환
============================*/
getEndOfMonthDay : function(yy, mm){
var max_days=0;
if(mm == 1 || mm == '01') {
max_days = 31 ;
} else if(mm == 2 || mm == '02') {
if ((( yy % 4 == 0) && (yy % 100 != 0)) || (yy % 400 == 0))
max_days = 29;
else
max_days = 28;
}
else if (mm == 3 || mm == '03')   max_days = 31;
else if (mm == 4 || mm == '04')   max_days = 30;
else if (mm == 5 || mm == '05')   max_days = 31;
else if (mm == 6 || mm == '06')   max_days = 30;
else if (mm == 7 || mm == '07')   max_days = 31;
else if (mm == 8 || mm == '08')   max_days = 31;
else if (mm == 9 || mm == '09')   max_days = 30;
else if (mm == 10 || mm == '10')  max_days = 31;
else if (mm == 11 || mm == '11')  max_days = 30;
else if (mm == 12 || mm == '12')  max_days = 31;
else                return '';
return max_days;
},
/*============================
* (year) 넘김 처리
============================*/
getNewYear : function(isAfter, yyyy, mm){
/*
* (year) 넘김 처리
*/
if(isAfter){
if(mm>12){
var formula = Math.floor(mm/12);
yyyy = Number(yyyy)+(formula);
mm = mm - ((formula)*12);
}
}else{
if(mm<1){
var formula = Math.floor((mm*(-1))/12)+1;
yyyy = yyyy-(formula);
mm = mm + ((formula)*12);
}
}
/*
* 포맷 설정
* -(month) 두자리 설정
*/
if( (''+mm).length == 1 )
mm = "0"+ mm;
/*
* 결과 반환
*/
var obj = new Object();
obj.yyyy = ''+yyyy;
obj.mm = ''+mm;
return obj;
},
}
/** /**
* *
* @param {Object} formEliment form eliment : document. * @param {Object} formEliment form eliment : document.

@ -1,3 +1,269 @@
var DateUtil = {
/*============================
* 현재날짜로부터 단위로 계산된 날짜(yyyymmdd) 반환
* -addMonth가 0 이면 현재월
* -음의 숫자면 전월 (ex: -1 전월, -2 전전월, -3 ...)
* -양의 숫자면 차월 (ex: 1 차월, 2 차차월, 3 ...)
============================*/
getDate : function(){
var result = new Object();
switch (arguments.length) {
case 1:
result = calcDate(arguments[0]);
break;
case 2:
result = calcDate(arguments[0], arguments[1]);
break;
default:
result = calcDate();
break;
}
return result;
//날짜 계산
function calcDate(addMonth, stdDay){
if(addMonth!=undefined)
addMonth = addMonth + 1;
addMonth = addMonth==undefined?1:addMonth;
/*
* 필수값 설정
* -날짜 설정
* -ago OR after 여부 설정
*/
var date = new Date();
var yyyy = date.getFullYear();
var mm = ( date.getMonth() + (addMonth) );
var dd = date.getDate();
if(stdDay!=undefined){
stdDay = stdDay.replace(/[^0-9]/gi,'');
yyyy = stdDay.substring(0,4);
mm = stdDay.substring(4,6);
dd = stdDay.substring(6,8);
if(addMonth==13)
yyyy = Number(yyyy)+1;
}
var isAfter = false;
if((addMonth*1)>0)
isAfter = true;
/*
* 유효성 처리
* -(year) 넘김 처리
* -말일(last day) 처리
*/
var newYear = DateUtil.getNewYear(isAfter, yyyy, mm);
yyyy = newYear.yyyy;
mm = newYear.mm;
var ago_last_dd = DateUtil.getEndOfMonthDay(yyyy, mm);
dd = dd>ago_last_dd?ago_last_dd:dd;
/*
* format 설정
*/
if( (''+dd).length == 1 )
dd = "0"+ dd;
/*
* 결과 반환
*/
var obj = new Object();
obj.date = ""+yyyy+mm+dd;
obj.yyyy = ""+yyyy;
obj.mm = ""+mm;
obj.dd = ""+dd;
return obj;
}
},
//+ 한달 후 말일 계산
getAddMonth : function(stdDay){
//날짜 계산
var rtnVal = calcDate(0,stdDay);
return rtnVal;
function calcDate(addMonth, stdDay){
if(addMonth!=undefined)
addMonth = addMonth + 1;
addMonth = addMonth==undefined?1:addMonth;
/*
* 필수값 설정
* -날짜 설정
* -ago OR after 여부 설정
*/
stdDay = stdDay.replace(/[^0-9]/gi,'');
var yyyy = stdDay.substring(0,4);
var mm = stdDay.substring(4,6);
var dd = stdDay.substring(6,8);
mm = Number(mm)+addMonth;
if(addMonth==13)
yyyy = Number(yyyy)+1;
var isAfter = false;
if((addMonth*1)>0)
isAfter = true;
/*
* 유효성 처리
* -(year) 넘김 처리
* -말일(last day) 처리
*/
var newYear = DateUtil.getNewYear(isAfter, yyyy, mm);
yyyy = newYear.yyyy;
mm = newYear.mm;
var ago_last_dd = DateUtil.getEndOfMonthDay(yyyy, mm);
dd = ago_last_dd;
/*
* format 설정
*/
if( (''+dd).length == 1 )
dd = "0"+ dd;
/*
* 결과 반환
*/
var obj = new Object();
obj.date = ""+yyyy+mm+dd;
obj.yyyy = ""+yyyy;
obj.mm = ""+mm;
obj.dd = ""+dd;
return obj;
}
},
/*============================
* 현재날짜(or 기준일)로부터 단위로 계산된 날짜(yyyymmdd) 반환
* -addDay가 0 이면 금일
* -음의 숫자면 전일 (ex: -1 작일, -2 재작일, -3 ...)
* -양의 숫자면 차일 (ex: 1 명일, 2 재명일, 3 ...)
============================*/
getDateDay: function(addDay){
var result = new Object();
switch (arguments.length) {
case 1:
result = calcDate(arguments[0], DateUtil.getDate().date);
break;
default:
result = calcDate(0, DateUtil.getDate().date);
break;
}
return result;
//날짜 계산
function calcDate(addDay, stdDay){
addDay = addDay==undefined||addDay==null?0:addDay*1;
/*
* 필수값 설정
* -날짜 설정
* -ago OR after 여부 설정
*/
var yyyy = stdDay.substring(0,4);
var mm = stdDay.substring(4,6);
var dd = stdDay.substring(6,8);
var date = new Date(yyyy, (mm-1)*1, dd*1);
date.setDate(date.getDate()+(addDay));
yyyy = date.getFullYear();
mm = date.getMonth()+1;
dd = date.getDate();
if( (''+mm).length == 1 )
mm = "0"+ mm;
if( (''+dd).length == 1 )
dd = "0"+ dd;
/*
* 결과 반환
*/
var obj = new Object();
obj.date = ""+yyyy+"-"+mm+"-"+dd;
obj.yyyy = yyyy;
obj.mm = mm;
obj.dd = dd;
return obj;
}
},
/*============================
* 달의 마지막 날짜(dd) 반환
============================*/
getEndOfMonthDay : function(yy, mm){
var max_days=0;
if(mm == 1 || mm == '01') {
max_days = 31 ;
} else if(mm == 2 || mm == '02') {
if ((( yy % 4 == 0) && (yy % 100 != 0)) || (yy % 400 == 0))
max_days = 29;
else
max_days = 28;
}
else if (mm == 3 || mm == '03') max_days = 31;
else if (mm == 4 || mm == '04') max_days = 30;
else if (mm == 5 || mm == '05') max_days = 31;
else if (mm == 6 || mm == '06') max_days = 30;
else if (mm == 7 || mm == '07') max_days = 31;
else if (mm == 8 || mm == '08') max_days = 31;
else if (mm == 9 || mm == '09') max_days = 30;
else if (mm == 10 || mm == '10') max_days = 31;
else if (mm == 11 || mm == '11') max_days = 30;
else if (mm == 12 || mm == '12') max_days = 31;
else return '';
return max_days;
},
/*============================
* (year) 넘김 처리
============================*/
getNewYear : function(isAfter, yyyy, mm){
/*
* (year) 넘김 처리
*/
if(isAfter){
if(mm>12){
var formula = Math.floor(mm/12);
yyyy = Number(yyyy)+(formula);
mm = mm - ((formula)*12);
}
}else{
if(mm<1){
var formula = Math.floor((mm*(-1))/12)+1;
yyyy = yyyy-(formula);
mm = mm + ((formula)*12);
}
}
/*
* 포맷 설정
* -(month) 두자리 설정
*/
if( (''+mm).length == 1 )
mm = "0"+ mm;
/*
* 결과 반환
*/
var obj = new Object();
obj.yyyy = ''+yyyy;
obj.mm = ''+mm;
return obj;
},
}
/** /**
* 입력일의 이전일 계산 * 입력일의 이전일 계산
*/ */

@ -377,18 +377,20 @@ function setComma(n) {
return n; return n;
} }
const setDateTimeFmt = (srcDate, delimiter = '-') => { const setDateTimeFmt = (srcDateStr, delimiter = '-') => {
let srcDate = srcDateStr.replace(/\-|\s|\:|\./g,'');
if(srcDate.length == 8) { if(srcDate.length == 8) {
return srcDate.substring(0, 4)+delimiter+srcDate.substring(4, 6)+delimiter+srcDate.substring(6, 8); return srcDate.substring(0, 4)+delimiter+srcDate.substring(4, 6)+delimiter+srcDate.substring(6, 8);
}else if(srcDate.length == 14){ }else if(srcDate.length >= 14){
return srcDate.substring(0, 4)+delimiter+srcDate.substring(4, 6)+delimiter+srcDate.substring(6, 8) return srcDate.substring(0, 4)+delimiter+srcDate.substring(4, 6)+delimiter+srcDate.substring(6, 8)
+ ' ' + srcDate.substring(8, 10) + ':' + srcDate.substring(10, 12) + ':' + srcDate.substring(12); + ' ' + srcDate.substring(8, 10) + ':' + srcDate.substring(10, 12) + ':' + srcDate.substring(12, 14);
}else{ }else{
return srcDate; return srcDate;
} }
} }
const setDateFmt = (srcDate, delimiter = '-') => { const setDateFmt = (srcDateStr, delimiter = '-') => {
let srcDate = srcDateStr.replace(/\-|\s|\:|\./g,'');
if(srcDate.length >= 8) { if(srcDate.length >= 8) {
return srcDate.substring(0, 4)+delimiter+srcDate.substring(4, 6)+delimiter+srcDate.substring(6, 8); return srcDate.substring(0, 4)+delimiter+srcDate.substring(4, 6)+delimiter+srcDate.substring(6, 8);
}else{ }else{

Loading…
Cancel
Save