请问各位大佬,我想将这两组时间都做成可选,当用户选择计划下线时间查询时,就不用选择那组创建时间,当选择创建时间查询的时候,就不用选择那组计划下线时间。下面是我的SQL,请问如何传参,请大佬写详细一点。 select p.FACTORYNAME,p.ORGCODE,p.PRODUCTREQUESTTYPE,p.PRODUCTREQUESTNAME,p.PRODUCTSPECNAME,p.PLANQUANTITY, p.RELEASEDQUANTITY,p.FINISHEDQUANTITY,p.SCRAPPEDQUANTITY,p.BONUSQUANTITY, to_CHAR(p.PLANRELEASEDTIME,'YYYY/MM/DD')PLANRELEASEDTIME, to_CHAR(p.PLANFINISHEDTIME,'YYYY/MM/DD')PLANFINISHEDTIME, to_CHAR(p.CREATETIME,'YYYY/MM/DD')CREATETIME, to_CHAR(p.RELEASETIME,'YYYY/MM/DD')RELEASETIME, p.COMPLETETIME,p.PRODUCTREQUESTSTATE from MES_PRODUCTREQUEST p ,MES_PRODUCTREQUEST t WHERE to_CHAR(p.PLANRELEASEDTIME,'YYYY-MM-DD') BETWEEN '${计划下线开始时间}' AND '${计划下线结束时间}' AND to_CHAR(t.CREATETIME,'YYYY-MM-DD') BETWEEN '${创建开始时间}' AND '${创建结束时间}' and p.PRODUCTREQUESTNAME=t.PRODUCTREQUESTNAME and p.FACTORYNAME=t.FACTORYNAME |