这个引号是中文状态下,改成英文状态的,然后${}中 你的拼接也有问题
建议拷贝语句贴出来,给你修改
======
select budget_date,department_name,a.subject_name_2 as subject_name from "L2"."subject_budget_marketing_rd_detail_new" a
where department_type='rd'
and budget_type='存里'
${if(find('财务部',GETUSERDEPARTMENTS())>0&& Fine_role="预算管控", "and department_name in ('"+GETUSERDEPARTMENTS()+"')","")}
group by budget_date,department_name,subject_name_2,subject_no
order by budget_date asc,department_name asc,subject_name_2 asc