多了一个括号
你写错了,格式是这样的,${if(len(Workshop) = 2,""," AND eql_Location = '" + Workshop + "'")}
${if(len(部门)=0,""," and c.DEPTCODE = ('"+部门+"')")}