from TB_RY_RYCJ,AFIS_QUALITY_CK where TB_RY_RYCJ.RYBH=AFIS_QUALITY_CK.R_RYBH(+) AND (TB_RY_RYCJ.SCBZ='0' or TB_RY_RYCJ.SCBZ is null) AND (IFHB<![CDATA[<>]]>'1' OR IFHB IS NULL)
<iftest="lrdwdm != null and lrdwdm != ''">and LRDWDM like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<iftest="ifslgzd != null and ifslgzd == 1"> and (LRDWDM like '%s%' or LRDWDM like '%S%' or LRDWDM like '%88____')</if>
<iftest="ifslgzd != null and ifslgzd == 2"> and (LRDWDM like '%g%' or LRDWDM like '%G%')</if>
<iftest="ifslgzd != null and ifslgzd == '1'.toString()"> and (LRDWDM like '%s%' or LRDWDM like '%S%' or LRDWDM like '%88____')</if>
<iftest="ifslgzd != null and ifslgzd == '2'.toString()"> and (LRDWDM like '%g%' or LRDWDM like '%G%')</if>
<iftest="flrsjStr != null and flrsjStr != ''"> AND LRSJ <![CDATA[>=]]> to_date(#{flrsjStr, jdbcType=VARCHAR },'yyyy-mm-dd') </if>
<iftest="elrsjStr != null and elrsjStr != ''"> AND LRSJ <![CDATA[<]]> to_date(#{elrsjStr , jdbcType=VARCHAR },'yyyy-mm-dd')+1 </if>