select * from b where 1=1
${if(cs='合计',"","and zd='"+cs+"'")}
1、下拉框绑定的数据集里面 加 union all select '合计类型'
2、ds1SQL改下 WHERE 1=1 ${if(下拉控件名=="合计类型",""," AND 类型字段='"+下拉控件名+"'")}