SELECT * FROM 订单where1=1${if(type=="","", if(type=="日报"," and date(订购日期)='"+ date +"'",if(type=="月报"," and strftime('%m',订单.订购日期)='"+ month+"'"+" and strftime('%Y',订单.订购日期)='"+ year+"'"," and strftime('%Y',订单.订购日期)='"+ year+"'")))}
SELECT * FROM 订单where1=1${if(len(type)==0,"", if(type=="日报"," and date(订购日期)='"+ date +"'",if(type=="月报"," and strftime('%m',订单.订购日期)='"+ month+"'"+" and strftime('%Y',订单.订购日期)='"+ year+"'"," and strftime('%Y',订单.订购日期)='"+ year+"'")))}