写法错误
XXXwhere "+内部条件+" =1XXX
==============
拼接有问题,少符号了,可以的话,贴出语句,帮你修改下
===========
${if(按钮="收货", "SELECT .......... FROM ......... WHERE 1=1 "
+ if(len(WMS系统) == 0,"","and cvsprod.srv_so.wms_system in ('" + joinarray(split(WMS系统,","),"','") +"')")
+ "GROUP BY ......","第二个SQL")}