<choose>
<when test="status == 'PROCES' or status == 'PENDNG'"> and batcol.status in('PROCES','PENDNG')</when>
<when test="status == 'PREAUD'"> and batcol.status = '--'</when>
<otherwise> and batcol.status = #{status,jdbcType=CHAR}</otherwise>
</choose>
<if test="status != null and status != 'all'" >
<choose>
<when test="status == 'PROCES' or status == 'PENDNG'"> and batcol.status in('PROCES','PENDNG')</when>
<when test="status == 'PREAUD'"> and batcol.status = '--'</when>
<otherwise> and batcol.status = #{status,jdbcType=CHAR}</otherwise>
</choose>
</if>