From bb38940c2efba9b6576d6a600b8807d66bd6a031 Mon Sep 17 00:00:00 2001 From: minuk926 Date: Fri, 30 Dec 2022 17:28:55 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=84=B8=EC=85=98=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80-=EC=8B=9C=EC=8A=A4=ED=85=9C=EC=BD=94?= =?UTF-8?q?=EB=93=9C(orgnztId=20-=20sysCode),=20=EC=A1=B0=EC=A7=81?= =?UTF-8?q?=EC=BD=94=EB=93=9C(pstinstCode=20-=20insttCode)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/biz/cmm/model/XitLoginVO.java | 16 ++++- .../biz/cmm/model/XitOrgnztInfoVO.java | 41 +++++------- .../service/impl/XitFrameCrudServiceImpl.java | 8 +-- .../service/impl/XitFrameUnitServiceImpl.java | 4 +- .../cmm/service/impl/XitSessionMapping.java | 6 +- .../biz/mng/user/model/XitUserInfoVO.java | 4 +- .../spring/service/context-security.xml | 4 +- src/main/resources/sql/DML.sql | 64 +++++++++++++++++++ .../cmm/XitFrameCrud-mysql-mapper.xml | 16 ++--- 9 files changed, 118 insertions(+), 45 deletions(-) diff --git a/src/main/java/kr/xit/framework/biz/cmm/model/XitLoginVO.java b/src/main/java/kr/xit/framework/biz/cmm/model/XitLoginVO.java index 652d8f3b..0582d1d6 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/model/XitLoginVO.java +++ b/src/main/java/kr/xit/framework/biz/cmm/model/XitLoginVO.java @@ -41,7 +41,9 @@ public class XitLoginVO implements Serializable{ private String passwordCnsr; /** 사용자구분 */ private String userSe; - /** 조직ID */ + /** + * 조직ID - 시스템코드(sysCode) + * */ private String orgnztId; /** 조직명 */ private String orgnztNm; @@ -53,8 +55,15 @@ public class XitLoginVO implements Serializable{ private String ip; /** GPKI인증 DN */ private String dn; - /** 그룹 ID */ + /** + * 그룹 ID + * */ private String groupId; + + /** + * 소속기관 코드 - 업무그룹(instt_code) + */ + private String pstinstCode; /** 업무 데이터 권한 */ private String jobDataAuthor; /** 사용자 관리 권한 */ @@ -91,6 +100,7 @@ public class XitLoginVO implements Serializable{ this.orgnztId = "-"; this.orgnztNm = "-"; this.groupId = vo.getGroupId(); + this.pstinstCode = "-"; this.uniqId = vo.getEsntlId(); this.jobDataAuthor = "-"; this.userManageAuthor = "-"; @@ -109,6 +119,7 @@ public class XitLoginVO implements Serializable{ this.orgnztId = "-"; this.orgnztNm = "-"; this.groupId = vo.getGroupId(); + this.pstinstCode = "-"; this.uniqId = vo.getEsntlId(); this.jobDataAuthor = "-"; this.userManageAuthor = "-"; @@ -127,6 +138,7 @@ public class XitLoginVO implements Serializable{ this.orgnztId = vo.getOrgnztId(); this.orgnztNm = vo.getOrgnztNm(); this.groupId = vo.getGroupId(); + this.pstinstCode = vo.getPstinstCode(); this.uniqId = vo.getEsntlId(); this.jobDataAuthor = vo.getJobDataAuthor(); this.userManageAuthor = vo.getUserManageAuthor(); diff --git a/src/main/java/kr/xit/framework/biz/cmm/model/XitOrgnztInfoVO.java b/src/main/java/kr/xit/framework/biz/cmm/model/XitOrgnztInfoVO.java index 2bb0a9d0..1dab30c3 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/model/XitOrgnztInfoVO.java +++ b/src/main/java/kr/xit/framework/biz/cmm/model/XitOrgnztInfoVO.java @@ -1,6 +1,11 @@ package kr.xit.framework.biz.cmm.model; -import kr.xit.framework.core.model.BaseVO; +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; /** * @@ -12,7 +17,13 @@ import kr.xit.framework.core.model.BaseVO; * @since 2002. 2. 2. * @version 1.0 Copyright(c) XIT All rights reserved. */ -public class XitOrgnztInfoVO extends BaseVO { +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode +@ToString +public class XitOrgnztInfoVO { /** * serialVersionUID @@ -20,28 +31,8 @@ public class XitOrgnztInfoVO extends BaseVO { private static final long serialVersionUID = 2971244133704702294L; - protected String orgnzt_id; //조직 id - protected String orgnzt_nm; //조직 명 - protected String orgnzt_dc; //조직 설명 - - - public String getOrgnzt_id() { - return orgnzt_id; - } - public void setOrgnzt_id(String orgnzt_id) { - this.orgnzt_id = orgnzt_id; - } - public String getOrgnzt_nm() { - return orgnzt_nm; - } - public void setOrgnzt_nm(String orgnzt_nm) { - this.orgnzt_nm = orgnzt_nm; - } - public String getOrgnzt_dc() { - return orgnzt_dc; - } - public void setOrgnzt_dc(String orgnzt_dc) { - this.orgnzt_dc = orgnzt_dc; - } + private String orgnztId; //조직 id + private String orgnztNm; //조직 명 + private String orgnztDc; //조직 설명 } diff --git a/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameCrudServiceImpl.java b/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameCrudServiceImpl.java index bb86d693..5a9b00a1 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameCrudServiceImpl.java +++ b/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameCrudServiceImpl.java @@ -3248,7 +3248,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{ * 필수조건 확인 */ String emsg = null; - if(XitCmmnUtil.isEmpty(vo.getOrgnzt_id())) + if(XitCmmnUtil.isEmpty(vo.getOrgnztId())) emsg = String.format("(%s)조직ID(은)는 필수조건 입니다.", table); if(emsg!=null){ logger.error(emsg); @@ -3279,7 +3279,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{ * 필수조건 확인 */ String emsg = null; - if(XitCmmnUtil.isEmpty(vo.getOrgnzt_id())) + if(XitCmmnUtil.isEmpty(vo.getOrgnztId())) emsg = String.format("(%s)조직ID(은)는 필수조건 입니다.", table); if(emsg!=null){ logger.error(emsg); @@ -3312,7 +3312,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{ * 필수조건 확인 */ String emsg = null; - if(XitCmmnUtil.isEmpty(vo.getOrgnzt_id())) + if(XitCmmnUtil.isEmpty(vo.getOrgnztId())) emsg = String.format("(%s)조직ID(은)는 필수조건 입니다.", table); if(emsg!=null){ logger.error(emsg); @@ -3345,7 +3345,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{ * 필수조건 확인 */ String emsg = null; - if(XitCmmnUtil.isEmpty(vo.getOrgnzt_id())) + if(XitCmmnUtil.isEmpty(vo.getOrgnztId())) emsg = String.format("(%s)조직ID(은)는 필수조건 입니다.", table); if(emsg!=null){ logger.error(emsg); diff --git a/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameUnitServiceImpl.java b/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameUnitServiceImpl.java index 3e0327eb..ecdc903d 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameUnitServiceImpl.java +++ b/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameUnitServiceImpl.java @@ -121,10 +121,10 @@ public class XitFrameUnitServiceImpl implements XitFrameUnitService { loginVO.convertToLoginVO(userUsrVO); // 조직id명 설정 XitOrgnztInfoVO orgnztInfoVO = new XitOrgnztInfoVO(); - orgnztInfoVO.setOrgnzt_id(userUsrVO.getOrgnztId()); + orgnztInfoVO.setOrgnztId(userUsrVO.getOrgnztId()); orgnztInfoVO = xitFrameCrudService.findXitOrgnztInfo(orgnztInfoVO); if (XitCmmnUtil.notEmpty(orgnztInfoVO)) - loginVO.setOrgnztNm(orgnztInfoVO.getOrgnzt_nm()); + loginVO.setOrgnztNm(orgnztInfoVO.getOrgnztNm()); } break; default: diff --git a/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitSessionMapping.java b/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitSessionMapping.java index dabd2a1a..094bb7ba 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitSessionMapping.java +++ b/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitSessionMapping.java @@ -52,6 +52,8 @@ public class XitSessionMapping extends EgovUsersByUsernameMapping { String strUserSe = rs.getString("user_se"); String strUserEmail = rs.getString("user_email"); String strOrgnztId = rs.getString("orgnzt_id"); + String strGroupId = rs.getString("group_id"); + String strPstinstCode = rs.getString("pstinst_code"); String strOrgnztNm = rs.getString("orgnzt_nm"); String strUniqId = rs.getString("esntl_id"); String strJobDataAuthor = rs.getString("job_data_author"); @@ -70,9 +72,11 @@ public class XitSessionMapping extends EgovUsersByUsernameMapping { loginVO.setName(strUserNm); //이름 loginVO.setUserSe(strUserSe); //사용자구분 loginVO.setEmail(strUserEmail); //이메일주소 - loginVO.setOrgnztId(strOrgnztId); //조직(부서)ID + loginVO.setOrgnztId(strOrgnztId); //조직(부서)ID - (시스템코드-sysCode) loginVO.setOrgnztNm(strOrgnztNm); //조직(부서)ID 명 loginVO.setUniqId(strUniqId); //고유아이디 + loginVO.setGroupId(strGroupId); //그룹 + loginVO.setPstinstCode(strPstinstCode); //소속기관-업무그룹(instt_code) loginVO.setJobDataAuthor(strJobDataAuthor); //업무 데이터 권한 loginVO.setUserManageAuthor(strUserManageAuthor); //사용자 관리 권한 loginVO.setElctrnsanctnUseAt(strElctrnsanctnUseAt); //전자결재 사용 여부 diff --git a/src/main/java/kr/xit/framework/biz/mng/user/model/XitUserInfoVO.java b/src/main/java/kr/xit/framework/biz/mng/user/model/XitUserInfoVO.java index c59ecaaa..466b8a0f 100644 --- a/src/main/java/kr/xit/framework/biz/mng/user/model/XitUserInfoVO.java +++ b/src/main/java/kr/xit/framework/biz/mng/user/model/XitUserInfoVO.java @@ -51,8 +51,8 @@ public class XitUserInfoVO extends XitUserEtcOptionVO { protected String emailAdres; //이메일 주소 protected String ofcpsNm; //직위 명 protected String houseMiddleTelno; //주택 중간 전화번호 - protected String groupId; //그룹 id - protected String pstinstCode; //소속기관 코드 + protected String groupId; //그룹 id - 업무그룹(instt_code) + protected String pstinstCode; //소속기관 코드 - 시스템코드(sysCode) protected String userSttusCode; //사용자 상태 코드 protected String esntlId; //고유 id protected String crtfcDnValue; //인증 dn 값 diff --git a/src/main/resources/spring/service/context-security.xml b/src/main/resources/spring/service/context-security.xml index 2ade0d19..0a74e504 100644 --- a/src/main/resources/spring/service/context-security.xml +++ b/src/main/resources/spring/service/context-security.xml @@ -105,7 +105,9 @@ , USER_EMAIL , USER_SE , ORGNZT_ID - , ESNTL_ID + , ESNTL_ID + , GROUP_ID + , PSTINST_CODE , ORGNZT_NM , JOB_DATA_AUTHOR , USER_MANAGE_AUTHOR diff --git a/src/main/resources/sql/DML.sql b/src/main/resources/sql/DML.sql index 57879b3a..90a531fb 100644 --- a/src/main/resources/sql/DML.sql +++ b/src/main/resources/sql/DML.sql @@ -25,3 +25,67 @@ BEGIN RETURN RTN_VAL; END ; + + + + +CREATE DEFINER = root@`%` VIEW xit_vw_user_mastr AS +SELECT `xplatform`.`xit_gnrl_mber`.`ESNTL_ID` AS `ESNTL_ID`, + `xplatform`.`xit_gnrl_mber`.`MBER_ID` AS `USER_ID`, + `xplatform`.`xit_gnrl_mber`.`PASSWORD` AS `PASSWORD`, + `xplatform`.`xit_gnrl_mber`.`MBER_NM` AS `USER_NM`, + `xplatform`.`xit_gnrl_mber`.`ZIP` AS `USER_ZIP`, + `xplatform`.`xit_gnrl_mber`.`ADRES` AS `USER_ADRES`, + `xplatform`.`xit_gnrl_mber`.`MBER_EMAIL_ADRES` AS `USER_EMAIL`, + ' ' AS `GROUP_ID`, + 'GNR' AS `USER_SE`, + ' ' AS `ORGNZT_ID`, + ' ' AS `PSTINST_CODE`, + ' ' AS `ORGNZT_NM`, + ' ' AS `JOB_DATA_AUTHOR`, + ' ' AS `USER_MANAGE_AUTHOR`, + ' ' AS `ELCTRNSANCTN_USE_AT`, + ' ' AS `JOB_CONFM_AUTHOR_AT` +FROM `xplatform`.`xit_gnrl_mber` +UNION ALL +SELECT `a`.`ESNTL_ID` AS `ESNTL_ID`, + `a`.`USER_ID` AS `USER_ID`, + `a`.`PASSWORD` AS `PASSWORD`, + `a`.`USER_NM` AS `USER_NM`, + `a`.`ZIP` AS `ZIP`, + `a`.`HOUSE_ADRES` AS `HOUSE_ADRES`, + `a`.`EMAIL_ADRES` AS `EMAIL_ADRES`, + `a`.`GROUP_ID` AS `GROUP_ID`, + 'USR' AS `USER_SE`, + `a`.`orgnzt_id` AS `ORGNZT_ID`, + `a`.`pstinst_code` AS `PSTINST_CODE`, + (SELECT `sa`.`ORGNZT_NM` + FROM `xplatform`.`xit_orgnzt_info` `sa` + WHERE `sa`.`ORGNZT_ID` = `a`.`orgnzt_id`) AS `ORGNZT_NM`, + `b`.`JOB_DATA_AUTHOR` AS `JOB_DATA_AUTHOR`, + `b`.`USER_MANAGE_AUTHOR` AS `USER_MANAGE_AUTHOR`, + `b`.`ELCTRNSANCTN_USE_AT` AS `ELCTRNSANCTN_USE_AT`, + `b`.`JOB_CONFM_AUTHOR_AT` AS `JOB_CONFM_AUTHOR_AT` +FROM (`xplatform`.`xit_user_info` `a` LEFT JOIN `xplatform`.`xit_user_etc_option` `b` +ON (`a`.`USER_ID` = `b`.`USER_ID`)) +UNION ALL +SELECT `xplatform`.`xit_entrprs_mber`.`ESNTL_ID` AS `ESNTL_ID`, + `xplatform`.`xit_entrprs_mber`.`ENTRPRS_MBER_ID` AS `USER_ID`, + `xplatform`.`xit_entrprs_mber`.`ENTRPRS_MBER_PASSWORD` AS `ENTRPRS_MBER_PASSWORD`, + `xplatform`.`xit_entrprs_mber`.`CMPNY_NM` AS `CMPNY_NM`, + `xplatform`.`xit_entrprs_mber`.`ZIP` AS `ZIP`, + `xplatform`.`xit_entrprs_mber`.`ADRES` AS `ADRES`, + `xplatform`.`xit_entrprs_mber`.`APPLCNT_EMAIL_ADRES` AS `APPLCNT_EMAIL_ADRES`, + ' ' AS `GROUP_ID`, + 'ENT' AS `USER_SE`, + ' ' AS `ORGNZT_ID`, + ' ' AS `PSTINST_CODE`, + ' ' AS `ORGNZT_NM`, + ' ' AS `JOB_DATA_AUTHOR`, + ' ' AS `USER_MANAGE_AUTHOR`, + ' ' AS `ELCTRNSANCTN_USE_AT`, + ' ' AS `JOB_CONFM_AUTHOR_AT` +FROM `xplatform`.`xit_entrprs_mber`; + + + diff --git a/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-mysql-mapper.xml index 79087513..594aaca4 100644 --- a/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-mysql-mapper.xml @@ -1809,9 +1809,9 @@ ,ORGNZT_DC FROM XIT_ORGNZT_INFO WHERE 1=1 - AND ORGNZT_ID = #{orgnzt_id} - AND ORGNZT_NM = #{orgnzt_nm} - AND ORGNZT_DC = #{orgnzt_dc} + AND ORGNZT_ID = #{orgnztId} + AND ORGNZT_NM = #{orgnztNm} + AND ORGNZT_DC = #{orgnztDc} /** addXitOrgnztInfo */ @@ -1841,17 +1841,17 @@ /** 조직정보 수정 */ UPDATE XIT_ORGNZT_INFO SET - ORGNZT_NM = IFNULL(#{orgnzt_nm}, ORGNZT_NM) - ,ORGNZT_DC = #{orgnzt_dc} + ORGNZT_NM = IFNULL(#{orgnztNm}, ORGNZT_NM) + ,ORGNZT_DC = #{orgnztDc} WHERE 1=1 - AND ORGNZT_ID = #{orgnzt_id} + AND ORGNZT_ID = #{orgnztId} /** removeXitOrgnztInfo */ /** 조직정보 삭제 */ DELETE FROM XIT_ORGNZT_INFO WHERE 1=1 - AND ORGNZT_ID = #{orgnzt_id} + AND ORGNZT_ID = #{orgnztId}