select * from tabname
where 1=1
-- 排查方向
-- 先执行select TO_CHAR(O.Requestedshipdate + '8 / 24', 'yyyy-mm-dd hh24:mi') -- 查看结果是什么= =#,与参数值能匹配?
and TO_CHAR(O.Requestedshipdate + '8 / 24', 'yyyy-mm-dd hh24:mi') >= '${start_date}'
and TO_CHAR(O.Requestedshipdate + '8 / 24', 'yyyy-mm-dd hh24:mi') <= '${end_date}'
-- 注意参数wbdh的分隔符',' -- wlbm,scdd,ckdlx雷同
-- =号切换成in
${if(len(wbdh) =0,"","and O.EXTERNORDERKEY IN ('"+wbdh+"')")}
${if(len(wlbm) =0,"","and OD.SKU IN ('"+wlbm+"')")}
${if(len(scdd) =0,"","and o.notes IN ('"+scdd+"')")}
${if(len(ckdlx)=0,"","and ot.description IN ('"+ckdlx+"')")}
===========
select * from tabname
where 1=1
-- 排查方向
-- 先执行select TO_CHAR(O.Requestedshipdate + '8 / 24', 'yyyy-mm-dd hh24:mi') -- 查看结果是什么= =#,与参数值能匹配?
${if(len(start_date)=0 && len(end_date)=0,""," and 过滤语句")}
-- and TO_CHAR(O.Requestedshipdate + '8 / 24', 'yyyy-mm-dd hh24:mi') >= '${start_date}'
-- and TO_CHAR(O.Requestedshipdate + '8 / 24', 'yyyy-mm-dd hh24:mi') <= '${end_date}'
-- 注意参数wbdh的分隔符',' -- wlbm,scdd,ckdlx雷同
-- =号切换成in
${if(len(wbdh) =0,"","and O.EXTERNORDERKEY IN ('"+wbdh+"')")}
${if(len(wlbm) =0,"","and OD.SKU IN ('"+wlbm+"')")}
${if(len(scdd) =0,"","and o.notes IN ('"+scdd+"')")}
${if(len(ckdlx)=0,"","and ot.description IN ('"+ckdlx+"')")}