YANGNAN(提问者)where 1=1 and b.BUCODE = \'0000100002\'
${if(len(p_hj)==0,\"\",\" AND lvcode3 in (\'\"+p_hj+\"\') \")}
${if(len(p_nxwx)==0,\"\",\" AND lvcode2 in (\'\"+p_nxwx+\"\') \")}
${if(len(p_xj)==0,\"\",\" AND lvcode4 in (\'\"+p_xj+\"\') \")}
${if(len(p_xsz)==0,\"\",\" AND a.saleteamcode in (\'\"+p_xsz+\"\') \")}