견문보고 > 견문작성 > 임시저장목록 조회 오류 수정
parent
aab3a7b4d9
commit
b4b0e250f3
|
|
@ -136,55 +136,44 @@
|
|||
</select>
|
||||
|
||||
<select id="Report.selectSaveList" parameterType="reportSearchVO" resultMap="reportMap">
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
ROWNUM RNUM, RPT.*
|
||||
FROM
|
||||
RPT_INFO RPT
|
||||
WHERE
|
||||
IN_STATE_CODE = '99' AND
|
||||
IN_TYPE = #{type} AND
|
||||
<choose>
|
||||
<when test="type != null and type.equals(1)">
|
||||
IN_USERID = #{userid}
|
||||
</when>
|
||||
<when test="type == null or type != 1">
|
||||
IN_USERID IN (#{userid}, '''' || #{usegrade} || '''')
|
||||
</when>
|
||||
</choose>
|
||||
<if test="orderCol != null and orderCol != '' and orderAsc != null and orderAsc != ''">
|
||||
ORDER BY ${ordercol} ${orderasc}
|
||||
</if>
|
||||
<if test="orderCol == null or orderCol == '' or orderAsc == null or orderAsc == ''">
|
||||
ORDER BY IN_SEQ DESC
|
||||
</if>
|
||||
|
||||
)
|
||||
WHERE
|
||||
RNUM > #{firstindex} AND
|
||||
RNUM <= #{firstindex} + #{recordcountperPage}
|
||||
|
||||
</select>
|
||||
SELECT (ROW_NUMBER() OVER()) AS RNUM,
|
||||
rpt.*
|
||||
FROM rpt_info rpt
|
||||
where in_state_code = '99'
|
||||
and in_type = #{type}
|
||||
<choose>
|
||||
<when test='type != null and type.equals("1")'>
|
||||
and in_userid = #{userid}
|
||||
</when>
|
||||
<when test='type == null or type != "1"'>
|
||||
and in_userid IN (#{userid}, '''' || #{usegrade} || '''')
|
||||
</when>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="orderCol != null and orderCol != '' and orderAsc != null and orderAsc != ''">
|
||||
order by ${orderCol} ${orderAsc}
|
||||
</when>
|
||||
<otherwise>
|
||||
order by in_seq desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
limit #{recordCountPerPage} offset #{firstIndex}
|
||||
</select>
|
||||
|
||||
<select id="Report.selectSaveListCnt" parameterType="reportSearchVO" resultType="int">
|
||||
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
RPT_INFO
|
||||
WHERE
|
||||
IN_STATE_CODE = '99' AND
|
||||
IN_TYPE = #{type} AND
|
||||
|
||||
<choose>
|
||||
<when test="type != null and type.equals(1)">
|
||||
IN_USERID = #{userid}
|
||||
</when>
|
||||
<when test="type == null or type != 1">
|
||||
IN_USERID IN (#{userid}, '''' || #{usegrade} || '''')
|
||||
</when>
|
||||
</choose>
|
||||
SELECT COUNT(*)
|
||||
FROM RPT_INFO
|
||||
WHERE IN_STATE_CODE = '99'
|
||||
AND IN_TYPE = #{type}
|
||||
<choose>
|
||||
<when test='type != null and type.equals("1")'>
|
||||
AND IN_USERID = #{userid}
|
||||
</when>
|
||||
<when test='type == null or type != "1"'>
|
||||
AND IN_USERID IN (#{userid}, '''' || #{usegrade} || '''')
|
||||
</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<insert id="Report.insert" parameterType="reportVO">
|
||||
|
|
|
|||
Loading…
Reference in New Issue