부서관련 조회조건 수정

master
mjkhan21 5 months ago
parent d07b60bd6a
commit 13d701f391

@ -25,8 +25,8 @@
<result property="positionName" column="POS_NM"/> <result property="positionName" column="POS_NM"/>
<result property="groupID" column="GRP_ID"/> <result property="groupID" column="GRP_ID"/>
<result property="orgID" column="ORG_ID"/> <result property="orgID" column="ORG_ID"/>
<result property="deptCode" column="DEPT_CD"/>
<result property="institute" column="NSTT_CD"/> <result property="institute" column="NSTT_CD"/>
<result property="deptCode" column="DEPT_CD"/>
<result property="certificateDn" column="CRTFC_DN"/> <result property="certificateDn" column="CRTFC_DN"/>
<result property="locked" column="LOCK_YN"/> <result property="locked" column="LOCK_YN"/>
<result property="lockCount" column="LOCK_CNT"/> <result property="lockCount" column="LOCK_CNT"/>
@ -60,7 +60,7 @@ SELECT USER_ID
, POS_NM , POS_NM
, GRP_ID , GRP_ID
, ORG_ID , ORG_ID
, DEPT_CD , A.DEPT_CD
, NSTT_CD , NSTT_CD
, CRTFC_DN , CRTFC_DN
, LOCK_YN , LOCK_YN
@ -68,7 +68,16 @@ SELECT USER_ID
, LOCK_DT , LOCK_DT
, REG_DT , REG_DT
, STTS , STTS
FROM TB_USER , INST_NM
, DEPT_NM
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><if test="by != null and term != null">AND ${by} LIKE CONCAT('%', #{term}, '%')</if> <where><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>
<if test="status == null and userIDs == null">AND STTS != 'D'</if> <if test="status == null and userIDs == null">AND STTS != 'D'</if>
@ -114,6 +123,7 @@ INSERT INTO TB_USER (
, GRP_ID , GRP_ID
, ORG_ID , ORG_ID
, NSTT_CD , NSTT_CD
, DEPT_CD
, CRTFC_DN , CRTFC_DN
, LOCK_YN , LOCK_YN
, LOCK_CNT , LOCK_CNT
@ -147,6 +157,7 @@ INSERT INTO TB_USER (
, #{groupID} , #{groupID}
, #{orgID} , #{orgID}
, #{institute} , #{institute}
, #{deptCode}
, #{certificateDn} , #{certificateDn}
, 'N' , 'N'
, 0 , 0
@ -180,6 +191,7 @@ UPDATE TB_USER SET
, GRP_ID = #{groupID} , GRP_ID = #{groupID}
, ORG_ID = #{orgID} , ORG_ID = #{orgID}
, NSTT_CD = #{institute} , NSTT_CD = #{institute}
, DEPT_CD = #{deptCode}
, CRTFC_DN = #{certificateDn} , CRTFC_DN = #{certificateDn}
, STTS = #{status} , STTS = #{status}
, MDFCN_DT =<include refid="utility.now" /> , MDFCN_DT =<include refid="utility.now" />

Loading…
Cancel
Save