${if(ym ='年度累计',"and CASE WHEN SUBSTRING(now(),9,2)>10 THEN left(calmonth,4)=substring(now(),1,4) and calmonth <= concat(substring(now(),1,4),substring(now(),6,2)) ELSE substring(now(),1,4) and calmonth
JL98 回复 慧慧036103(提问者)改成这样试一下
${if(ym =\'年度累计\',\"and CASE WHEN SUBSTRING(now(),9,2)>10 THEN left(calmonth,4)=substring(now(),1,4) and calmonth <= concat(substring(now(),1,4),substring(now(),6,2)) ELSE left(calmonth,4)=substring(now(),1,4) and calmonth 10 THEN calmonth = \'\"+ ym +\"\' ELSE calmonth = \'\"+ ym +\"\'-1 END \")}