下拉框自定义 jd
实际值 显示值
1 第一季度
2 第二季度
3 第三季度
4 第四季度
select 日期,sum(数据) from 表 where case
when ${jd}=1 then formart(日期,"yyyymm") between year(today())+"01" and year(today())+"03"
when ${jd}=2 then formart(日期,"yyyymm") between year(today())+"04" and year(today())+"06"
when ${jd}=3 then formart(日期,"yyyymm") between year(today())+"07" and year(today())+"09"
when ${jd}=4 then formart(日期,"yyyymm") between year(today())+"10" and year(today())+"12"