SqlServer?oracle?mysql?
--------------
select * from tablename where 1=1 ${if(len(开始日期)==0,""," and CONVERT(NVARCHAR(10),MBNY+'-01')>='"+FORMAT(开始日期,"yyyy-MM-01")+"'")}
${if(len(结束日期)==0,""," and CONVERT(NVARCHAR(10),MBNY+'-01')<='"+FORMAT(结束日期,"yyyy-MM-01")+"'")}
-----------