这一段要怎么修改
where 1=1
${if(len(P)==0,"","and t.time1>='"+P+"'")}
${if(len(P)==0,"","and t.time1<='"+Q+"'")}
红框里面的改成这个试试
${if(len(P1) = 0 , "" , "and B.field0011 >= ' + P1 + "' "")}
${if(len(P2) = 0 , "" , "and B.field0011 <= ' + P2 + "' "")}