射手座、(提问者)SELECT
VEHICLE_TYPE,
SUM(MONEY) SUM_MONEY,
COUNT(*) CNT
${if(statisticsType==0,\",DATE_FORMAT(CREATE_TIME,\'%Y-%m\') work_date
FROM t_sjz_month_ticket
WHERE CREATE_TIME >= \'\"+year+\"-01-01\' AND CREATE_TIME < DATE_ADD(\'\"+year+\"-01-01\',INTERVAL 1 year)
GROUP BY VEHICLE_TYPE,DATE_FORMAT(CREATE_TIME,\'%Y-%m\')
ORDER BY DATE_FORMAT(CREATE_TIME,\'%Y-%m\')\",\"\")}
${if(statisticsType==1,\",DATE_FORMAT(CREATE_TIME,\'%Y-%m-%d\') work_date
FROM t_sjz_month_ticket
WHERE CREATE_TIME >= \'\"+yearMonth+\"-01\' AND CREATE_TIME < DATE_ADD(\'\"+yearMonth+\"-01\',INTERVAL 1 month)
GROUP BY VEHICLE_TYPE,DATE_FORMAT(CREATE_TIME,\'%Y-%m-%d\')
ORDER BY DATE_FORMAT(CREATE_TIME,\'%Y-%m-%d\')\",\"\")}
以上是报表SQL,再没有其他的设置