${if(type=="已录","SELECT decode(h2.dxq,1,'东街','西街') dxq,h1.ht_id , substr(h2.DIANZHAO,1,10) dianzhao , h1.SALE1 , h1.SALE2 , h1.RUN_DATE, h1.ins_date from HETONG_SALE_YJYE h1, HETONG_YJYE h2where h1.HT_ID=h2.HT_IDand 1=1 ${if(len(run_date)==0,"","and h1.run_date=to_date('"+run_date+"','yyyy-mm-dd')")}and 1=1 ${if(len(dianzhao)==0,"","and dianzhao like '%"+dianzhao+"%'")}order by decode(h2.dxq,1,'东街','西街'),h1.ht_id,h1.run_date","select decode(dxq,1,'东街','西街') dxq, HT_ID , substr(DIANZHAO,1,10) dianzhao , 0 sale1 , 0 sale2, to_date('"+run_date+"','yyyy-mm-dd') run_date, to_date('"+run_date+"','yyyy-mm-dd') ins_datefrom hetong_yjyewhere ht_id not in (select distinct ht_id from HETONG_SALE_YJYE where RUN_DATE=to_date('"+run_date+"','yyyy-mm-dd')) and 1=1 ${if(len(dianzhao)==0,"","and dianzhao like '%"+dianzhao+"%'")}order by dxq,ht_id")} 参数type体现不出来?