in ('"+replace(货号," ","','")+"')
-----------
${if(len(货号)==0,"","AND A.产品编号 in ('"+replace(货号," ","','")+"')")}
改成这样就行了。