逗号放到字符串里,in后面的东西都去掉

下面这个给你参考下
group by
${if(rqwd="day" ,"a.bill_date" ,"")}
${if(rqwd="week" ,"'W'||date_part('week',to_date(to_char(a.bill_week),'yyyymmdd'))||'('||to_char(a.bill_week)||')'" ,"")}
${if(rqwd="month","substring(to_char(a.bill_month),1,6)","")}
${if(rqwd="year" ,"substring(to_char(a.bill_year),1,4)" ,"")}
${if(dqwd=true,",a.department_name","")}
${if(sqwd=true,",a.region_name","")}
${if(sswd=true,",a.shop_retail","")}
${if(dpwd=true,",a.shop_no","")}
${if(dpwd=true,",a.shop_shotname","")}