<if test="itemCodeList != null and itemCodeList.size > 0"> and a.material_code in <foreach collection="itemCodeList" item="itemCode" open="(" close=")" separator="," > #{itemCode} </foreach> </if>
<if test="itemCodeList != null and itemCodeList.size > 0">
and a.material_code in
<foreach collection="itemCodeList" index="index" open="(" close=")" item="itemCode" separator=","> <if test="(index % 999) == 998"> NULL) OR a.material_code IN(</if>#{itemCode} </foreach>
</if>