${if(len(年份)==0,""," AND pi.year = '"+年份+"'")}
${if(len(年份)==0,""," AND pi.year in ('"+年份+"')")}
${if(len(年份) == 0,""," and pi.year in ( '" + SUBSTITUTE(年份,",","','") + "')")}
首选修改控件属性,改成字符串,分隔符设置为','
sql为: