diff --git a/src/main/resources/sql/mapper/base/actiongroup-mapper.xml b/src/main/resources/sql/mapper/base/actiongroup-mapper.xml new file mode 100644 index 00000000..f42bb2ee --- /dev/null +++ b/src/main/resources/sql/mapper/base/actiongroup-mapper.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + +SELECT A.* + FROM TB_ACTION_GRP A + +AND GRP_ID IN (#{groupID}) +AND ${by} LIKE CONCAT('%', #{term}, '%') + + + + + + + +/* 기능그룹 등록(actionGroupMapper.insertGroup) */ +INSERT INTO TB_ACTION_GRP ( + GRP_ID + , GRP_NM + , DSCRP + , REG_DT +) VALUES ( + #{id} + , #{name} + , #{description} + , +) + +/* 기능그룹 수정(actionGroupMapper.updateGroup) */ +UPDATE TB_ACTION_GRP SET + GRP_NM = #{name} + , DSCRP = #{description} + WHERE GRP_ID = #{id} + +/* 기능그룹 삭제(actionGroupMapper.removeGroups) */ +DELETE FROM TB_ACTION_GRP + WHERE GRP_ID IN (#{groupID}) + + + +/* 그룹별 기능 추가(actionGroupMapper.addActions) */ +INSERT INTO TB_GRP_ACTION (GRP_ID, ACTION, REG_DT, RGTR) +SELECT GRP_ID, ACTION,, #{currentUser.id} + FROM ( + SELECT #{groupID} GRP_ID, #{action} ACTION FROM DUAL + ) A + WHERE NOT EXISTS ( + SELECT GRP_ID, ACTION + FROM TB_GRP_ACTION B + WHERE B.GRP_ID = A.GRP_ID + AND B.ACTION = A.ACTION + ) + +/* 그룹별 기능 삭제(actionGroupMapper.removeActions) */ +DELETE FROM TB_GRP_ACTION + +AND GRP_ID IN (#{groupID}) +AND ACTION IN (#{action}) + + + + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/authority-mapper.xml b/src/main/resources/sql/mapper/base/authority-mapper.xml new file mode 100644 index 00000000..184312f3 --- /dev/null +++ b/src/main/resources/sql/mapper/base/authority-mapper.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + +SELECT * FROM ( + SELECT 0 AUTH_TYPE, 'ROLE_ADMIN' AUTH_ID, '시스템 관리자' AUTH_NM, '시스템 관리자' DSCRP, 'all' INF_SCP, 'all' USER_INF_SCP,REG_DT UNION + SELECT 1 AUTH_TYPE, 'ROLE_ANONYMOUS' AUTH_ID, '익명 사용자' AUTH_NM, '모든 사용자' DSCRP, 'none' INF_SCP, 'none' USER_INF_SCP,REG_DT UNION + SELECT 1 AUTH_TYPE, 'ROLE_USER' AUTH_ID, '시스템 사용자' AUTH_NM, '로그인한 사용자' DSCRP, 'self' INF_SCP, 'self' USER_INF_SCP,REG_DT UNION + SELECT 2 AUTH_TYPE, AUTH_ID, AUTH_NM, DSCRP, INF_SCP, USER_INF_SCP, REG_DT + FROM TB_AUTHORITY +) A + +AND AUTH_ID IN (#{authID}) +AND ${by} LIKE CONCAT('%', #{term}, '%') + + + + + + + + +/* 권한 등록(authorityMapper.insertAuthority) */ +INSERT INTO TB_AUTHORITY ( + AUTH_ID + , AUTH_NM + , DSCRP + , INF_SCP + , USER_INF_SCP + , REG_DT +) VALUES ( + #{id} + , #{name} + , #{description} + , #{infoScope} + , #{userInfoScope} + , +) + +/* 권한 수정(authorityMapper.updateAuthority) */ +UPDATE TB_AUTHORITY SET + AUTH_NM = #{name} + , DSCRP = #{description} + , INF_SCP = #{infoScope} + , USER_INF_SCP = #{userInfoScope} + WHERE AUTH_ID = #{id} + +/* 권한 삭제(authorityMapper.removeAuthorities) */ +DELETE FROM TB_AUTHORITY + WHERE AUTH_ID IN (#{authID}) + + + +/* 권한-기능그룹 추가(authorityMapper.addActionGroups) */ +INSERT INTO TB_AUTH_ACTION (AUTH_ID, GRP_ID, REG_DT) +SELECT AUTH_ID, GRP_ID, + FROM ( + SELECT #{authID} AUTH_ID, #{groupID} GRP_ID FROM DUAL + ) A + WHERE NOT EXISTS ( + SELECT AUTH_ID, GRP_ID + FROM TB_AUTH_ACTION B + WHERE B.AUTH_ID = A.AUTH_ID + AND B.GRP_ID = A.GRP_ID + ) + +/* 권한-기능그룹 삭제(authorityMapper.removeActionGroups) */ +DELETE FROM TB_AUTH_ACTION + +AND AUTH_ID IN (#{authID}) +AND GRP_ID IN (#{groupID}) + + + + + + + +SELECT * + FROM TB_AUTH_USER +WHERE AUTH_ID IN (#{authID}) +WHERE USER_ID IN (#{userID}) + + + + + + + +/* 권한-사용자 추가(authorityMapper.addUsers) */ +INSERT INTO TB_AUTH_USER (AUTH_ID, USER_ID, REG_DT) +SELECT AUTH_ID, USER_ID, + FROM ( + SELECT #{authID} AUTH_ID, #{userID} USER_ID FROM DUAL + ) A + WHERE NOT EXISTS ( + SELECT AUTH_ID, USER_ID + FROM TB_AUTH_USER B + WHERE B.AUTH_ID = A.AUTH_ID + AND B.USER_ID = A.USER_ID + ) + +/* 권한-사용자 삭제(authorityMapper.removeUsers) */ +DELETE FROM TB_AUTH_USER + +AND AUTH_ID IN (#{authID}) +AND USER_ID IN (#{userID}) + + + + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/code-mapper.xml b/src/main/resources/sql/mapper/base/code-mapper.xml new file mode 100644 index 00000000..be27d2b6 --- /dev/null +++ b/src/main/resources/sql/mapper/base/code-mapper.xml @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +SELECT * + FROM TB_CODE_CTGR + WHERE USE_YN = 'Y' + AND CTGR_ID IN (#{categoryID}) + + + + + + + +/* 코드 카테고리 등록(codeMapper.insertCategory) */ +INSERT INTO TB_CODE_CTGR ( + CTGR_ID + , CTGR_NM + , DSCRP + , REG_DT + , RGTR + , MDFCN_DT + , MDFR + , USE_YN +) VALUES ( + #{category.id} + , #{category.name} + , #{category.description} + , + , #{currentUser.id} + , + , #{currentUser.id} + , 'Y' +) + +/* 코드 카테고리 수정(codeMapper.updateCategory) */ +UPDATE TB_CODE_CTGR SET + CTGR_NM = #{category.name} + , DSCRP = #{category.description} + , MDFCN_DT = + , MDFR = #{currentUser.id} +WHERE CTGR_ID = #{category.id} + +/* 코드 카테고리 제거(codeMapper.removeCategories) */ +UPDATE TB_CODE_CTGR SET + MDFCN_DT = + , MDFR = #{currentUser.id} + , USE_YN = 'N' +WHERE CTGR_ID IN (#{categoryID}) + + +SELECT * + FROM TB_CODE_GRP + WHERE USE_YN = 'Y' +AND CTGR_ID IN (#{categoryID}) +AND GRP_ID IN (#{groupID}) + + + + + + + +/* 코드그룹 등록(codeMapper.insertGroup) */ +INSERT INTO TB_CODE_GRP ( + GRP_ID + , GRP_NM + , CTGR_ID + , DSCRP + , REG_DT + , RGTR + , MDFCN_DT + , MDFR + , USE_YN +) VALUES ( + #{group.id} + , #{group.name} + , #{group.categoryID} + , #{group.description} + , + , #{currentUser.id} + , + , #{currentUser.id} + , 'Y' +) + +/* 코드그룹 수정(codeMapper.updateGroup) */ +UPDATE TB_CODE_GRP SET + GRP_NM = #{group.name} + , CTGR_ID = #{group.categoryID} + , DSCRP = #{group.description} + , MDFCN_DT = + , MDFR = #{currentUser.id} + WHERE GRP_ID = #{group.id} + +/*코드그룹 제거(codeMapper.removeGroups) */ +UPDATE TB_CODE_GRP SET + USE_YN = 'N' + , MDFCN_DT = + , MDFR = #{currentUser.id} + +CTGR_ID IN (#{categoryID}) +GRP_ID IN (#{groupID}) + + + +SELECT * + FROM TB_CMN_CODE + WHERE USE_YN = 'Y' + AND GRP_ID IN (#{groupID}) + AND CODE IN (#{code}) + + + + + + + +/* 코드 등록(codeMapper.insertCode) */ +INSERT INTO TB_CMN_CODE ( + GRP_ID + , CODE + , CODE_VAL + , DSCRP + , ETC_1 + , ETC_2 + , ETC_3 + , SRT_ORD + , REG_DT + , RGTR + , MDFCN_DT + , MDFR + , USE_YN +) VALUES ( + #{code.groupID} + , #{code.code} + , #{code.value} + , #{code.description} + , #{code.etc1} + , #{code.etc2} + , #{code.etc3} + , #{code.sortOrder} + , + , #{currentUser.id} + , + , #{currentUser.id} + , 'Y' +) + +/* 코드 수정(codeMapper.updateCode) */ +UPDATE TB_CMN_CODE SET + CODE_VAL = #{code.value} + , DSCRP = #{code.description} + , ETC_1 = #{code.etc1} + , ETC_2 = #{code.etc2} + , ETC_3 = #{code.etc3} + , MDFCN_DT = + , MDFR = #{currentUser.id} + WHERE GRP_ID = #{code.groupID} + AND CODE = #{code.code} + +/* 코드 정렬순서 변경(codeMapper.reorderCodes) */ +UPDATE TB_CMN_CODE SET + SRT_ORD = CASE CODE + WHEN #{code} THEN #{index} + ELSE SRT_ORD + END + , MDFCN_DT = + , MDFR = #{currentUser.id} + WHERE GRP_ID = #{groupID} + AND CODE IN (#{code}) + +/* 코드 제거(codeMapper.removeCodes) */ +UPDATE TB_CMN_CODE SET + MDFCN_DT = + , MDFR = #{currentUser.id} + , USE_YN = 'N' + +AND GRP_ID IN (#{groupID}) +AND CODE IN (#{code}) + + + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/file-mapper.xml b/src/main/resources/sql/mapper/base/file-mapper.xml new file mode 100644 index 00000000..00d066bb --- /dev/null +++ b/src/main/resources/sql/mapper/base/file-mapper.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + +SELECT INF_TYPE + , CONCAT('C://workspace/xit/base/files/', DIR, DATE_FORMAT(CURRENT_DATE, '%Y/%m/%d/')) DIR + FROM ( + SELECT '00' INF_TYPE, 'attachment/' DIR UNION + SELECT '01' INF_TYPE, 'document/' DIR UNION + SELECT '02' INF_TYPE, 'article/' DIR + ) FILE_DIRS + + + +SELECT A.*, REPLACE(FILE_PATH, 'C://workspace/xit/base', '') URL + FROM TB_FILE A + WHERE FILE_ID IN (#{fileID}) + ORDER BY FILE_ID + +SELECT A.*, REPLACE(FILE_PATH, 'C://workspace/xit/base', '') URL + FROM TB_FILE A + + AND A.INF_TYPE = #{infoType} + AND INF_KEY IN (#{infoKey}) + AND USE_YN = 'Y' + + + + + + + + + + +/* 파일 등록(fileMapper.insertFile) */ + +SELECT NEW_ID, CONCAT(DIR, NEW_ID, '.', #{file.extension}) PATH + FROM ( + SELECT IFNULL(MAX(FILE_ID) + 1, CONCAT(THIS_DAY, '00001')) NEW_ID + FROM TB_FILE A, () B + WHERE FILE_ID LIKE CONCAT(THIS_DAY, '%') + ) T1, ( + + WHERE INF_TYPE = #{file.infoType} + ) T2 +INSERT INTO TB_FILE ( + FILE_ID + , INF_TYPE + , INF_KEY + , SUB_TYPE + , FILE_NM + , FILE_PATH + , MIME_TYPE + , FILE_SIZE + , DNLD_CNT + , SRT_ORD + , RGTR + , REG_DT + , USE_YN +) VALUES ( + #{file.id} + , #{file.infoType} + , #{file.infoKey} + , #{file.subType} + , #{file.name} + , #{file.path} + , #{file.mimeType} + , #{file.size} + , #{file.downloadCount} + , #{file.sortOrder} + , #{currentUser.id} + , + , 'Y' +) + + +/* 파일 순서 변경(fileMapper.reorder) */ +UPDATE TB_FILE SET + SRT_ORD = CASE FILE_ID + WHEN #{fileID} THEN #{index} + + ELSE SRT_ORD END +WHERE FILE_ID IN (#{fileID}) + +/* 다운로드 횟수 증가(fileMapper.updateDownloadCount) */ +UPDATE TB_FILE SET + DNLD_CNT = DNLD_CNT + 1 + WHERE USE_YN = 'Y' + AND FILE_ID IN (#{fileID}) + +/* 파일 제거(fileMapper.removeFiles) */ +UPDATE TB_FILE SET + USE_YN = 'N' + WHERE USE_YN = 'Y' + AND FILE_ID IN (#{fileID}) + + AND INF_TYPE = #{infoType} + AND INF_KEY IN (#{infoKey}) + +/* 파일 삭제(fileMapper.deleteFiles) */ +DELETE FROM TB_FILE +WHERE FILE_ID IN (#{fileID}) + + + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/menu-mapper.xml b/src/main/resources/sql/mapper/base/menu-mapper.xml new file mode 100644 index 00000000..2856c0bc --- /dev/null +++ b/src/main/resources/sql/mapper/base/menu-mapper.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + +SELECT A.* + FROM TB_MENU A +WHERE MENU_NO = #{menuID} + ORDER BY PRNT_NO, SRT_ORD, MENU_NO + + + + + +/* 메뉴 등록(menuMapper.insertMenu) */ + +SELECT NEW_NO, NEW_ORD + FROM (SELECT IFNULL(MAX(MENU_NO) + 1, 0) NEW_NO FROM TB_MENU) A, + () B +INSERT INTO TB_MENU ( + MENU_NO + , MENU_NM + , PRNT_NO + , PGRM_FILE_NM + , ACTION + , DSCRP + , IMG_NM + , IMG_CNF + , SRT_ORD + , REG_DT + , RGTR +) VALUES ( + #{menu.id} + , #{menu.name} + , #{menu.parentID} + , #{menu.programFilename} + , #{menu.action} + , #{menu.description} + , #{menu.imageName} + , #{menu.imageConf} + , #{menu.sortOrder} + , + , #{currentUser.id} +) + +/* 메뉴 수정(menuMapper.updateMenu) */ +UPDATE TB_MENU SET + MENU_NM = #{menu.name} + , PGRM_FILE_NM = #{menu.programFilename} + , ACTION = #{menu.action} + , DSCRP = #{menu.description} + , IMG_NM = #{menu.imageName} + , IMG_CNF = #{menu.imageConf} +WHERE MENU_NO = #{menu.id} + +SELECT IFNULL(MAX(SRT_ORD) + 1, 0) NEW_ORD FROM TB_MENU WHERE PRNT_NO = IFNULL(#{parentID}, IFNULL(#{menu.parentID}, 0)) + +/* 메뉴 이동(menuMapper.moveMenus) */ +UPDATE TB_MENU SET + PRNT_NO = #{parentID} + , SRT_ORD = SRT_ORD + () + WHERE MENU_NO IN (#{menuID}) + + +/* 메뉴 순서 변경(menuMapper.reorderMenus) */ +UPDATE TB_MENU SET + SRT_ORD = CASE MENU_NO + WHEN #{menuID} THEN #{index} + + ELSE MENU_NO END + WHERE MENU_NO IN (#{menuID}) + +/* 메뉴 제거(menuMapper.removeMenus) */ +DELETE FROM TB_MENU + WHERE MENU_NO IN (#{menuID}) + + + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/policy-mapper.xml b/src/main/resources/sql/mapper/base/policy-mapper.xml new file mode 100644 index 00000000..ad692385 --- /dev/null +++ b/src/main/resources/sql/mapper/base/policy-mapper.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + +/* 로그인 정책 등록(policyMapper.insertPolicy) */ +INSERT INTO TB_LOGIN_POLICY ( + USER_ID + , IP_ADRS + , DPLCT_YN + , LIMIT_YN + , REG_DT + , RGTR + , MDFCN_DT + , MDFR +) VALUES ( + #{policy.userID} + , #{policy.ipAddress} + , #{policy.duplicateYN} + , #{policy.limitYN} + , + , #{currentUser.id} + , + , #{currentUser.id} +) + +/* 로그인 정책 수정(policyMapper.updatePolicy) */ +UPDATE TB_LOGIN_POLICY SET + IP_ADRS = #{policy.ipAddress} + , DPLCT_YN = #{policy.duplicateYN} + , LIMIT_YN = #{policy.limitYN} + , MDFR = #{currentUser.id} + , MDFCN_DT = +WHERE USER_ID = #{policy.userID} + +/* 로그인 정책 삭제(policyMapper.removePolicy) */ +DELETE FROM TB_LOGIN_POLICY + WHERE USER_ID IN (#{userID}) + + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/program.xml b/src/main/resources/sql/mapper/base/program.xml new file mode 100644 index 00000000..dbcfd763 --- /dev/null +++ b/src/main/resources/sql/mapper/base/program.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +SELECT A.* + FROM TB_PROGRAM A + +${by} LIKE CONCAT('%', #{term}, '%') +PGRM_FILE_NM IN (#{filename}) + + ORDER BY${by}PGRM_FILE_NM + + + + + + +/* 프로그램 등록(program.insertProgram) */ +INSERT INTO TB_PROGRAM ( + PGRM_FILE_NM + , PGRM_FILE_PATH + , PGRM_NM + , DSCRP + , URL +) VALUES ( + #{filename} + , #{location} + , #{name} + , #{description} + , #{url} +) + +/* 프로그램 수정(program.updateProgram) */ +UPDATE TB_PROGRAM SET + PGRM_FILE_PATH = #{location} + , PGRM_NM = #{name} + , DSCRP = #{description} + , URL = #{url} +WHERE PGRM_FILE_NM = #{filename} + +/* 프로그램 삭제(program.removePrograms) */ +DELETE FROM TB_PROGRAM + WHERE PGRM_FILE_NM IN (#{filename}) + +/* 프로그램 비우기(program.clearPrograms) */ +DELETE FROM TB_PROGRAM + WHERE PGRM_FILE_NM NOT IN (SELECT PGRM_FILE_NM FROM TB_MENU) + + +SELECT A.* + FROM TB_PGRM_CHNG_REQ A + +REQ_DT >= #{fromReqDate} +REQ_DT <= #{toReqDate} +${by} LIKE CONCAT('%', #{term}, '%') +PGRM_FILE_NAME IN (#{filename}) +REQ_ID IN (#{reqID}) + + ORDER BY PGRM_FILE_NM,${by}REQ_ID DESC + + + + + +/* 프로그램 변경요청 등록(program.insertRequest) */ +INSERT INTO TB_PGRM_CHNG_REQ ( + PGRM_FILE_NM + , REQ_ID + , SUBJECT + , REQ_USER + , REQ_DT + , REQ_CNTNT + , PRSC_USER + , PRCS_DT + , PRCS_CNTNT + , PRCS_STATUS +) VALUES ( + #{filename} + , #{id} + , #{subject} + , #{requestorID} + , #{requestDate} + , #{requestDetail} + , #{processorID} + , #{processDate} + , #{processDetail} + , #{status} +) + +/* 프로그램 변경요청 수정(program.updateRequest) */ +UPDATE TB_PGRM_CHNG_REQ SET + SUBJECT = #{subject} + , REQ_USER = #{requestorID} + , REQ_DT = #{requestDate} + , REQ_CNTNT = #{requestDetail} + , PRSC_USER = #{processorID} + , PRCS_DT = #{processDate} + , PRCS_CNTNT = #{processDetail} +WHERE PGRM_FILE_NM = #{filename} +AND REQ_ID = #{id} + +/* 프로그램 변경요청 상태 변경(program.setRequestStatus) */ +UPDATE TB_PGRM_CHNG_REQ SET + PRCS_STATUS = #{status} + WHERE PGRM_FILE_NM = #{filename} + AND REQ_ID = #{id} + + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/test-mapper.xml b/src/main/resources/sql/mapper/base/test-mapper.xml new file mode 100644 index 00000000..d6741306 --- /dev/null +++ b/src/main/resources/sql/mapper/base/test-mapper.xml @@ -0,0 +1,13 @@ + + + + +${sql} + +${sql} + +${sql} + +COMMIT + + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/user-mapper.xml b/src/main/resources/sql/mapper/base/user-mapper.xml new file mode 100644 index 00000000..bc46fb60 --- /dev/null +++ b/src/main/resources/sql/mapper/base/user-mapper.xml @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +SELECT USER_ID + , USER_ACNT + , USER_NM + , PASSWD_HINT + , PASSWD_NSR + , EMP_NO + , RSDNT_NO + , GENDER + , BRDT + , AREA_NO + , ZIP + , ADDR + , DADDR + , TELNO + , MBL_TELNO + , FXNO + , EML_ADRS + , POS_NM + , GRP_ID + , ORG_ID + , DEPT_CD + , NSTT_CD + , CRTFC_DN + , LOCK_YN + , LOCK_CNT + , LOCK_DT + , REG_DT + , STTS + FROM TB_USER +AND ${by} LIKE CONCAT('%', #{term}, '%') + USER_ID IN (#{userID}) + AND STTS != 'D' + AND STTS = #{status} + + + + + + + + + + +SELECT LPAD(IFNULL(MAX(USER_ID) + 1, 1), 10, '0') NEW_ID FROM TB_USER +/* 사용자 정보 등록(userMapper.insertUser) */ +INSERT INTO TB_USER ( + USER_ID + , USER_ACNT + , USER_NM + , PASSWD + , PASSWD_HINT + , PASSWD_NSR + , EMP_NO + , RSDNT_NO + , GENDER + , BRDT + , AREA_NO + , ZIP + , ADDR + , DADDR + , TELNO + , MBL_TELNO + , FXNO + , EML_ADRS + , POS_NM + , GRP_ID + , ORG_ID + , NSTT_CD + , CRTFC_DN + , LOCK_YN + , LOCK_CNT + , LOCK_DT + , REG_DT + , RGTR + , MDFCN_DT + , MDFR + , USE_YN + , STTS +) VALUES ( + #{id} + , #{account} + , #{name} + , #{password} + , #{passwordHint} + , #{passwordHintAnswer} + , #{empNo} + , #{residentRegNo} + , #{gender} + , #{birthday} + , #{areaNo} + , #{zipCode} + , #{address} + , #{addressDetail} + , #{phoneNo} + , #{mobilePhoneNo} + , #{faxNo} + , #{emailAddress} + , #{positionName} + , #{groupID} + , #{orgID} + , #{institute} + , #{certificateDn} + , 'N' + , 0 + , NULL + , + , #{createdBy} + , + , #{createdBy} + , 'Y' + , #{status} +) + +/* 사용자 정보 수정(userMapper.updateUser) */ +UPDATE TB_USER SET + USER_NM = #{name} + , PASSWD_HINT = #{passwordHint} + , PASSWD_NSR = #{passwordHintAnswer} + , EMP_NO = #{empNo} + , RSDNT_NO = #{residentRegNo} + , GENDER = #{gender} + , BRDT = #{birthday} + , AREA_NO = #{areaNo} + , ZIP = #{zipCode} + , ADDR = #{address} + , DADDR = #{addressDetail} + , TELNO = #{phoneNo} + , MBL_TELNO = #{mobilePhoneNo} + , FXNO = #{faxNo} + , EML_ADRS = #{emailAddress} + , POS_NM = #{positionName} + , GRP_ID = #{groupID} + , ORG_ID = #{orgID} + , NSTT_CD = #{institute} + , CRTFC_DN = #{certificateDn} + , MDFCN_DT = + , MDFR = #{modifiedBy} + WHERE USER_ID = #{id} + +/* 비밀번호 변경(userMapper.changePassword) */ +UPDATE TB_USER SET + PASSWD = CASE USER_ID + WHEN #{userPassword.userID} THEN #{userPassword.password} + ELSE PASSWD END + , MDFCN_DT = + , MDFR = #{currentUser.id} + WHERE USER_ID IN (#{userID}) + + +/* 사용자 잠김 해제(userMapper.lockUsers) */ +UPDATE TB_USER SET + LOCK_YN = 'Y' + , LOCK_CNT = LOCK_CNT + 1 + , LOCK_DT = + LOCK_YN = 'N' + , LOCK_CNT = 0 + , LOCK_DT = NULL + , MDFCN_DT = + , MDFR = #{currentUser.id} + WHERE USER_ID IN (#{userID}) + + +/* 사용자 상태 변경(userMapper.setStatus) */ +UPDATE TB_USER SET + STTS = #{status} + , USE_YN = 'N' + , MDFCN_DT = + , MDFR = #{currentUser.id} + WHERE USER_ID IN (#{userID}) + AND STTS != #{status} + + + \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/utility.xml b/src/main/resources/sql/mapper/base/utility.xml index b7b73766..7748817e 100644 --- a/src/main/resources/sql/mapper/base/utility.xml +++ b/src/main/resources/sql/mapper/base/utility.xml @@ -3,30 +3,26 @@ - - + SELECT QROWS.* FROM ( SELECT ROW_NUMBER() OVER() ROW_NUM , COUNT(*) OVER() TOT_CNT, QBODY.* - FROM ( - + FROM ( - - ) QBODY + ) QBODY ) QROWS -WHERE ROW_NUM BETWEEN ((#{pageNum} - 1) * #{fetchSize}) + 1 AND (#{pageNum} * #{fetchSize}) - - +WHERE ROW_NUM BETWEEN ((#{pageNum} - 1) * #{fetchSize}) + 1 AND (#{pageNum} * #{fetchSize}) +SELECT FOUND_ROWS() TOT_CNT ORDER BY ${orderBy} -IFNULL(#{thisDay}, TO_CHAR(CURRENT_DATE, 'YYYYMMDD')) +DATE_FORMAT(CURRENT_TIMESTAMP(), '%Y%m%d%H%i%s') + +IFNULL(#{thisDay}, DATE_FORMAT(CURRENT_DATE, '%Y%m%d')) SELECTTHIS_DAY diff --git a/src/main/webapp/WEB-INF/jsp/base/actionGroup/actionGroup-info.jsp b/src/main/webapp/WEB-INF/jsp/base/actionGroup/actionGroup-info.jsp new file mode 100644 index 00000000..352694cd --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/actionGroup/actionGroup-info.jsp @@ -0,0 +1,80 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/actionGroup/actionGroup-main.jsp b/src/main/webapp/WEB-INF/jsp/base/actionGroup/actionGroup-main.jsp new file mode 100644 index 00000000..2f74539a --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/actionGroup/actionGroup-main.jsp @@ -0,0 +1,264 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> + + + +
+
+ + + +
+ + + + +
+ + +
+ <%--h4 id="pageTitle" class="fw-bold py-3 mb-4">페이지 제목 +기능 그룹 + +
+
+ +
+
+ + +
+
+ + + + +
+
+ +
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/actionGroup/select-actionGroup.jsp b/src/main/webapp/WEB-INF/jsp/base/actionGroup/select-actionGroup.jsp new file mode 100644 index 00000000..8f3ef6ac --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/actionGroup/select-actionGroup.jsp @@ -0,0 +1,121 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +기능 그룹 + +
+
+ +
+
+ + diff --git a/src/main/webapp/WEB-INF/jsp/base/authority/actionGroup-list.jsp b/src/main/webapp/WEB-INF/jsp/base/authority/actionGroup-list.jsp new file mode 100644 index 00000000..92ed2da9 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/authority/actionGroup-list.jsp @@ -0,0 +1,91 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +
+
+ + +
+
+ + + + + + + + + + + + + +
+ +
    +
+
+function removeActions() { + dialog.alert({ + content:"선택한 기능그룹을 삭제하시겠습니까?", + onOK:() => { + ${infoPrefix}Control.removeActions(); + } + }); +} + +${infoPrefix}Control.onActionListChange = obj => { + let authority = ${infoPrefix}Control.authorities.getCurrent(); + authority = authority ? authority.AUTH_NM : ""; + let ${infoPrefix}List = ${infoPrefix}Control.actions.dataset; + let empty = ${infoPrefix}List.empty; + + let trs = + ${infoPrefix}Control.authorities.isAdmin() ? [document.getElementById("adminActions").innerHTML.replace(/{authority}/, authority)] : + empty ? + [document.getElementById("actionNotFound").innerHTML] : <%-- from template#${infoPrefix}NotFound --%> + ${infoPrefix}List.inStrings(document.getElementById("actionRow").innerHTML); <%-- from template#${infoPrefix}Row --%> + $("#actionList").html(trs.join()); + $("#actionToggler").prop("checked", false); + + $("#actionPaging").setPaging({ + list:${infoPrefix}Control.actions.dataset, + prefix:${infoPrefix}Control.actions.prefix, + start:obj.actionStart, + totalSize:obj.actionTotal, + fetchSize:obj.actionFetch, + func:"${infoPrefix}Control.actions.load({index})" + }); +}; + +${infoPrefix}Control.onCurrentActionChange = item => { + if (!item) return; + + let data = item.data; + let key = data.AUTH_ID + "-" + data.GRP_ID; + $("#actionList").setCurrentRow(key); +}; + +${infoPrefix}Control.onActionSelect = selected => { + let ${infoPrefix}List = ${infoPrefix}Control.actions.dataset; + let keys = selected.map(e => ${infoPrefix}List.getKey(e)); + $("#actionList input[type='checkbox']").each(function() { + let checkbox = $(this); + checkbox.prop("checked", keys.includes(checkbox.val())); + }); + + $("#btnRemoveActions").prop("disabled", keys.length < 1); +}; \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/authority/authority-info.jsp b/src/main/webapp/WEB-INF/jsp/base/authority/authority-info.jsp new file mode 100644 index 00000000..0719816d --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/authority/authority-info.jsp @@ -0,0 +1,82 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/authority/authority-main.jsp b/src/main/webapp/WEB-INF/jsp/base/authority/authority-main.jsp new file mode 100644 index 00000000..2a914935 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/authority/authority-main.jsp @@ -0,0 +1,207 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> + + + +
+
+ + + +
+ + + + +
+ + +
+ <%--h4 id="pageTitle" class="fw-bold py-3 mb-4">페이지 제목 +권한 + +
+
+ +
+
+ + +
+
+ + + + +
+
+ +
+ +
+
+ + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/authority/user-list.jsp b/src/main/webapp/WEB-INF/jsp/base/authority/user-list.jsp new file mode 100644 index 00000000..c1ae8cdb --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/authority/user-list.jsp @@ -0,0 +1,91 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +
+
+ + +
+
+ + + + + + + + + + + + + +
+ +
    +
+
+ +function removeUsers() { + dialog.alert({ + content:"선택한 사용자를 삭제하시겠습니까?", + onOK:() => { + ${infoPrefix}Control.removeUsers(); + } + }); +} + +${infoPrefix}Control.onUserListChange = obj => { + let authority = ${infoPrefix}Control.authorities.getCurrent(); + authority = authority ? authority.AUTH_NM : ""; + let ${infoPrefix}List = ${infoPrefix}Control.users.dataset; + let empty = ${infoPrefix}List.empty; + + let trs = + ${infoPrefix}Control.authorities.isImplicit() ? [document.getElementById("implicitActions").innerHTML.replace(/{authority}/, authority)] : + empty ? [document.getElementById("userNotFound").innerHTML] : <%-- from template#${infoPrefix}NotFound --%> + ${infoPrefix}List.inStrings(document.getElementById("userRow").innerHTML); <%-- from template#${infoPrefix}Row --%> + $("#userList").html(trs.join()); + $("#userToggler").prop("checked", false); + + $("#userPaging").setPaging({ + list:${infoPrefix}Control.users.dataset, + prefix:${infoPrefix}Control.users.prefix, + start:obj.userStart, + totalSize:obj.userTotal, + fetchSize:obj.userFetch, + func:"${infoPrefix}Control.users.load({index})" + }); +}; + +${infoPrefix}Control.onCurrentUserChange = item => { + if (!item) return; + + let data = item.data; + let key = data.AUTH_ID + "-" + data.USER_ID; + $("#userList").setCurrentRow(key); +}; + +${infoPrefix}Control.onUserSelect = selected => { + let ${infoPrefix}List = ${infoPrefix}Control.users.dataset; + let keys = selected.map(e => ${infoPrefix}List.getKey(e)); + $("#userList input[type='checkbox']").each(function() { + let checkbox = $(this); + checkbox.prop("checked", keys.includes(checkbox.val())); + }); + + $("#btnRemoveUsers").prop("disabled", keys.length < 1); +}; \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/code/code-info.jsp b/src/main/webapp/WEB-INF/jsp/base/code/code-info.jsp new file mode 100644 index 00000000..e7085bb1 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/code/code-info.jsp @@ -0,0 +1,142 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +
+
+
+
+ +
+ + +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp b/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp new file mode 100644 index 00000000..6d2ace32 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp @@ -0,0 +1,269 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> + + + +
+
+ + + +
+ + + + +
+ + +
+ <%--h4 id="pageTitle" class="fw-bold py-3 mb-4">페이지 제목 +코드 그룹 + +
+
+ +
+
+ + +
+
+ + + + +
+
+ +
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/code/group-info.jsp b/src/main/webapp/WEB-INF/jsp/base/code/group-info.jsp new file mode 100644 index 00000000..5098a5c0 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/code/group-info.jsp @@ -0,0 +1,112 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/base/menu/menu-info.jsp b/src/main/webapp/WEB-INF/jsp/base/menu/menu-info.jsp new file mode 100644 index 00000000..60c9aa06 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/menu/menu-info.jsp @@ -0,0 +1,108 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +