|
|
@ -41,49 +41,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectUsers">
|
|
|
|
<sql id="selectUsers">
|
|
|
|
<include refid="utility.paging-prefix" />
|
|
|
|
<include refid="utility.paging-prefix" />
|
|
|
|
SELECT USER_ID
|
|
|
|
SELECT A.USER_ID
|
|
|
|
, USER_ACNT
|
|
|
|
, A.USER_ACNT
|
|
|
|
, USER_NM
|
|
|
|
, A.USER_NM
|
|
|
|
, PASSWD_HINT
|
|
|
|
, A.PASSWD_HINT
|
|
|
|
, PASSWD_NSR
|
|
|
|
, A.PASSWD_NSR
|
|
|
|
, EMP_NO
|
|
|
|
, A.EMP_NO
|
|
|
|
, RSDNT_NO
|
|
|
|
, A.RSDNT_NO
|
|
|
|
, GENDER
|
|
|
|
, A.GENDER
|
|
|
|
, BRDT
|
|
|
|
, A.BRDT
|
|
|
|
, AREA_NO
|
|
|
|
, A.AREA_NO
|
|
|
|
, ZIP
|
|
|
|
, A.ZIP
|
|
|
|
, ADDR
|
|
|
|
, A.ADDR
|
|
|
|
, DADDR
|
|
|
|
, A.DADDR
|
|
|
|
, TELNO
|
|
|
|
, A.TELNO
|
|
|
|
, MBL_TELNO
|
|
|
|
, A.MBL_TELNO
|
|
|
|
, FXNO
|
|
|
|
, A.FXNO
|
|
|
|
, EML_ADRS
|
|
|
|
, A.EML_ADRS
|
|
|
|
, POS_NM
|
|
|
|
, A.POS_NM
|
|
|
|
, GRP_ID
|
|
|
|
, A.GRP_ID
|
|
|
|
, ORG_ID
|
|
|
|
, A.ORG_ID
|
|
|
|
, (SELECT SGG_NM FROM TB_SGG WHERE SGG_CD = A.ORG_ID) AS SGG_NM
|
|
|
|
, A.CRTFC_DN
|
|
|
|
, DEPT_CD
|
|
|
|
, A.LOCK_YN
|
|
|
|
, (CASE
|
|
|
|
, A.LOCK_CNT
|
|
|
|
WHEN A.DEPT_CD = 'default'
|
|
|
|
, A.LOCK_DT
|
|
|
|
THEN '기본 부서'
|
|
|
|
, A.REG_DT
|
|
|
|
ELSE (SELECT DEPT_NM FROM TB_DEPT WHERE DEPT_CD = A.DEPT_CD)
|
|
|
|
, A.STTS
|
|
|
|
END
|
|
|
|
, (SELECT GET_CODE_NM('CMN004', A.STTS) FROM DUAL) AS STTS_NM
|
|
|
|
) AS DEPT_NM
|
|
|
|
, A.NSTT_CD AS NSTT_CD
|
|
|
|
, NSTT_CD
|
|
|
|
, (CASE WHEN A.NSTT_CD = 'default' THEN '기본 기관' ELSE B.INST_NM END) AS NSTT_NM
|
|
|
|
, (CASE
|
|
|
|
, A.NSTT_CD AS INST_CD
|
|
|
|
WHEN A.NSTT_CD = 'default'
|
|
|
|
, (CASE WHEN A.NSTT_CD = 'default' THEN '기본 기관' ELSE B.INST_NM END) AS INST_NM
|
|
|
|
THEN '기본 기관'
|
|
|
|
, A.DEPT_CD AS DEPT_CD
|
|
|
|
ELSE (SELECT INST_NM FROM TB_SGG WHERE INST_CD = A.NSTT_CD AND SGG_CD = A.ORG_ID)
|
|
|
|
, (CASE WHEN A.DEPT_CD = 'default' THEN '기본 부서' ELSE B.DEPT_NM END) AS DEPT_NM
|
|
|
|
END
|
|
|
|
, B.SGG_CD AS SGG_CD
|
|
|
|
) AS NSTT_NM
|
|
|
|
, B.SGG_NM AS SGG_NM
|
|
|
|
, CRTFC_DN
|
|
|
|
|
|
|
|
, LOCK_YN
|
|
|
|
|
|
|
|
, LOCK_CNT
|
|
|
|
|
|
|
|
, LOCK_DT
|
|
|
|
|
|
|
|
, REG_DT
|
|
|
|
|
|
|
|
, STTS
|
|
|
|
|
|
|
|
, (SELECT GET_CODE_NM('CMN004', STTS) FROM DUAL) AS STTS_NM
|
|
|
|
|
|
|
|
FROM TB_USER A
|
|
|
|
FROM TB_USER A
|
|
|
|
|
|
|
|
LEFT OUTER JOIN (
|
|
|
|
|
|
|
|
SELECT A.SGG_CD, SGG_NM, A.INST_CD, INST_NM, DEPT_CD, DEPT_NM
|
|
|
|
|
|
|
|
FROM TB_SGG A LEFT OUTER JOIN TB_DEPT B
|
|
|
|
|
|
|
|
ON A.SGG_CD = B.SGG_CD
|
|
|
|
|
|
|
|
AND A.INST_CD = B.INST_CD
|
|
|
|
|
|
|
|
AND A.USE_YN = 'Y' AND B.USE_YN = 'Y'
|
|
|
|
|
|
|
|
) B ON A.NSTT_CD = B.INST_CD AND A.DEPT_CD = B.DEPT_CD
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="by != null and term != null">AND ${by} LIKE CONCAT('%', #{term}, '%')</if>
|
|
|
|
<if test="by != null and term != null">AND ${by} LIKE CONCAT('%', #{term}, '%')</if>
|
|
|
|
<if test="userIDs != null">USER_ID IN (<foreach collection="userIDs" item="userID" separator=",">#{userID}</foreach>)</if>
|
|
|
|
<if test="userIDs != null">USER_ID IN (<foreach collection="userIDs" item="userID" separator=",">#{userID}</foreach>)</if>
|
|
|
|