|
|
|
|
@ -233,114 +233,54 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="Member.getFaMemberList" parameterType="memberSearchVO" resultType="memberVO">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
SELECT
|
|
|
|
|
*
|
|
|
|
|
FROM (
|
|
|
|
|
SELECT
|
|
|
|
|
ROWNUM RNUM, MEMBER_LIST.*
|
|
|
|
|
FROM (
|
|
|
|
|
SELECT
|
|
|
|
|
MEMBER_LIST.PLACE1STR || ' ' || MEMBER_LIST.PLACE2STR AS PLACE3STR, MEMBER_LIST.*, TOTALEXCAREER_Y || '년 ' || TOTALEXCAREER_M || '개월' TOTALCAREER
|
|
|
|
|
FROM
|
|
|
|
|
(
|
|
|
|
|
SELECT
|
|
|
|
|
B.CODENM AS PLACE2STR, A.*
|
|
|
|
|
FROM
|
|
|
|
|
(SELECT
|
|
|
|
|
B.CODENM AS POSITIONSTR, A.*
|
|
|
|
|
FROM
|
|
|
|
|
(SELECT
|
|
|
|
|
B.CODENM AS PLACE1STR, A.*
|
|
|
|
|
FROM
|
|
|
|
|
(SELECT
|
|
|
|
|
B.CODENM AS JOBTYPESTR, A.*
|
|
|
|
|
FROM
|
|
|
|
|
(
|
|
|
|
|
SELECT
|
|
|
|
|
TAGENT.*,
|
|
|
|
|
MOD((EXCAREER_M + EXCAREER1_M + EXCAREER2_M + EXCAREER3_M), 12) TOTALEXCAREER_M,
|
|
|
|
|
(EXCAREER_Y + EXCAREER1_Y + EXCAREER2_Y + EXCAREER3_Y) + FLOOR(MOD((EXCAREER_M + EXCAREER1_M + EXCAREER2_M + EXCAREER3_M), 12) / 12) TOTALEXCAREER_Y
|
|
|
|
|
FROM (
|
|
|
|
|
SELECT
|
|
|
|
|
TAGENT.*,
|
|
|
|
|
SUBSTR(EXCAREER, 1, INSTR(EXCAREER, '-', 1) - 1) EXCAREER_Y,
|
|
|
|
|
SUBSTR(EXCAREER, INSTR(EXCAREER, '-', 1) + 1, 3) EXCAREER_M,
|
|
|
|
|
SUBSTR(EXCAREER1, 1, INSTR(EXCAREER1, '-', 1) - 1) EXCAREER1_Y,
|
|
|
|
|
SUBSTR(EXCAREER1, INSTR(EXCAREER1, '-', 1) + 1, 3) EXCAREER1_M,
|
|
|
|
|
SUBSTR(EXCAREER2, 1, INSTR(EXCAREER2, '-', 1) - 1) EXCAREER2_Y,
|
|
|
|
|
SUBSTR(EXCAREER2, INSTR(EXCAREER2, '-', 1) + 1, 3) EXCAREER2_M,
|
|
|
|
|
SUBSTR(EXCAREER3, 1, INSTR(EXCAREER3, '-', 1) - 1) EXCAREER3_Y,
|
|
|
|
|
SUBSTR(EXCAREER3, INSTR(EXCAREER3, '-', 1) + 1, 3) EXCAREER3_M
|
|
|
|
|
FROM
|
|
|
|
|
TAGENT
|
|
|
|
|
) TAGENT
|
|
|
|
|
) A,
|
|
|
|
|
TCODE B
|
|
|
|
|
WHERE
|
|
|
|
|
B.CODE1(+) = 'C003' AND
|
|
|
|
|
A.JOBTYPE = 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
|
|
|
|
|
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
|
|
|
|
|
WHERE
|
|
|
|
|
A.RNUM > #{firstIndex} AND
|
|
|
|
|
A.RNUM <= #{firstIndex} + #{recordCountPerPage}
|
|
|
|
|
ORDER BY
|
|
|
|
|
A.RNUM
|
|
|
|
|
]]>
|
|
|
|
|
|
|
|
|
|
select (ROW_NUMBER() OVER()) AS RNUM,
|
|
|
|
|
(aa.PLACE1STR || ' ' || aa.PLACE2STR) PLACE3STR,
|
|
|
|
|
TOTALEXCAREER_Y || '년 ' || TOTALEXCAREER_M || '개월' TOTALCAREER,
|
|
|
|
|
aa.*
|
|
|
|
|
from (select pl1.codenm place1str,
|
|
|
|
|
pl2.codenm PLACE2STR,
|
|
|
|
|
pst.codenm POSITIONSTR,
|
|
|
|
|
jt.codenm JOBTYPESTR,
|
|
|
|
|
MOD((EXCAREER_M + EXCAREER1_M + EXCAREER2_M + EXCAREER3_M), 12) TOTALEXCAREER_M,
|
|
|
|
|
(EXCAREER_Y + EXCAREER1_Y + EXCAREER2_Y + EXCAREER3_Y) + FLOOR(MOD((EXCAREER_M + EXCAREER1_M + EXCAREER2_M + EXCAREER3_M), 12) / 12) TOTALEXCAREER_Y,
|
|
|
|
|
a.*
|
|
|
|
|
from (select *,
|
|
|
|
|
split_part(EXCAREER, '-', 1)::int EXCAREER_Y,
|
|
|
|
|
split_part(EXCAREER, '-', 2)::int EXCAREER_M,
|
|
|
|
|
split_part(EXCAREER1, '-', 1)::int EXCAREER1_Y,
|
|
|
|
|
split_part(EXCAREER1, '-', 2)::int EXCAREER1_M,
|
|
|
|
|
split_part(EXCAREER2, '-', 1)::int EXCAREER2_Y,
|
|
|
|
|
split_part(EXCAREER2, '-', 2)::int EXCAREER2_M,
|
|
|
|
|
split_part(EXCAREER3, '-', 1)::int EXCAREER3_Y,
|
|
|
|
|
split_part(EXCAREER3, '-', 2)::int EXCAREER3_M
|
|
|
|
|
from tagent
|
|
|
|
|
<where>
|
|
|
|
|
<if test="name != null and name != ''">
|
|
|
|
|
AND NAME LIKE '%' || #{name} || '%'
|
|
|
|
|
</if>
|
|
|
|
|
<if test="place1 != null and place1 != ''">
|
|
|
|
|
AND PLACE1 = #{place1}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
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
|
|
|
|
|
limit #{recordCountPerPage} offset #{firstIndex}) a
|
|
|
|
|
inner join tcode pl1 on pl1.code1 = 'C001' and a.place1 = pl1.code2
|
|
|
|
|
inner join tcode pl2 on a.place1 = pl2.code1 and a.place2 = pl2.code2
|
|
|
|
|
inner join tcode pst on pst.code1 = 'C002' and a.position = pst.code2
|
|
|
|
|
inner join tcode jt on jt.code1 = 'C003' and a.jobtype = jt.code2
|
|
|
|
|
) aa
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="Member.getCmmnListAll" parameterType="memberSearchVO" resultType="memberVO">
|
|
|
|
|
|