应该是语句拼接错误,应该用and(),不能用&&:
方法一(写两条):
${if(and(len(销售员)==0,fine_username!="sa"),"and 地区 in ('"+fine_role+"')","and 销售员 in ('"+销售员+"')")}
${if(and(len(销售员)==0,fine_username=="sa"),"","and 销售员 in ('"+销售员+"')")}
方法二:
${if(and(len(销售员)==0,fine_username=="sa"),"",if(and(len(销售员)>0,fine_username=="sa"),"and 销售员 in ('"+销售员+"')",if(and(len(销售员)==0,fine_username!="sa"),"and 地区 in ('"+fine_role+"')","and 销售员 in ('"+销售员+"')")))}