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