数据集是这样的:SELECT [date] ,[wo_no] ,[type] ,[pn] ,[product_qty] ,[unit] ,[basic_start] ,[basic_finish] ,[actual_start] ,[actual_finish_time] ,[PO_Status] ,[producted_qty] ,[remark] FROM dbo.[wo_Status_temp] with(nolock) where 1=1 and wo_Status_temp.date between '${Date From}' and '${Date To}' ${if(len(WO)==0,"","and wo_no ='"+WO+"'")} 没有where条件中的参数就有数据,加了 参数就没数据了 ,奇特地方没做任何设置 |