<if test="ids!=null and ids.size > 0">
and (x.CNC_ID in
<foreach collection="ids" open="(" close=")" separator="," item="i" index="index">
<if test="index != 0 and index % 999 == 0">
#{i}) or x.CNC_ID in (
</if>
#{i}
</foreach>
)
<if test="ids!=null and ids.size > 0">
and (x.CNC_ID in
<foreach collection="ids" open="(" close=")" separator="," item="i" index="index">
<if test="index != 0 and index % 999 == 0">
#{i}) or x.CNC_ID in (
</if>
#{i}
</foreach>
)