Compare commits
No commits in common. "e9f449b0a44f4504dbca649841591c9b21eb297d" and "db98cb473f095ced41775233618870857003aa56" have entirely different histories.
e9f449b0a4
...
db98cb473f
|
|
@ -25,57 +25,83 @@
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="Log.selectUserLog" parameterType="logSearchVO" resultType="logVO">
|
<select id="Log.selectUserLog" parameterType="logSearchVO" resultType="logVO">
|
||||||
select (ROW_NUMBER() OVER()) AS RNUM,
|
<![CDATA[
|
||||||
LOG_LIST.*
|
SELECT
|
||||||
FROM (SELECT LOG.UL_USERID AS USERID,
|
LOG_LIST.*
|
||||||
LOG.UL_NAME AS NAME,
|
FROM
|
||||||
LOG.UL_LOCATION1 AS LOCATION1,
|
(
|
||||||
LOG.UL_LOCATION2 AS LOCATION2,
|
SELECT
|
||||||
LOG.UL_LOCATION3 AS LOCATION3,
|
ROWNUM RNUM, LOG_LIST.*
|
||||||
TO_CHAR(LOG.UL_REGDATE, 'YYYY-MM-DD HH24:MI:SS') AS REGDATE,
|
FROM
|
||||||
LOG.UL_USER_IP AS IP,
|
( SELECT
|
||||||
LOG.UL_POSITION AS POSITION_CODE,
|
LOG.UL_USERID AS USERID, LOG.UL_NAME AS NAME, LOG.UL_LOCATION1 AS LOCATION1, LOG.UL_LOCATION2 AS LOCATION2, LOG.UL_LOCATION3 AS LOCATION3,
|
||||||
CODE.CODENM AS POSITION
|
TO_CHAR(LOG.UL_REGDATE, 'YYYY-MM-DD HH24:MI:SS') AS REGDATE, LOG.UL_USER_IP AS IP, LOG.UL_POSITION AS POSITION_CODE, CODE.CODENM AS POSITION
|
||||||
FROM H3_USER_LOG LOG
|
FROM
|
||||||
inner join TCODE CODE on LOG.UL_POSITION = CODE.CODE2 and CODE.CODE1 = 'C002'
|
H3_USER_LOG LOG, TCODE CODE
|
||||||
<where>
|
WHERE
|
||||||
<if test="sdate != null and sdate != '' and edate != null and edate != ''">
|
LOG.UL_POSITION = CODE.CODE2
|
||||||
AND UL_REGDATE >= (#{sdate} || ' 00:00:00')::date
|
AND CODE.CODE1 = 'C002' ]]>
|
||||||
AND UL_REGDATE <= (#{edate} || ' 23:59:59')::date
|
<if test="sdate != null and sdate != '' and edate != null and edate != ''"><![CDATA[
|
||||||
</if>
|
AND UL_REGDATE >= #{sdate} || ' 00:00:00'
|
||||||
<if test="place1 != null and place1 != ''">
|
AND UL_REGDATE <= #{edate} || ' 23:59:59' ]]>
|
||||||
AND UL_PLACE1 = #{place1}
|
</if>
|
||||||
</if>
|
<if test="place1 != null and place1 != ''">
|
||||||
</where>
|
AND UL_PLACE1 = #{place1}
|
||||||
ORDER BY UL_REGDATE <if test="order != 0">DESC</if>
|
</if>
|
||||||
limit #{recordCountPerPage} offset #{firstIndex}
|
<if test="name != null and name != ''">
|
||||||
) LOG_LIST
|
AND UL_NAME LIKE '%' || #{name} || '%'
|
||||||
|
</if>
|
||||||
|
<![CDATA[ ORDER BY
|
||||||
|
UL_REGDATE ]]> <if test="order != 0">DESC</if> <![CDATA[
|
||||||
|
) LOG_LIST
|
||||||
|
WHERE ROWNUM <= #{firstIndex} + #{recordCountPerPage}
|
||||||
|
) LOG_LIST
|
||||||
|
WHERE
|
||||||
|
RNUM > #{firstIndex}
|
||||||
|
]]>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="Log.selectLoginoutLog" parameterType="logSearchVO" resultType="logVO">
|
<select id="Log.selectLoginoutLog" parameterType="logSearchVO" resultType="logVO">
|
||||||
SELECT (ROW_NUMBER() OVER()) AS RNUM,
|
<![CDATA[
|
||||||
IO_USERID AS USERID,
|
SELECT
|
||||||
IO_NAME AS NAME,
|
LOG_LIST.*, CODE.CODENM AS POSITION
|
||||||
TO_CHAR(IO_REGDATE, 'YYYY-MM-DD HH24:MI:SS') AS REGDATE,
|
FROM
|
||||||
IO_POSITION AS POSITION_CODE,
|
(
|
||||||
IO_TYPE AS TYPE,
|
SELECT
|
||||||
CODE.CODENM AS POSITION
|
ROWNUM RNUM, LOG_LIST.*
|
||||||
FROM H3_LOGINOUT_LOG log
|
FROM
|
||||||
inner join TCODE CODE on log.IO_POSITION = CODE.CODE2 AND CODE.CODE1 = 'C002'
|
( SELECT
|
||||||
<where>
|
IO_USERID AS USERID, IO_NAME AS NAME, TO_CHAR(IO_REGDATE, 'YYYY-MM-DD HH24:MI:SS') AS REGDATE, IO_POSITION AS POSITION_CODE, IO_TYPE AS TYPE
|
||||||
<if test="sdate != null and sdate != '' and edate != null and edate != ''">
|
FROM
|
||||||
AND TO_CHAR(log.IO_REGDATE, 'yyyy-mm-dd') >= #{sdate}
|
H3_LOGINOUT_LOG
|
||||||
AND TO_CHAR(log.IO_REGDATE, 'yyyy-mm-dd') <= #{edate}
|
WHERE
|
||||||
</if>
|
1 = 1
|
||||||
<if test="place1 != null and place1 != ''">
|
]]>
|
||||||
AND IO_PLACE1 = #{place1}
|
<if test="sdate != null and sdate != '' and edate != null and edate != ''"><![CDATA[
|
||||||
</if>
|
AND
|
||||||
<if test="name != null and name != ''">
|
TO_CHAR(IO_REGDATE, 'yyyy-mm-dd') >= #{sdate} AND
|
||||||
AND IO_NAME LIKE '%' || #{name} || '%'
|
TO_CHAR(IO_REGDATE, 'yyyy-mm-dd') <= #{edate} ]]>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
<if test="place1 != null and place1 != ''">
|
||||||
ORDER BY IO_REGDATE <if test="order != 0">DESC</if>
|
AND IO_PLACE1 = #{place1}
|
||||||
limit #{recordCountPerPage} offset #{firstIndex}
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND IO_NAME LIKE '%' || #{name} || '%'
|
||||||
|
</if>
|
||||||
|
<![CDATA[ ORDER BY
|
||||||
|
IO_REGDATE ]]> <if test="order != 0">DESC</if> <![CDATA[
|
||||||
|
) LOG_LIST
|
||||||
|
) LOG_LIST,
|
||||||
|
TCODE CODE
|
||||||
|
|
||||||
|
WHERE
|
||||||
|
RNUM > #{firstIndex} AND
|
||||||
|
RNUM <= #{firstIndex} + #{recordCountPerPage} AND
|
||||||
|
LOG_LIST.POSITION_CODE = CODE.CODE2 AND
|
||||||
|
CODE.CODE1 = 'C002'
|
||||||
|
|
||||||
|
|
||||||
|
]]>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="Log.selectLogListTotCnt" parameterType="logSearchVO" resultType="int">
|
<select id="Log.selectLogListTotCnt" parameterType="logSearchVO" resultType="int">
|
||||||
|
|
@ -124,36 +150,18 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="Log.selectUrlInfo" parameterType="logVO" resultType="hashmap">
|
<select id="Log.selectUrlInfo" parameterType="logVO" resultType="hashmap">
|
||||||
with recursive menu_hierarchy (
|
<![CDATA[
|
||||||
level,
|
SELECT
|
||||||
id,
|
LEVEL AS LV, MENU.*
|
||||||
name,
|
FROM
|
||||||
eng_name,
|
T_MENU MENU
|
||||||
parent,
|
START WITH
|
||||||
depth,
|
MENU.URL = #{location2}
|
||||||
url,
|
CONNECT BY PRIOR
|
||||||
menu_position,
|
MENU.PARENT = MENU.ID
|
||||||
visible,
|
ORDER BY
|
||||||
url_group,
|
LV DESC
|
||||||
sub_visibel,
|
]]>
|
||||||
role_level,
|
|
||||||
url_query,
|
|
||||||
board_id,
|
|
||||||
window_target
|
|
||||||
) as (
|
|
||||||
select 1, a.*
|
|
||||||
from t_menu a
|
|
||||||
where url = #{location2}
|
|
||||||
|
|
||||||
union all
|
|
||||||
|
|
||||||
select b.level +1, a.*
|
|
||||||
from t_menu a
|
|
||||||
inner join menu_hierarchy b
|
|
||||||
on a.id = b.parent
|
|
||||||
)
|
|
||||||
select * from menu_hierarchy
|
|
||||||
order by level desc
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="Log.selectLogTotalCnt" parameterType="logSearchVO" resultType="int">
|
<select id="Log.selectLogTotalCnt" parameterType="logSearchVO" resultType="int">
|
||||||
|
|
|
||||||
|
|
@ -66,54 +66,136 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getFaListAll" parameterType="memberSearchVO" resultType="memberVO">
|
<select id="getFaListAll" parameterType="memberSearchVO" resultType="memberVO">
|
||||||
select (ROW_NUMBER() OVER()) AS RNUM,
|
<![CDATA[
|
||||||
(aa.PLACE1STR || ' ' || aa.PLACE2STR) PLACE3STR,
|
SELECT
|
||||||
TOTALEXCAREER_Y || '년 ' || TOTALEXCAREER_M || '개월' TOTALCAREER,
|
*
|
||||||
aa.*
|
FROM (
|
||||||
from (select pl1.codenm place1str,
|
SELECT
|
||||||
pl2.codenm PLACE2STR,
|
ROWNUM RNUM, MEMBER_LIST.*
|
||||||
pst.codenm POSITIONSTR,
|
FROM (
|
||||||
jt.codenm JOBTYPESTR,
|
SELECT
|
||||||
MOD((EXCAREER_M + EXCAREER1_M + EXCAREER2_M + EXCAREER3_M), 12) TOTALEXCAREER_M,
|
MEMBER_LIST.PLACE1STR || ' ' || MEMBER_LIST.PLACE2STR AS PLACE3STR, MEMBER_LIST.*, TOTALEXCAREER_Y || '년 ' || TOTALEXCAREER_M || '개월' TOTALCAREER
|
||||||
(EXCAREER_Y + EXCAREER1_Y + EXCAREER2_Y + EXCAREER3_Y) + FLOOR(MOD((EXCAREER_M + EXCAREER1_M + EXCAREER2_M + EXCAREER3_M), 12) / 12) TOTALEXCAREER_Y,
|
FROM
|
||||||
a.*
|
(
|
||||||
from (select *,
|
SELECT
|
||||||
split_part(EXCAREER, '-', 1)::int EXCAREER_Y,
|
B.CODENM AS PLACE2STR, A.*
|
||||||
split_part(EXCAREER, '-', 2)::int EXCAREER_M,
|
FROM
|
||||||
split_part(EXCAREER1, '-', 1)::int EXCAREER1_Y,
|
(SELECT
|
||||||
split_part(EXCAREER1, '-', 2)::int EXCAREER1_M,
|
B.CODENM AS POSITIONSTR, A.*
|
||||||
split_part(EXCAREER2, '-', 1)::int EXCAREER2_Y,
|
FROM
|
||||||
split_part(EXCAREER2, '-', 2)::int EXCAREER2_M,
|
(SELECT
|
||||||
split_part(EXCAREER3, '-', 1)::int EXCAREER3_Y,
|
B.CODENM AS PLACE1STR, A.*
|
||||||
split_part(EXCAREER3, '-', 2)::int EXCAREER3_M
|
FROM
|
||||||
from tagent
|
(SELECT
|
||||||
<where>
|
B.CODENM AS JOBTYPESTR, A.*
|
||||||
<if test="name != null and name != ''">
|
FROM
|
||||||
AND NAME LIKE '%' || #{name} || '%'
|
(
|
||||||
</if>
|
SELECT
|
||||||
<if test="place1 != null and place1 != ''">
|
TAGENT.*,
|
||||||
AND PLACE1 = #{place1}
|
MOD((EXCAREER_M + EXCAREER1_M + EXCAREER2_M + EXCAREER3_M), 12) TOTALEXCAREER_M,
|
||||||
</if>
|
(EXCAREER_Y + EXCAREER1_Y + EXCAREER2_Y + EXCAREER3_Y) + FLOOR(MOD((EXCAREER_M + EXCAREER1_M + EXCAREER2_M + EXCAREER3_M), 12) / 12) TOTALEXCAREER_Y
|
||||||
</where>
|
FROM (
|
||||||
ORDER BY
|
SELECT
|
||||||
<if test="orderkey != null and orderkey != ''">
|
TAGENT.*,
|
||||||
<choose>
|
SUBSTR(EXCAREER, 1, INSTR(EXCAREER, '-', 1) - 1) EXCAREER_Y,
|
||||||
<when test="ordercode == 7">
|
SUBSTR(EXCAREER, INSTR(EXCAREER, '-', 1) + 1, 3) EXCAREER_M,
|
||||||
TOTALEXCAREER_Y <choose><when test="ordertype == 1">DESC</when><otherwise>ASC</otherwise></choose>,
|
SUBSTR(EXCAREER1, 1, INSTR(EXCAREER1, '-', 1) - 1) EXCAREER1_Y,
|
||||||
TOTALEXCAREER_M <choose><when test="ordertype == 1">DESC</when><otherwise>ASC</otherwise></choose>,
|
SUBSTR(EXCAREER1, INSTR(EXCAREER1, '-', 1) + 1, 3) EXCAREER1_M,
|
||||||
</when>
|
SUBSTR(EXCAREER2, 1, INSTR(EXCAREER2, '-', 1) - 1) EXCAREER2_Y,
|
||||||
<otherwise>
|
SUBSTR(EXCAREER2, INSTR(EXCAREER2, '-', 1) + 1, 3) EXCAREER2_M,
|
||||||
${orderkey} <choose><when test="ordertype == 1">DESC</when><otherwise>ASC</otherwise></choose>,
|
SUBSTR(EXCAREER3, 1, INSTR(EXCAREER3, '-', 1) - 1) EXCAREER3_Y,
|
||||||
</otherwise>
|
SUBSTR(EXCAREER3, INSTR(EXCAREER3, '-', 1) + 1, 3) EXCAREER3_M
|
||||||
</choose>
|
FROM
|
||||||
</if>
|
TAGENT
|
||||||
PLACE1, PLACE2, PLACE3, POSITION DESC, DUTIES, NAME
|
) TAGENT
|
||||||
) a
|
) A,
|
||||||
inner join tcode pl1 on pl1.code1 = 'C001' and a.place1 = pl1.code2
|
TCODE B
|
||||||
inner join tcode pl2 on a.place1 = pl2.code1 and a.place2 = pl2.code2
|
WHERE
|
||||||
inner join tcode pst on pst.code1 = 'C002' and a.position = pst.code2
|
B.CODE1(+) = 'C003' AND
|
||||||
inner join tcode jt on jt.code1 = 'C003' and a.jobtype = jt.code2
|
A.JOBTYPE = B.CODE2(+)) A,
|
||||||
) aa
|
TCODE B
|
||||||
|
WHERE
|
||||||
|
A.PLACE1 = B.CODE2(+) AND
|
||||||
|
B.CODE1(+) = 'C001' ) A,
|
||||||
|
TCODE B
|
||||||
|
WHERE
|
||||||
|
A.POSITION = B.CODE2(+) AND
|
||||||
|
B.CODE1(+) = 'C002') A,
|
||||||
|
TCODE B
|
||||||
|
WHERE
|
||||||
|
A.PLACE1 = B.CODE1(+) AND
|
||||||
|
A.PLACE2 = B.CODE2(+)
|
||||||
|
ORDER BY ]]>
|
||||||
|
<if test="orderkey != null and orderkey != ''">
|
||||||
|
<choose>
|
||||||
|
<when test="ordercode == 7">
|
||||||
|
TOTALEXCAREER_Y <choose><when test="ordertype == 1">DESC</when><otherwise>ASC</otherwise></choose>,
|
||||||
|
TOTALEXCAREER_M <choose><when test="ordertype == 1">DESC</when><otherwise>ASC</otherwise></choose>,
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
${orderkey} <choose><when test="ordertype == 1">DESC</when><otherwise>ASC</otherwise></choose>,
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
PLACE1,
|
||||||
|
PLACE2,
|
||||||
|
PLACE3,
|
||||||
|
POSITION DESC,
|
||||||
|
DUTIES,
|
||||||
|
NAME
|
||||||
|
<![CDATA[
|
||||||
|
) MEMBER_LIST
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
]]>
|
||||||
|
<if test="place1 != null and place1 != ''">
|
||||||
|
AND PLACE1 = #{place1}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND NAME LIKE '%' || #{name} || '%'
|
||||||
|
</if>
|
||||||
|
<![CDATA[
|
||||||
|
) MEMBER_LIST
|
||||||
|
) A
|
||||||
|
LEFT JOIN
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
IO_USERID, TO_CHAR(MAX(IO_REGDATE), 'YYYY-MM-DD HH24:MI:SS') AS RECENTDATE
|
||||||
|
FROM
|
||||||
|
H3_LOGINOUT_LOG
|
||||||
|
GROUP BY
|
||||||
|
IO_USERID
|
||||||
|
) B
|
||||||
|
ON
|
||||||
|
A.USERID = B.IO_USERID
|
||||||
|
]]>
|
||||||
|
<!--
|
||||||
|
SELECT
|
||||||
|
P1.CODENM AS PLACE1STR, P2.CODENM AS PLACE2STR,
|
||||||
|
J.CODENM AS JOBTYPESTR, POS.CODENM AS POSITIONSTR, P1.CODENM || ' ' || P2.CODENM,
|
||||||
|
(경력계산)
|
||||||
|
A.*
|
||||||
|
FROM TAGENT A
|
||||||
|
LEFT JOIN TCODE J ON J.CODE1 = 'C003' AND A.JOBTYPE = J.CODE2
|
||||||
|
LEFT JOIN TCODE P1 ON P1.CODE1 = 'C001' AND A.PLACE1 = P1.CODE2
|
||||||
|
LEFT JOIN TCODE POS ON POS.CODE1 = 'C002' AND A.POSITION = POS.CODE2
|
||||||
|
LEFT JOIN TCODE P2 ON A.PLACE1 = P2.CODE1 AND A.PLACE2 = P2.CODE2
|
||||||
|
LEFT JOIN
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
IO_USERID, TO_CHAR(MAX(IO_REGDATE), 'YYYY-MM-DD HH24:MI:SS') AS RECENTDATE
|
||||||
|
FROM
|
||||||
|
H3_LOGINOUT_LOG
|
||||||
|
GROUP BY
|
||||||
|
IO_USERID
|
||||||
|
) B
|
||||||
|
ON
|
||||||
|
A.USERID = B.IO_USERID
|
||||||
|
WHERE
|
||||||
|
A.PLACE1 = 'PS92'
|
||||||
|
ORDER BY
|
||||||
|
PLACE1, PLACE2, PLACE3, POSITION DESC, DUTIES, NAME
|
||||||
|
-->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="Member.getMemberSearchResult" parameterType="memberSearchVO" resultType="memberVO">
|
<select id="Member.getMemberSearchResult" parameterType="memberSearchVO" resultType="memberVO">
|
||||||
|
|
@ -202,89 +284,150 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="Member.getCmmnListAll" parameterType="memberSearchVO" resultType="memberVO">
|
<select id="Member.getCmmnListAll" parameterType="memberSearchVO" resultType="memberVO">
|
||||||
select (ROW_NUMBER() OVER()) AS RNUM,
|
<![CDATA[
|
||||||
aa.*
|
SELECT
|
||||||
from (select pl1.codenm place1str,
|
*
|
||||||
b.recentdate,
|
FROM (
|
||||||
pl2.codenm PLACE2STR,
|
SELECT
|
||||||
pl3.codenm PLACE3STR,
|
ROWNUM RNUM, MEMBER_LIST.*
|
||||||
pst.codenm POSITIONSTR,
|
FROM (
|
||||||
jt.codenm JOBTYPESTR,
|
SELECT
|
||||||
a.*
|
MEMBER_LIST.PLACE1STR || ' ' || MEMBER_LIST.PLACE2STR AS PLACE3STR, MEMBER_LIST.NAME, MEMBER_LIST.POSITIONSTR,
|
||||||
from tagent a
|
MEMBER_LIST.USERID, MEMBER_LIST.LOGINCHK, MEMBER_LIST.CHKCNT, MEMBER_LIST.IDNO
|
||||||
inner join tcode pl1 on pl1.code1 = 'C001' and a.place1 = pl1.code2
|
FROM
|
||||||
inner join tcode pl2 on a.place1 = pl2.code1 and a.place2 = pl2.code2
|
(
|
||||||
inner join tcode pl3 on pl3.code1 = 'C009' and a.place3 = pl3.code2
|
SELECT
|
||||||
inner join tcode pst on pst.code1 = 'C002' and a.position = pst.code2
|
B.CODENM AS PLACE2STR, A.*
|
||||||
inner join tcode jt on jt.code1 = 'C003' and a.jobtype = jt.code2
|
FROM
|
||||||
left outer join (SELECT IO_USERID, TO_CHAR(MAX(IO_REGDATE), 'YYYY-MM-DD HH24:MI:SS') AS RECENTDATE
|
(SELECT
|
||||||
FROM H3_LOGINOUT_LOG
|
B.CODENM AS POSITIONSTR, A.*
|
||||||
<where>
|
FROM
|
||||||
<if test="place1 != null and place1 != ''">
|
(SELECT
|
||||||
AND IO_PLACE1 = #{place1}
|
B.CODENM AS PLACE1STR, A.*
|
||||||
</if>
|
FROM
|
||||||
<if test="name != null and name != ''">
|
TUSER A,
|
||||||
AND IO_NAME LIKE '%' || #{name} || '%'
|
TCODE B
|
||||||
</if>
|
WHERE
|
||||||
</where>
|
A.PLACE1 = B.CODE2(+) AND
|
||||||
GROUP BY IO_USERID ) B ON A.USERID = B.IO_USERID
|
B.CODE1(+) = 'C001' ) A,
|
||||||
<where>
|
TCODE B
|
||||||
<if test="place1 != null and place1 != ''">
|
WHERE
|
||||||
AND PLACE1 = #{place1}
|
A.POSITION = B.CODE2(+) AND
|
||||||
</if>
|
B.CODE1(+) = 'C002') A,
|
||||||
<if test="name != null and name != ''">
|
TCODE B
|
||||||
AND NAME LIKE '%' || #{name} || '%'
|
WHERE
|
||||||
</if>
|
A.PLACE1 = B.CODE1(+) AND
|
||||||
</where>
|
B.CODE2(+) = A.PLACE2
|
||||||
ORDER BY
|
ORDER BY]]>
|
||||||
<if test="orderkey != null and orderkey != ''">
|
<if test="orderkey != null and orderkey != ''">
|
||||||
${orderkey} <choose><when test="ordertype == 1">DESC</when></choose>,
|
${orderkey} <choose><when test="ordertype == 1">DESC</when><otherwise>ASC</otherwise></choose>,
|
||||||
</if>
|
</if>
|
||||||
PLACE1, PLACE2, POSITION DESC, NAME ) aa
|
PLACE1,
|
||||||
|
PLACE2,
|
||||||
|
POSITION DESC,
|
||||||
|
NAME
|
||||||
|
<![CDATA[) MEMBER_LIST
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
]]>
|
||||||
|
<if test="place1 != null and place1 != ''">
|
||||||
|
AND PLACE1 = #{place1}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND NAME LIKE '%' || #{name} || '%'
|
||||||
|
</if>
|
||||||
|
<![CDATA[
|
||||||
|
) MEMBER_LIST
|
||||||
|
) A
|
||||||
|
LEFT JOIN
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
IO_USERID, TO_CHAR(MAX(IO_REGDATE), 'YYYY-MM-DD HH24:MI:SS') AS RECENTDATE
|
||||||
|
FROM
|
||||||
|
H3_LOGINOUT_LOG
|
||||||
|
GROUP BY
|
||||||
|
IO_USERID
|
||||||
|
) B
|
||||||
|
ON
|
||||||
|
A.USERID = B.IO_USERID
|
||||||
|
]]>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="Member.getCmmnMemberList" parameterType="memberSearchVO" resultType="memberVO">
|
<select id="Member.getCmmnMemberList" parameterType="memberSearchVO" resultType="memberVO">
|
||||||
select (ROW_NUMBER() OVER()) AS RNUM,
|
<![CDATA[
|
||||||
aa.*
|
SELECT
|
||||||
from (select pl1.codenm place1str,
|
*
|
||||||
b.recentdate,
|
FROM (
|
||||||
pl2.codenm PLACE2STR,
|
SELECT
|
||||||
pl3.codenm PLACE3STR,
|
ROWNUM RNUM, MEMBER_LIST.*
|
||||||
pst.codenm POSITIONSTR,
|
FROM (
|
||||||
jt.codenm JOBTYPESTR,
|
SELECT
|
||||||
a.*
|
MEMBER_LIST.PLACE1STR || ' ' || MEMBER_LIST.PLACE2STR AS PLACE3STR, MEMBER_LIST.NAME, MEMBER_LIST.POSITIONSTR,
|
||||||
from tagent a
|
MEMBER_LIST.USERID, MEMBER_LIST.LOGINCHK, MEMBER_LIST.CHKCNT, MEMBER_LIST.IDNO, MEMBER_LIST.PLACE1
|
||||||
inner join tcode pl1 on pl1.code1 = 'C001' and a.place1 = pl1.code2
|
FROM
|
||||||
inner join tcode pl2 on a.place1 = pl2.code1 and a.place2 = pl2.code2
|
(
|
||||||
inner join tcode pl3 on pl3.code1 = 'C009' and a.place3 = pl3.code2
|
SELECT
|
||||||
inner join tcode pst on pst.code1 = 'C002' and a.position = pst.code2
|
B.CODENM AS PLACE2STR, A.*
|
||||||
inner join tcode jt on jt.code1 = 'C003' and a.jobtype = jt.code2
|
FROM
|
||||||
left outer join (SELECT IO_USERID, TO_CHAR(MAX(IO_REGDATE), 'YYYY-MM-DD HH24:MI:SS') AS RECENTDATE
|
(SELECT
|
||||||
FROM H3_LOGINOUT_LOG
|
B.CODENM AS POSITIONSTR, A.*
|
||||||
<where>
|
FROM
|
||||||
<if test="place1 != null and place1 != ''">
|
(SELECT
|
||||||
AND IO_PLACE1 = #{place1}
|
B.CODENM AS PLACE1STR, A.*
|
||||||
</if>
|
FROM
|
||||||
<if test="name != null and name != ''">
|
TUSER A,
|
||||||
AND IO_NAME LIKE '%' || #{name} || '%'
|
TCODE B
|
||||||
</if>
|
WHERE
|
||||||
</where>
|
A.PLACE1 = B.CODE2(+) AND
|
||||||
GROUP BY IO_USERID ) B ON A.USERID = B.IO_USERID
|
B.CODE1(+) = 'C001' ) A,
|
||||||
<where>
|
TCODE B
|
||||||
<if test="place1 != null and place1 != ''">
|
WHERE
|
||||||
AND PLACE1 = #{place1}
|
A.POSITION = B.CODE2(+) AND
|
||||||
</if>
|
B.CODE1(+) = 'C002') A,
|
||||||
<if test="name != null and name != ''">
|
TCODE B
|
||||||
AND NAME LIKE '%' || #{name} || '%'
|
WHERE
|
||||||
</if>
|
A.PLACE1 = B.CODE1(+) AND
|
||||||
</where>
|
B.CODE2(+) = A.PLACE2
|
||||||
ORDER BY
|
ORDER BY]]>
|
||||||
<if test="orderkey != null and orderkey != ''">
|
<if test="orderkey != null and orderkey != ''">
|
||||||
${orderkey} <choose><when test="ordertype == 1">DESC</when><otherwise>ASC</otherwise></choose>,
|
${orderkey} <choose><when test="ordertype == 1">DESC</when><otherwise>ASC</otherwise></choose>,
|
||||||
</if>
|
</if>
|
||||||
PLACE1, PLACE2, POSITION DESC, NAME
|
PLACE1,
|
||||||
limit #{recordCountPerPage} offset #{firstIndex} ) aa
|
PLACE2,
|
||||||
</select>
|
POSITION DESC,
|
||||||
|
NAME
|
||||||
|
<![CDATA[) MEMBER_LIST
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
]]>
|
||||||
|
<if test="place1 != null and place1 != ''">
|
||||||
|
AND PLACE1 = #{place1}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND NAME LIKE '%' || #{name} || '%'
|
||||||
|
</if>
|
||||||
|
<![CDATA[
|
||||||
|
) MEMBER_LIST
|
||||||
|
) A
|
||||||
|
LEFT JOIN
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
IO_USERID, TO_CHAR(MAX(IO_REGDATE), 'YYYY-MM-DD HH24:MI:SS') AS RECENTDATE
|
||||||
|
FROM
|
||||||
|
H3_LOGINOUT_LOG
|
||||||
|
GROUP BY
|
||||||
|
IO_USERID
|
||||||
|
) B
|
||||||
|
ON
|
||||||
|
A.USERID = B.IO_USERID
|
||||||
|
WHERE
|
||||||
|
RNUM > #{firstIndex} AND
|
||||||
|
RNUM <= #{firstIndex} + #{recordCountPerPage}
|
||||||
|
ORDER BY
|
||||||
|
RNUM
|
||||||
|
]]>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="Member.selectTotalCnt" parameterType="memberSearchVO" resultType="int">
|
<select id="Member.selectTotalCnt" parameterType="memberSearchVO" resultType="int">
|
||||||
|
|
@ -477,6 +620,7 @@
|
||||||
WHERE
|
WHERE
|
||||||
USERID = #{userid}
|
USERID = #{userid}
|
||||||
]]>
|
]]>
|
||||||
|
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,27 +37,82 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="MemberAuth.getMemberListByPlace1" parameterType="memberSearchVO" resultType="loginUserVO">
|
<select id="MemberAuth.getMemberListByPlace1" parameterType="memberSearchVO" resultType="loginUserVO">
|
||||||
select (ROW_NUMBER() OVER()) AS RNUM,
|
<![CDATA[
|
||||||
aa.*
|
SELECT
|
||||||
from (select pl1.codenm place1str,
|
*
|
||||||
pl2.codenm PLACE2STR,
|
FROM (
|
||||||
pl3.codenm PLACE3STR,
|
SELECT
|
||||||
pst.codenm POSITIONSTR,
|
ROWNUM RNUM, MEMBER_LIST.*
|
||||||
jt.codenm JOBTYPESTR,
|
FROM (
|
||||||
a.*
|
SELECT
|
||||||
from tagent a
|
B.CODENM AS PLACE3STR, A.*
|
||||||
inner join tcode pl1 on pl1.code1 = 'C001' and a.place1 = pl1.code2
|
FROM
|
||||||
inner join tcode pl2 on a.place1 = pl2.code1 and a.place2 = pl2.code2
|
(
|
||||||
inner join tcode pl3 on pl3.code1 = 'C009' and a.place3 = pl3.code2
|
SELECT
|
||||||
inner join tcode pst on pst.code1 = 'C002' and a.position = pst.code2
|
B.CODENM AS PLACE2STR, A.*
|
||||||
inner join tcode jt on jt.code1 = 'C003' and a.jobtype = jt.code2
|
FROM
|
||||||
where PLACE1 =#{place1}
|
(SELECT
|
||||||
ORDER BY
|
B.CODENM AS POSITIONSTR, A.*
|
||||||
<if test="orderkey != null and orderkey != ''">
|
FROM
|
||||||
${orderkey} <choose><when test="ordertype == 1">DESC</when><otherwise>ASC</otherwise></choose>,
|
(SELECT
|
||||||
</if>
|
B.CODENM AS PLACE1STR, A.*
|
||||||
POSITION DESC, PLACE2, PLACE3, DUTIES, NAME
|
FROM
|
||||||
limit #{recordCountPerAuthPage} offset #{firstIndex} ) aa
|
(SELECT
|
||||||
|
B.CODENM AS DUTIESSTR, A.*
|
||||||
|
FROM
|
||||||
|
(SELECT
|
||||||
|
AGENT.USERID, AGENT.NAME, AGENT.PLACE1, AGENT.PLACE2, AGENT.PLACE3, AGENT.DUTIES, AGENT.POSITION, AGENT.USEGRADE,
|
||||||
|
PT_AUTH.AU_CODE AS AUTHCODE
|
||||||
|
FROM
|
||||||
|
( TAGENT AGENT
|
||||||
|
LEFT JOIN
|
||||||
|
RPT_AGENT_AUTH PT_AUTH
|
||||||
|
ON AGENT.USERID = PT_AUTH.AU_ID)
|
||||||
|
LEFT JOIN
|
||||||
|
H3_AGENT_AUTH ST_AUTH
|
||||||
|
ON
|
||||||
|
AGENT.USERID = ST_AUTH.AU_USERID
|
||||||
|
WHERE
|
||||||
|
PLACE1 = #{place1}
|
||||||
|
) A,
|
||||||
|
TCODE B
|
||||||
|
WHERE
|
||||||
|
B.CODE1 = 'C004' AND
|
||||||
|
A.DUTIES = B.CODE2) A,
|
||||||
|
TCODE B
|
||||||
|
WHERE
|
||||||
|
A.PLACE1 = B.CODE2 AND
|
||||||
|
B.CODE1 = 'C001' ) A,
|
||||||
|
TCODE B
|
||||||
|
WHERE
|
||||||
|
A.POSITION = B.CODE2 AND
|
||||||
|
B.CODE1 = 'C002') A,
|
||||||
|
TCODE B
|
||||||
|
WHERE
|
||||||
|
A.PLACE1 = B.CODE1(+) AND
|
||||||
|
B.CODE2(+) = A.PLACE2
|
||||||
|
ORDER BY
|
||||||
|
PLACE1,
|
||||||
|
PLACE2, PLACE3, POSITION DESC, DUTIES, NAME
|
||||||
|
) A,
|
||||||
|
TCODE B
|
||||||
|
WHERE
|
||||||
|
A.PLACE3 = B.CODE2(+) AND
|
||||||
|
CODE1(+) = 'C009'
|
||||||
|
ORDER BY]]>
|
||||||
|
<if test="orderkey != null and orderkey != ''">
|
||||||
|
${orderkey} <choose><when test="ordertype == 1">DESC</when><otherwise>ASC</otherwise></choose>,
|
||||||
|
</if>
|
||||||
|
POSITION DESC,
|
||||||
|
PLACE2, PLACE3, DUTIES, NAME
|
||||||
|
<![CDATA[) MEMBER_LIST
|
||||||
|
)
|
||||||
|
WHERE
|
||||||
|
RNUM > #{firstIndex} AND
|
||||||
|
RNUM <= #{firstIndex} + #{recordCountPerAuthPage}
|
||||||
|
ORDER BY
|
||||||
|
RNUM
|
||||||
|
]]>
|
||||||
</select>
|
</select>
|
||||||
<select id="MemberAuth.getMemberListByPlace1Cnt" parameterType="String" resultType="int">
|
<select id="MemberAuth.getMemberListByPlace1Cnt" parameterType="String" resultType="int">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue